refactor: move zod import from validation package to zod (#2111)

* refactor: move zod import from validation package to zod

* refactor: move missing zod imports
This commit is contained in:
Meier Lukas
2025-01-26 22:16:27 +01:00
committed by GitHub
parent 1146c59a41
commit c43a2f0488
91 changed files with 153 additions and 99 deletions

View File

@@ -48,7 +48,8 @@
"react": "19.0.0",
"react-dom": "19.0.0",
"superjson": "2.2.2",
"trpc-to-openapi": "^2.1.2"
"trpc-to-openapi": "^2.1.2",
"zod": "^3.24.1"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",

View File

@@ -1,4 +1,5 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import type { Session } from "@homarr/auth";
import { hasQueryAccessToIntegrationsAsync } from "@homarr/auth/server";
@@ -9,7 +10,6 @@ import type { Database } from "@homarr/db";
import { and, eq, inArray } from "@homarr/db";
import { integrations } from "@homarr/db/schema";
import type { IntegrationKind } from "@homarr/definitions";
import { z } from "@homarr/validation";
import { publicProcedure } from "../trpc";

View File

@@ -1,9 +1,9 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { and, eq } from "@homarr/db";
import { items } from "@homarr/db/schema";
import type { WidgetKind } from "@homarr/definitions";
import { z } from "@homarr/validation";
import { publicProcedure } from "../trpc";

View File

@@ -1,10 +1,11 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { asc, createId, eq, inArray, like } from "@homarr/db";
import { apps } from "@homarr/db/schema";
import { selectAppSchema } from "@homarr/db/validationSchemas";
import { getIconForName } from "@homarr/icons";
import { validation, z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { convertIntersectionToZodObject } from "../schema-merger";
import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure, publicProcedure } from "../trpc";

View File

@@ -1,5 +1,6 @@
import { TRPCError } from "@trpc/server";
import superjson from "superjson";
import { z } from "zod";
import { constructBoardPermissions } from "@homarr/auth/shared";
import type { DeviceType } from "@homarr/common/server";
@@ -25,7 +26,7 @@ import { importOldmarrAsync } from "@homarr/old-import";
import { importJsonFileSchema } from "@homarr/old-import/shared";
import { oldmarrConfigSchema } from "@homarr/old-schema";
import type { BoardItemAdvancedOptions } from "@homarr/validation";
import { createSectionSchema, sharedItemSchema, validation, z, zodUnionFromArray } from "@homarr/validation";
import { createSectionSchema, sharedItemSchema, validation, zodUnionFromArray } from "@homarr/validation";
import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure, publicProcedure } from "../trpc";
import { throwIfActionForbiddenAsync } from "./board/board-access";

View File

@@ -1,4 +1,5 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { db, like, or } from "@homarr/db";
import { icons } from "@homarr/db/schema";
@@ -6,7 +7,6 @@ import { DockerSingleton } from "@homarr/docker";
import type { Container, ContainerInfo, ContainerState, Docker, Port } from "@homarr/docker";
import { logger } from "@homarr/log";
import { createCacheChannel } from "@homarr/redis";
import { z } from "@homarr/validation";
import { createTRPCRouter, permissionRequiredProcedure } from "../../trpc";

View File

@@ -1,10 +1,11 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import type { Database } from "@homarr/db";
import { and, createId, eq, like, not, sql } from "@homarr/db";
import { groupMembers, groupPermissions, groups } from "@homarr/db/schema";
import { everyoneGroup } from "@homarr/definitions";
import { validation, z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { createTRPCRouter, onboardingProcedure, permissionRequiredProcedure, protectedProcedure } from "../trpc";
import { throwIfCredentialsDisabled } from "./invite/checks";

View File

@@ -1,10 +1,11 @@
import { z } from "zod";
import { analyseOldmarrImportForRouterAsync, analyseOldmarrImportInputSchema } from "@homarr/old-import/analyse";
import {
ensureValidTokenOrThrow,
importInitialOldmarrAsync,
importInitialOldmarrInputSchema,
} from "@homarr/old-import/import";
import { z } from "@homarr/validation";
import { createTRPCRouter, onboardingProcedure } from "../../trpc";
import { nextOnboardingStepAsync } from "../onboard/onboard-queries";

View File

@@ -1,4 +1,5 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { objectEntries } from "@homarr/common";
import { decryptSecret, encryptSecret } from "@homarr/common/server";
@@ -23,7 +24,7 @@ import {
integrationSecretKindObject,
} from "@homarr/definitions";
import { integrationCreator } from "@homarr/integrations";
import { validation, z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { createOneIntegrationMiddleware } from "../../middlewares/integration";
import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure, publicProcedure } from "../../trpc";

View File

@@ -1,10 +1,10 @@
import { randomBytes } from "crypto";
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { asc, createId, eq } from "@homarr/db";
import { invites } from "@homarr/db/schema";
import { selectInviteSchema } from "@homarr/db/validationSchemas";
import { z } from "@homarr/validation";
import { createTRPCRouter, permissionRequiredProcedure } from "../trpc";
import { throwIfCredentialsDisabled } from "./invite/checks";

View File

@@ -1,5 +1,6 @@
import type { z } from "zod";
import { fetchWithTimeout } from "@homarr/common";
import type { z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { createTRPCRouter, publicProcedure } from "../trpc";

View File

@@ -1,10 +1,11 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import type { InferInsertModel } from "@homarr/db";
import { and, createId, desc, eq, like } from "@homarr/db";
import { iconRepositories, icons, medias } from "@homarr/db/schema";
import { createLocalImageUrl, LOCAL_ICON_REPOSITORY_SLUG, mapMediaToIcon } from "@homarr/icons/local";
import { validation, z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure } from "../../trpc";

View File

@@ -1,6 +1,8 @@
import { z } from "zod";
import { onboarding } from "@homarr/db/schema";
import { onboardingSteps } from "@homarr/definitions";
import { z, zodEnumFromArray } from "@homarr/validation";
import { zodEnumFromArray } from "@homarr/validation";
import { createTRPCRouter, publicProcedure } from "../../trpc";
import { getOnboardingOrFallbackAsync, nextOnboardingStepAsync } from "./onboard-queries";

View File

@@ -1,10 +1,11 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { asc, createId, eq, like, sql } from "@homarr/db";
import { getServerSettingByKeyAsync } from "@homarr/db/queries";
import { searchEngines, users } from "@homarr/db/schema";
import { integrationCreator } from "@homarr/integrations";
import { validation, z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { createOneIntegrationMiddleware } from "../../middlewares/integration";
import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure, publicProcedure } from "../../trpc";

View File

@@ -1,7 +1,9 @@
import { z } from "zod";
import { getServerSettingByKeyAsync, getServerSettingsAsync, updateServerSettingByKeyAsync } from "@homarr/db/queries";
import type { ServerSettings } from "@homarr/server-settings";
import { defaultServerSettingsKeys } from "@homarr/server-settings";
import { validation, z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { createTRPCRouter, onboardingProcedure, permissionRequiredProcedure, publicProcedure } from "../trpc";
import { nextOnboardingStepAsync } from "./onboard/onboard-queries";

View File

@@ -1,4 +1,5 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { createSaltAsync, hashPasswordAsync } from "@homarr/auth";
import type { Database } from "@homarr/db";
@@ -8,7 +9,7 @@ import { selectUserSchema } from "@homarr/db/validationSchemas";
import { credentialsAdminGroup } from "@homarr/definitions";
import type { SupportedAuthProvider } from "@homarr/definitions";
import { logger } from "@homarr/log";
import { validation, z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { convertIntersectionToZodObject } from "../schema-merger";
import {

View File

@@ -1,8 +1,8 @@
import { observable } from "@trpc/server/observable";
import { z } from "zod";
import { sendPingRequestAsync } from "@homarr/ping";
import { pingChannel, pingUrlChannel } from "@homarr/redis";
import { z } from "@homarr/validation";
import { createTRPCRouter, publicProcedure } from "../../trpc";

View File

@@ -1,7 +1,8 @@
import { z } from "zod";
import { getIntegrationKindsByCategory } from "@homarr/definitions";
import { radarrReleaseTypes } from "@homarr/integrations/types";
import { calendarMonthRequestHandler } from "@homarr/request-handler/calendar";
import { z } from "@homarr/validation";
import { createManyIntegrationMiddleware } from "../../middlewares/integration";
import { createTRPCRouter, publicProcedure } from "../../trpc";

View File

@@ -1,4 +1,5 @@
import { observable } from "@trpc/server/observable";
import { z } from "zod";
import type { Modify } from "@homarr/common/types";
import type { Integration } from "@homarr/db/schema";
@@ -7,7 +8,6 @@ import { getIntegrationKindsByCategory } from "@homarr/definitions";
import type { DownloadClientJobsAndStatus } from "@homarr/integrations";
import { downloadClientItemSchema, integrationCreator } from "@homarr/integrations";
import { downloadClientRequestHandler } from "@homarr/request-handler/downloads";
import { z } from "@homarr/validation";
import type { IntegrationAction } from "../../middlewares/integration";
import { createManyIntegrationMiddleware } from "../../middlewares/integration";

View File

@@ -1,11 +1,11 @@
import { observable } from "@trpc/server/observable";
import { z } from "zod";
import { getIntegrationKindsByCategory } from "@homarr/definitions";
import { integrationCreator, MediaRequestStatus } from "@homarr/integrations";
import type { MediaRequest } from "@homarr/integrations/types";
import { mediaRequestListRequestHandler } from "@homarr/request-handler/media-request-list";
import { mediaRequestStatsRequestHandler } from "@homarr/request-handler/media-request-stats";
import { z } from "@homarr/validation";
import { createManyIntegrationMiddleware, createOneIntegrationMiddleware } from "../../middlewares/integration";
import { createTRPCRouter, protectedProcedure, publicProcedure } from "../../trpc";

View File

@@ -1,9 +1,9 @@
import { TRPCError } from "@trpc/server";
import SuperJSON from "superjson";
import { z } from "zod";
import { eq } from "@homarr/db";
import { items } from "@homarr/db/schema";
import { z } from "@homarr/validation";
import { createTRPCRouter, protectedProcedure } from "../../trpc";

View File

@@ -1,5 +1,6 @@
import { z } from "zod";
import { rssFeedsRequestHandler } from "@homarr/request-handler/rss-feeds";
import { z } from "@homarr/validation";
import { createTRPCRouter, publicProcedure } from "../../trpc";

View File

@@ -1,9 +1,9 @@
import { observable } from "@trpc/server/observable";
import { z } from "zod";
import { getIntegrationKindsByCategory } from "@homarr/definitions";
import { integrationCreator } from "@homarr/integrations";
import { smartHomeEntityStateRequestHandler } from "@homarr/request-handler/smart-home-entity-state";
import { z } from "@homarr/validation";
import type { IntegrationAction } from "../../middlewares/integration";
import { createOneIntegrationMiddleware } from "../../middlewares/integration";

View File

@@ -1,5 +1,5 @@
import type { AnyZodObject, ZodIntersection, ZodObject } from "@homarr/validation";
import { z } from "@homarr/validation";
import { z } from "zod";
import type { AnyZodObject, ZodIntersection, ZodObject } from "zod";
export function convertIntersectionToZodObject<TIntersection extends ZodIntersection<AnyZodObject, AnyZodObject>>(
intersection: TIntersection,

View File

@@ -9,6 +9,7 @@
import { initTRPC, TRPCError } from "@trpc/server";
import superjson from "superjson";
import type { OpenApiMeta } from "trpc-to-openapi";
import { ZodError } from "zod";
import type { Session } from "@homarr/auth";
import { FlattenError } from "@homarr/common";
@@ -16,7 +17,6 @@ import { userAgent } from "@homarr/common/server";
import { db } from "@homarr/db";
import type { GroupPermissionKey, OnboardingStep } from "@homarr/definitions";
import { logger } from "@homarr/log";
import { ZodError } from "@homarr/validation";
import { getOnboardingOrFallbackAsync } from "./router/onboard/onboard-queries";

View File

@@ -38,7 +38,8 @@
"next-auth": "5.0.0-beta.25",
"pretty-print-error": "^1.1.2",
"react": "19.0.0",
"react-dom": "19.0.0"
"react-dom": "19.0.0",
"zod": "^3.24.1"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",

View File

@@ -1,10 +1,11 @@
import bcrypt from "bcrypt";
import type { z } from "zod";
import type { Database } from "@homarr/db";
import { and, eq } from "@homarr/db";
import { users } from "@homarr/db/schema";
import { logger } from "@homarr/log";
import type { validation, z } from "@homarr/validation";
import type { validation } from "@homarr/validation";
export const authorizeWithBasicCredentialsAsync = async (
db: Database,

View File

@@ -1,4 +1,5 @@
import { CredentialsSignin } from "@auth/core/errors";
import { z } from "zod";
import { extractErrorMessage } from "@homarr/common";
import type { Database, InferInsertModel } from "@homarr/db";
@@ -6,7 +7,6 @@ import { and, createId, eq } from "@homarr/db";
import { users } from "@homarr/db/schema";
import { logger } from "@homarr/log";
import type { validation } from "@homarr/validation";
import { z } from "@homarr/validation";
import { env } from "../../../env";
import { LdapClient } from "../ldap-client";

View File

@@ -1,6 +1,5 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { z } from "@homarr/validation";
import { z } from "zod";
import { expireDateAfter, generateSessionToken } from "../session";

View File

@@ -26,7 +26,8 @@
"@homarr/common": "workspace:^0.1.0",
"@homarr/translation": "workspace:^0.1.0",
"@homarr/validation": "workspace:^0.1.0",
"@mantine/form": "^7.16.2"
"@mantine/form": "^7.16.2",
"zod": "^3.24.1"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",

View File

@@ -1,8 +1,8 @@
import { useForm, zodResolver } from "@mantine/form";
import { z } from "zod";
import type { AnyZodObject, ZodDiscriminatedUnion, ZodEffects, ZodIntersection } from "zod";
import { useI18n } from "@homarr/translation/client";
import { z } from "@homarr/validation";
import type { AnyZodObject, ZodDiscriminatedUnion, ZodEffects, ZodIntersection } from "@homarr/validation";
import { zodErrorMap } from "@homarr/validation/form";
export const useZodForm = <

View File

@@ -1,6 +1,7 @@
import type { ErrorMapCtx, z, ZodTooBigIssue, ZodTooSmallIssue } from "zod";
import { ZodIssueCode } from "zod";
import type { TranslationObject } from "@homarr/translation";
import type { ErrorMapCtx, z, ZodTooBigIssue, ZodTooSmallIssue } from "@homarr/validation";
import { ZodIssueCode } from "@homarr/validation";
const handleStringError = (issue: z.ZodInvalidStringIssue) => {
if (typeof issue.validation === "object") {

View File

@@ -38,7 +38,8 @@
"@jellyfin/sdk": "^0.11.0",
"proxmox-api": "1.1.1",
"undici": "7.3.0",
"xml2js": "^0.6.2"
"xml2js": "^0.6.2",
"zod": "^3.24.1"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const statsResponseSchema = z.object({
time_units: z.enum(["hours", "days"]),

View File

@@ -1,10 +1,10 @@
import type { Response } from "undici";
import { z } from "zod";
import { extractErrorMessage, removeTrailingSlash } from "@homarr/common";
import type { IntegrationSecretKind } from "@homarr/definitions";
import { logger } from "@homarr/log";
import type { TranslationObject } from "@homarr/translation";
import { z } from "@homarr/validation";
import { IntegrationTestConnectionError } from "./test-connection-error";
import type { IntegrationSecret } from "./types";

View File

@@ -1,5 +1,6 @@
import { z } from "zod";
import { FlattenError } from "@homarr/common";
import { z } from "@homarr/validation";
import type { TestConnectionError } from "./integration";

View File

@@ -3,9 +3,9 @@ import { humanFileSize } from "@homarr/common";
import "@homarr/redis";
import dayjs from "dayjs";
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { z } from "@homarr/validation";
import { createChannelEventHistory } from "../../../redis/src/lib/channel";
import { Integration } from "../base/integration";

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const queueSchema = z.object({
queue: z.object({

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const entityStateSchema = z.object({
attributes: z.record(

View File

@@ -1,5 +1,6 @@
import { z } from "zod";
import type { Integration } from "@homarr/db/schema";
import { z } from "@homarr/validation";
const usenetQueueState = ["downloading", "queued", "paused"] as const;
const usenetHistoryState = ["completed", "failed", "processing"] as const;

View File

@@ -1,6 +1,7 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import type { CalendarEvent } from "../../calendar-types";
import { MediaOrganizerIntegration } from "../media-organizer-integration";

View File

@@ -1,7 +1,8 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import type { AtLeastOneOf } from "@homarr/common/types";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import type { CalendarEvent } from "../../calendar-types";
import { radarrReleaseTypes } from "../../calendar-types";

View File

@@ -1,6 +1,7 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import type { CalendarEvent } from "../../calendar-types";
import { MediaOrganizerIntegration } from "../media-organizer-integration";

View File

@@ -1,6 +1,7 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import type { CalendarEvent } from "../../calendar-types";
import { MediaOrganizerIntegration } from "../media-organizer-integration";

View File

@@ -1,5 +1,6 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { z } from "@homarr/validation";
import { Integration } from "../base/integration";
import type { TdarrQueue } from "../interfaces/media-transcoding/queue";

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const getStatisticsSchema = z.object({
totalFileCount: z.number(),

View File

@@ -1,6 +1,7 @@
import { z } from "zod";
import { fetchWithTrustedCertificatesAsync } from "@homarr/certificates/server";
import { logger } from "@homarr/log";
import { z } from "@homarr/validation";
import { Integration } from "../base/integration";
import type { ISearchableIntegration } from "../base/searchable-integration";

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const summaryResponseSchema = z.object({
status: z.enum(["enabled", "disabled"]),

View File

@@ -1,4 +1,4 @@
import { z } from "@homarr/validation";
import { z } from "zod";
export const indexerResponseSchema = z.object({
id: z.number(),

View File

@@ -37,7 +37,8 @@
"dayjs": "^1.11.13",
"next": "15.1.6",
"react": "19.0.0",
"react-dom": "19.0.0"
"react-dom": "19.0.0",
"zod": "^3.24.1"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",

View File

@@ -1,6 +1,7 @@
import { useState } from "react";
import { Button, FileInput, Group, Radio, Stack, TextInput } from "@mantine/core";
import { IconFileUpload } from "@tabler/icons-react";
import { z } from "zod";
import { clientApi } from "@homarr/api/client";
import { revalidatePathActionAsync } from "@homarr/common/client";
@@ -12,7 +13,6 @@ import type { OldmarrImportConfiguration } from "@homarr/old-import/shared";
import { oldmarrImportConfigurationSchema, superRefineJsonImportFile } from "@homarr/old-import/shared";
import { oldmarrConfigSchema } from "@homarr/old-schema";
import { useI18n, useScopedI18n } from "@homarr/translation/client";
import { z } from "@homarr/validation";
import { useBoardNameStatus } from "./add-board-modal";

View File

@@ -1,4 +1,5 @@
import { Button, Group, Image, List, LoadingOverlay, Stack, Text, TextInput } from "@mantine/core";
import { z } from "zod";
import type { RouterOutputs } from "@homarr/api";
import { clientApi } from "@homarr/api/client";
@@ -6,7 +7,6 @@ import { useZodForm } from "@homarr/form";
import { createModal } from "@homarr/modals";
import { showErrorNotification, showSuccessNotification } from "@homarr/notifications";
import { useI18n } from "@homarr/translation/client";
import { z } from "@homarr/validation";
interface AddDockerAppToHomarrProps {
selectedContainers: RouterOutputs["docker"]["getContainers"]["containers"];

View File

@@ -1,2 +1 @@
export * from "./src";
export * from "zod";

View File

@@ -64,7 +64,8 @@
"next": "15.1.6",
"react": "19.0.0",
"react-dom": "19.0.0",
"video.js": "^8.21.0"
"video.js": "^8.21.0",
"zod": "^3.24.1"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",

View File

@@ -1,8 +1,8 @@
import { IconCalendar } from "@tabler/icons-react";
import { z } from "zod";
import { getIntegrationKindsByCategory } from "@homarr/definitions";
import { radarrReleaseTypes } from "@homarr/integrations/types";
import { z } from "@homarr/validation";
import { createWidgetDefinition } from "../definition";
import { optionsBuilder } from "../options";

View File

@@ -1,8 +1,8 @@
import { IconDownload } from "@tabler/icons-react";
import { z } from "zod";
import { getIntegrationKindsByCategory } from "@homarr/definitions";
import type { ExtendedDownloadClientItem } from "@homarr/integrations";
import { z } from "@homarr/validation";
import { createWidgetDefinition } from "../definition";
import { optionsBuilder } from "../options";

View File

@@ -1,6 +1,5 @@
import { IconTransform } from "@tabler/icons-react";
import { z } from "@homarr/validation";
import { z } from "zod";
import { createWidgetDefinition } from "../definition";
import { optionsBuilder } from "../options";

View File

@@ -1,6 +1,5 @@
import { IconBrandMinecraft } from "@tabler/icons-react";
import { z } from "@homarr/validation";
import { z } from "zod";
import { createWidgetDefinition } from "../../definition";
import { optionsBuilder } from "../../options";

View File

@@ -2,13 +2,13 @@
import { useState } from "react";
import { Button, Group, Stack } from "@mantine/core";
import { z } from "zod";
import { objectEntries } from "@homarr/common";
import type { WidgetKind } from "@homarr/definitions";
import { zodResolver } from "@homarr/form";
import { createModal, useModalAction } from "@homarr/modals";
import { useI18n } from "@homarr/translation/client";
import { z } from "@homarr/validation";
import { zodErrorMap } from "@homarr/validation/form";
import { widgetImports } from "..";

View File

@@ -1,10 +1,10 @@
import type React from "react";
import type { DraggableAttributes, UniqueIdentifier } from "@dnd-kit/core";
import type { ActionIconProps } from "@mantine/core";
import { z } from "zod";
import type { ZodType } from "zod";
import type { IntegrationKind } from "@homarr/definitions";
import type { ZodType } from "@homarr/validation";
import { z } from "@homarr/validation";
import type { inferSelectOptionValue, SelectOption } from "./_inputs/widget-select-input";

View File

@@ -1,6 +1,5 @@
import { IconRss } from "@tabler/icons-react";
import { z } from "@homarr/validation";
import { z } from "zod";
import { createWidgetDefinition } from "../definition";
import { optionsBuilder } from "../options";

View File

@@ -1,7 +1,6 @@
import { IconCloud } from "@tabler/icons-react";
import dayjs from "dayjs";
import { z } from "@homarr/validation";
import { z } from "zod";
import { createWidgetDefinition } from "../definition";
import { optionsBuilder } from "../options";