feat: add weather widget (#286)

* feat: add nestjs replacement, remove nestjs

* feat: add weather widget

* fix: lock issue

* fix: format issue

* fix: deepsource issues

* fix: change timezone to auto
This commit is contained in:
Meier Lukas
2024-04-13 11:34:55 +02:00
committed by GitHub
parent 7fb0decd5b
commit 80d2d485b8
19 changed files with 762 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import type { WidgetKind } from "@homarr/definitions";
import { Center } from "@homarr/ui";
import { widgetImports } from "@homarr/widgets";
import { env } from "~/env.mjs";
import { WidgetPreviewPageContent } from "./_content";
interface Props {
@@ -12,7 +13,7 @@ interface Props {
}
export default async function WidgetPreview(props: Props) {
if (!(props.params.kind in widgetImports)) {
if (!(props.params.kind in widgetImports || env.NODE_ENV !== "development")) {
notFound();
}

View File

@@ -12,6 +12,9 @@ export const env = createEnv({
.optional()
.transform((url) => (url ? `https://${url}` : undefined)),
PORT: z.coerce.number().default(3000),
NODE_ENV: z
.enum(["development", "production", "test"])
.default("development"),
},
/**
* Specify your server-side environment variables schema here. This way you can ensure the app isn't
@@ -49,6 +52,7 @@ export const env = createEnv({
DB_NAME: process.env.DB_NAME,
DB_PORT: process.env.DB_PORT,
DB_DRIVER: process.env.DB_DRIVER,
NODE_ENV: process.env.NODE_ENV,
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
},
skipValidation: