diff --git a/.gitignore b/.gitignore index e81335cbf..91c18132f 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,7 @@ yarn-error.log* apps/tasks/tasks.cjs apps/websocket/wssServer.cjs apps/nextjs/.million/ + + +#personal backgrounds +apps/nextjs/public/images/background.png \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 84dd7000b..0263499bb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,11 +9,17 @@ "js/ts.implicitProjectConfig.experimentalDecorators": true, "prettier.configPath": "./tooling/prettier/index.mjs", "cSpell.words": [ + "ajnart", "cqmin", + "gridstack", "homarr", "jellyfin", "mantine", + "manuel-rw", + "Meierschlumpf", "overseerr", + "Sabnzbd", + "SeDemal", "Sonarr", "superjson", "tabler", diff --git a/apps/nextjs/package.json b/apps/nextjs/package.json index 82be0f98d..7b96c572f 100644 --- a/apps/nextjs/package.json +++ b/apps/nextjs/package.json @@ -28,6 +28,7 @@ "@homarr/log": "workspace:^", "@homarr/modals": "workspace:^0.1.0", "@homarr/notifications": "workspace:^0.1.0", + "@homarr/old-schema": "workspace:^0.1.0", "@homarr/server-settings": "workspace:^0.1.0", "@homarr/spotlight": "workspace:^0.1.0", "@homarr/translation": "workspace:^0.1.0", @@ -41,10 +42,10 @@ "@mantine/tiptap": "^7.12.2", "@million/lint": "1.0.0-rc.84", "@t3-oss/env-nextjs": "^0.11.1", - "@tabler/icons-react": "^3.14.0", - "@tanstack/react-query": "^5.55.0", - "@tanstack/react-query-devtools": "^5.55.0", - "@tanstack/react-query-next-experimental": "5.55.0", + "@tabler/icons-react": "^3.16.0", + "@tanstack/react-query": "^5.56.2", + "@tanstack/react-query-devtools": "^5.56.2", + "@tanstack/react-query-next-experimental": "5.56.2", "@trpc/client": "next", "@trpc/next": "next", "@trpc/react-query": "next", @@ -52,7 +53,7 @@ "@xterm/addon-canvas": "^0.7.0", "@xterm/addon-fit": "0.10.0", "@xterm/xterm": "^5.5.0", - "chroma-js": "^3.0.0", + "chroma-js": "^3.1.1", "clsx": "^2.1.1", "dayjs": "^1.11.13", "dotenv": "^16.4.5", @@ -60,7 +61,7 @@ "glob": "^11.0.0", "jotai": "^2.9.3", "mantine-react-table": "2.0.0-beta.6", - "next": "^14.2.8", + "next": "^14.2.11", "postcss-preset-mantine": "^1.17.0", "prismjs": "^1.29.0", "react": "^18.3.1", @@ -82,10 +83,10 @@ "@types/react": "^18.3.5", "@types/react-dom": "^18.3.0", "@types/swagger-ui-react": "^4.18.3", - "concurrently": "^8.2.2", - "eslint": "^9.9.1", + "concurrently": "^9.0.1", + "eslint": "^9.10.0", "node-loader": "^2.0.0", "prettier": "^3.3.3", - "typescript": "^5.5.4" + "typescript": "^5.6.2" } } diff --git a/apps/nextjs/src/app/[locale]/_client-providers/trpc.tsx b/apps/nextjs/src/app/[locale]/_client-providers/trpc.tsx index ff3078ae6..8583ac24f 100644 --- a/apps/nextjs/src/app/[locale]/_client-providers/trpc.tsx +++ b/apps/nextjs/src/app/[locale]/_client-providers/trpc.tsx @@ -5,7 +5,15 @@ import { useState } from "react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; import { ReactQueryStreamedHydration } from "@tanstack/react-query-next-experimental"; -import { createWSClient, loggerLink, unstable_httpBatchStreamLink, wsLink } from "@trpc/client"; +import { + createWSClient, + httpLink, + isNonJsonSerializable, + loggerLink, + splitLink, + unstable_httpBatchStreamLink, + wsLink, +} from "@trpc/client"; import superjson from "superjson"; import type { AppRouter } from "@homarr/api"; @@ -34,18 +42,29 @@ export function TRPCReactProvider(props: PropsWithChildren) { enabled: (opts) => process.env.NODE_ENV === "development" || (opts.direction === "down" && opts.result instanceof Error), }), - (args) => { - return ({ op, next }) => { - console.log("op", op.type, op.input, op.path, op.id); - if (op.type === "subscription") { - const link = wsLink({ - client: wsClient, - transformer: superjson, - }); - return link(args)({ op, next }); - } - - return unstable_httpBatchStreamLink({ + splitLink({ + condition: ({ type }) => type === "subscription", + true: wsLink({ + client: wsClient, + transformer: superjson, + }), + false: splitLink({ + condition: ({ input }) => isNonJsonSerializable(input), + true: httpLink({ + /** + * We don't want to transform the data here as we want to use form data + */ + transformer: { + serialize(object: unknown) { + return object; + }, + deserialize(data: unknown) { + return data; + }, + }, + url: `${getBaseUrl()}/api/trpc`, + }), + false: unstable_httpBatchStreamLink({ transformer: superjson, url: `${getBaseUrl()}/api/trpc`, headers() { @@ -53,9 +72,9 @@ export function TRPCReactProvider(props: PropsWithChildren) { headers.set("x-trpc-source", "nextjs-react"); return headers; }, - })(args)({ op, next }); - }; - }, + }), + }), + }), ], }); }); diff --git a/apps/nextjs/src/app/[locale]/boards/(content)/_creator.tsx b/apps/nextjs/src/app/[locale]/boards/(content)/_creator.tsx index fe56c11ea..6a6be9b42 100644 --- a/apps/nextjs/src/app/[locale]/boards/(content)/_creator.tsx +++ b/apps/nextjs/src/app/[locale]/boards/(content)/_creator.tsx @@ -4,6 +4,9 @@ import { TRPCError } from "@trpc/server"; // Placed here because gridstack styles are used for board content import "~/styles/gridstack.scss"; +import { IntegrationProvider } from "@homarr/auth/client"; +import { auth } from "@homarr/auth/next"; +import { getIntegrationsWithPermissionsAsync } from "@homarr/auth/server"; import { getI18n } from "@homarr/translation/server"; import { createMetaTitle } from "~/metadata"; @@ -27,8 +30,16 @@ export const createBoardContentPage = >( getInitialBoardAsync: getInitialBoard, isBoardContentPage: true, }), - page: () => { - return ; + // eslint-disable-next-line no-restricted-syntax + page: async () => { + const session = await auth(); + const integrations = await getIntegrationsWithPermissionsAsync(session); + + return ( + + + + ); }, generateMetadataAsync: async ({ params }: { params: TParams }): Promise => { try { diff --git a/apps/nextjs/src/app/[locale]/layout.tsx b/apps/nextjs/src/app/[locale]/layout.tsx index ae7c4600c..c1b37045b 100644 --- a/apps/nextjs/src/app/[locale]/layout.tsx +++ b/apps/nextjs/src/app/[locale]/layout.tsx @@ -12,6 +12,7 @@ import { ModalProvider } from "@homarr/modals"; import { Notifications } from "@homarr/notifications"; import { Analytics } from "~/components/layout/analytics"; +import { SearchEngineOptimization } from "~/components/layout/search-engine-optimization"; import { JotaiProvider } from "./_client-providers/jotai"; import { CustomMantineProvider } from "./_client-providers/mantine"; import { NextInternationalProvider } from "./_client-providers/next-international"; @@ -70,6 +71,7 @@ export default async function Layout(props: { children: React.ReactNode; params: + diff --git a/apps/nextjs/src/app/[locale]/manage/about/page.tsx b/apps/nextjs/src/app/[locale]/manage/about/page.tsx index 3724cb668..f500f604a 100644 --- a/apps/nextjs/src/app/[locale]/manage/about/page.tsx +++ b/apps/nextjs/src/app/[locale]/manage/about/page.tsx @@ -1,3 +1,4 @@ +import { headers } from "next/headers"; import Image from "next/image"; import { Accordion, @@ -17,16 +18,15 @@ import { Title, } from "@mantine/core"; import { IconLanguage, IconLibrary, IconUsers } from "@tabler/icons-react"; -import { setStaticParamsLocale } from "next-international/server"; -import { getScopedI18n, getStaticParams } from "@homarr/translation/server"; +import { getScopedI18n } from "@homarr/translation/server"; import { homarrLogoPath } from "~/components/layout/logo/homarr-logo"; import { DynamicBreadcrumb } from "~/components/navigation/dynamic-breadcrumb"; import { createMetaTitle } from "~/metadata"; import { getPackageAttributesAsync } from "~/versions/package-reader"; -import contributorsData from "../../../../../../../static-data/contributors.json"; -import translatorsData from "../../../../../../../static-data/translators.json"; +import type githubContributorsJson from "../../../../../../../static-data/contributors.json"; +import type crowdinContributorsJson from "../../../../../../../static-data/translators.json"; import classes from "./about.module.css"; export async function generateMetadata() { @@ -37,16 +37,26 @@ export async function generateMetadata() { }; } -interface PageProps { - params: { - locale: string; - }; -} +const getHost = () => { + if (process.env.HOSTNAME) { + return `${process.env.HOSTNAME}:3000`; + } -export default async function AboutPage({ params: { locale } }: PageProps) { - setStaticParamsLocale(locale); + return headers().get("host"); +}; + +export default async function AboutPage() { + const baseServerUrl = `http://${getHost()}`; const t = await getScopedI18n("management.page.about"); const attributes = await getPackageAttributesAsync(); + const githubContributors = (await fetch(`${baseServerUrl}/api/about/contributors/github`).then((res) => + res.json(), + )) as typeof githubContributorsJson; + + const crowdinContributors = (await fetch(`${baseServerUrl}/api/about/contributors/crowdin`).then((res) => + res.json(), + )) as typeof crowdinContributorsJson; + return (
@@ -70,14 +80,14 @@ export default async function AboutPage({ params: { locale } }: PageProps) { {t("accordion.contributors.title")} {t("accordion.contributors.subtitle", { - count: contributorsData.length, + count: githubContributors.length, })} - {contributorsData.map((contributor) => ( + {githubContributors.map((contributor) => ( {t("accordion.translators.title")} {t("accordion.translators.subtitle", { - count: translatorsData.length, + count: crowdinContributors.length, })} - {translatorsData.map((translator) => ( + {crowdinContributors.map((translator) => ( ); }; - -export function generateStaticParams() { - return getStaticParams(); -} - -export const dynamic = "force-static"; diff --git a/apps/nextjs/src/app/[locale]/manage/boards/_components/create-board-button.tsx b/apps/nextjs/src/app/[locale]/manage/boards/_components/create-board-button.tsx index ed30fb23d..864c5ea83 100644 --- a/apps/nextjs/src/app/[locale]/manage/boards/_components/create-board-button.tsx +++ b/apps/nextjs/src/app/[locale]/manage/boards/_components/create-board-button.tsx @@ -1,15 +1,17 @@ "use client"; import { useCallback } from "react"; -import { IconCategoryPlus } from "@tabler/icons-react"; +import { Affix, Button, Group, Menu } from "@mantine/core"; +import { IconCategoryPlus, IconChevronDown, IconFileImport } from "@tabler/icons-react"; import { clientApi } from "@homarr/api/client"; import { useModalAction } from "@homarr/modals"; import { useI18n } from "@homarr/translation/client"; +import { BetaBadge } from "@homarr/ui"; import { revalidatePathActionAsync } from "~/app/revalidatePathAction"; import { AddBoardModal } from "~/components/manage/boards/add-board-modal"; -import { MobileAffixButton } from "~/components/manage/mobile-affix-button"; +import { ImportBoardModal } from "~/components/manage/boards/import-board-modal"; interface CreateBoardButtonProps { boardNames: string[]; @@ -17,7 +19,8 @@ interface CreateBoardButtonProps { export const CreateBoardButton = ({ boardNames }: CreateBoardButtonProps) => { const t = useI18n(); - const { openModal } = useModalAction(AddBoardModal); + const { openModal: openAddModal } = useModalAction(AddBoardModal); + const { openModal: openImportModal } = useModalAction(ImportBoardModal); const { mutateAsync, isPending } = clientApi.board.createBoard.useMutation({ onSettled: async () => { @@ -25,8 +28,8 @@ export const CreateBoardButton = ({ boardNames }: CreateBoardButtonProps) => { }, }); - const onClick = useCallback(() => { - openModal({ + const onCreateClick = useCallback(() => { + openAddModal({ onSuccess: async (values) => { await mutateAsync({ name: values.name, @@ -36,11 +39,41 @@ export const CreateBoardButton = ({ boardNames }: CreateBoardButtonProps) => { }, boardNames, }); - }, [mutateAsync, boardNames, openModal]); + }, [mutateAsync, boardNames, openAddModal]); + + const onImportClick = useCallback(() => { + openImportModal({ boardNames }); + }, [openImportModal, boardNames]); + + const buttonGroupContent = ( + <> + + + + + + + }> + + {t("board.action.oldImport.label")} + + + + + + + ); return ( - } onClick={onClick} loading={isPending}> - {t("management.page.board.action.new.label")} - + <> + {buttonGroupContent} + + {buttonGroupContent} + + ); }; diff --git a/apps/nextjs/src/app/[locale]/manage/integrations/new/page.tsx b/apps/nextjs/src/app/[locale]/manage/integrations/new/page.tsx index 7d4b436d2..3dcc78ab2 100644 --- a/apps/nextjs/src/app/[locale]/manage/integrations/new/page.tsx +++ b/apps/nextjs/src/app/[locale]/manage/integrations/new/page.tsx @@ -18,8 +18,7 @@ interface NewIntegrationPageProps { } export default async function IntegrationsNewPage({ searchParams }: NewIntegrationPageProps) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const result = z.enum([integrationKinds[0]!, ...integrationKinds.slice(1)]).safeParse(searchParams.kind); + const result = z.enum(integrationKinds).safeParse(searchParams.kind); if (!result.success) { notFound(); } diff --git a/apps/nextjs/src/app/[locale]/manage/settings/_components/analytics.settings.tsx b/apps/nextjs/src/app/[locale]/manage/settings/_components/analytics.settings.tsx index fe10331c9..f56b4a1b9 100644 --- a/apps/nextjs/src/app/[locale]/manage/settings/_components/analytics.settings.tsx +++ b/apps/nextjs/src/app/[locale]/manage/settings/_components/analytics.settings.tsx @@ -1,16 +1,14 @@ "use client"; -import type { ReactNode } from "react"; import React from "react"; -import type { MantineSpacing } from "@mantine/core"; -import { Card, Group, LoadingOverlay, Stack, Switch, Text, Title, UnstyledButton } from "@mantine/core"; +import { Card, LoadingOverlay, Stack, Title } from "@mantine/core"; import { clientApi } from "@homarr/api/client"; -import type { UseFormReturnType } from "@homarr/form"; import { useForm } from "@homarr/form"; import type { defaultServerSettings } from "@homarr/server-settings"; import { useScopedI18n } from "@homarr/translation/client"; +import { SwitchSetting } from "~/app/[locale]/manage/settings/_components/setting-switch"; import { revalidatePathActionAsync } from "~/app/revalidatePathAction"; interface AnalyticsSettingsProps { @@ -62,6 +60,7 @@ export const AnalyticsSettings = ({ initialData }: AnalyticsSettingsProps) => { ms="xl" title={t("integrationData.title")} text={t("integrationData.text")} + disabled={!form.values.enableGeneral} /> { ms="xl" title={t("widgetData.title")} text={t("widgetData.text")} + disabled={!form.values.enableGeneral} /> { ms="xl" title={t("usersData.title")} text={t("usersData.text")} + disabled={!form.values.enableGeneral} /> ); }; - -const SwitchSetting = ({ - form, - ms, - title, - text, - formKey, -}: { - form: UseFormReturnType; - formKey: keyof typeof defaultServerSettings.analytics; - ms?: MantineSpacing; - title: string; - text: ReactNode; -}) => { - const disabled = formKey !== "enableGeneral" && !form.values.enableGeneral; - const handleClick = React.useCallback(() => { - if (disabled) { - return; - } - form.setFieldValue(formKey, !form.values[formKey]); - }, [form, formKey, disabled]); - - return ( - - - - {title} - - {text} - - - - - - ); -}; diff --git a/apps/nextjs/src/app/[locale]/manage/settings/_components/crawling-and-indexing.settings.tsx b/apps/nextjs/src/app/[locale]/manage/settings/_components/crawling-and-indexing.settings.tsx new file mode 100644 index 000000000..a74c4cf47 --- /dev/null +++ b/apps/nextjs/src/app/[locale]/manage/settings/_components/crawling-and-indexing.settings.tsx @@ -0,0 +1,68 @@ +"use client"; + +import React from "react"; +import { Card, LoadingOverlay, Stack, Text, Title } from "@mantine/core"; + +import { clientApi } from "@homarr/api/client"; +import { useForm } from "@homarr/form"; +import type { defaultServerSettings } from "@homarr/server-settings"; +import { useScopedI18n } from "@homarr/translation/client"; + +import { SwitchSetting } from "~/app/[locale]/manage/settings/_components/setting-switch"; +import { revalidatePathActionAsync } from "~/app/revalidatePathAction"; + +interface CrawlingAndIndexingSettingsProps { + initialData: typeof defaultServerSettings.crawlingAndIndexing; +} + +export const CrawlingAndIndexingSettings = ({ initialData }: CrawlingAndIndexingSettingsProps) => { + const t = useScopedI18n("management.page.settings.section.crawlingAndIndexing"); + const form = useForm({ + initialValues: initialData, + onValuesChange: (updatedValues, _) => { + if (!form.isValid()) { + return; + } + + void mutateAsync({ + settingsKey: "crawlingAndIndexing", + value: updatedValues, + }); + }, + }); + + const { mutateAsync, isPending } = clientApi.serverSettings.saveSettings.useMutation({ + onSettled: async () => { + await revalidatePathActionAsync("/manage/settings"); + }, + }); + + return ( + <> + {t("title")} + + + + {t("warning")} + + + + + + + + + + + ); +}; diff --git a/apps/nextjs/src/app/[locale]/manage/settings/_components/setting-switch.tsx b/apps/nextjs/src/app/[locale]/manage/settings/_components/setting-switch.tsx new file mode 100644 index 000000000..293a8fa96 --- /dev/null +++ b/apps/nextjs/src/app/[locale]/manage/settings/_components/setting-switch.tsx @@ -0,0 +1,50 @@ +import type { ReactNode } from "react"; +import React from "react"; +import type { MantineSpacing } from "@mantine/core"; +import { Group, Stack, Switch, Text, UnstyledButton } from "@mantine/core"; + +import type { Modify } from "@homarr/common/types"; +import type { UseFormReturnType } from "@homarr/form"; + +export const SwitchSetting = >({ + form, + ms, + title, + text, + formKey, + disabled, +}: { + form: Modify< + UseFormReturnType TFormValue>, + { + setFieldValue: (key: keyof TFormValue, value: (previous: boolean) => boolean) => void; + } + >; + formKey: keyof TFormValue; + ms?: MantineSpacing; + title: string; + text: ReactNode; + disabled?: boolean; +}) => { + const handleClick = React.useCallback(() => { + if (disabled) { + return; + } + + form.setFieldValue(formKey, (previous) => !previous); + }, [form, formKey, disabled]); + + return ( + + + + {title} + + {text} + + + + + + ); +}; diff --git a/apps/nextjs/src/app/[locale]/manage/settings/page.tsx b/apps/nextjs/src/app/[locale]/manage/settings/page.tsx index c90261c37..26ef0b3c1 100644 --- a/apps/nextjs/src/app/[locale]/manage/settings/page.tsx +++ b/apps/nextjs/src/app/[locale]/manage/settings/page.tsx @@ -3,6 +3,7 @@ import { Stack, Title } from "@mantine/core"; import { api } from "@homarr/api/server"; import { getScopedI18n } from "@homarr/translation/server"; +import { CrawlingAndIndexingSettings } from "~/app/[locale]/manage/settings/_components/crawling-and-indexing.settings"; import { DynamicBreadcrumb } from "~/components/navigation/dynamic-breadcrumb"; import { AnalyticsSettings } from "./_components/analytics.settings"; @@ -24,6 +25,7 @@ export default async function SettingsPage() { {t("title")} + ); diff --git a/apps/nextjs/src/app/[locale]/widgets/[kind]/_content.tsx b/apps/nextjs/src/app/[locale]/widgets/[kind]/_content.tsx index d38c868a2..0d7f1b880 100644 --- a/apps/nextjs/src/app/[locale]/widgets/[kind]/_content.tsx +++ b/apps/nextjs/src/app/[locale]/widgets/[kind]/_content.tsx @@ -86,6 +86,9 @@ export const WidgetPreviewPageContent = ({ kind, integrationData }: WidgetPrevie }); }, [dimensions, openPreviewDimensionsModal]); + const updateOptions = ({ newOptions }: { newOptions: Record }) => + setState({ ...state, options: { ...state.options, newOptions } }); + return ( <> = 96 ? undefined : 4}> @@ -105,6 +108,7 @@ export const WidgetPreviewPageContent = ({ kind, integrationData }: WidgetPrevie isEditMode={editMode} boardId={undefined} itemId={undefined} + setOptions={updateOptions} /> )} diff --git a/apps/nextjs/src/app/api/about/contributors/crowdin/route.ts b/apps/nextjs/src/app/api/about/contributors/crowdin/route.ts new file mode 100644 index 000000000..a149c082d --- /dev/null +++ b/apps/nextjs/src/app/api/about/contributors/crowdin/route.ts @@ -0,0 +1,9 @@ +import { NextResponse } from "next/server"; + +import crowdinContributors from "../../../../../../../../static-data/translators.json"; + +export const GET = () => { + return NextResponse.json(crowdinContributors); +}; + +export const dynamic = "force-static"; diff --git a/apps/nextjs/src/app/api/about/contributors/github/route.ts b/apps/nextjs/src/app/api/about/contributors/github/route.ts new file mode 100644 index 000000000..a6fc81173 --- /dev/null +++ b/apps/nextjs/src/app/api/about/contributors/github/route.ts @@ -0,0 +1,9 @@ +import { NextResponse } from "next/server"; + +import githubContributors from "../../../../../../../../static-data/contributors.json"; + +export const GET = () => { + return NextResponse.json(githubContributors); +}; + +export const dynamic = "force-static"; diff --git a/apps/nextjs/src/components/board/items/item-actions.tsx b/apps/nextjs/src/components/board/items/item-actions.tsx index d30ac2fed..4d452574e 100644 --- a/apps/nextjs/src/components/board/items/item-actions.tsx +++ b/apps/nextjs/src/components/board/items/item-actions.tsx @@ -1,5 +1,6 @@ import { useCallback } from "react"; +import type { Modify } from "@homarr/common/types"; import { createId } from "@homarr/db/client"; import type { WidgetKind } from "@homarr/definitions"; import type { BoardItemAdvancedOptions } from "@homarr/validation"; @@ -71,9 +72,12 @@ export const useItemActions = () => { advancedOptions: { customCssClasses: [], }, - } satisfies Omit & { - kind: WidgetKind; - }; + } satisfies Modify< + Omit, + { + kind: WidgetKind; + } + >; return { ...previous, @@ -105,7 +109,7 @@ export const useItemActions = () => { id: createId(), yOffset: undefined, xOffset: undefined, - } satisfies Omit & { yOffset?: number; xOffset?: number }; + } satisfies Modify; return { ...previous, diff --git a/apps/nextjs/src/components/board/items/item-content.tsx b/apps/nextjs/src/components/board/items/item-content.tsx index 28636d32b..2af6b3154 100644 --- a/apps/nextjs/src/components/board/items/item-content.tsx +++ b/apps/nextjs/src/components/board/items/item-content.tsx @@ -10,6 +10,7 @@ import { WidgetError } from "@homarr/widgets/errors"; import type { Item } from "~/app/[locale]/boards/_types"; import { useEditMode, useRequiredBoard } from "~/app/[locale]/boards/(content)/_context"; import classes from "../sections/item.module.css"; +import { useItemActions } from "./item-actions"; import { BoardItemMenu } from "./item-menu"; interface BoardItemContentProps { @@ -56,6 +57,9 @@ const InnerContent = ({ item, ...dimensions }: InnerContentProps) => { const Comp = loadWidgetDynamic(item.kind); const options = reduceWidgetOptionsWithDefaultValues(item.kind, item.options); const newItem = { ...item, options }; + const { updateItemOptions } = useItemActions(); + const updateOptions = ({ newOptions }: { newOptions: Record }) => + updateItemOptions({ itemId: item.id, newOptions }); if (!serverData?.isReady) return null; @@ -80,6 +84,7 @@ const InnerContent = ({ item, ...dimensions }: InnerContentProps) => { isEditMode={isEditMode} boardId={board.id} itemId={item.id} + setOptions={updateOptions} {...dimensions} /> diff --git a/apps/nextjs/src/components/board/sections/item.module.css b/apps/nextjs/src/components/board/sections/item.module.css index aacc4803e..af488c201 100644 --- a/apps/nextjs/src/components/board/sections/item.module.css +++ b/apps/nextjs/src/components/board/sections/item.module.css @@ -1,10 +1,12 @@ .itemCard { @mixin dark { - background-color: rgba(46, 46, 46, var(--opacity)); - border-color: rgba(66, 66, 66, var(--opacity)); + --background-color: rgb(from var(--mantine-color-dark-6) r g b / var(--opacity)); + --border-color: rgb(from var(--mantine-color-dark-4) r g b / var(--opacity)); } @mixin light { - background-color: rgba(255, 255, 255, var(--opacity)); - border-color: rgba(222, 226, 230, var(--opacity)); + --background-color: rgb(from var(--mantine-color-white) r g b / var(--opacity)); + --border-color: rgb(from var(--mantine-color-gray-3) r g b / var(--opacity)); } + background-color: var(--background-color); + border-color: var(--border-color); } diff --git a/apps/nextjs/src/components/layout/search-engine-optimization.tsx b/apps/nextjs/src/components/layout/search-engine-optimization.tsx new file mode 100644 index 000000000..2fcc82d66 --- /dev/null +++ b/apps/nextjs/src/components/layout/search-engine-optimization.tsx @@ -0,0 +1,33 @@ +import SuperJSON from "superjson"; + +import { db, eq } from "@homarr/db"; +import { serverSettings } from "@homarr/db/schema/sqlite"; +import type { defaultServerSettings } from "@homarr/server-settings"; + +export const SearchEngineOptimization = async () => { + const crawlingAndIndexingSetting = await db.query.serverSettings.findFirst({ + where: eq(serverSettings.settingKey, "crawlingAndIndexing"), + }); + + if (!crawlingAndIndexingSetting) { + return null; + } + + const value = SuperJSON.parse<(typeof defaultServerSettings)["crawlingAndIndexing"]>( + crawlingAndIndexingSetting.value, + ); + + const robotsAttributes = [...(value.noIndex ? ["noindex"] : []), ...(value.noIndex ? ["nofollow"] : [])]; + + const googleAttributes = [ + ...(value.noSiteLinksSearchBox ? ["nositelinkssearchbox"] : []), + ...(value.noTranslate ? ["notranslate"] : []), + ]; + + return ( + <> + + + + ); +}; diff --git a/apps/nextjs/src/components/manage/boards/import-board-modal.tsx b/apps/nextjs/src/components/manage/boards/import-board-modal.tsx new file mode 100644 index 000000000..bf201477f --- /dev/null +++ b/apps/nextjs/src/components/manage/boards/import-board-modal.tsx @@ -0,0 +1,189 @@ +import { useState } from "react"; +import { Button, Fieldset, FileInput, Grid, Group, Radio, Stack, Switch, TextInput } from "@mantine/core"; +import { IconFileUpload } from "@tabler/icons-react"; + +import { clientApi } from "@homarr/api/client"; +import { useZodForm } from "@homarr/form"; +import { createModal } from "@homarr/modals"; +import { showErrorNotification, showSuccessNotification } from "@homarr/notifications"; +import { oldmarrConfigSchema } from "@homarr/old-schema"; +import { useScopedI18n } from "@homarr/translation/client"; +import { SelectWithDescription } from "@homarr/ui"; +import type { OldmarrImportConfiguration } from "@homarr/validation"; +import { createOldmarrImportConfigurationSchema, superRefineJsonImportFile, z } from "@homarr/validation"; + +import { revalidatePathActionAsync } from "~/app/revalidatePathAction"; + +interface InnerProps { + boardNames: string[]; +} + +export const ImportBoardModal = createModal(({ actions, innerProps }) => { + const tOldImport = useScopedI18n("board.action.oldImport"); + const tCommon = useScopedI18n("common"); + const [fileValid, setFileValid] = useState(true); + const form = useZodForm( + z.object({ + file: z.instanceof(File).nullable().superRefine(superRefineJsonImportFile), + configuration: createOldmarrImportConfigurationSchema(innerProps.boardNames), + }), + { + initialValues: { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + file: null!, + configuration: { + distinctAppsByHref: true, + onlyImportApps: false, + screenSize: "lg", + sidebarBehaviour: "last-section", + name: "", + }, + }, + onValuesChange(values, previous) { + // This is a workarround until async validation is supported by mantine + void (async () => { + if (values.file === previous.file) { + return; + } + + if (!values.file) { + return; + } + + const content = await values.file.text(); + const result = oldmarrConfigSchema.safeParse(JSON.parse(content)); + + if (!result.success) { + console.error(result.error.errors); + setFileValid(false); + return; + } + + setFileValid(true); + form.setFieldValue("configuration.name", result.data.configProperties.name); + })(); + }, + }, + ); + + const { mutateAsync, isPending } = clientApi.board.importOldmarrConfig.useMutation(); + + const handleSubmitAsync = async (values: { file: File; configuration: OldmarrImportConfiguration }) => { + const formData = new FormData(); + formData.set("file", values.file); + formData.set("configuration", JSON.stringify(values.configuration)); + + await mutateAsync(formData, { + async onSuccess() { + actions.closeModal(); + await revalidatePathActionAsync("/manage/boards"); + showSuccessNotification({ + title: tOldImport("notification.success.title"), + message: tOldImport("notification.success.message"), + }); + }, + onError() { + showErrorNotification({ + title: tOldImport("notification.error.title"), + message: tOldImport("notification.error.message"), + }); + }, + }); + }; + + return ( +
{ + if (!fileValid) { + return; + } + + void handleSubmitAsync({ + // It's checked for null in the superrefine + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + file: values.file!, + configuration: values.configuration, + }); + })} + > + + } + withAsterisk + accept="application/json" + {...form.getInputProps("file")} + error={ + (form.getInputProps("file").error as string | undefined) ?? + (!fileValid && form.isDirty("file") ? tOldImport("form.file.invalidError") : undefined) + } + type="button" + label={tOldImport("form.file.label")} + /> + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+
+ ); +}).withOptions({ + defaultTitle: (t) => t("board.action.oldImport.label"), + size: "lg", +}); diff --git a/apps/tasks/package.json b/apps/tasks/package.json index 200b05db9..0e427ccb7 100644 --- a/apps/tasks/package.json +++ b/apps/tasks/package.json @@ -46,9 +46,9 @@ "@homarr/tsconfig": "workspace:^0.1.0", "@types/node": "^20.16.5", "dotenv-cli": "^7.4.2", - "eslint": "^9.9.1", + "eslint": "^9.10.0", "prettier": "^3.3.3", "tsx": "4.13.3", - "typescript": "^5.5.4" + "typescript": "^5.6.2" } } diff --git a/apps/websocket/package.json b/apps/websocket/package.json index b651380e7..52bc4e8e2 100644 --- a/apps/websocket/package.json +++ b/apps/websocket/package.json @@ -34,8 +34,8 @@ "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/ws": "^8.5.12", - "eslint": "^9.9.1", + "eslint": "^9.10.0", "prettier": "^3.3.3", - "typescript": "^5.5.4" + "typescript": "^5.6.2" } } diff --git a/package.json b/package.json index 7e1dd0384..48194bc67 100644 --- a/package.json +++ b/package.json @@ -27,20 +27,20 @@ "prettier": "@homarr/prettier-config", "devDependencies": { "@homarr/prettier-config": "workspace:^0.1.0", - "@turbo/gen": "^2.1.1", + "@turbo/gen": "^2.1.2", "@vitejs/plugin-react": "^4.3.1", - "@vitest/coverage-v8": "^2.0.5", - "@vitest/ui": "^2.0.5", + "@vitest/coverage-v8": "^2.1.1", + "@vitest/ui": "^2.1.1", "cross-env": "^7.0.3", "jsdom": "^25.0.0", "prettier": "^3.3.3", - "testcontainers": "^10.13.0", - "turbo": "^2.1.1", - "typescript": "^5.5.4", + "testcontainers": "^10.13.1", + "turbo": "^2.1.2", + "typescript": "^5.6.2", "vite-tsconfig-paths": "^5.0.1", - "vitest": "^2.0.5" + "vitest": "^2.1.1" }, - "packageManager": "pnpm@9.9.0", + "packageManager": "pnpm@9.10.0", "engines": { "node": ">=20.17.0" }, diff --git a/packages/analytics/package.json b/packages/analytics/package.json index 4870fdb28..180f0e9ec 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -32,7 +32,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/api/package.json b/packages/api/package.json index e8399f5ff..782e0a281 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -29,6 +29,8 @@ "@homarr/definitions": "workspace:^0.1.0", "@homarr/integrations": "workspace:^0.1.0", "@homarr/log": "workspace:^", + "@homarr/old-import": "workspace:^0.1.0", + "@homarr/old-schema": "workspace:^0.1.0", "@homarr/ping": "workspace:^0.1.0", "@homarr/redis": "workspace:^0.1.0", "@homarr/server-settings": "workspace:^0.1.0", @@ -37,7 +39,7 @@ "@trpc/react-query": "next", "@trpc/server": "next", "dockerode": "^4.0.2", - "next": "^14.2.8", + "next": "^14.2.11", "react": "^18.3.1", "superjson": "2.2.1", "trpc-swagger": "^1.2.6" @@ -47,8 +49,8 @@ "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/dockerode": "^3.3.31", - "eslint": "^9.9.1", + "eslint": "^9.10.0", "prettier": "^3.3.3", - "typescript": "^5.5.4" + "typescript": "^5.6.2" } } diff --git a/packages/api/src/middlewares/integration.ts b/packages/api/src/middlewares/integration.ts index be91fecbd..78b3326c9 100644 --- a/packages/api/src/middlewares/integration.ts +++ b/packages/api/src/middlewares/integration.ts @@ -3,7 +3,8 @@ import { TRPCError } from "@trpc/server"; import type { Session } from "@homarr/auth"; import { hasQueryAccessToIntegrationsAsync } from "@homarr/auth/server"; import { constructIntegrationPermissions } from "@homarr/auth/shared"; -import { decryptSecret } from "@homarr/common"; +import { decryptSecret } from "@homarr/common/server"; +import type { AtLeastOneOf } from "@homarr/common/types"; import type { Database } from "@homarr/db"; import { and, eq, inArray } from "@homarr/db"; import { integrations } from "@homarr/db/schema/sqlite"; @@ -12,7 +13,7 @@ import { z } from "@homarr/validation"; import { publicProcedure } from "../trpc"; -type IntegrationAction = "query" | "interact"; +export type IntegrationAction = "query" | "interact"; /** * Creates a middleware that provides the integration in the context that is of the specified kinds @@ -25,7 +26,7 @@ type IntegrationAction = "query" | "interact"; */ export const createOneIntegrationMiddleware = ( action: IntegrationAction, - ...kinds: [TKind, ...TKind[]] // Ensure at least one kind is provided + ...kinds: AtLeastOneOf // Ensure at least one kind is provided ) => { return publicProcedure.input(z.object({ integrationId: z.string() })).use(async ({ input, ctx, next }) => { const integration = await ctx.db.query.integrations.findFirst({ @@ -95,7 +96,7 @@ export const createOneIntegrationMiddleware = ( */ export const createManyIntegrationMiddleware = ( action: IntegrationAction, - ...kinds: [TKind, ...TKind[]] // Ensure at least one kind is provided + ...kinds: AtLeastOneOf // Ensure at least one kind is provided ) => { return publicProcedure .input(z.object({ integrationIds: z.array(z.string()).min(1) })) @@ -161,7 +162,7 @@ export const createManyIntegrationMiddleware = ( */ export const createManyIntegrationOfOneItemMiddleware = ( action: IntegrationAction, - ...kinds: [TKind, ...TKind[]] // Ensure at least one kind is provided + ...kinds: AtLeastOneOf // Ensure at least one kind is provided ) => { return publicProcedure .input(z.object({ integrationIds: z.array(z.string()).min(1), itemId: z.string() })) diff --git a/packages/api/src/router/board.ts b/packages/api/src/router/board.ts index aa6464156..0a937f374 100644 --- a/packages/api/src/router/board.ts +++ b/packages/api/src/router/board.ts @@ -16,6 +16,8 @@ import { } from "@homarr/db/schema/sqlite"; import type { WidgetKind } from "@homarr/definitions"; import { getPermissionsWithParents, widgetKinds } from "@homarr/definitions"; +import { importAsync } from "@homarr/old-import"; +import { oldmarrConfigSchema } from "@homarr/old-schema"; import type { BoardItemAdvancedOptions } from "@homarr/validation"; import { createSectionSchema, sharedItemSchema, validation, z } from "@homarr/validation"; @@ -451,6 +453,13 @@ export const boardRouter = createTRPCRouter({ ); }); }), + importOldmarrConfig: protectedProcedure + .input(validation.board.importOldmarrConfig) + .mutation(async ({ input, ctx }) => { + const content = await input.file.text(); + const oldmarr = oldmarrConfigSchema.parse(JSON.parse(content)); + await importAsync(ctx.db, oldmarr, input.configuration); + }), }); const noBoardWithSimilarNameAsync = async (db: Database, name: string, ignoredIds: string[] = []) => { diff --git a/packages/api/src/router/integration/integration-router.ts b/packages/api/src/router/integration/integration-router.ts index 60040f457..5ac6c4350 100644 --- a/packages/api/src/router/integration/integration-router.ts +++ b/packages/api/src/router/integration/integration-router.ts @@ -1,6 +1,6 @@ import { TRPCError } from "@trpc/server"; -import { decryptSecret, encryptSecret } from "@homarr/common"; +import { decryptSecret, encryptSecret } from "@homarr/common/server"; import type { Database } from "@homarr/db"; import { and, createId, eq, inArray } from "@homarr/db"; import { diff --git a/packages/api/src/router/integration/integration-test-connection.ts b/packages/api/src/router/integration/integration-test-connection.ts index 673d2f6b4..91d12f344 100644 --- a/packages/api/src/router/integration/integration-test-connection.ts +++ b/packages/api/src/router/integration/integration-test-connection.ts @@ -1,8 +1,8 @@ -import { decryptSecret } from "@homarr/common"; +import { decryptSecret } from "@homarr/common/server"; import type { Integration } from "@homarr/db/schema/sqlite"; import type { IntegrationKind, IntegrationSecretKind } from "@homarr/definitions"; import { getAllSecretKindOptions } from "@homarr/definitions"; -import { integrationCreatorByKind, IntegrationTestConnectionError } from "@homarr/integrations"; +import { integrationCreator, IntegrationTestConnectionError } from "@homarr/integrations"; type FormIntegration = Integration & { secrets: { @@ -37,23 +37,25 @@ export const testConnectionAsync = async ( const sourcedSecrets = [...formSecrets, ...decryptedDbSecrets]; const secretKinds = getSecretKindOption(integration.kind, sourcedSecrets); - const filteredSecrets = secretKinds.map((kind) => { - const secrets = sourcedSecrets.filter((secret) => secret.kind === kind); - // Will never be undefined because of the check before - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - if (secrets.length === 1) return secrets[0]!; + const decryptedSecrets = secretKinds + .map((kind) => { + const secrets = sourcedSecrets.filter((secret) => secret.kind === kind); + // Will never be undefined because of the check before + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + if (secrets.length === 1) return secrets[0]!; - // There will always be a matching secret because of the getSecretKindOption function - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return secrets.find((secret) => secret.source === "form") ?? secrets[0]!; - }); + // There will always be a matching secret because of the getSecretKindOption function + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return secrets.find((secret) => secret.source === "form") ?? secrets[0]!; + }) + .map(({ source: _, ...secret }) => secret); - // @ts-expect-error - For now we expect an error here as not all integerations have been implemented - const integrationInstance = integrationCreatorByKind(integration.kind, { - id: integration.id, - name: integration.name, - url: integration.url, - decryptedSecrets: filteredSecrets, + const { secrets: _, ...baseIntegration } = integration; + + // @ts-expect-error - For now we expect an error here as not all integrations have been implemented + const integrationInstance = integrationCreator({ + ...baseIntegration, + decryptedSecrets, }); await integrationInstance.testConnectionAsync(); diff --git a/packages/api/src/router/test/integration/integration-router.spec.ts b/packages/api/src/router/test/integration/integration-router.spec.ts index dde896352..52a23f3b6 100644 --- a/packages/api/src/router/test/integration/integration-router.spec.ts +++ b/packages/api/src/router/test/integration/integration-router.spec.ts @@ -2,7 +2,7 @@ import { describe, expect, test, vi } from "vitest"; import type { Session } from "@homarr/auth"; -import { encryptSecret } from "@homarr/common"; +import { encryptSecret } from "@homarr/common/server"; import { createId } from "@homarr/db"; import { integrations, integrationSecrets } from "@homarr/db/schema/sqlite"; import { createDb } from "@homarr/db/test"; diff --git a/packages/api/src/router/test/integration/integration-test-connection.spec.ts b/packages/api/src/router/test/integration/integration-test-connection.spec.ts index 5118f526c..e692543b6 100644 --- a/packages/api/src/router/test/integration/integration-test-connection.spec.ts +++ b/packages/api/src/router/test/integration/integration-test-connection.spec.ts @@ -5,9 +5,9 @@ import * as homarrIntegrations from "@homarr/integrations"; import { testConnectionAsync } from "../../integration/integration-test-connection"; -vi.mock("@homarr/common", async (importActual) => { +vi.mock("@homarr/common/server", async (importActual) => { // eslint-disable-next-line @typescript-eslint/consistent-type-imports - const actual = await importActual(); + const actual = await importActual(); return { ...actual, @@ -18,7 +18,7 @@ vi.mock("@homarr/common", async (importActual) => { describe("testConnectionAsync should run test connection of integration", () => { test("with input of only form secrets matching api key kind it should use form apiKey", async () => { // Arrange - const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreatorByKind"); + const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreator"); const optionsSpy = vi.spyOn(homarrDefinitions, "getAllSecretKindOptions"); factorySpy.mockReturnValue({ testConnectionAsync: async () => await Promise.resolve(), @@ -42,10 +42,11 @@ describe("testConnectionAsync should run test connection of integration", () => await testConnectionAsync(integration); // Assert - expect(factorySpy).toHaveBeenCalledWith("piHole", { + expect(factorySpy).toHaveBeenCalledWith({ id: "new", name: "Pi Hole", url: "http://pi.hole", + kind: "piHole", decryptedSecrets: [ expect.objectContaining({ kind: "apiKey", @@ -57,7 +58,7 @@ describe("testConnectionAsync should run test connection of integration", () => test("with input of only null form secrets and the required db secrets matching api key kind it should use db apiKey", async () => { // Arrange - const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreatorByKind"); + const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreator"); const optionsSpy = vi.spyOn(homarrDefinitions, "getAllSecretKindOptions"); factorySpy.mockReturnValue({ testConnectionAsync: async () => await Promise.resolve(), @@ -88,10 +89,11 @@ describe("testConnectionAsync should run test connection of integration", () => await testConnectionAsync(integration, dbSecrets); // Assert - expect(factorySpy).toHaveBeenCalledWith("piHole", { + expect(factorySpy).toHaveBeenCalledWith({ id: "new", name: "Pi Hole", url: "http://pi.hole", + kind: "piHole", decryptedSecrets: [ expect.objectContaining({ kind: "apiKey", @@ -103,7 +105,7 @@ describe("testConnectionAsync should run test connection of integration", () => test("with input of form and db secrets matching api key kind it should use form apiKey", async () => { // Arrange - const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreatorByKind"); + const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreator"); const optionsSpy = vi.spyOn(homarrDefinitions, "getAllSecretKindOptions"); factorySpy.mockReturnValue({ testConnectionAsync: async () => await Promise.resolve(), @@ -134,10 +136,11 @@ describe("testConnectionAsync should run test connection of integration", () => await testConnectionAsync(integration, dbSecrets); // Assert - expect(factorySpy).toHaveBeenCalledWith("piHole", { + expect(factorySpy).toHaveBeenCalledWith({ id: "new", name: "Pi Hole", url: "http://pi.hole", + kind: "piHole", decryptedSecrets: [ expect.objectContaining({ kind: "apiKey", @@ -149,7 +152,7 @@ describe("testConnectionAsync should run test connection of integration", () => test("with input of form apiKey and db secrets for username and password it should use form apiKey when both is allowed", async () => { // Arrange - const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreatorByKind"); + const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreator"); const optionsSpy = vi.spyOn(homarrDefinitions, "getAllSecretKindOptions"); factorySpy.mockReturnValue({ testConnectionAsync: async () => await Promise.resolve(), @@ -184,10 +187,11 @@ describe("testConnectionAsync should run test connection of integration", () => await testConnectionAsync(integration, dbSecrets); // Assert - expect(factorySpy).toHaveBeenCalledWith("piHole", { + expect(factorySpy).toHaveBeenCalledWith({ id: "new", name: "Pi Hole", url: "http://pi.hole", + kind: "piHole", decryptedSecrets: [ expect.objectContaining({ kind: "apiKey", @@ -199,7 +203,7 @@ describe("testConnectionAsync should run test connection of integration", () => test("with input of null form apiKey and db secrets for username and password it should use db username and password when both is allowed", async () => { // Arrange - const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreatorByKind"); + const factorySpy = vi.spyOn(homarrIntegrations, "integrationCreator"); const optionsSpy = vi.spyOn(homarrDefinitions, "getAllSecretKindOptions"); factorySpy.mockReturnValue({ testConnectionAsync: async () => await Promise.resolve(), @@ -234,10 +238,11 @@ describe("testConnectionAsync should run test connection of integration", () => await testConnectionAsync(integration, dbSecrets); // Assert - expect(factorySpy).toHaveBeenCalledWith("piHole", { + expect(factorySpy).toHaveBeenCalledWith({ id: "new", name: "Pi Hole", url: "http://pi.hole", + kind: "piHole", decryptedSecrets: [ expect.objectContaining({ kind: "username", diff --git a/packages/api/src/router/widgets/calendar.ts b/packages/api/src/router/widgets/calendar.ts index 1dba2888f..606ec04b7 100644 --- a/packages/api/src/router/widgets/calendar.ts +++ b/packages/api/src/router/widgets/calendar.ts @@ -1,3 +1,4 @@ +import { getIntegrationKindsByCategory } from "@homarr/definitions"; import type { CalendarEvent } from "@homarr/integrations/types"; import { createItemAndIntegrationChannel } from "@homarr/redis"; @@ -6,7 +7,7 @@ import { createTRPCRouter, publicProcedure } from "../../trpc"; export const calendarRouter = createTRPCRouter({ findAllEvents: publicProcedure - .unstable_concat(createManyIntegrationOfOneItemMiddleware("query", "sonarr", "radarr", "readarr", "lidarr")) + .unstable_concat(createManyIntegrationOfOneItemMiddleware("query", ...getIntegrationKindsByCategory("calendar"))) .query(async ({ ctx }) => { return await Promise.all( ctx.integrations.flatMap(async (integration) => { diff --git a/packages/api/src/router/widgets/dns-hole.ts b/packages/api/src/router/widgets/dns-hole.ts index f12c36edb..41c09c1b2 100644 --- a/packages/api/src/router/widgets/dns-hole.ts +++ b/packages/api/src/router/widgets/dns-hole.ts @@ -1,6 +1,7 @@ import { TRPCError } from "@trpc/server"; -import { AdGuardHomeIntegration, PiHoleIntegration } from "@homarr/integrations"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; +import { integrationCreator } from "@homarr/integrations"; import type { DnsHoleSummary } from "@homarr/integrations/types"; import { logger } from "@homarr/log"; import { createCacheChannel } from "@homarr/redis"; @@ -11,21 +12,13 @@ import { createTRPCRouter, publicProcedure } from "../../trpc"; export const dnsHoleRouter = createTRPCRouter({ summary: publicProcedure - .unstable_concat(createManyIntegrationMiddleware("query", "piHole", "adGuardHome")) + .unstable_concat(createManyIntegrationMiddleware("query", ...getIntegrationKindsByCategory("dnsHole"))) .query(async ({ ctx }) => { const results = await Promise.all( ctx.integrations.map(async (integration) => { const cache = createCacheChannel(`dns-hole-summary:${integration.id}`); const { data } = await cache.consumeAsync(async () => { - let client; - switch (integration.kind) { - case "piHole": - client = new PiHoleIntegration(integration); - break; - case "adGuardHome": - client = new AdGuardHomeIntegration(integration); - break; - } + const client = integrationCreator(integration); return await client.getSummaryAsync().catch((err) => { logger.error("dns-hole router - ", err); @@ -47,33 +40,17 @@ export const dnsHoleRouter = createTRPCRouter({ }), enable: publicProcedure - .unstable_concat(createOneIntegrationMiddleware("interact", "piHole", "adGuardHome")) - .mutation(async ({ ctx }) => { - let client; - switch (ctx.integration.kind) { - case "piHole": - client = new PiHoleIntegration(ctx.integration); - break; - case "adGuardHome": - client = new AdGuardHomeIntegration(ctx.integration); - break; - } + .unstable_concat(createOneIntegrationMiddleware("interact", ...getIntegrationKindsByCategory("dnsHole"))) + .mutation(async ({ ctx: { integration } }) => { + const client = integrationCreator(integration); await client.enableAsync(); }), disable: publicProcedure .input(controlsInputSchema) - .unstable_concat(createOneIntegrationMiddleware("interact", "piHole", "adGuardHome")) - .mutation(async ({ ctx, input }) => { - let client; - switch (ctx.integration.kind) { - case "piHole": - client = new PiHoleIntegration(ctx.integration); - break; - case "adGuardHome": - client = new AdGuardHomeIntegration(ctx.integration); - break; - } + .unstable_concat(createOneIntegrationMiddleware("interact", ...getIntegrationKindsByCategory("dnsHole"))) + .mutation(async ({ ctx: { integration }, input }) => { + const client = integrationCreator(integration); await client.disableAsync(input.duration); }), }); diff --git a/packages/api/src/router/widgets/downloads.ts b/packages/api/src/router/widgets/downloads.ts new file mode 100644 index 000000000..927a0c438 --- /dev/null +++ b/packages/api/src/router/widgets/downloads.ts @@ -0,0 +1,110 @@ +import { observable } from "@trpc/server/observable"; + +import type { Integration } from "@homarr/db/schema/sqlite"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; +import type { DownloadClientJobsAndStatus } from "@homarr/integrations"; +import { downloadClientItemSchema, integrationCreator } from "@homarr/integrations"; +import { createItemAndIntegrationChannel } from "@homarr/redis"; +import { z } from "@homarr/validation"; + +import type { IntegrationAction } from "../../middlewares/integration"; +import { createManyIntegrationMiddleware } from "../../middlewares/integration"; +import { createTRPCRouter, protectedProcedure, publicProcedure } from "../../trpc"; + +const createDownloadClientIntegrationMiddleware = (action: IntegrationAction) => + createManyIntegrationMiddleware(action, ...getIntegrationKindsByCategory("downloadClient")); + +export const downloadsRouter = createTRPCRouter({ + getJobsAndStatuses: publicProcedure + .unstable_concat(createDownloadClientIntegrationMiddleware("query")) + .query(async ({ ctx }) => { + return await Promise.all( + ctx.integrations.map(async ({ decryptedSecrets: _, ...integration }) => { + const channel = createItemAndIntegrationChannel("downloads", integration.id); + const { data, timestamp } = (await channel.getAsync()) ?? { data: null, timestamp: new Date(0) }; + return { + integration, + timestamp, + data, + }; + }), + ); + }), + subscribeToJobsAndStatuses: publicProcedure + .unstable_concat(createDownloadClientIntegrationMiddleware("query")) + .subscription(({ ctx }) => { + return observable<{ integration: Integration; timestamp: Date; data: DownloadClientJobsAndStatus }>((emit) => { + const unsubscribes: (() => void)[] = []; + for (const integrationWithSecrets of ctx.integrations) { + const { decryptedSecrets: _, ...integration } = integrationWithSecrets; + const channel = createItemAndIntegrationChannel("downloads", integration.id); + const unsubscribe = channel.subscribe((data) => { + emit.next({ + integration, + timestamp: new Date(), + data, + }); + }); + unsubscribes.push(unsubscribe); + } + return () => { + unsubscribes.forEach((unsubscribe) => { + unsubscribe(); + }); + }; + }); + }), + pause: protectedProcedure + .unstable_concat(createDownloadClientIntegrationMiddleware("interact")) + .mutation(async ({ ctx }) => { + await Promise.all( + ctx.integrations.map(async (integration) => { + const integrationInstance = integrationCreator(integration); + await integrationInstance.pauseQueueAsync(); + }), + ); + }), + pauseItem: protectedProcedure + .unstable_concat(createDownloadClientIntegrationMiddleware("interact")) + .input(z.object({ item: downloadClientItemSchema })) + .mutation(async ({ ctx, input }) => { + await Promise.all( + ctx.integrations.map(async (integration) => { + const integrationInstance = integrationCreator(integration); + await integrationInstance.pauseItemAsync(input.item); + }), + ); + }), + resume: protectedProcedure + .unstable_concat(createDownloadClientIntegrationMiddleware("interact")) + .mutation(async ({ ctx }) => { + await Promise.all( + ctx.integrations.map(async (integration) => { + const integrationInstance = integrationCreator(integration); + await integrationInstance.resumeQueueAsync(); + }), + ); + }), + resumeItem: protectedProcedure + .unstable_concat(createDownloadClientIntegrationMiddleware("interact")) + .input(z.object({ item: downloadClientItemSchema })) + .mutation(async ({ ctx, input }) => { + await Promise.all( + ctx.integrations.map(async (integration) => { + const integrationInstance = integrationCreator(integration); + await integrationInstance.resumeItemAsync(input.item); + }), + ); + }), + deleteItem: protectedProcedure + .unstable_concat(createDownloadClientIntegrationMiddleware("interact")) + .input(z.object({ item: downloadClientItemSchema, fromDisk: z.boolean() })) + .mutation(async ({ ctx, input }) => { + await Promise.all( + ctx.integrations.map(async (integration) => { + const integrationInstance = integrationCreator(integration); + await integrationInstance.deleteItemAsync(input.item, input.fromDisk); + }), + ); + }), +}); diff --git a/packages/api/src/router/widgets/index.ts b/packages/api/src/router/widgets/index.ts index 7ab978bb0..b8b221536 100644 --- a/packages/api/src/router/widgets/index.ts +++ b/packages/api/src/router/widgets/index.ts @@ -2,6 +2,8 @@ import { createTRPCRouter } from "../../trpc"; import { appRouter } from "./app"; import { calendarRouter } from "./calendar"; import { dnsHoleRouter } from "./dns-hole"; +import { downloadsRouter } from "./downloads"; +import { indexerManagerRouter } from "./indexer-manager"; import { mediaRequestsRouter } from "./media-requests"; import { mediaServerRouter } from "./media-server"; import { notebookRouter } from "./notebook"; @@ -17,6 +19,8 @@ export const widgetRouter = createTRPCRouter({ smartHome: smartHomeRouter, mediaServer: mediaServerRouter, calendar: calendarRouter, + downloads: downloadsRouter, mediaRequests: mediaRequestsRouter, rssFeed: rssFeedRouter, + indexerManager: indexerManagerRouter, }); diff --git a/packages/api/src/router/widgets/indexer-manager.ts b/packages/api/src/router/widgets/indexer-manager.ts new file mode 100644 index 000000000..731216f0c --- /dev/null +++ b/packages/api/src/router/widgets/indexer-manager.ts @@ -0,0 +1,80 @@ +import { TRPCError } from "@trpc/server"; +import { observable } from "@trpc/server/observable"; + +import { getIntegrationKindsByCategory } from "@homarr/definitions"; +import { integrationCreator } from "@homarr/integrations"; +import type { Indexer } from "@homarr/integrations/types"; +import { logger } from "@homarr/log"; +import { createItemAndIntegrationChannel } from "@homarr/redis"; + +import type { IntegrationAction } from "../../middlewares/integration"; +import { createManyIntegrationMiddleware } from "../../middlewares/integration"; +import { createTRPCRouter, publicProcedure } from "../../trpc"; + +const createIndexerManagerIntegrationMiddleware = (action: IntegrationAction) => + createManyIntegrationMiddleware(action, ...getIntegrationKindsByCategory("indexerManager")); + +export const indexerManagerRouter = createTRPCRouter({ + getIndexersStatus: publicProcedure + .unstable_concat(createIndexerManagerIntegrationMiddleware("query")) + .query(async ({ ctx }) => { + const results = await Promise.all( + ctx.integrations.map(async (integration) => { + const client = integrationCreator(integration); + const indexers = await client.getIndexersAsync().catch((err) => { + logger.error("indexer-manager router - ", err); + throw new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + message: `Failed to fetch indexers for ${integration.name} (${integration.id})`, + }); + }); + + return { + integrationId: integration.id, + indexers, + }; + }), + ); + return results; + }), + + subscribeIndexersStatus: publicProcedure + .unstable_concat(createIndexerManagerIntegrationMiddleware("query")) + .subscription(({ ctx }) => { + return observable<{ integrationId: string; indexers: Indexer[] }>((emit) => { + const unsubscribes: (() => void)[] = []; + for (const integration of ctx.integrations) { + const channel = createItemAndIntegrationChannel("indexerManager", integration.id); + const unsubscribe = channel.subscribe((indexers) => { + emit.next({ + integrationId: integration.id, + indexers, + }); + }); + unsubscribes.push(unsubscribe); + } + return () => { + unsubscribes.forEach((unsubscribe) => { + unsubscribe(); + }); + }; + }); + }), + + testAllIndexers: publicProcedure + .unstable_concat(createIndexerManagerIntegrationMiddleware("interact")) + .mutation(async ({ ctx }) => { + await Promise.all( + ctx.integrations.map(async (integration) => { + const client = integrationCreator(integration); + await client.testAllAsync().catch((err) => { + logger.error("indexer-manager router - ", err); + throw new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + message: `Failed to test all indexers for ${integration.name} (${integration.id})`, + }); + }); + }), + ); + }), +}); diff --git a/packages/api/src/router/widgets/media-requests.ts b/packages/api/src/router/widgets/media-requests.ts index 4a289e763..2c2916715 100644 --- a/packages/api/src/router/widgets/media-requests.ts +++ b/packages/api/src/router/widgets/media-requests.ts @@ -1,5 +1,6 @@ +import { getIntegrationKindsByCategory } from "@homarr/definitions"; import type { MediaRequestList, MediaRequestStats } from "@homarr/integrations"; -import { integrationCreatorByKind } from "@homarr/integrations"; +import { integrationCreator } from "@homarr/integrations"; import { createItemAndIntegrationChannel } from "@homarr/redis"; import { z } from "@homarr/validation"; @@ -11,7 +12,9 @@ import { createTRPCRouter, protectedProcedure, publicProcedure } from "../../trp export const mediaRequestsRouter = createTRPCRouter({ getLatestRequests: publicProcedure - .unstable_concat(createManyIntegrationOfOneItemMiddleware("query", "overseerr", "jellyseerr")) + .unstable_concat( + createManyIntegrationOfOneItemMiddleware("query", ...getIntegrationKindsByCategory("mediaRequest")), + ) .query(async ({ input }) => { return await Promise.all( input.integrationIds.map(async (integrationId) => { @@ -21,7 +24,9 @@ export const mediaRequestsRouter = createTRPCRouter({ ); }), getStats: publicProcedure - .unstable_concat(createManyIntegrationOfOneItemMiddleware("query", "overseerr", "jellyseerr")) + .unstable_concat( + createManyIntegrationOfOneItemMiddleware("query", ...getIntegrationKindsByCategory("mediaRequest")), + ) .query(async ({ input }) => { return await Promise.all( input.integrationIds.map(async (integrationId) => { @@ -34,15 +39,15 @@ export const mediaRequestsRouter = createTRPCRouter({ ); }), answerRequest: protectedProcedure - .unstable_concat(createOneIntegrationMiddleware("interact", "overseerr", "jellyseerr")) + .unstable_concat(createOneIntegrationMiddleware("interact", ...getIntegrationKindsByCategory("mediaRequest"))) .input(z.object({ requestId: z.number(), answer: z.enum(["approve", "decline"]) })) - .mutation(async ({ ctx, input }) => { - const integration = integrationCreatorByKind(ctx.integration.kind, ctx.integration); + .mutation(async ({ ctx: { integration }, input }) => { + const integrationInstance = integrationCreator(integration); if (input.answer === "approve") { - await integration.approveRequestAsync(input.requestId); + await integrationInstance.approveRequestAsync(input.requestId); return; } - await integration.declineRequestAsync(input.requestId); + await integrationInstance.declineRequestAsync(input.requestId); }), }); diff --git a/packages/api/src/router/widgets/media-server.ts b/packages/api/src/router/widgets/media-server.ts index 00f4cf68c..ec93ad206 100644 --- a/packages/api/src/router/widgets/media-server.ts +++ b/packages/api/src/router/widgets/media-server.ts @@ -1,14 +1,19 @@ import { observable } from "@trpc/server/observable"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; import type { StreamSession } from "@homarr/integrations"; import { createItemAndIntegrationChannel } from "@homarr/redis"; +import type { IntegrationAction } from "../../middlewares/integration"; import { createManyIntegrationMiddleware } from "../../middlewares/integration"; import { createTRPCRouter, publicProcedure } from "../../trpc"; +const createMediaServerIntegrationMiddleware = (action: IntegrationAction) => + createManyIntegrationMiddleware(action, ...getIntegrationKindsByCategory("mediaService")); + export const mediaServerRouter = createTRPCRouter({ getCurrentStreams: publicProcedure - .unstable_concat(createManyIntegrationMiddleware("query", "jellyfin", "plex")) + .unstable_concat(createMediaServerIntegrationMiddleware("query")) .query(async ({ ctx }) => { return await Promise.all( ctx.integrations.map(async (integration) => { @@ -22,7 +27,7 @@ export const mediaServerRouter = createTRPCRouter({ ); }), subscribeToCurrentStreams: publicProcedure - .unstable_concat(createManyIntegrationMiddleware("query", "jellyfin", "plex")) + .unstable_concat(createMediaServerIntegrationMiddleware("query")) .subscription(({ ctx }) => { return observable<{ integrationId: string; data: StreamSession[] }>((emit) => { const unsubscribes: (() => void)[] = []; diff --git a/packages/api/src/router/widgets/smart-home.ts b/packages/api/src/router/widgets/smart-home.ts index b77a5d051..3cfd3a98a 100644 --- a/packages/api/src/router/widgets/smart-home.ts +++ b/packages/api/src/router/widgets/smart-home.ts @@ -1,12 +1,17 @@ import { observable } from "@trpc/server/observable"; -import { HomeAssistantIntegration } from "@homarr/integrations"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; +import { integrationCreator } from "@homarr/integrations"; import { homeAssistantEntityState } from "@homarr/redis"; import { z } from "@homarr/validation"; +import type { IntegrationAction } from "../../middlewares/integration"; import { createOneIntegrationMiddleware } from "../../middlewares/integration"; import { createTRPCRouter, publicProcedure } from "../../trpc"; +const createSmartHomeIntegrationMiddleware = (action: IntegrationAction) => + createOneIntegrationMiddleware(action, ...getIntegrationKindsByCategory("smartHomeServer")); + export const smartHomeRouter = createTRPCRouter({ subscribeEntityState: publicProcedure.input(z.object({ entityId: z.string() })).subscription(({ input }) => { return observable<{ @@ -26,17 +31,17 @@ export const smartHomeRouter = createTRPCRouter({ }); }), switchEntity: publicProcedure - .unstable_concat(createOneIntegrationMiddleware("interact", "homeAssistant")) + .unstable_concat(createSmartHomeIntegrationMiddleware("interact")) .input(z.object({ entityId: z.string() })) - .mutation(async ({ ctx, input }) => { - const client = new HomeAssistantIntegration(ctx.integration); + .mutation(async ({ ctx: { integration }, input }) => { + const client = integrationCreator(integration); return await client.triggerToggleAsync(input.entityId); }), executeAutomation: publicProcedure - .unstable_concat(createOneIntegrationMiddleware("interact", "homeAssistant")) + .unstable_concat(createSmartHomeIntegrationMiddleware("interact")) .input(z.object({ automationId: z.string() })) - .mutation(async ({ input, ctx }) => { - const client = new HomeAssistantIntegration(ctx.integration); + .mutation(async ({ ctx: { integration }, input }) => { + const client = integrationCreator(integration); await client.triggerAutomationAsync(input.automationId); }), }); diff --git a/packages/auth/client.ts b/packages/auth/client.ts index ab914304f..0e543ce6c 100644 --- a/packages/auth/client.ts +++ b/packages/auth/client.ts @@ -1 +1,2 @@ export { signIn, signOut, useSession, SessionProvider } from "next-auth/react"; +export * from "./permissions/integration-provider"; diff --git a/packages/auth/package.json b/packages/auth/package.json index 6f4ea6af2..eaca572c6 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -33,8 +33,8 @@ "@t3-oss/env-nextjs": "^0.11.1", "bcrypt": "^5.1.1", "cookies": "^0.9.1", - "ldapts": "7.1.1", - "next": "^14.2.8", + "ldapts": "7.2.0", + "next": "^14.2.11", "next-auth": "5.0.0-beta.20", "react": "^18.3.1", "react-dom": "^18.3.1" @@ -45,8 +45,8 @@ "@homarr/tsconfig": "workspace:^0.1.0", "@types/bcrypt": "5.0.2", "@types/cookies": "0.9.0", - "eslint": "^9.9.1", + "eslint": "^9.10.0", "prettier": "^3.3.3", - "typescript": "^5.5.4" + "typescript": "^5.6.2" } } diff --git a/packages/auth/permissions/integration-permissions.ts b/packages/auth/permissions/integration-permissions.ts index d8c4d2127..0ab30322d 100644 --- a/packages/auth/permissions/integration-permissions.ts +++ b/packages/auth/permissions/integration-permissions.ts @@ -13,14 +13,14 @@ export interface IntegrationPermissionsProps { export const constructIntegrationPermissions = (integration: IntegrationPermissionsProps, session: Session | null) => { return { - hasFullAccess: session?.user.permissions.includes("integration-full-all"), + hasFullAccess: session?.user.permissions.includes("integration-full-all") ?? false, hasInteractAccess: integration.userPermissions.some(({ permission }) => permission === "interact") || integration.groupPermissions.some(({ permission }) => permission === "interact") || - session?.user.permissions.includes("integration-interact-all"), + (session?.user.permissions.includes("integration-interact-all") ?? false), hasUseAccess: integration.userPermissions.length >= 1 || integration.groupPermissions.length >= 1 || - session?.user.permissions.includes("integration-use-all"), + (session?.user.permissions.includes("integration-use-all") ?? false), }; }; diff --git a/packages/auth/permissions/integration-provider.tsx b/packages/auth/permissions/integration-provider.tsx new file mode 100644 index 000000000..f1f8eef9a --- /dev/null +++ b/packages/auth/permissions/integration-provider.tsx @@ -0,0 +1,54 @@ +"use client"; + +import type { PropsWithChildren } from "react"; +import { createContext, useContext } from "react"; + +interface IntegrationContextProps { + integrations: { + id: string; + name: string; + url: string; + kind: string; + permissions: { + hasFullAccess: boolean; + hasInteractAccess: boolean; + hasUseAccess: boolean; + }; + }[]; +} + +const IntegrationContext = createContext(null); + +export const IntegrationProvider = ({ integrations, children }: PropsWithChildren) => { + return {children}; +}; + +export const useIntegrationsWithUseAccess = () => { + const context = useContext(IntegrationContext); + + if (!context) { + throw new Error("useIntegrationsWithUseAccess must be used within an IntegrationProvider"); + } + + return context.integrations.filter((integration) => integration.permissions.hasUseAccess); +}; + +export const useIntegrationsWithInteractAccess = () => { + const context = useContext(IntegrationContext); + + if (!context) { + throw new Error("useIntegrationsWithInteractAccess must be used within an IntegrationProvider"); + } + + return context.integrations.filter((integration) => integration.permissions.hasInteractAccess); +}; + +export const useIntegrationsWithFullAccess = () => { + const context = useContext(IntegrationContext); + + if (!context) { + throw new Error("useIntegrationsWithFullAccess must be used within an IntegrationProvider"); + } + + return context.integrations.filter((integration) => integration.permissions.hasFullAccess); +}; diff --git a/packages/auth/permissions/integrations-with-permissions.ts b/packages/auth/permissions/integrations-with-permissions.ts new file mode 100644 index 000000000..98a25be66 --- /dev/null +++ b/packages/auth/permissions/integrations-with-permissions.ts @@ -0,0 +1,36 @@ +import type { Session } from "@auth/core/types"; + +import { db, eq, inArray } from "@homarr/db"; +import { groupMembers, integrationGroupPermissions, integrationUserPermissions } from "@homarr/db/schema/sqlite"; + +import { constructIntegrationPermissions } from "./integration-permissions"; + +export const getIntegrationsWithPermissionsAsync = async (session: Session | null) => { + const groupsOfCurrentUser = await db.query.groupMembers.findMany({ + where: eq(groupMembers.userId, session?.user.id ?? ""), + }); + const integrations = await db.query.integrations.findMany({ + columns: { + id: true, + name: true, + url: true, + kind: true, + }, + with: { + userPermissions: { + where: eq(integrationUserPermissions.userId, session?.user.id ?? ""), + }, + groupPermissions: { + where: inArray( + integrationGroupPermissions.groupId, + groupsOfCurrentUser.map((group) => group.groupId), + ), + }, + }, + }); + + return integrations.map(({ userPermissions, groupPermissions, ...integration }) => ({ + ...integration, + permissions: constructIntegrationPermissions({ userPermissions, groupPermissions }, session), + })); +}; diff --git a/packages/auth/server.ts b/packages/auth/server.ts index ae11f0f60..903902f62 100644 --- a/packages/auth/server.ts +++ b/packages/auth/server.ts @@ -1,2 +1,3 @@ export { hasQueryAccessToIntegrationsAsync } from "./permissions/integration-query-permissions"; +export { getIntegrationsWithPermissionsAsync } from "./permissions/integrations-with-permissions"; export { isProviderEnabled } from "./providers/check-provider"; diff --git a/packages/cli/package.json b/packages/cli/package.json index 6376fb9b9..53f9f1a1d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -33,7 +33,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/common/package.json b/packages/common/package.json index dde0170e7..57eefabcd 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -26,15 +26,15 @@ "prettier": "@homarr/prettier-config", "dependencies": { "dayjs": "^1.11.13", - "next": "^14.2.8", + "next": "^14.2.11", "react": "^18.3.1", - "tldts": "^6.1.42" + "tldts": "^6.1.44" }, "devDependencies": { "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/common/src/index.ts b/packages/common/src/index.ts index 45141ab45..f45300e32 100644 --- a/packages/common/src/index.ts +++ b/packages/common/src/index.ts @@ -7,5 +7,4 @@ export * from "./hooks"; export * from "./url"; export * from "./number"; export * from "./error"; -export * from "./encryption"; export * from "./fetch-with-timeout"; diff --git a/packages/common/src/number.ts b/packages/common/src/number.ts index 24738850d..bb479f34c 100644 --- a/packages/common/src/number.ts +++ b/packages/common/src/number.ts @@ -19,3 +19,31 @@ export const formatNumber = (value: number, decimalPlaces: number) => { export const randomInt = (min: number, max: number) => { return Math.floor(Math.random() * (max - min + 1) + min); }; + +/** + * Number of bytes to si format. (Division by 1024) + * Does not accept floats, size in bytes should be an integer. + * Will return "NaI" and logs a warning if a float is passed. + * Concat as parameters so it is not added if the returned value is "NaI" or "∞". + * Returns "∞" if the size is too large to be represented in the current format. + */ +export const humanFileSize = (size: number, concat = ""): string => { + //64bit limit for Number stops at EiB + const siRanges = ["B", "kiB", "MiB", "GiB", "TiB", "PiB", "EiB"]; + if (!Number.isInteger(size)) { + console.warn( + "Invalid use of the humanFileSize function with a float, please report this and what integration this is impacting.", + ); + //Not an Integer + return "NaI"; + } + let count = 0; + while (count < siRanges.length) { + const tempSize = size / Math.pow(1024, count); + if (tempSize < 1024) { + return tempSize.toFixed(Math.min(count, 1)) + siRanges[count] + concat; + } + count++; + } + return "∞"; +}; diff --git a/packages/common/src/server.ts b/packages/common/src/server.ts index 8916238d4..136ecfc84 100644 --- a/packages/common/src/server.ts +++ b/packages/common/src/server.ts @@ -1,2 +1,3 @@ export * from "./app-url/server"; export * from "./security"; +export * from "./encryption"; diff --git a/packages/common/src/types.ts b/packages/common/src/types.ts index 9cd354b34..e29902783 100644 --- a/packages/common/src/types.ts +++ b/packages/common/src/types.ts @@ -1 +1,7 @@ export type MaybePromise = T | Promise; + +export type AtLeastOneOf = [T, ...T[]]; + +export type Modify>> = { + [P in keyof (Omit & R)]: (Omit & R)[P]; +}; diff --git a/packages/cron-job-runner/package.json b/packages/cron-job-runner/package.json index d4a18e976..f27e3c0c8 100644 --- a/packages/cron-job-runner/package.json +++ b/packages/cron-job-runner/package.json @@ -30,7 +30,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/cron-job-status/package.json b/packages/cron-job-status/package.json index d4e8b63c4..55df95a77 100644 --- a/packages/cron-job-status/package.json +++ b/packages/cron-job-status/package.json @@ -29,7 +29,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/cron-jobs-core/package.json b/packages/cron-jobs-core/package.json index 5b78de5fa..c0efbfe82 100644 --- a/packages/cron-jobs-core/package.json +++ b/packages/cron-jobs-core/package.json @@ -32,7 +32,7 @@ "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/node-cron": "^3.0.11", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/cron-jobs/package.json b/packages/cron-jobs/package.json index 3578badcd..74704688c 100644 --- a/packages/cron-jobs/package.json +++ b/packages/cron-jobs/package.json @@ -41,7 +41,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/cron-jobs/src/index.ts b/packages/cron-jobs/src/index.ts index b28bd3eaa..f6289859e 100644 --- a/packages/cron-jobs/src/index.ts +++ b/packages/cron-jobs/src/index.ts @@ -1,6 +1,8 @@ import { analyticsJob } from "./jobs/analytics"; import { iconsUpdaterJob } from "./jobs/icons-updater"; +import { downloadsJob } from "./jobs/integrations/downloads"; import { smartHomeEntityStateJob } from "./jobs/integrations/home-assistant"; +import { indexerManagerJob } from "./jobs/integrations/indexer-manager"; import { mediaOrganizerJob } from "./jobs/integrations/media-organizer"; import { mediaRequestsJob } from "./jobs/integrations/media-requests"; import { mediaServerJob } from "./jobs/integrations/media-server"; @@ -16,8 +18,10 @@ export const jobGroup = createCronJobGroup({ smartHomeEntityState: smartHomeEntityStateJob, mediaServer: mediaServerJob, mediaOrganizer: mediaOrganizerJob, + downloads: downloadsJob, mediaRequests: mediaRequestsJob, rssFeeds: rssFeedsJob, + indexerManager: indexerManagerJob, }); export type JobGroupKeys = ReturnType<(typeof jobGroup)["getKeys"]>[number]; diff --git a/packages/cron-jobs/src/jobs/integrations/downloads.ts b/packages/cron-jobs/src/jobs/integrations/downloads.ts new file mode 100644 index 000000000..35ff36277 --- /dev/null +++ b/packages/cron-jobs/src/jobs/integrations/downloads.ts @@ -0,0 +1,27 @@ +import { EVERY_5_SECONDS } from "@homarr/cron-jobs-core/expressions"; +import { db } from "@homarr/db"; +import { getItemsWithIntegrationsAsync } from "@homarr/db/queries"; +import type { DownloadClientJobsAndStatus } from "@homarr/integrations"; +import { integrationCreatorFromSecrets } from "@homarr/integrations"; +import { createItemAndIntegrationChannel } from "@homarr/redis"; + +import { createCronJob } from "../../lib"; + +export const downloadsJob = createCronJob("downloads", EVERY_5_SECONDS).withCallback(async () => { + const itemsForIntegration = await getItemsWithIntegrationsAsync(db, { + kinds: ["downloads"], + }); + + for (const itemForIntegration of itemsForIntegration) { + for (const { integration } of itemForIntegration.integrations) { + const integrationInstance = integrationCreatorFromSecrets(integration); + await integrationInstance + .getClientJobsAndStatusAsync() + .then(async (data) => { + const channel = createItemAndIntegrationChannel("downloads", integration.id); + await channel.publishAndUpdateLastStateAsync(data); + }) + .catch((error) => console.error(`Could not retrieve data for ${integration.name}: "${error}"`)); + } + } +}); diff --git a/packages/cron-jobs/src/jobs/integrations/home-assistant.ts b/packages/cron-jobs/src/jobs/integrations/home-assistant.ts index ddb1919b1..782bb5bbc 100644 --- a/packages/cron-jobs/src/jobs/integrations/home-assistant.ts +++ b/packages/cron-jobs/src/jobs/integrations/home-assistant.ts @@ -1,10 +1,9 @@ import SuperJSON from "superjson"; -import { decryptSecret } from "@homarr/common"; import { EVERY_MINUTE } from "@homarr/cron-jobs-core/expressions"; -import { db, eq } from "@homarr/db"; -import { items } from "@homarr/db/schema/sqlite"; -import { HomeAssistantIntegration } from "@homarr/integrations"; +import { db } from "@homarr/db"; +import { getItemsWithIntegrationsAsync } from "@homarr/db/queries"; +import { integrationCreatorFromSecrets } from "@homarr/integrations"; import { logger } from "@homarr/log"; import { homeAssistantEntityState } from "@homarr/redis"; @@ -13,24 +12,8 @@ import type { WidgetComponentProps } from "../../../../widgets"; import { createCronJob } from "../../lib"; export const smartHomeEntityStateJob = createCronJob("smartHomeEntityState", EVERY_MINUTE).withCallback(async () => { - const itemsForIntegration = await db.query.items.findMany({ - where: eq(items.kind, "smartHome-entityState"), - with: { - integrations: { - with: { - integration: { - with: { - secrets: { - columns: { - kind: true, - value: true, - }, - }, - }, - }, - }, - }, - }, + const itemsForIntegration = await getItemsWithIntegrationsAsync(db, { + kinds: ["smartHome-entityState"], }); for (const itemForIntegration of itemsForIntegration) { @@ -43,13 +26,7 @@ export const smartHomeEntityStateJob = createCronJob("smartHomeEntityState", EVE itemForIntegration.options, ); - const homeAssistant = new HomeAssistantIntegration({ - ...integration, - decryptedSecrets: integration.secrets.map((secret) => ({ - ...secret, - value: decryptSecret(secret.value), - })), - }); + const homeAssistant = integrationCreatorFromSecrets(integration); const state = await homeAssistant.getEntityStateAsync(options.entityId); if (!state.success) { diff --git a/packages/cron-jobs/src/jobs/integrations/indexer-manager.ts b/packages/cron-jobs/src/jobs/integrations/indexer-manager.ts new file mode 100644 index 000000000..858e0c84a --- /dev/null +++ b/packages/cron-jobs/src/jobs/integrations/indexer-manager.ts @@ -0,0 +1,19 @@ +import { EVERY_MINUTE } from "@homarr/cron-jobs-core/expressions"; +import { db } from "@homarr/db"; +import { getItemsWithIntegrationsAsync } from "@homarr/db/queries"; +import { integrationCreatorFromSecrets } from "@homarr/integrations"; + +import { createCronJob } from "../../lib"; + +export const indexerManagerJob = createCronJob("indexerManager", EVERY_MINUTE).withCallback(async () => { + const itemsForIntegration = await getItemsWithIntegrationsAsync(db, { + kinds: ["indexerManager"], + }); + + for (const itemForIntegration of itemsForIntegration) { + for (const { integration } of itemForIntegration.integrations) { + const integrationInstance = integrationCreatorFromSecrets(integration); + await integrationInstance.getIndexersAsync(); + } + } +}); diff --git a/packages/cron-jobs/src/jobs/integrations/media-organizer.ts b/packages/cron-jobs/src/jobs/integrations/media-organizer.ts index 2daf7bd9b..be088b448 100644 --- a/packages/cron-jobs/src/jobs/integrations/media-organizer.ts +++ b/packages/cron-jobs/src/jobs/integrations/media-organizer.ts @@ -1,11 +1,11 @@ import dayjs from "dayjs"; import SuperJSON from "superjson"; -import { decryptSecret } from "@homarr/common"; +import type { Modify } from "@homarr/common/types"; import { EVERY_MINUTE } from "@homarr/cron-jobs-core/expressions"; -import { db, eq } from "@homarr/db"; -import { items } from "@homarr/db/schema/sqlite"; -import { SonarrIntegration } from "@homarr/integrations"; +import { db } from "@homarr/db"; +import { getItemsWithIntegrationsAsync } from "@homarr/db/queries"; +import { integrationCreatorFromSecrets } from "@homarr/integrations"; import type { CalendarEvent } from "@homarr/integrations/types"; import { createItemAndIntegrationChannel } from "@homarr/redis"; @@ -14,43 +14,25 @@ import type { WidgetComponentProps } from "../../../../widgets"; import { createCronJob } from "../../lib"; export const mediaOrganizerJob = createCronJob("mediaOrganizer", EVERY_MINUTE).withCallback(async () => { - const itemsForIntegration = await db.query.items.findMany({ - where: eq(items.kind, "calendar"), - with: { - integrations: { - with: { - integration: { - with: { - secrets: { - columns: { - kind: true, - value: true, - }, - }, - }, - }, - }, - }, - }, + const itemsForIntegration = await getItemsWithIntegrationsAsync(db, { + kinds: ["calendar"], }); for (const itemForIntegration of itemsForIntegration) { - for (const integration of itemForIntegration.integrations) { + for (const { integration } of itemForIntegration.integrations) { const options = SuperJSON.parse["options"]>(itemForIntegration.options); const start = dayjs().subtract(Number(options.filterPastMonths), "months").toDate(); const end = dayjs().add(Number(options.filterFutureMonths), "months").toDate(); - const sonarr = new SonarrIntegration({ - ...integration.integration, - decryptedSecrets: integration.integration.secrets.map((secret) => ({ - ...secret, - value: decryptSecret(secret.value), - })), - }); - const events = await sonarr.getCalendarEventsAsync(start, end); + //Asserting the integration kind until all of them get implemented + const integrationInstance = integrationCreatorFromSecrets( + integration as Modify, + ); - const cache = createItemAndIntegrationChannel("calendar", integration.integrationId); + const events = await integrationInstance.getCalendarEventsAsync(start, end); + + const cache = createItemAndIntegrationChannel("calendar", integration.id); await cache.setAsync(events); } } diff --git a/packages/cron-jobs/src/jobs/integrations/media-requests.ts b/packages/cron-jobs/src/jobs/integrations/media-requests.ts index c97645bd5..8e34d7305 100644 --- a/packages/cron-jobs/src/jobs/integrations/media-requests.ts +++ b/packages/cron-jobs/src/jobs/integrations/media-requests.ts @@ -1,9 +1,8 @@ -import { decryptSecret } from "@homarr/common"; import { EVERY_5_SECONDS } from "@homarr/cron-jobs-core/expressions"; import { db } from "@homarr/db"; import { getItemsWithIntegrationsAsync } from "@homarr/db/queries"; import type { MediaRequestList, MediaRequestStats } from "@homarr/integrations"; -import { integrationCreatorByKind } from "@homarr/integrations"; +import { integrationCreatorFromSecrets } from "@homarr/integrations"; import { createItemAndIntegrationChannel } from "@homarr/redis"; import { createCronJob } from "../../lib"; @@ -14,23 +13,15 @@ export const mediaRequestsJob = createCronJob("mediaRequests", EVERY_5_SECONDS). }); for (const itemForIntegration of itemsForIntegration) { - for (const { integration, integrationId } of itemForIntegration.integrations) { - const integrationWithSecrets = { - ...integration, - decryptedSecrets: integration.secrets.map((secret) => ({ - ...secret, - value: decryptSecret(secret.value), - })), - }; - - const requestsIntegration = integrationCreatorByKind(integration.kind, integrationWithSecrets); + for (const { integration } of itemForIntegration.integrations) { + const requestsIntegration = integrationCreatorFromSecrets(integration); const mediaRequests = await requestsIntegration.getRequestsAsync(); const requestsStats = await requestsIntegration.getStatsAsync(); const requestsUsers = await requestsIntegration.getUsersAsync(); const requestListChannel = createItemAndIntegrationChannel( "mediaRequests-requestList", - integrationId, + integration.id, ); await requestListChannel.publishAndUpdateLastStateAsync({ integration: { id: integration.id }, @@ -39,7 +30,7 @@ export const mediaRequestsJob = createCronJob("mediaRequests", EVERY_5_SECONDS). const requestStatsChannel = createItemAndIntegrationChannel( "mediaRequests-requestStats", - integrationId, + integration.id, ); await requestStatsChannel.publishAndUpdateLastStateAsync({ integration: { kind: integration.kind, name: integration.name }, diff --git a/packages/cron-jobs/src/jobs/integrations/media-server.ts b/packages/cron-jobs/src/jobs/integrations/media-server.ts index 9adb806b8..88c7e85ba 100644 --- a/packages/cron-jobs/src/jobs/integrations/media-server.ts +++ b/packages/cron-jobs/src/jobs/integrations/media-server.ts @@ -1,44 +1,21 @@ -import { decryptSecret } from "@homarr/common"; import { EVERY_5_SECONDS } from "@homarr/cron-jobs-core/expressions"; -import { db, eq } from "@homarr/db"; -import { items } from "@homarr/db/schema/sqlite"; -import { JellyfinIntegration } from "@homarr/integrations"; +import { db } from "@homarr/db"; +import { getItemsWithIntegrationsAsync } from "@homarr/db/queries"; +import { integrationCreatorFromSecrets } from "@homarr/integrations"; import { createItemAndIntegrationChannel } from "@homarr/redis"; import { createCronJob } from "../../lib"; export const mediaServerJob = createCronJob("mediaServer", EVERY_5_SECONDS).withCallback(async () => { - const itemsForIntegration = await db.query.items.findMany({ - where: eq(items.kind, "mediaServer"), - with: { - integrations: { - with: { - integration: { - with: { - secrets: { - columns: { - kind: true, - value: true, - }, - }, - }, - }, - }, - }, - }, + const itemsForIntegration = await getItemsWithIntegrationsAsync(db, { + kinds: ["mediaServer"], }); for (const itemForIntegration of itemsForIntegration) { - for (const integration of itemForIntegration.integrations) { - const jellyfinIntegration = new JellyfinIntegration({ - ...integration.integration, - decryptedSecrets: integration.integration.secrets.map((secret) => ({ - ...secret, - value: decryptSecret(secret.value), - })), - }); - const streamSessions = await jellyfinIntegration.getCurrentSessionsAsync(); - const channel = createItemAndIntegrationChannel("mediaServer", integration.integrationId); + for (const { integration } of itemForIntegration.integrations) { + const integrationInstance = integrationCreatorFromSecrets(integration); + const streamSessions = await integrationInstance.getCurrentSessionsAsync(); + const channel = createItemAndIntegrationChannel("mediaServer", integration.id); await channel.publishAndUpdateLastStateAsync(streamSessions); } } diff --git a/packages/cron-jobs/src/jobs/rss-feeds.ts b/packages/cron-jobs/src/jobs/rss-feeds.ts index 510eeef38..5c468520d 100644 --- a/packages/cron-jobs/src/jobs/rss-feeds.ts +++ b/packages/cron-jobs/src/jobs/rss-feeds.ts @@ -2,6 +2,7 @@ import type { FeedData, FeedEntry } from "@extractus/feed-extractor"; import { extract } from "@extractus/feed-extractor"; import SuperJSON from "superjson"; +import type { Modify } from "@homarr/common/types"; import { EVERY_5_MINUTES } from "@homarr/cron-jobs-core/expressions"; import { db, eq } from "@homarr/db"; import { items } from "@homarr/db/schema/sqlite"; @@ -125,9 +126,12 @@ interface ExtendedFeedEntry extends FeedEntry { * We extend the feed with custom properties. * This interface omits the default entries with our custom definition. */ -interface ExtendedFeedData extends Omit { - entries?: ExtendedFeedEntry; -} +type ExtendedFeedData = Modify< + FeedData, + { + entries?: ExtendedFeedEntry; + } +>; export interface RssFeed { feedUrl: string; diff --git a/packages/db/package.json b/packages/db/package.json index 43497e5b3..663150cb6 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -36,11 +36,11 @@ "@homarr/definitions": "workspace:^0.1.0", "@homarr/log": "workspace:^0.1.0", "@paralleldrive/cuid2": "^2.2.2", - "better-sqlite3": "^11.2.1", + "better-sqlite3": "^11.3.0", "dotenv": "^16.4.5", "drizzle-kit": "^0.24.2", "drizzle-orm": "^0.33.0", - "mysql2": "3.11.0" + "mysql2": "3.11.2" }, "devDependencies": { "@homarr/eslint-config": "workspace:^0.2.0", @@ -48,8 +48,8 @@ "@homarr/tsconfig": "workspace:^0.1.0", "@types/better-sqlite3": "7.6.11", "dotenv-cli": "^7.4.2", - "eslint": "^9.9.1", + "eslint": "^9.10.0", "prettier": "^3.3.3", - "typescript": "^5.5.4" + "typescript": "^5.6.2" } } diff --git a/packages/definitions/package.json b/packages/definitions/package.json index 7b025b25f..4598432cf 100644 --- a/packages/definitions/package.json +++ b/packages/definitions/package.json @@ -28,7 +28,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/definitions/src/integration.ts b/packages/definitions/src/integration.ts index fbe355d6f..94736e857 100644 --- a/packages/definitions/src/integration.ts +++ b/packages/definitions/src/integration.ts @@ -1,4 +1,5 @@ import { objectKeys } from "@homarr/common"; +import type { AtLeastOneOf } from "@homarr/common/types"; export const integrationSecretKindObject = { apiKey: { isPublic: false }, @@ -8,36 +9,43 @@ export const integrationSecretKindObject = { export const integrationSecretKinds = objectKeys(integrationSecretKindObject); +interface integrationDefinition { + name: string; + iconUrl: string; + secretKinds: AtLeastOneOf; // at least one secret kind set is required + category: AtLeastOneOf; +} + export const integrationDefs = { sabNzbd: { name: "SABnzbd", secretKinds: [["apiKey"]], iconUrl: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/sabnzbd.png", - category: ["useNetClient"], + category: ["downloadClient", "usenet"], }, nzbGet: { name: "NZBGet", secretKinds: [["username", "password"]], iconUrl: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/nzbget.png", - category: ["useNetClient"], + category: ["downloadClient", "usenet"], }, deluge: { name: "Deluge", secretKinds: [["password"]], iconUrl: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/deluge.png", - category: ["downloadClient"], + category: ["downloadClient", "torrent"], }, transmission: { name: "Transmission", secretKinds: [["username", "password"]], iconUrl: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/transmission.png", - category: ["downloadClient"], + category: ["downloadClient", "torrent"], }, qBittorrent: { name: "qBittorrent", secretKinds: [["username", "password"]], iconUrl: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/qbittorrent.png", - category: ["downloadClient"], + category: ["downloadClient", "torrent"], }, sonarr: { name: "Sonarr", @@ -111,15 +119,9 @@ export const integrationDefs = { iconUrl: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/home-assistant.png", category: ["smartHomeServer"], }, -} satisfies Record< - string, - { - name: string; - iconUrl: string; - secretKinds: [IntegrationSecretKind[], ...IntegrationSecretKind[][]]; // at least one secret kind set is required - category: IntegrationCategory[]; - } ->; +} as const satisfies Record; + +export const integrationKinds = objectKeys(integrationDefs) as AtLeastOneOf; export const getIconUrl = (integration: IntegrationKind) => integrationDefs[integration].iconUrl; @@ -128,14 +130,34 @@ export const getIntegrationName = (integration: IntegrationKind) => integrationD export const getDefaultSecretKinds = (integration: IntegrationKind): IntegrationSecretKind[] => integrationDefs[integration].secretKinds[0]; -export const getAllSecretKindOptions = ( - integration: IntegrationKind, -): [IntegrationSecretKind[], ...IntegrationSecretKind[][]] => integrationDefs[integration].secretKinds; +export const getAllSecretKindOptions = (integration: IntegrationKind): AtLeastOneOf => + integrationDefs[integration].secretKinds; -export const integrationKinds = objectKeys(integrationDefs); +/** + * Get all integration kinds that share a category, typed only by the kinds belonging to the category + * @param category Category to filter by, belonging to IntegrationCategory + * @returns Partial list of integration kinds + */ +export const getIntegrationKindsByCategory = (category: TCategory) => { + return objectKeys(integrationDefs).filter((integration) => + integrationDefs[integration].category.some((defCategory) => defCategory === category), + ) as AtLeastOneOf>; +}; -export type IntegrationSecretKind = (typeof integrationSecretKinds)[number]; -export type IntegrationKind = (typeof integrationKinds)[number]; +/** + * Directly get the types of the list returned by getIntegrationKindsByCategory + */ +export type IntegrationKindByCategory = { + [Key in keyof typeof integrationDefs]: TCategory extends (typeof integrationDefs)[Key]["category"][number] + ? Key + : never; +}[keyof typeof integrationDefs] extends infer U + ? //Needed to simplify the type when using it + U + : never; + +export type IntegrationSecretKind = keyof typeof integrationSecretKindObject; +export type IntegrationKind = keyof typeof integrationDefs; export type IntegrationCategory = | "dnsHole" | "mediaService" @@ -143,6 +165,7 @@ export type IntegrationCategory = | "mediaSearch" | "mediaRequest" | "downloadClient" - | "useNetClient" + | "usenet" + | "torrent" | "smartHomeServer" | "indexerManager"; diff --git a/packages/definitions/src/widget.ts b/packages/definitions/src/widget.ts index c6a498489..fba9af698 100644 --- a/packages/definitions/src/widget.ts +++ b/packages/definitions/src/widget.ts @@ -11,8 +11,10 @@ export const widgetKinds = [ "smartHome-executeAutomation", "mediaServer", "calendar", + "downloads", "mediaRequests-requestList", "mediaRequests-requestStats", "rssFeed", + "indexerManager", ] as const; export type WidgetKind = (typeof widgetKinds)[number]; diff --git a/packages/form/package.json b/packages/form/package.json index 9c150c670..5f0ca96e1 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -30,7 +30,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/icons/package.json b/packages/icons/package.json index 3926129c9..fffb4fe7d 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -29,7 +29,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/integrations/package.json b/packages/integrations/package.json index eef4cd8d2..206b71a33 100644 --- a/packages/integrations/package.json +++ b/packages/integrations/package.json @@ -24,18 +24,23 @@ }, "prettier": "@homarr/prettier-config", "dependencies": { + "@ctrl/deluge": "^6.1.0", + "@ctrl/qbittorrent": "^9.0.1", + "@ctrl/transmission": "^6.1.0", "@homarr/common": "workspace:^0.1.0", + "@homarr/db": "workspace:^0.1.0", "@homarr/definitions": "workspace:^0.1.0", "@homarr/log": "workspace:^0.1.0", "@homarr/translation": "workspace:^0.1.0", "@homarr/validation": "workspace:^0.1.0", - "@jellyfin/sdk": "^0.10.0" + "@jellyfin/sdk": "^0.10.0", + "typed-rpc": "^5.1.0" }, "devDependencies": { "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/integrations/src/base/creator.ts b/packages/integrations/src/base/creator.ts index 27c289ef2..2a1c46969 100644 --- a/packages/integrations/src/base/creator.ts +++ b/packages/integrations/src/base/creator.ts @@ -1,24 +1,48 @@ -import type { IntegrationKind } from "@homarr/definitions"; +import { decryptSecret } from "@homarr/common/server"; +import type { Modify } from "@homarr/common/types"; +import type { Integration as DbIntegration } from "@homarr/db/schema/sqlite"; +import type { IntegrationKind, IntegrationSecretKind } from "@homarr/definitions"; import { AdGuardHomeIntegration } from "../adguard-home/adguard-home-integration"; +import { DelugeIntegration } from "../download-client/deluge/deluge-integration"; +import { NzbGetIntegration } from "../download-client/nzbget/nzbget-integration"; +import { QBitTorrentIntegration } from "../download-client/qbittorrent/qbittorrent-integration"; +import { SabnzbdIntegration } from "../download-client/sabnzbd/sabnzbd-integration"; +import { TransmissionIntegration } from "../download-client/transmission/transmission-integration"; import { HomeAssistantIntegration } from "../homeassistant/homeassistant-integration"; import { JellyfinIntegration } from "../jellyfin/jellyfin-integration"; import { JellyseerrIntegration } from "../jellyseerr/jellyseerr-integration"; +import { RadarrIntegration } from "../media-organizer/radarr/radarr-integration"; import { SonarrIntegration } from "../media-organizer/sonarr/sonarr-integration"; import { OverseerrIntegration } from "../overseerr/overseerr-integration"; import { PiHoleIntegration } from "../pi-hole/pi-hole-integration"; import { ProwlarrIntegration } from "../prowlarr/prowlarr-integration"; import type { Integration, IntegrationInput } from "./integration"; -export const integrationCreatorByKind = ( - kind: TKind, - integration: IntegrationInput, +export const integrationCreator = ( + integration: IntegrationInput & { kind: TKind }, ) => { - if (!(kind in integrationCreators)) { - throw new Error(`Unknown integration kind ${kind}. Did you forget to add it to the integration creator?`); + if (!(integration.kind in integrationCreators)) { + throw new Error( + `Unknown integration kind ${integration.kind}. Did you forget to add it to the integration creator?`, + ); } - return new integrationCreators[kind](integration) as InstanceType<(typeof integrationCreators)[TKind]>; + return new integrationCreators[integration.kind](integration) as InstanceType<(typeof integrationCreators)[TKind]>; +}; + +export const integrationCreatorFromSecrets = ( + integration: Modify & { + secrets: { kind: IntegrationSecretKind; value: `${string}.${string}` }[]; + }, +) => { + return integrationCreator({ + ...integration, + decryptedSecrets: integration.secrets.map((secret) => ({ + ...secret, + value: decryptSecret(secret.value), + })), + }); }; export const integrationCreators = { @@ -27,6 +51,12 @@ export const integrationCreators = { homeAssistant: HomeAssistantIntegration, jellyfin: JellyfinIntegration, sonarr: SonarrIntegration, + radarr: RadarrIntegration, + sabNzbd: SabnzbdIntegration, + nzbGet: NzbGetIntegration, + qBittorrent: QBitTorrentIntegration, + deluge: DelugeIntegration, + transmission: TransmissionIntegration, jellyseerr: JellyseerrIntegration, overseerr: OverseerrIntegration, prowlarr: ProwlarrIntegration, diff --git a/packages/integrations/src/download-client/deluge/deluge-integration.ts b/packages/integrations/src/download-client/deluge/deluge-integration.ts new file mode 100644 index 000000000..ae7d18b36 --- /dev/null +++ b/packages/integrations/src/download-client/deluge/deluge-integration.ts @@ -0,0 +1,116 @@ +import { Deluge } from "@ctrl/deluge"; +import dayjs from "dayjs"; + +import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; +import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; +import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; +import type { DownloadClientStatus } from "../../interfaces/downloads/download-client-status"; + +export class DelugeIntegration extends DownloadClientIntegration { + public async testConnectionAsync(): Promise { + const client = this.getClient(); + await client.login(); + } + + public async getClientJobsAndStatusAsync(): Promise { + const type = "torrent"; + const client = this.getClient(); + const { + stats: { download_rate, upload_rate }, + torrents: rawTorrents, + } = (await client.listTorrents(["completed_time"])).result; + const torrents = Object.entries(rawTorrents).map(([id, torrent]) => ({ + ...(torrent as { completed_time: number } & typeof torrent), + id, + })); + const paused = torrents.find(({ state }) => DelugeIntegration.getTorrentState(state) !== "paused") === undefined; + const status: DownloadClientStatus = { + paused, + rates: { + down: Math.floor(download_rate), + up: Math.floor(upload_rate), + }, + type, + }; + const items = torrents.map((torrent): DownloadClientItem => { + const state = DelugeIntegration.getTorrentState(torrent.state); + return { + type, + id: torrent.id, + index: torrent.queue, + name: torrent.name, + size: torrent.total_wanted, + sent: torrent.total_uploaded, + downSpeed: torrent.progress !== 100 ? torrent.download_payload_rate : undefined, + upSpeed: torrent.upload_payload_rate, + time: + torrent.progress === 100 + ? Math.min((torrent.completed_time - dayjs().unix()) * 1000, -1) + : Math.max(torrent.eta * 1000, 0), + added: torrent.time_added * 1000, + state, + progress: torrent.progress / 100, + category: torrent.label, + }; + }); + return { status, items }; + } + + public async pauseQueueAsync() { + const client = this.getClient(); + const store = (await client.listTorrents()).result.torrents; + await Promise.all( + Object.entries(store).map(async ([id]) => { + await client.pauseTorrent(id); + }), + ); + } + + public async pauseItemAsync({ id }: DownloadClientItem): Promise { + await this.getClient().pauseTorrent(id); + } + + public async resumeQueueAsync() { + const client = this.getClient(); + const store = (await client.listTorrents()).result.torrents; + await Promise.all( + Object.entries(store).map(async ([id]) => { + await client.resumeTorrent(id); + }), + ); + } + + public async resumeItemAsync({ id }: DownloadClientItem): Promise { + await this.getClient().resumeTorrent(id); + } + + public async deleteItemAsync({ id }: DownloadClientItem, fromDisk: boolean): Promise { + await this.getClient().removeTorrent(id, fromDisk); + } + + private getClient() { + const baseUrl = new URL(this.integration.url).href; + return new Deluge({ + baseUrl, + password: this.getSecretValue("password"), + }); + } + + private static getTorrentState(state: string): DownloadClientItem["state"] { + switch (state) { + case "Queued": + case "Checking": + case "Allocating": + case "Downloading": + return "leeching"; + case "Seeding": + return "seeding"; + case "Paused": + return "paused"; + case "Error": + case "Moving": + default: + return "unknown"; + } + } +} diff --git a/packages/integrations/src/download-client/nzbget/nzbget-integration.ts b/packages/integrations/src/download-client/nzbget/nzbget-integration.ts new file mode 100644 index 000000000..824a47a9c --- /dev/null +++ b/packages/integrations/src/download-client/nzbget/nzbget-integration.ts @@ -0,0 +1,123 @@ +import dayjs from "dayjs"; +import { rpcClient } from "typed-rpc"; + +import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; +import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; +import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; +import type { DownloadClientStatus } from "../../interfaces/downloads/download-client-status"; +import type { NzbGetClient } from "./nzbget-types"; + +export class NzbGetIntegration extends DownloadClientIntegration { + public async testConnectionAsync(): Promise { + const client = this.getClient(); + await client.version(); + } + + public async getClientJobsAndStatusAsync(): Promise { + const type = "usenet"; + const nzbGetClient = this.getClient(); + const queue = await nzbGetClient.listgroups(); + const history = await nzbGetClient.history(); + const nzbGetStatus = await nzbGetClient.status(); + const status: DownloadClientStatus = { + paused: nzbGetStatus.DownloadPaused, + rates: { down: nzbGetStatus.DownloadRate }, + type, + }; + const items = queue + .map((file): DownloadClientItem => { + const state = NzbGetIntegration.getUsenetQueueState(file.Status); + const time = + (file.RemainingSizeLo + file.RemainingSizeHi * Math.pow(2, 32)) / (nzbGetStatus.DownloadRate / 1000); + return { + type, + id: file.NZBID.toString(), + index: file.MaxPriority, + name: file.NZBName, + size: file.FileSizeLo + file.FileSizeHi * Math.pow(2, 32), + downSpeed: file.ActiveDownloads > 0 ? nzbGetStatus.DownloadRate : 0, + time: Number.isFinite(time) ? time : 0, + added: (dayjs().unix() - file.DownloadTimeSec) * 1000, + state, + progress: file.DownloadedSizeMB / file.FileSizeMB, + category: file.Category, + }; + }) + .concat( + history.map((file, index): DownloadClientItem => { + const state = NzbGetIntegration.getUsenetHistoryState(file.ScriptStatus); + return { + type, + id: file.NZBID.toString(), + index, + name: file.Name, + size: file.FileSizeLo + file.FileSizeHi * Math.pow(2, 32), + time: (dayjs().unix() - file.HistoryTime) * 1000, + added: (file.HistoryTime - file.DownloadTimeSec) * 1000, + state, + progress: 1, + category: file.Category, + }; + }), + ); + return { status, items }; + } + + public async pauseQueueAsync() { + await this.getClient().pausedownload(); + } + + public async pauseItemAsync({ id }: DownloadClientItem): Promise { + await this.getClient().editqueue("GroupPause", "", [Number(id)]); + } + + public async resumeQueueAsync() { + await this.getClient().resumedownload(); + } + + public async resumeItemAsync({ id }: DownloadClientItem): Promise { + await this.getClient().editqueue("GroupResume", "", [Number(id)]); + } + + public async deleteItemAsync({ id, progress }: DownloadClientItem, fromDisk: boolean): Promise { + const client = this.getClient(); + if (fromDisk) { + const filesIds = (await client.listfiles(0, 0, Number(id))).map((value) => value.ID); + await this.getClient().editqueue("FileDelete", "", filesIds); + } + if (progress !== 1) { + await client.editqueue("GroupFinalDelete", "", [Number(id)]); + } else { + await client.editqueue("HistoryFinalDelete", "", [Number(id)]); + } + } + + private getClient() { + const url = new URL(this.integration.url); + url.pathname += `${this.getSecretValue("username")}:${this.getSecretValue("password")}`; + url.pathname += url.pathname.endsWith("/") ? "jsonrpc" : "/jsonrpc"; + return rpcClient(url.toString()); + } + + private static getUsenetQueueState(status: string): DownloadClientItem["state"] { + switch (status) { + case "QUEUED": + return "queued"; + case "PAUSED": + return "paused"; + default: + return "downloading"; + } + } + + private static getUsenetHistoryState(status: string): DownloadClientItem["state"] { + switch (status) { + case "FAILURE": + return "failed"; + case "SUCCESS": + return "completed"; + default: + return "processing"; + } + } +} diff --git a/packages/integrations/src/download-client/nzbget/nzbget-types.ts b/packages/integrations/src/download-client/nzbget/nzbget-types.ts new file mode 100644 index 000000000..436db45a7 --- /dev/null +++ b/packages/integrations/src/download-client/nzbget/nzbget-types.ts @@ -0,0 +1,42 @@ +export interface NzbGetClient { + version: () => string; + status: () => NzbGetStatus; + listgroups: () => NzbGetGroup[]; + history: () => NzbGetHistory[]; + pausedownload: () => void; + resumedownload: () => void; + editqueue: (Command: string, Param: string, IDs: number[]) => void; + listfiles: (IDFrom: number, IDTo: number, NZBID: number) => { ID: number }[]; +} + +interface NzbGetStatus { + DownloadPaused: boolean; + DownloadRate: number; +} + +interface NzbGetGroup { + Status: string; + NZBID: number; + MaxPriority: number; + NZBName: string; + FileSizeLo: number; + FileSizeHi: number; + ActiveDownloads: number; + RemainingSizeLo: number; + RemainingSizeHi: number; + DownloadTimeSec: number; + Category: string; + DownloadedSizeMB: number; + FileSizeMB: number; +} + +interface NzbGetHistory { + ScriptStatus: string; + NZBID: number; + Name: string; + FileSizeLo: number; + FileSizeHi: number; + HistoryTime: number; + DownloadTimeSec: number; + Category: string; +} diff --git a/packages/integrations/src/download-client/qbittorrent/qbittorrent-integration.ts b/packages/integrations/src/download-client/qbittorrent/qbittorrent-integration.ts new file mode 100644 index 000000000..407790fbf --- /dev/null +++ b/packages/integrations/src/download-client/qbittorrent/qbittorrent-integration.ts @@ -0,0 +1,112 @@ +import { QBittorrent } from "@ctrl/qbittorrent"; +import dayjs from "dayjs"; + +import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; +import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; +import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; +import type { DownloadClientStatus } from "../../interfaces/downloads/download-client-status"; + +export class QBitTorrentIntegration extends DownloadClientIntegration { + public async testConnectionAsync(): Promise { + const client = this.getClient(); + await client.login(); + } + + public async getClientJobsAndStatusAsync(): Promise { + const type = "torrent"; + const client = this.getClient(); + const torrents = await client.listTorrents(); + const rates = torrents.reduce( + ({ down, up }, { dlspeed, upspeed }) => ({ down: down + dlspeed, up: up + upspeed }), + { down: 0, up: 0 }, + ); + const paused = + torrents.find(({ state }) => QBitTorrentIntegration.getTorrentState(state) !== "paused") === undefined; + const status: DownloadClientStatus = { paused, rates, type }; + const items = torrents.map((torrent): DownloadClientItem => { + const state = QBitTorrentIntegration.getTorrentState(torrent.state); + return { + type, + id: torrent.hash, + index: torrent.priority, + name: torrent.name, + size: torrent.size, + sent: torrent.uploaded, + downSpeed: torrent.progress !== 1 ? torrent.dlspeed : undefined, + upSpeed: torrent.upspeed, + time: + torrent.progress === 1 + ? Math.min(torrent.completion_on * 1000 - dayjs().valueOf(), -1) + : torrent.eta === 8640000 + ? 0 + : Math.max(torrent.eta * 1000, 0), + added: torrent.added_on * 1000, + state, + progress: torrent.progress, + category: torrent.category, + }; + }); + return { status, items }; + } + + public async pauseQueueAsync() { + await this.getClient().pauseTorrent("all"); + } + + public async pauseItemAsync({ id }: DownloadClientItem): Promise { + await this.getClient().pauseTorrent(id); + } + + public async resumeQueueAsync() { + await this.getClient().resumeTorrent("all"); + } + + public async resumeItemAsync({ id }: DownloadClientItem): Promise { + await this.getClient().resumeTorrent(id); + } + + public async deleteItemAsync({ id }: DownloadClientItem, fromDisk: boolean): Promise { + await this.getClient().removeTorrent(id, fromDisk); + } + + private getClient() { + const baseUrl = new URL(this.integration.url).href; + return new QBittorrent({ + baseUrl, + username: this.getSecretValue("username"), + password: this.getSecretValue("password"), + }); + } + + private static getTorrentState(state: string): DownloadClientItem["state"] { + switch (state) { + case "allocating": + case "checkingDL": + case "downloading": + case "forcedDL": + case "forcedMetaDL": + case "metaDL": + case "queuedDL": + case "queuedForChecking": + return "leeching"; + case "checkingUP": + case "forcedUP": + case "queuedUP": + case "uploading": + case "stalledUP": + return "seeding"; + case "pausedDL": + case "pausedUP": + return "paused"; + case "stalledDL": + return "stalled"; + case "error": + case "checkingResumeData": + case "missingFiles": + case "moving": + case "unknown": + default: + return "unknown"; + } + } +} diff --git a/packages/integrations/src/download-client/sabnzbd/sabnzbd-integration.ts b/packages/integrations/src/download-client/sabnzbd/sabnzbd-integration.ts new file mode 100644 index 000000000..22b65d1b3 --- /dev/null +++ b/packages/integrations/src/download-client/sabnzbd/sabnzbd-integration.ts @@ -0,0 +1,149 @@ +import dayjs from "dayjs"; +import duration from "dayjs/plugin/duration"; + +import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; +import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; +import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; +import type { DownloadClientStatus } from "../../interfaces/downloads/download-client-status"; +import { historySchema, queueSchema } from "./sabnzbd-schema"; + +dayjs.extend(duration); + +export class SabnzbdIntegration extends DownloadClientIntegration { + public async testConnectionAsync(): Promise { + //This is the one call that uses the least amount of data while requiring the api key + await this.sabNzbApiCallAsync("translate", new URLSearchParams({ value: "ping" })); + } + + public async getClientJobsAndStatusAsync(): Promise { + const type = "usenet"; + const { queue } = await queueSchema.parseAsync(await this.sabNzbApiCallAsync("queue")); + const { history } = await historySchema.parseAsync(await this.sabNzbApiCallAsync("history")); + const status: DownloadClientStatus = { + paused: queue.paused, + rates: { down: Math.floor(Number(queue.kbpersec) * 1024) }, //Actually rounded kiBps () + type, + }; + const items = queue.slots + .map((slot): DownloadClientItem => { + const state = SabnzbdIntegration.getUsenetQueueState(slot.status); + const times = slot.timeleft.split(":").reverse(); + const time = dayjs + .duration({ + seconds: Number(times[0] ?? 0), + minutes: Number(times[1] ?? 0), + hours: Number(times[2] ?? 0), + days: Number(times[3] ?? 0), + }) + .asMilliseconds(); + return { + type, + id: slot.nzo_id, + index: slot.index, + name: slot.filename, + size: Math.ceil(parseFloat(slot.mb) * 1024 * 1024), //Actually rounded MiB + downSpeed: slot.index > 0 ? 0 : status.rates.down, + time, + //added: 0, <- Only part from all integrations that is missing the timestamp (or from which it could be inferred) + state, + progress: parseFloat(slot.percentage) / 100, + category: slot.cat, + }; + }) + .concat( + history.slots.map((slot, index): DownloadClientItem => { + const state = SabnzbdIntegration.getUsenetHistoryState(slot.status); + return { + type, + id: slot.nzo_id, + index, + name: slot.name, + size: slot.bytes, + time: slot.completed * 1000 - dayjs().valueOf(), + added: (slot.completed - slot.download_time - slot.postproc_time) * 1000, + state, + progress: 1, + category: slot.category, + }; + }), + ); + return { status, items }; + } + + public async pauseQueueAsync() { + await this.sabNzbApiCallAsync("pause"); + } + + public async pauseItemAsync({ id }: DownloadClientItem) { + await this.sabNzbApiCallAsync("queue", new URLSearchParams({ name: "pause", value: id })); + } + + public async resumeQueueAsync() { + await this.sabNzbApiCallAsync("resume"); + } + + public async resumeItemAsync({ id }: DownloadClientItem): Promise { + await this.sabNzbApiCallAsync("queue", new URLSearchParams({ name: "resume", value: id })); + } + + //Delete files prevented on completed files. https://github.com/sabnzbd/sabnzbd/issues/2754 + //Works on all other in downloading and post-processing. + //Will stop working as soon as the finished files is moved to completed folder. + public async deleteItemAsync({ id, progress }: DownloadClientItem, fromDisk: boolean): Promise { + await this.sabNzbApiCallAsync( + progress !== 1 ? "queue" : "history", + new URLSearchParams({ + name: "delete", + archive: fromDisk ? "0" : "1", + value: id, + del_files: fromDisk ? "1" : "0", + }), + ); + } + + private async sabNzbApiCallAsync(mode: string, searchParams?: URLSearchParams): Promise { + const url = new URL("api", this.integration.url); + url.searchParams.append("output", "json"); + url.searchParams.append("mode", mode); + searchParams?.forEach((value, key) => { + url.searchParams.append(key, value); + }); + url.searchParams.append("apikey", this.getSecretValue("apiKey")); + return await fetch(url) + .then((response) => { + if (!response.ok) { + throw new Error(response.statusText); + } + return response.json() as Promise; + }) + .catch((error) => { + if (error instanceof Error) { + throw new Error(error.message); + } else { + throw new Error("Error communicating with SABnzbd"); + } + }); + } + + private static getUsenetQueueState(status: string): DownloadClientItem["state"] { + switch (status) { + case "Queued": + return "queued"; + case "Paused": + return "paused"; + default: + return "downloading"; + } + } + + private static getUsenetHistoryState(status: string): DownloadClientItem["state"] { + switch (status) { + case "Completed": + return "completed"; + case "Failed": + return "failed"; + default: + return "processing"; + } + } +} diff --git a/packages/integrations/src/download-client/sabnzbd/sabnzbd-schema.ts b/packages/integrations/src/download-client/sabnzbd/sabnzbd-schema.ts new file mode 100644 index 000000000..9ea91c16c --- /dev/null +++ b/packages/integrations/src/download-client/sabnzbd/sabnzbd-schema.ts @@ -0,0 +1,121 @@ +import { z } from "@homarr/validation"; + +export const queueSchema = z.object({ + queue: z.object({ + status: z.string(), + speedlimit: z.string(), + speedlimit_abs: z.string(), + paused: z.boolean(), + noofslots_total: z.number(), + noofslots: z.number(), + limit: z.number(), + start: z.number(), + timeleft: z.string(), + speed: z.string(), + kbpersec: z.string(), + size: z.string(), + sizeleft: z.string(), + mb: z.string(), + mbleft: z.string(), + slots: z.array( + z.object({ + status: z.string(), + index: z.number(), + password: z.string(), + avg_age: z.string(), + script: z.string(), + has_rating: z.boolean().optional(), + mb: z.string(), + mbleft: z.string(), + mbmissing: z.string(), + size: z.string(), + sizeleft: z.string(), + filename: z.string(), + labels: z.array(z.string().or(z.null())).or(z.null()).optional(), + priority: z + .number() + .or(z.string()) + .transform((priority) => (typeof priority === "number" ? priority : parseInt(priority))), + cat: z.string(), + timeleft: z.string(), + percentage: z.string(), + nzo_id: z.string(), + unpackopts: z.string(), + }), + ), + categories: z.array(z.string()).or(z.null()).optional(), + scripts: z.array(z.string()).or(z.null()).optional(), + diskspace1: z.string(), + diskspace2: z.string(), + diskspacetotal1: z.string(), + diskspacetotal2: z.string(), + diskspace1_norm: z.string(), + diskspace2_norm: z.string(), + have_warnings: z.string(), + pause_int: z.string(), + loadavg: z.string().optional(), + left_quota: z.string(), + version: z.string(), + finish: z.number(), + cache_art: z.string(), + cache_size: z.string(), + finishaction: z.null().optional(), + paused_all: z.boolean(), + quota: z.string(), + have_quota: z.boolean(), + queue_details: z.string().optional(), + }), +}); + +export const historySchema = z.object({ + history: z.object({ + noofslots: z.number(), + day_size: z.string(), + week_size: z.string(), + month_size: z.string(), + total_size: z.string(), + last_history_update: z.number(), + slots: z.array( + z.object({ + action_line: z.string(), + series: z.string().or(z.null()).optional(), + script_log: z.string().optional(), + meta: z.null().optional(), + fail_message: z.string(), + loaded: z.boolean(), + id: z.number().optional(), + size: z.string(), + category: z.string(), + pp: z.string(), + retry: z.number(), + script: z.string(), + nzb_name: z.string(), + download_time: z.number(), + storage: z.string(), + has_rating: z.boolean().optional(), + status: z.string(), + script_line: z.string(), + completed: z.number(), + nzo_id: z.string(), + downloaded: z.number(), + report: z.string(), + password: z.string().or(z.null()).optional(), + path: z.string(), + postproc_time: z.number(), + name: z.string(), + url: z.string().or(z.null()).optional(), + md5sum: z.string(), + bytes: z.number(), + url_info: z.string(), + stage_log: z + .array( + z.object({ + name: z.string(), + actions: z.array(z.string()).or(z.null()).optional(), + }), + ) + .optional(), + }), + ), + }), +}); diff --git a/packages/integrations/src/download-client/transmission/transmission-integration.ts b/packages/integrations/src/download-client/transmission/transmission-integration.ts new file mode 100644 index 000000000..2258546b8 --- /dev/null +++ b/packages/integrations/src/download-client/transmission/transmission-integration.ts @@ -0,0 +1,99 @@ +import { Transmission } from "@ctrl/transmission"; +import dayjs from "dayjs"; + +import type { DownloadClientJobsAndStatus } from "../../interfaces/downloads/download-client-data"; +import { DownloadClientIntegration } from "../../interfaces/downloads/download-client-integration"; +import type { DownloadClientItem } from "../../interfaces/downloads/download-client-items"; +import type { DownloadClientStatus } from "../../interfaces/downloads/download-client-status"; + +export class TransmissionIntegration extends DownloadClientIntegration { + public async testConnectionAsync(): Promise { + await this.getClient().getSession(); + } + + public async getClientJobsAndStatusAsync(): Promise { + const type = "torrent"; + const client = this.getClient(); + const { torrents } = (await client.listTorrents()).arguments; + const rates = torrents.reduce( + ({ down, up }, { rateDownload, rateUpload }) => ({ down: down + rateDownload, up: up + rateUpload }), + { down: 0, up: 0 }, + ); + const paused = + torrents.find(({ status }) => TransmissionIntegration.getTorrentState(status) !== "paused") === undefined; + const status: DownloadClientStatus = { paused, rates, type }; + const items = torrents.map((torrent): DownloadClientItem => { + const state = TransmissionIntegration.getTorrentState(torrent.status); + return { + type, + id: torrent.hashString, + index: torrent.queuePosition, + name: torrent.name, + size: torrent.totalSize, + sent: torrent.uploadedEver, + downSpeed: torrent.percentDone !== 1 ? torrent.rateDownload : undefined, + upSpeed: torrent.rateUpload, + time: + torrent.percentDone === 1 + ? Math.min(torrent.doneDate * 1000 - dayjs().valueOf(), -1) + : Math.max(torrent.eta * 1000, 0), + added: torrent.addedDate * 1000, + state, + progress: torrent.percentDone, + category: torrent.labels, + }; + }); + return { status, items }; + } + + public async pauseQueueAsync() { + const client = this.getClient(); + const ids = (await client.listTorrents()).arguments.torrents.map(({ hashString }) => hashString); + await this.getClient().pauseTorrent(ids); + } + + public async pauseItemAsync({ id }: DownloadClientItem): Promise { + await this.getClient().pauseTorrent(id); + } + + public async resumeQueueAsync() { + const client = this.getClient(); + const ids = (await client.listTorrents()).arguments.torrents.map(({ hashString }) => hashString); + await this.getClient().resumeTorrent(ids); + } + + public async resumeItemAsync({ id }: DownloadClientItem): Promise { + await this.getClient().resumeTorrent(id); + } + + public async deleteItemAsync({ id }: DownloadClientItem, fromDisk: boolean): Promise { + await this.getClient().removeTorrent(id, fromDisk); + } + + private getClient() { + const baseUrl = new URL(this.integration.url).href; + return new Transmission({ + baseUrl, + username: this.getSecretValue("username"), + password: this.getSecretValue("password"), + }); + } + + private static getTorrentState(status: number): DownloadClientItem["state"] { + switch (status) { + case 0: + return "paused"; + case 1: + case 3: + return "stalled"; + case 2: + case 4: + return "leeching"; + case 5: + case 6: + return "seeding"; + default: + return "unknown"; + } + } +} diff --git a/packages/integrations/src/index.ts b/packages/integrations/src/index.ts index c603976e7..0b5cd8a35 100644 --- a/packages/integrations/src/index.ts +++ b/packages/integrations/src/index.ts @@ -2,16 +2,31 @@ export { AdGuardHomeIntegration } from "./adguard-home/adguard-home-integration"; export { HomeAssistantIntegration } from "./homeassistant/homeassistant-integration"; export { JellyfinIntegration } from "./jellyfin/jellyfin-integration"; -export { SonarrIntegration } from "./media-organizer/sonarr/sonarr-integration"; +export { DownloadClientIntegration } from "./interfaces/downloads/download-client-integration"; export { JellyseerrIntegration } from "./jellyseerr/jellyseerr-integration"; +export { RadarrIntegration } from "./media-organizer/radarr/radarr-integration"; +export { SonarrIntegration } from "./media-organizer/sonarr/sonarr-integration"; +export { SabnzbdIntegration } from "./download-client/sabnzbd/sabnzbd-integration"; +export { NzbGetIntegration } from "./download-client/nzbget/nzbget-integration"; +export { QBitTorrentIntegration } from "./download-client/qbittorrent/qbittorrent-integration"; +export { DelugeIntegration } from "./download-client/deluge/deluge-integration"; +export { TransmissionIntegration } from "./download-client/transmission/transmission-integration"; export { OverseerrIntegration } from "./overseerr/overseerr-integration"; export { PiHoleIntegration } from "./pi-hole/pi-hole-integration"; +export { ProwlarrIntegration } from "./prowlarr/prowlarr-integration"; // Types -export type { StreamSession } from "./interfaces/media-server/session"; +export type { IntegrationInput } from "./base/integration"; +export type { DownloadClientJobsAndStatus } from "./interfaces/downloads/download-client-data"; +export type { ExtendedDownloadClientItem } from "./interfaces/downloads/download-client-items"; +export type { ExtendedClientStatus } from "./interfaces/downloads/download-client-status"; export { MediaRequestStatus } from "./interfaces/media-requests/media-request"; export type { MediaRequestList, MediaRequestStats } from "./interfaces/media-requests/media-request"; +export type { StreamSession } from "./interfaces/media-server/session"; + +// Schemas +export { downloadClientItemSchema } from "./interfaces/downloads/download-client-items"; // Helpers -export { integrationCreatorByKind } from "./base/creator"; +export { integrationCreator, integrationCreatorFromSecrets } from "./base/creator"; export { IntegrationTestConnectionError } from "./base/test-connection-error"; diff --git a/packages/integrations/src/interfaces/downloads/download-client-data.ts b/packages/integrations/src/interfaces/downloads/download-client-data.ts new file mode 100644 index 000000000..f82840dfe --- /dev/null +++ b/packages/integrations/src/interfaces/downloads/download-client-data.ts @@ -0,0 +1,7 @@ +import type { DownloadClientItem } from "./download-client-items"; +import type { DownloadClientStatus } from "./download-client-status"; + +export interface DownloadClientJobsAndStatus { + status: DownloadClientStatus; + items: DownloadClientItem[]; +} diff --git a/packages/integrations/src/interfaces/downloads/download-client-integration.ts b/packages/integrations/src/interfaces/downloads/download-client-integration.ts new file mode 100644 index 000000000..b14b4b6e6 --- /dev/null +++ b/packages/integrations/src/interfaces/downloads/download-client-integration.ts @@ -0,0 +1,18 @@ +import { Integration } from "../../base/integration"; +import type { DownloadClientJobsAndStatus } from "./download-client-data"; +import type { DownloadClientItem } from "./download-client-items"; + +export abstract class DownloadClientIntegration extends Integration { + /** Get download client's status and list of all of it's items */ + public abstract getClientJobsAndStatusAsync(): Promise; + /** Pauses the client or all of it's items */ + public abstract pauseQueueAsync(): Promise; + /** Pause a single item using it's ID */ + public abstract pauseItemAsync(item: DownloadClientItem): Promise; + /** Resumes the client or all of it's items */ + public abstract resumeQueueAsync(): Promise; + /** Resume a single item using it's ID */ + public abstract resumeItemAsync(item: DownloadClientItem): Promise; + /** Delete an entry on the client or a file from disk */ + public abstract deleteItemAsync(item: DownloadClientItem, fromDisk: boolean): Promise; +} diff --git a/packages/integrations/src/interfaces/downloads/download-client-items.ts b/packages/integrations/src/interfaces/downloads/download-client-items.ts new file mode 100644 index 000000000..aaca5b40a --- /dev/null +++ b/packages/integrations/src/interfaces/downloads/download-client-items.ts @@ -0,0 +1,56 @@ +import type { Integration } from "@homarr/db/schema/sqlite"; +import { z } from "@homarr/validation"; + +const usenetQueueState = ["downloading", "queued", "paused"] as const; +const usenetHistoryState = ["completed", "failed", "processing"] as const; +const torrentState = ["leeching", "stalled", "paused", "seeding"] as const; + +/** + * DownloadClientItem + * Description: + * Normalized interface for downloading clients for Usenet and + * Torrents alike, using common properties and few extra optionals + * from each. + */ +export const downloadClientItemSchema = z.object({ + /** Unique Identifier provided by client */ + id: z.string(), + /** Position in queue */ + index: z.number(), + /** Filename */ + name: z.string(), + /** Torrent/Usenet identifier */ + type: z.enum(["torrent", "usenet"]), + /** Item size in Bytes */ + size: z.number(), + /** Total uploaded in Bytes, only required for Torrent items */ + sent: z.number().optional(), + /** Download speed in Bytes/s, only required if not complete + * (Says 0 only if it should be downloading but isn't) */ + downSpeed: z.number().optional(), + /** Upload speed in Bytes/s, only required for Torrent items */ + upSpeed: z.number().optional(), + /** Positive = eta (until completion, 0 meaning infinite), Negative = time since completion, in milliseconds*/ + time: z.number(), + /** Unix timestamp in milliseconds when the item was added to the client */ + added: z.number().optional(), + /** Status message, mostly as information to display and not for logic */ + state: z.enum(["unknown", ...usenetQueueState, ...usenetHistoryState, ...torrentState]), + /** Progress expressed between 0 and 1, can infer completion from progress === 1 */ + progress: z.number().min(0).max(1), + /** Category given to the item */ + category: z.string().or(z.array(z.string())).optional(), +}); + +export type DownloadClientItem = z.infer; + +export type ExtendedDownloadClientItem = { + integration: Integration; + received: number; + ratio?: number; + actions?: { + resume: () => void; + pause: () => void; + delete: ({ fromDisk }: { fromDisk: boolean }) => void; + }; +} & DownloadClientItem; diff --git a/packages/integrations/src/interfaces/downloads/download-client-status.ts b/packages/integrations/src/interfaces/downloads/download-client-status.ts new file mode 100644 index 000000000..7c55e77c5 --- /dev/null +++ b/packages/integrations/src/interfaces/downloads/download-client-status.ts @@ -0,0 +1,23 @@ +import type { Integration } from "@homarr/db/schema/sqlite"; + +export interface DownloadClientStatus { + /** If client is considered paused */ + paused: boolean; + /** Download/Upload speeds for the client */ + rates: { + down: number; + up?: number; + }; + type: "usenet" | "torrent"; +} +export interface ExtendedClientStatus { + integration: Integration; + interact: boolean; + status?: { + /** To derive from current items */ + totalDown?: number; + /** To derive from current items */ + totalUp?: number; + ratio?: number; + } & DownloadClientStatus; +} diff --git a/packages/integrations/src/media-organizer/radarr/radarr-integration.ts b/packages/integrations/src/media-organizer/radarr/radarr-integration.ts new file mode 100644 index 000000000..1ef79bf78 --- /dev/null +++ b/packages/integrations/src/media-organizer/radarr/radarr-integration.ts @@ -0,0 +1,126 @@ +import { logger } from "@homarr/log"; +import { z } from "@homarr/validation"; + +import { Integration } from "../../base/integration"; +import type { CalendarEvent } from "../../calendar-types"; + +export class RadarrIntegration extends Integration { + /** + * Priority list that determines the quality of images using their order. + * Types at the start of the list are better than those at the end. + * We do this to attempt to find the best quality image for the show. + */ + private readonly priorities: z.infer["images"][number]["coverType"][] = [ + "poster", // Official, perfect aspect ratio + "banner", // Official, bad aspect ratio + "fanart", // Unofficial, possibly bad quality + "screenshot", // Bad aspect ratio, possibly bad quality + "clearlogo", // Without background, bad aspect ratio + ]; + + /** + * Gets the events in the Radarr calendar between two dates. + * @param start The start date + * @param end The end date + * @param includeUnmonitored When true results will include unmonitored items of the Tadarr library. + */ + async getCalendarEventsAsync(start: Date, end: Date, includeUnmonitored = true): Promise { + const url = new URL(this.integration.url); + url.pathname = "/api/v3/calendar"; + url.searchParams.append("start", start.toISOString()); + url.searchParams.append("end", end.toISOString()); + url.searchParams.append("unmonitored", includeUnmonitored ? "true" : "false"); + const response = await fetch(url, { + headers: { + "X-Api-Key": super.getSecretValue("apiKey"), + }, + }); + const radarrCalendarEvents = await z.array(radarrCalendarEventSchema).parseAsync(await response.json()); + + return radarrCalendarEvents.map( + (radarrCalendarEvent): CalendarEvent => ({ + name: radarrCalendarEvent.title, + subName: radarrCalendarEvent.originalTitle, + description: radarrCalendarEvent.overview, + thumbnail: this.chooseBestImageAsURL(radarrCalendarEvent), + date: radarrCalendarEvent.inCinemas, + mediaInformation: { + type: "movie", + }, + links: this.getLinksForRadarrCalendarEvent(radarrCalendarEvent), + }), + ); + } + + private getLinksForRadarrCalendarEvent = (event: z.infer) => { + const links: CalendarEvent["links"] = [ + { + href: `${this.integration.url}/movie/${event.titleSlug}`, + name: "Radarr", + logo: "/images/apps/radarr.svg", + color: undefined, + notificationColor: "yellow", + isDark: true, + }, + ]; + + if (event.imdbId) { + links.push({ + href: `https://www.imdb.com/title/${event.imdbId}/`, + name: "IMDb", + color: "#f5c518", + isDark: false, + logo: "/images/apps/imdb.png", + }); + } + + return links; + }; + + private chooseBestImage = ( + event: z.infer, + ): z.infer["images"][number] | undefined => { + const flatImages = [...event.images]; + + const sortedImages = flatImages.sort( + (imageA, imageB) => this.priorities.indexOf(imageA.coverType) - this.priorities.indexOf(imageB.coverType), + ); + logger.debug(`Sorted images to [${sortedImages.map((image) => image.coverType).join(",")}]`); + return sortedImages[0]; + }; + + private chooseBestImageAsURL = (event: z.infer): string | undefined => { + const bestImage = this.chooseBestImage(event); + if (!bestImage) { + return undefined; + } + return bestImage.remoteUrl; + }; + + public async testConnectionAsync(): Promise { + await super.handleTestConnectionResponseAsync({ + queryFunctionAsync: async () => { + return await fetch(`${this.integration.url}/api`, { + headers: { "X-Api-Key": super.getSecretValue("apiKey") }, + }); + }, + }); + } +} + +const radarrCalendarEventImageSchema = z.array( + z.object({ + coverType: z.enum(["screenshot", "poster", "banner", "fanart", "clearlogo"]), + remoteUrl: z.string().url(), + }), +); + +const radarrCalendarEventSchema = z.object({ + title: z.string(), + originalTitle: z.string(), + inCinemas: z.string().transform((value) => new Date(value)), + overview: z.string().optional(), + titleSlug: z.string(), + images: radarrCalendarEventImageSchema, + imdbId: z.string().optional(), +}); diff --git a/packages/integrations/src/prowlarr/prowlarr-integration.ts b/packages/integrations/src/prowlarr/prowlarr-integration.ts index e023e21a5..8768073c4 100644 --- a/packages/integrations/src/prowlarr/prowlarr-integration.ts +++ b/packages/integrations/src/prowlarr/prowlarr-integration.ts @@ -52,7 +52,7 @@ export class ProwlarrIntegration extends Integration { name: indexer.name, url: indexer.indexerUrls[0] ?? "", enabled: indexer.enable, - status: inactiveIndexerIds.has(indexer.id), + status: !inactiveIndexerIds.has(indexer.id), })); return indexers; diff --git a/packages/integrations/src/types.ts b/packages/integrations/src/types.ts index a39c1d577..445894eb4 100644 --- a/packages/integrations/src/types.ts +++ b/packages/integrations/src/types.ts @@ -1,3 +1,4 @@ -export * from "./interfaces/dns-hole-summary/dns-hole-summary-types"; export * from "./calendar-types"; +export * from "./interfaces/dns-hole-summary/dns-hole-summary-types"; +export * from "./interfaces/indexer-manager/indexer"; export * from "./interfaces/media-requests/media-request"; diff --git a/packages/integrations/test/home-assistant.spec.ts b/packages/integrations/test/home-assistant.spec.ts index 1c1696581..d4f796b82 100644 --- a/packages/integrations/test/home-assistant.spec.ts +++ b/packages/integrations/test/home-assistant.spec.ts @@ -1,3 +1,4 @@ +import { join } from "path"; import type { StartedTestContainer } from "testcontainers"; import { GenericContainer, getContainerRuntimeClient, ImageName, Wait } from "testcontainers"; import { beforeAll, describe, expect, test } from "vitest"; @@ -57,7 +58,7 @@ const createHomeAssistantContainer = () => { return new GenericContainer(IMAGE_NAME) .withCopyFilesToContainer([ { - source: __dirname + "/volumes/home-assistant-config.zip", + source: join(__dirname, "/volumes/home-assistant-config.zip"), target: "/tmp/config.zip", }, ]) diff --git a/packages/integrations/test/nzbget.spec.ts b/packages/integrations/test/nzbget.spec.ts new file mode 100644 index 000000000..a23f081c7 --- /dev/null +++ b/packages/integrations/test/nzbget.spec.ts @@ -0,0 +1,195 @@ +import { join } from "path"; +import type { StartedTestContainer } from "testcontainers"; +import { GenericContainer, getContainerRuntimeClient, ImageName, Wait } from "testcontainers"; +import { beforeAll, describe, expect, test } from "vitest"; + +import { NzbGetIntegration } from "../src"; + +const username = "nzbget"; +const password = "tegbzn6789"; +const IMAGE_NAME = "linuxserver/nzbget:latest"; + +describe("Nzbget integration", () => { + beforeAll(async () => { + const containerRuntimeClient = await getContainerRuntimeClient(); + await containerRuntimeClient.image.pull(ImageName.fromString(IMAGE_NAME)); + }, 100_000); + + test("Test connection should work", async () => { + // Arrange + const startedContainer = await createNzbGetContainer().start(); + const nzbGetIntegration = createNzbGetIntegration(startedContainer, username, password); + + // Act + const actAsync = async () => await nzbGetIntegration.testConnectionAsync(); + + // Assert + await expect(actAsync()).resolves.not.toThrow(); + + // Cleanup + await startedContainer.stop(); + }, 20_000); + + test("Test connection should fail with wrong credentials", async () => { + // Arrange + const startedContainer = await createNzbGetContainer().start(); + const nzbGetIntegration = createNzbGetIntegration(startedContainer, "wrong-user", "wrong-password"); + + // Act + const actAsync = async () => await nzbGetIntegration.testConnectionAsync(); + + // Assert + await expect(actAsync()).rejects.toThrow(); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("pauseQueueAsync should work", async () => { + // Arrange + const startedContainer = await createNzbGetContainer().start(); + const nzbGetIntegration = createNzbGetIntegration(startedContainer, username, password); + + // Acts + const actAsync = async () => await nzbGetIntegration.pauseQueueAsync(); + const getAsync = async () => await nzbGetIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(actAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ status: { paused: true } }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("resumeQueueAsync should work", async () => { + // Arrange + const startedContainer = await createNzbGetContainer().start(); + const nzbGetIntegration = createNzbGetIntegration(startedContainer, username, password); + await nzbGetIntegration.pauseQueueAsync(); + + // Acts + const actAsync = async () => await nzbGetIntegration.resumeQueueAsync(); + const getAsync = async () => await nzbGetIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(actAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ + status: { paused: false }, + }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("Items should be empty", async () => { + // Arrange + const startedContainer = await createNzbGetContainer().start(); + const nzbGetIntegration = createNzbGetIntegration(startedContainer, username, password); + + // Act + const getAsync = async () => await nzbGetIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(getAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ + items: [], + }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("1 Items should exist after adding one", async () => { + // Arrange + const startedContainer = await createNzbGetContainer().start(); + const nzbGetIntegration = createNzbGetIntegration(startedContainer, username, password); + await nzbGetAddItemAsync(startedContainer, username, password, nzbGetIntegration); + + // Act + const getAsync = async () => await nzbGetIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(getAsync()).resolves.not.toThrow(); + expect((await getAsync()).items).toHaveLength(1); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("Delete item should result in empty items", async () => { + // Arrange + const startedContainer = await createNzbGetContainer().start(); + const nzbGetIntegration = createNzbGetIntegration(startedContainer, username, password); + const item = await nzbGetAddItemAsync(startedContainer, username, password, nzbGetIntegration); + + // Act + const getAsync = async () => await nzbGetIntegration.getClientJobsAndStatusAsync(); + const actAsync = async () => await nzbGetIntegration.deleteItemAsync(item, false); + + // Assert + await expect(actAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ items: [] }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds*/ +}); + +const createNzbGetContainer = () => { + return new GenericContainer(IMAGE_NAME) + .withExposedPorts(6789) + .withEnvironment({ PUID: "0", PGID: "0" }) + .withWaitStrategy(Wait.forLogMessage("[ls.io-init] done.")); +}; + +const createNzbGetIntegration = (container: StartedTestContainer, username: string, password: string) => { + return new NzbGetIntegration({ + id: "1", + decryptedSecrets: [ + { + kind: "username", + value: username, + }, + { + kind: "password", + value: password, + }, + ], + name: "NzbGet", + url: `http://${container.getHost()}:${container.getMappedPort(6789)}`, + }); +}; + +const nzbGetAddItemAsync = async ( + container: StartedTestContainer, + username: string, + password: string, + integration: NzbGetIntegration, +) => { + // Add nzb file in the watch folder + await container.copyFilesToContainer([ + { + source: join(__dirname, "/volumes/usenet/test_download_100MB.nzb"), + target: "/downloads/nzb/test_download_100MB.nzb", + }, + ]); + // Trigger scanning of the watch folder (Only available way to add an item except "append" which is too complex and unnecessary) + await fetch(`http://${container.getHost()}:${container.getMappedPort(6789)}/${username}:${password}/jsonrpc`, { + method: "POST", + body: JSON.stringify({ method: "scan" }), + }); + // Retries up to 10000 times to let NzbGet scan and process the nzb (1 retry should suffice tbh but NzbGet is slow) + for (let i = 0; i < 10000; i++) { + const { + items: [item], + } = await integration.getClientJobsAndStatusAsync(); + if (item) { + // Remove the added time because NzbGet doesn't return it properly in this specific case + const { added: _, ...itemRest } = item; + return itemRest; + } + } + // Throws if it can't find the item + throw new Error("No item found"); +}; diff --git a/packages/integrations/test/sabnzbd.spec.ts b/packages/integrations/test/sabnzbd.spec.ts new file mode 100644 index 000000000..b549a8f3d --- /dev/null +++ b/packages/integrations/test/sabnzbd.spec.ts @@ -0,0 +1,235 @@ +import { join } from "path"; +import { GenericContainer, getContainerRuntimeClient, ImageName, Wait } from "testcontainers"; +import type { StartedTestContainer } from "testcontainers"; +import { beforeAll, describe, expect, test } from "vitest"; + +import { SabnzbdIntegration } from "../src"; +import type { DownloadClientItem } from "../src/interfaces/downloads/download-client-items"; + +const DEFAULT_API_KEY = "8r45mfes43s3iw7x3oecto6dl9ilxnf9"; +const IMAGE_NAME = "linuxserver/sabnzbd:latest"; + +describe("Sabnzbd integration", () => { + beforeAll(async () => { + const containerRuntimeClient = await getContainerRuntimeClient(); + await containerRuntimeClient.image.pull(ImageName.fromString(IMAGE_NAME)); + }, 100_000); + + test("Test connection should work", async () => { + // Arrange + const startedContainer = await createSabnzbdContainer().start(); + const sabnzbdIntegration = createSabnzbdIntegration(startedContainer, DEFAULT_API_KEY); + + // Act + const actAsync = async () => await sabnzbdIntegration.testConnectionAsync(); + + // Assert + await expect(actAsync()).resolves.not.toThrow(); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("Test connection should fail with wrong ApiKey", async () => { + // Arrange + const startedContainer = await createSabnzbdContainer().start(); + const sabnzbdIntegration = createSabnzbdIntegration(startedContainer, "wrong-api-key"); + + // Act + const actAsync = async () => await sabnzbdIntegration.testConnectionAsync(); + + // Assert + await expect(actAsync()).rejects.toThrow(); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("pauseQueueAsync should work", async () => { + // Arrange + const startedContainer = await createSabnzbdContainer().start(); + const sabnzbdIntegration = createSabnzbdIntegration(startedContainer, DEFAULT_API_KEY); + + // Acts + const actAsync = async () => await sabnzbdIntegration.pauseQueueAsync(); + const getAsync = async () => await sabnzbdIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(actAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ status: { paused: true } }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("resumeQueueAsync should work", async () => { + // Arrange + const startedContainer = await createSabnzbdContainer().start(); + const sabnzbdIntegration = createSabnzbdIntegration(startedContainer, DEFAULT_API_KEY); + await sabnzbdIntegration.pauseQueueAsync(); + + // Acts + const actAsync = async () => await sabnzbdIntegration.resumeQueueAsync(); + const getAsync = async () => await sabnzbdIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(actAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ + status: { paused: false }, + }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("Items should be empty", async () => { + // Arrange + const startedContainer = await createSabnzbdContainer().start(); + const sabnzbdIntegration = createSabnzbdIntegration(startedContainer, DEFAULT_API_KEY); + + // Act + const getAsync = async () => await sabnzbdIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(getAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ + items: [], + }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("1 Items should exist after adding one", async () => { + // Arrange + const startedContainer = await createSabnzbdContainer().start(); + const sabnzbdIntegration = createSabnzbdIntegration(startedContainer, DEFAULT_API_KEY); + await sabNzbdAddItemAsync(startedContainer, DEFAULT_API_KEY, sabnzbdIntegration); + + // Act + const getAsync = async () => await sabnzbdIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(getAsync()).resolves.not.toThrow(); + expect((await getAsync()).items).toHaveLength(1); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("Pause item should work", async () => { + // Arrange + const startedContainer = await createSabnzbdContainer().start(); + const sabnzbdIntegration = createSabnzbdIntegration(startedContainer, DEFAULT_API_KEY); + const item = await sabNzbdAddItemAsync(startedContainer, DEFAULT_API_KEY, sabnzbdIntegration); + + // Act + const actAsync = async () => await sabnzbdIntegration.pauseItemAsync(item); + const getAsync = async () => await sabnzbdIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(getAsync()).resolves.toMatchObject({ items: [{ ...item, state: "downloading" }] }); + await expect(actAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ items: [{ ...item, state: "paused" }] }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("Resume item should work", async () => { + // Arrange + const startedContainer = await createSabnzbdContainer().start(); + const sabnzbdIntegration = createSabnzbdIntegration(startedContainer, DEFAULT_API_KEY); + const item = await sabNzbdAddItemAsync(startedContainer, DEFAULT_API_KEY, sabnzbdIntegration); + await sabnzbdIntegration.pauseItemAsync(item); + + // Act + const actAsync = async () => await sabnzbdIntegration.resumeItemAsync(item); + const getAsync = async () => await sabnzbdIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(getAsync()).resolves.toMatchObject({ items: [{ ...item, state: "paused" }] }); + await expect(actAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ items: [{ ...item, state: "downloading" }] }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds + + test("Delete item should result in empty items", async () => { + // Arrange + const startedContainer = await createSabnzbdContainer().start(); + const sabnzbdIntegration = createSabnzbdIntegration(startedContainer, DEFAULT_API_KEY); + const item = await sabNzbdAddItemAsync(startedContainer, DEFAULT_API_KEY, sabnzbdIntegration); + + // Act - fromDisk already doesn't work for sabnzbd, so only test deletion itself. + const actAsync = async () => + await sabnzbdIntegration.deleteItemAsync({ ...item, progress: 0 } as DownloadClientItem, false); + const getAsync = async () => await sabnzbdIntegration.getClientJobsAndStatusAsync(); + + // Assert + await expect(actAsync()).resolves.not.toThrow(); + await expect(getAsync()).resolves.toMatchObject({ items: [] }); + + // Cleanup + await startedContainer.stop(); + }, 20_000); // Timeout of 20 seconds +}); + +const createSabnzbdContainer = () => { + return new GenericContainer(IMAGE_NAME) + .withCopyFilesToContainer([ + { + source: join(__dirname, "/volumes/usenet/sabnzbd.ini"), + target: "/config/sabnzbd.ini", + }, + ]) + .withExposedPorts(1212) + .withEnvironment({ PUID: "0", PGID: "0" }) + .withWaitStrategy(Wait.forHttp("/", 1212)); +}; + +const createSabnzbdIntegration = (container: StartedTestContainer, apiKey: string) => { + return new SabnzbdIntegration({ + id: "1", + decryptedSecrets: [ + { + kind: "apiKey", + value: apiKey, + }, + ], + name: "Sabnzbd", + url: `http://${container.getHost()}:${container.getMappedPort(1212)}`, + }); +}; + +const sabNzbdAddItemAsync = async ( + container: StartedTestContainer, + apiKey: string, + integration: SabnzbdIntegration, +) => { + // Add nzb file in the watch folder + await container.copyFilesToContainer([ + { + source: join(__dirname, "/volumes/usenet/test_download_100MB.nzb"), + target: "/nzb/test_download_100MB.nzb", + }, + ]); + // Adding file is faster than triggering scan of the watch folder + // (local add: 1.4-1.6s, scan trigger: 2.5-2.7s, auto scan: 2.9-3s) + await fetch( + `http://${container.getHost()}:${container.getMappedPort(1212)}/api` + + "?mode=addlocalfile" + + "&name=%2Fnzb%2Ftest_download_100MB.nzb" + + `&apikey=${apiKey}`, + ); + // Retries up to 5 times to let SabNzbd scan and process the nzb (1 retry should suffice tbh) + for (let i = 0; i < 5; i++) { + const { + items: [item], + } = await integration.getClientJobsAndStatusAsync(); + if (item) return item; + } + // Throws if it can't find the item + throw new Error("No item found"); +}; diff --git a/packages/integrations/test/volumes/usenet/sabnzbd.ini b/packages/integrations/test/volumes/usenet/sabnzbd.ini new file mode 100755 index 000000000..14b644488 --- /dev/null +++ b/packages/integrations/test/volumes/usenet/sabnzbd.ini @@ -0,0 +1,407 @@ +__version__ = 19 +__encoding__ = utf-8 +[misc] +pre_script = None +queue_complete = "" +queue_complete_pers = 0 +bandwidth_perc = 100 +refresh_rate = 1 +interface_settings = '{"dateFormat":"fromNow","extraQueueColumns":[],"extraHistoryColumns":[],"displayCompact":false,"displayFullWidth":false,"displayTabbed":false,"confirmDeleteQueue":true,"confirmDeleteHistory":true,"keyboardShortcuts":true}' +queue_limit = 20 +config_lock = 0 +sched_converted = 0 +notified_new_skin = 2 +direct_unpack_tested = 1 +check_new_rel = 0 +auto_browser = 0 +language = en +enable_https_verification = 1 +host = 127.0.0.1 +port = 1212 +https_port = 1212 +username = "" +password = "" +bandwidth_max = 1125M +cache_limit = 128G +web_dir = Glitter +web_color = Auto +https_cert = server.cert +https_key = server.key +https_chain = "" +enable_https = 0 +inet_exposure = 4 +local_ranges = , +api_key = 8r45mfes43s3iw7x3oecto6dl9ilxnf9 +nzb_key = nc6q489idfb4fmdjh0uuqlsn4fjawrub +permissions = "" +download_dir = /temp +download_free = "" +complete_dir = /downloads +complete_free = "" +fulldisk_autoresume = 0 +script_dir = "" +nzb_backup_dir = "" +admin_dir = /admin +dirscan_dir = /nzb +dirscan_speed = 1 +password_file = "" +log_dir = logs +max_art_tries = 3 +load_balancing = 2 +top_only = 0 +sfv_check = 1 +quick_check_ext_ignore = nfo, sfv, srr +script_can_fail = 0 +enable_recursive = 1 +flat_unpack = 0 +par_option = "" +pre_check = 0 +nice = "" +win_process_prio = 3 +ionice = "" +fail_hopeless_jobs = 1 +fast_fail = 1 +auto_disconnect = 1 +no_dupes = 0 +no_series_dupes = 0 +series_propercheck = 1 +pause_on_pwrar = 1 +ignore_samples = 0 +deobfuscate_final_filenames = 0 +auto_sort = "" +direct_unpack = 1 +direct_unpack_threads = 6 +propagation_delay = 0 +folder_rename = 1 +replace_spaces = 0 +replace_dots = 0 +safe_postproc = 1 +pause_on_post_processing = 0 +sanitize_safe = 0 +cleanup_list = , +unwanted_extensions = , +action_on_unwanted_extensions = 0 +new_nzb_on_failure = 0 +history_retention = "" +enable_meta = 1 +quota_size = "" +quota_day = "" +quota_resume = 0 +quota_period = m +rating_enable = 0 +rating_host = "" +rating_api_key = "" +rating_filter_enable = 0 +rating_filter_abort_audio = 0 +rating_filter_abort_video = 0 +rating_filter_abort_encrypted = 0 +rating_filter_abort_encrypted_confirm = 0 +rating_filter_abort_spam = 0 +rating_filter_abort_spam_confirm = 0 +rating_filter_abort_downvoted = 0 +rating_filter_abort_keywords = "" +rating_filter_pause_audio = 0 +rating_filter_pause_video = 0 +rating_filter_pause_encrypted = 0 +rating_filter_pause_encrypted_confirm = 0 +rating_filter_pause_spam = 0 +rating_filter_pause_spam_confirm = 0 +rating_filter_pause_downvoted = 0 +rating_filter_pause_keywords = "" +enable_tv_sorting = 0 +tv_sort_string = "" +tv_sort_countries = 1 +tv_categories = , +enable_movie_sorting = 0 +movie_sort_string = "" +movie_sort_extra = -cd%1 +movie_extra_folder = 0 +movie_categories = movies, +enable_date_sorting = 0 +date_sort_string = "" +date_categories = tv, +schedlines = , +rss_rate = 60 +ampm = 0 +replace_illegal = 1 +start_paused = 0 +enable_all_par = 0 +enable_par_cleanup = 1 +enable_unrar = 1 +enable_unzip = 1 +enable_7zip = 1 +enable_filejoin = 1 +enable_tsjoin = 1 +overwrite_files = 0 +ignore_unrar_dates = 0 +backup_for_duplicates = 1 +empty_postproc = 0 +wait_for_dfolder = 0 +rss_filenames = 0 +api_logging = 1 +html_login = 1 +osx_menu = 1 +osx_speed = 1 +warn_dupl_jobs = 1 +helpfull_warnings = 1 +keep_awake = 1 +win_menu = 1 +allow_incomplete_nzb = 0 +enable_broadcast = 1 +max_art_opt = 0 +ipv6_hosting = 0 +fixed_ports = 1 +api_warnings = 1 +disable_api_key = 0 +no_penalties = 0 +x_frame_options = 1 +require_modern_tls = 0 +num_decoders = 3 +rss_odd_titles = nzbindex.nl/, nzbindex.com/, nzbclub.com/ +req_completion_rate = 100.2 +selftest_host = self-test.sabnzbd.org +movie_rename_limit = 100M +size_limit = 0 +show_sysload = 2 +history_limit = 10 +wait_ext_drive = 5 +max_foldername_length = 246 +nomedia_marker = "" +ipv6_servers = 1 +url_base = /sabnzbd +host_whitelist = , +max_url_retries = 10 +downloader_sleep_time = 10 +ssdp_broadcast_interval = 15 +email_server = "" +email_to = , +email_from = "" +email_account = "" +email_pwd = "" +email_endjob = 0 +email_full = 0 +email_dir = "" +email_rss = 0 +email_cats = *, +unwanted_extensions_mode = 0 +preserve_paused_state = 0 +process_unpacked_par2 = 1 +helpful_warnings = 1 +allow_old_ssl_tls = 0 +episode_rename_limit = 20M +socks5_proxy_url = "" +num_simd_decoders = 2 +ext_rename_ignore = , +sorters_converted = 1 +backup_dir = "" +replace_underscores = 0 +tray_icon = 1 +enable_season_sorting = 1 +receive_threads = 6 +switchinterval = 0.005 +enable_multipar = 1 +verify_xff_header = 0 +end_queue_script = None +no_smart_dupes = 0 +dupes_propercheck = 1 +history_retention_option = all +history_retention_number = 1 +ipv6_staging = 0 +[logging] +log_level = 1 +max_log_size = 5242880 +log_backups = 5 +[ncenter] +ncenter_enable = 0 +ncenter_cats = *, +ncenter_prio_startup = 1 +ncenter_prio_download = 0 +ncenter_prio_pause_resume = 0 +ncenter_prio_pp = 0 +ncenter_prio_complete = 1 +ncenter_prio_failed = 1 +ncenter_prio_disk_full = 1 +ncenter_prio_new_login = 0 +ncenter_prio_warning = 0 +ncenter_prio_error = 0 +ncenter_prio_queue_done = 1 +ncenter_prio_other = 1 +[acenter] +acenter_enable = 0 +acenter_cats = *, +acenter_prio_startup = 0 +acenter_prio_download = 0 +acenter_prio_pause_resume = 0 +acenter_prio_pp = 0 +acenter_prio_complete = 1 +acenter_prio_failed = 1 +acenter_prio_disk_full = 1 +acenter_prio_new_login = 0 +acenter_prio_warning = 0 +acenter_prio_error = 0 +acenter_prio_queue_done = 1 +acenter_prio_other = 1 +[ntfosd] +ntfosd_enable = 1 +ntfosd_cats = *, +ntfosd_prio_startup = 1 +ntfosd_prio_download = 0 +ntfosd_prio_pause_resume = 0 +ntfosd_prio_pp = 0 +ntfosd_prio_complete = 1 +ntfosd_prio_failed = 1 +ntfosd_prio_disk_full = 1 +ntfosd_prio_new_login = 0 +ntfosd_prio_warning = 0 +ntfosd_prio_error = 0 +ntfosd_prio_queue_done = 1 +ntfosd_prio_other = 1 +[prowl] +prowl_enable = 0 +prowl_cats = *, +prowl_apikey = "" +prowl_prio_startup = -3 +prowl_prio_download = -3 +prowl_prio_pause_resume = -3 +prowl_prio_pp = -3 +prowl_prio_complete = 0 +prowl_prio_failed = 1 +prowl_prio_disk_full = 1 +prowl_prio_new_login = -3 +prowl_prio_warning = -3 +prowl_prio_error = -3 +prowl_prio_queue_done = 0 +prowl_prio_other = 0 +[pushover] +pushover_token = "" +pushover_userkey = "" +pushover_device = "" +pushover_emergency_expire = 3600 +pushover_emergency_retry = 60 +pushover_enable = 0 +pushover_cats = *, +pushover_prio_startup = -3 +pushover_prio_download = -2 +pushover_prio_pause_resume = -2 +pushover_prio_pp = -3 +pushover_prio_complete = -1 +pushover_prio_failed = -1 +pushover_prio_disk_full = 1 +pushover_prio_new_login = -3 +pushover_prio_warning = 1 +pushover_prio_error = 1 +pushover_prio_queue_done = -1 +pushover_prio_other = -1 +[pushbullet] +pushbullet_enable = 0 +pushbullet_cats = *, +pushbullet_apikey = "" +pushbullet_device = "" +pushbullet_prio_startup = 0 +pushbullet_prio_download = 0 +pushbullet_prio_pause_resume = 0 +pushbullet_prio_pp = 0 +pushbullet_prio_complete = 1 +pushbullet_prio_failed = 1 +pushbullet_prio_disk_full = 1 +pushbullet_prio_new_login = 0 +pushbullet_prio_warning = 0 +pushbullet_prio_error = 0 +pushbullet_prio_queue_done = 0 +pushbullet_prio_other = 1 +[nscript] +nscript_enable = 0 +nscript_cats = *, +nscript_script = "" +nscript_parameters = "" +nscript_prio_startup = 1 +nscript_prio_download = 0 +nscript_prio_pause_resume = 0 +nscript_prio_pp = 0 +nscript_prio_complete = 1 +nscript_prio_failed = 1 +nscript_prio_disk_full = 1 +nscript_prio_new_login = 0 +nscript_prio_warning = 0 +nscript_prio_error = 0 +nscript_prio_queue_done = 1 +nscript_prio_other = 1 +[servers] +[categories] +[[audio]] +name = audio +order = 0 +pp = "" +script = Default +dir = "" +newzbin = "" +priority = -100 +[[software]] +name = software +order = 0 +pp = "" +script = Default +dir = "" +newzbin = "" +priority = -100 +[[books]] +name = books +order = 1 +pp = "" +script = Default +dir = books +newzbin = "" +priority = -100 +[[tv]] +name = tv +order = 0 +pp = "" +script = Default +dir = tvshows +newzbin = "" +priority = -100 +[[movies]] +name = movies +order = 0 +pp = "" +script = Default +dir = movies +newzbin = "" +priority = -100 +[[*]] +name = * +order = 0 +pp = 3 +script = Default +dir = "" +newzbin = "" +priority = 0 +[rss] +[apprise] +apprise_enable = 0 +apprise_cats = *, +apprise_urls = "" +apprise_target_startup = "" +apprise_target_startup_enable = 0 +apprise_target_download = "" +apprise_target_download_enable = 0 +apprise_target_pause_resume = "" +apprise_target_pause_resume_enable = 0 +apprise_target_pp = "" +apprise_target_pp_enable = 0 +apprise_target_complete = "" +apprise_target_complete_enable = 1 +apprise_target_failed = "" +apprise_target_failed_enable = 1 +apprise_target_disk_full = "" +apprise_target_disk_full_enable = 0 +apprise_target_new_login = "" +apprise_target_new_login_enable = 1 +apprise_target_warning = "" +apprise_target_warning_enable = 0 +apprise_target_error = "" +apprise_target_error_enable = 0 +apprise_target_queue_done = "" +apprise_target_queue_done_enable = 0 +apprise_target_other = "" +apprise_target_other_enable = 1 diff --git a/packages/integrations/test/volumes/usenet/test_download_100MB.nzb b/packages/integrations/test/volumes/usenet/test_download_100MB.nzb new file mode 100644 index 000000000..e97940220 --- /dev/null +++ b/packages/integrations/test/volumes/usenet/test_download_100MB.nzb @@ -0,0 +1,317 @@ + + + + + + alt.binaries.test + + + EkZuHcMrVxSbBbBaSuFgVbMm-1658672638813@nyuu + HeTrDnAcEoFtWyJhTdPkNhPe-1658672638816@nyuu + OyFbRuRmVxPzXrZoKpWhJsKm-1658672638821@nyuu + NwNaDvOgStUoRfVbXmZxKeQf-1658672638822@nyuu + DpZgLkTwXvIePlNdDiCcEkXu-1658672638853@nyuu + HlTnIiCoXaLbOyOpXyIsMjJo-1658672638855@nyuu + YqLsWoYuZnHbYvCjSuZpJdQx-1658672638856@nyuu + TgRzBeNrGuQhTxIdLbZgGnNv-1658672638857@nyuu + BtUmYfDwAaSdWgRnWjKfRkMl-1658672638862@nyuu + EoUoUdSxYgIhVlQrPpMtHzFg-1658672638883@nyuu + MeEhBmZsBzSqEtZcFzLqUwMr-1658672639406@nyuu + VwBfZmSuHdVuUfJsUnCiKgAl-1658672639428@nyuu + IfJyWnIgPhKkFvEmSqQiQzSd-1658672639461@nyuu + LiRyAkTyOwRkVzMnJpAzJlQr-1658672639469@nyuu + PwMjYlAzKaMbOcWjGrNhLvNc-1658672639479@nyuu + + + + + alt.binaries.test + + + UtJrLhPwPvHrZjTvUjZrCpKw-1658672639558@nyuu + OzChWnChCwAeBsHrBvKvPcGr-1658672639883@nyuu + VsLoYaHzQfOmDgNdPnTzPzLx-1658672639939@nyuu + FkDiOcGkYxNwOgLrJaWcShKy-1658672640012@nyuu + OyGyQxWoHmMxHzPaRdGeMlXz-1658672640035@nyuu + NiFsKxNsWjCxXxQfPtNmGyOw-1658672640039@nyuu + JqMdEoVhTaRtAdLeYfAeCvRi-1658672640078@nyuu + NkOnBwJtHjBoMlUkHjHrNdGo-1658672640324@nyuu + QwQnXeMrZjKiJoCbPuSbMjPq-1658672640398@nyuu + ZiPvOsXwOjTqIjLnIrKbBdXv-1658672640437@nyuu + DwJyDjVzBhKxRyLxIxXqRfHp-1658672640521@nyuu + ArRbXcZqRaDhAgRsNmMsGeBh-1658672640545@nyuu + UvYkRiCmXfBoIrYxCdEjMtJw-1658672640563@nyuu + TqHaSdLuNlWvAaFqZlHqZzJr-1658672640762@nyuu + SdNiSzMzVdJkFtTtGtJyEcKi-1658672640859@nyuu + + + + + alt.binaries.test + + + ZpUwNcWlXaVzJeJcBjXmBqCu-1658672640910@nyuu + AtQtJrYjNnYdVbJsXuKvXkSc-1658672640969@nyuu + NzBlVfVlKtTxFaIfZxDgAfHa-1658672641009@nyuu + JmBgCqStEdWlXqCdWgMtRaKh-1658672641040@nyuu + XyLjFiRjRuWmHeVhHmIhIzTg-1658672641200@nyuu + IvKxDaYbZkGhMsJiZcXtMhFk-1658672641311@nyuu + YuGtYkBnWtRiLdMeUrRxIbId-1658672641377@nyuu + GcNoBzAgAhSjJbQkFyKuKbAj-1658672641454@nyuu + RlLtFgVnBfWgJpPwTtPoJjLf-1658672641491@nyuu + BxLxScLaVfDoNmDwRkMbUxPg-1658672641517@nyuu + LhVnUdRnVqFyUiThZyIrNfMt-1658672641649@nyuu + VoVyMbIvAuZnWhZoEqVuRpJd-1658672641769@nyuu + GnMqIqUjMgVlPsZgAuLlAtGs-1658672641851@nyuu + YzPbErKpMvWhVgMiNgJoRmNa-1658672641933@nyuu + FaSoKgLtJxPsOsCyPuWgNzEe-1658672641972@nyuu + + + + + alt.binaries.test + + + PoGtRtIyThRwHgJbSrJhXuNq-1658672642009@nyuu + CnRbGgFpMxKxKyKtMmZbSuSa-1658672642085@nyuu + NrSeRjXxKaBqWnZaDzMiAmBi-1658672642217@nyuu + WwMyBrUwInZkYjUfIsDkLkEr-1658672642300@nyuu + DxRtSoVyQrChKqSySdPoDvGn-1658672642384@nyuu + SaMlZuQzOiHtNpUcOzRqAkOw-1658672642443@nyuu + RuGaHaWfEsAeGpLwLzQpFdOd-1658672642476@nyuu + CmNcLvFdZfTjIlXcQiWdHuTe-1658672642524@nyuu + UxRnTlCuZjUcIcXhAmYkDdQz-1658672642677@nyuu + PvLmSwSzFzJjLoNiVdCpAqKp-1658672642735@nyuu + VjVmMvDxOzXvNmOrOwGdBbVg-1658672642826@nyuu + ToFnSxDePaBlQcEjViYzSdGo-1658672642903@nyuu + LjHkMlYqRaQcBpVkFjCuXrHc-1658672642938@nyuu + DpAmYrOyHoXkGkCfZcDiBiIn-1658672642972@nyuu + DkGlMfAxEnPcPlAjIbBpNpFg-1658672643110@nyuu + + + + + alt.binaries.test + + + LkSeRbWaNmKoPaLxRpYcOjWf-1658672643185@nyuu + MoUlMsBmZmWtBkFzJtRuYcJy-1658672643272@nyuu + QmYmNyEiSmVgSqVaQmEvXuBh-1658672643358@nyuu + EfHzOhLcXqKfCwRiKcAmYdCf-1658672643403@nyuu + YpBuJtUmPlDvLiPpKlPoTcZg-1658672643425@nyuu + PmGyAhWxVtBiOcOhGaIwSxRd-1658672643555@nyuu + HaSrHrMhKqHxDdDcYqNkUdEp-1658672643632@nyuu + QcDnQmPkMiHuWqIrHsRqWaYu-1658672643725@nyuu + SjThZtNpPqLlReTpKlQpTwBk-1658672643799@nyuu + KjMnVtRmOgJjYnYeQuLdRkNd-1658672643832@nyuu + UeIdYsQtLaKkDqJpFjTrAjSp-1658672643871@nyuu + LbVrYoMpQzDbNzXbAdNjEvAo-1658672643996@nyuu + QdUwTpUvVhBtDaGvYsTrIuAt-1658672644078@nyuu + FtFgNeYsBoLzImYqDbGfSdQf-1658672644160@nyuu + OsQiRhKjTyYwAwUaGmUpUlLe-1658672644258@nyuu + + + + + alt.binaries.test + + + HwJpGfDtJuCiCnLgCuTxAgOe-1658672644335@nyuu + DxAdNjPhGcJhNzQeYlJjYaAj-1658672644340@nyuu + UsXkQuGsJuQgSpZzAqYqDhPm-1658672644365@nyuu + OvDlAlUaWpZuIvImBcInGxZm-1658672644530@nyuu + JrGfSbDkHsIrIiZzLpWuJzZj-1658672644599@nyuu + TfYyCsKwKgUfYvXlZwGdLuJx-1658672644713@nyuu + MgQiXjLvFpEqNdIoMxEkPoJb-1658672644783@nyuu + TbBhHaXgToWiTjBkTvPfVjSf-1658672644805@nyuu + NpZaHwXwIrZdCeQfBfJuZhVm-1658672644831@nyuu + EvDjIqRhNmFzYsTqFxUfLmJo-1658672644945@nyuu + YcAnJpKgSmDmTrExKtClJiJw-1658672645044@nyuu + UdPfUkYtQqEfBiYsHeJnBoFv-1658672645173@nyuu + GjXmLsWnXvQuOhZrXuFaQsWt-1658672645264@nyuu + YoEsZaVnNrElAnIoBdZkEsUl-1658672645310@nyuu + FiDqTcLyQjSiMoKwNkJcOpKu-1658672645321@nyuu + + + + + alt.binaries.test + + + BcCnTfTbAqSiUoOkJyMhOpGx-1658672645395@nyuu + QsClUcDuHqEcDiTpOdGfDgFs-1658672645483@nyuu + EsXdXwNbZnIsFhPxQkKhSaHj-1658672645616@nyuu + XuDkCuXkIkJsIjAdKsTkLqWq-1658672645751@nyuu + PfEjJjTjHiCsXqDxYiBcUxCw-1658672645777@nyuu + IrGgIuRlScWcZwCtDjTrQdKy-1658672645805@nyuu + LwVpWrWgUjSuHyLqXoZrMaKb-1658672645859@nyuu + VxLjOjYzKeEoGxUgBeIwSfFb-1658672645927@nyuu + OaQySkXmXlTnWbSoLkOmExIn-1658672646084@nyuu + JmAsMqGcGaVsPiUcRbWqScYh-1658672646171@nyuu + EcOcFyCdIaJvOnNjYkMgTyLc-1658672646251@nyuu + JdTfZrWbKhYyPpCuOkEuUpWs-1658672646289@nyuu + CtZkDeFoUhJyXeTsOxQcPfEg-1658672646332@nyuu + ArAjLtAfYtVjRxHwPeTfSsPw-1658672646366@nyuu + CmKcCzHnYhEqUxMoOyPwNgUe-1658672646549@nyuu + + + + + alt.binaries.test + + + ExOtMnHzYeTeXbPrQpMqQcEd-1658672646626@nyuu + FvHhUgEeOuOmZuJrOeOdCmBp-1658672646690@nyuu + OgIaDbSgOmMjGkNgYzAvOzEa-1658672646751@nyuu + LxTeXnRpDpQsMjQxIpRzFfQo-1658672646793@nyuu + VcToYzYiJqAwGvCmMiVsGqNj-1658672646834@nyuu + XhBxFwNzQdHkIoGcHdMeDeSo-1658672646992@nyuu + BmQxAvJfEwEdKzVoMxCoVmIr-1658672647067@nyuu + PxYzIiRmDrSdFmKaSfTtQrWp-1658672647129@nyuu + PnSpIsPeHgAfThOjXyOpNlCo-1658672647192@nyuu + YfHjYuKnUvRlBnKdDqOoGnKo-1658672647224@nyuu + WpPkPhPeXsBiMkAkUcEcZuQg-1658672647285@nyuu + SlOeJlNtDjHqTuEkAeNxMdDk-1658672647439@nyuu + AdCgCfRmEvZkRzXgCoLrHfGa-1658672647508@nyuu + JrQhNuXmRiLjRaBvNlBzMgAd-1658672647568@nyuu + XiYcGuBtZdChJfIeKeYwAsHy-1658672647654@nyuu + + + + + alt.binaries.test + + + YnIxYaQuEcKvMpSyYnEeAvVn-1658672647688@nyuu + XrFdJwZqRcRtHnIcDnEzCoMc-1658672647743@nyuu + WfRuRmRrPwGgKwZhPaAmNpOn-1658672647970@nyuu + PkCrNtOrEvNvRoPaDuAuGqSf-1658672648003@nyuu + KsFvGlAdBjRfTlZhVxEuWxJm-1658672648029@nyuu + ZnIxXyHkDpGpBkLlPkQnHwWt-1658672648104@nyuu + RhVuUwDpCoRiUoNzUpOpFrWp-1658672648150@nyuu + JpYiPxYmAaClCuXtYwLcTkHb-1658672648199@nyuu + GiSuQeEyMkMeVaJmReDyKgVt-1658672648484@nyuu + LrFxMoDtJaNcEiLgDxQoFgIq-1658672648486@nyuu + BfUcDaUxLsNrZzAvBrLcRdWw-1658672648524@nyuu + MgHqJlXjFsEmGtCuCvTrMfDl-1658672648565@nyuu + DgZiJzKyBoGaWvXrRcRfPbZy-1658672648642@nyuu + SvAwVvXyWaFgPkAwAxLmAoVe-1658672648661@nyuu + UwZyZtBxBlZdQnIbMkAmFrUx-1658672648994@nyuu + + + + + alt.binaries.test + + + MzGbXzBiDkQkCkPjHgRfYgSt-1658672650132@nyuu + + + + + alt.binaries.test + + + QbGaVgPmAxUeYtGfRrNaCgPi-1658672649037@nyuu + TlYaEwZcLkMxXiVlWnXbBhCo-1658672649043@nyuu + JvFuObAaRgTpRdAaNsBnUjSf-1658672649046@nyuu + ViJqMxYcZuCzRiXqZqPyXhVl-1658672649105@nyuu + QaYyAkGsSmRwGwWlYwOcIdCh-1658672649138@nyuu + KdLcItOyTuDfZlFvDgFoGjLx-1658672649505@nyuu + DwEiPdQdSdKbYjQzSpCtNnBp-1658672649527@nyuu + JjZfPzJoYrSnSqOzLfQdLaJe-1658672649559@nyuu + JpAdAoOiWbLlElNnXyZqUrZk-1658672649591@nyuu + KcXsPhOqSmVlImNiAaBxOeDg-1658672649593@nyuu + OcKeQsZvSvCzZzGkSyYaIwLe-1658672649621@nyuu + TpSgWsQbCxSvRhCpNeVxXpQp-1658672650017@nyuu + FgLlWiOgZsXwZbDiUfRlUbAh-1658672650037@nyuu + DpWgTfSaHsEyDoRwKmMrHlNg-1658672650077@nyuu + ApWcZeAvJfEfArBnTqKaAlTi-1658672650131@nyuu + + + + + alt.binaries.test + + + GiCuNqThWxXhQtBdIpCuSpTu-1658672650163@nyuu + + + + + alt.binaries.test + + + XwSuKgDcYgYbThUtGbFnYlMr-1658672650478@nyuu + + + + + alt.binaries.test + + + XtIpShElZfGwAxEdWcWmMoSg-1658672650533@nyuu + + + + + alt.binaries.test + + + YjBcYcXxFoSmTdKrXbQaVcEc-1658672650555@nyuu + + + + + alt.binaries.test + + + YrBmEjHwHgWrGpWwWvHnZsNr-1658672650628@nyuu + + + + + alt.binaries.test + + + HmLkJbFaPwGnDeHoAsUeWvOx-1658672650641@nyuu + BgMgXvTfPmQpMeIxMrVbSbWb-1658672650648@nyuu + + + + + alt.binaries.test + + + InAlBjYtHfRoZbUcLbLjVwGg-1658672650925@nyuu + UeLxHaYaYrGcWoApMiIeUcFc-1658672650940@nyuu + TmTyRsQpWjLvJoZtYvDxKfDk-1658672650960@nyuu + + + + + alt.binaries.test + + + AoFjKyMxTlDpZtDzHyJtFaVt-1658672651017@nyuu + WbUyNnEyReLnSdNwBsVqVfVc-1658672651029@nyuu + FaXfJfTqWuIiMvTlGdOfGgKi-1658672651035@nyuu + NeEnAwTqVeRoJuStBvPhSsCf-1658672651324@nyuu + FeFfMtWjQyDkIcPaPnFnTvZl-1658672651372@nyuu + JxFgMzBwLqVoRcPuJzHoSgFy-1658672651406@nyuu + + + + + alt.binaries.test + + + ZrZzDkZqMlGxTlXsOxZzWkFy-1658672651436@nyuu + EkIfIsZtKbFcHyLtEiOvCgUe-1658672651500@nyuu + FdAlCsPqQgToRlEcZxCzHhFu-1658672651528@nyuu + OnYrJuAaClWaDjEdFmYoDaKt-1658672651727@nyuu + TsJbMqVtYcIaGqEvShTyEhWf-1658672651793@nyuu + UbNvVcQoDxAfCiPsEqFfGkDu-1658672651860@nyuu + + + diff --git a/packages/log/package.json b/packages/log/package.json index b5830fbee..bdff9c312 100644 --- a/packages/log/package.json +++ b/packages/log/package.json @@ -34,7 +34,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/modals/package.json b/packages/modals/package.json index d0065baa4..ed6786187 100644 --- a/packages/modals/package.json +++ b/packages/modals/package.json @@ -32,7 +32,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/notifications/package.json b/packages/notifications/package.json index 499a5a89c..74cb86d91 100644 --- a/packages/notifications/package.json +++ b/packages/notifications/package.json @@ -25,13 +25,13 @@ "dependencies": { "@homarr/ui": "workspace:^0.1.0", "@mantine/notifications": "^7.12.2", - "@tabler/icons-react": "^3.14.0" + "@tabler/icons-react": "^3.16.0" }, "devDependencies": { "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/old-import/eslint.config.js b/packages/old-import/eslint.config.js new file mode 100644 index 000000000..5b19b6f8a --- /dev/null +++ b/packages/old-import/eslint.config.js @@ -0,0 +1,9 @@ +import baseConfig from "@homarr/eslint-config/base"; + +/** @type {import('typescript-eslint').Config} */ +export default [ + { + ignores: [], + }, + ...baseConfig, +]; diff --git a/packages/old-import/index.ts b/packages/old-import/index.ts new file mode 100644 index 000000000..3bd16e178 --- /dev/null +++ b/packages/old-import/index.ts @@ -0,0 +1 @@ +export * from "./src"; diff --git a/packages/old-import/package.json b/packages/old-import/package.json new file mode 100644 index 000000000..35cc72750 --- /dev/null +++ b/packages/old-import/package.json @@ -0,0 +1,40 @@ +{ + "name": "@homarr/old-import", + "private": true, + "version": "0.1.0", + "type": "module", + "exports": { + ".": "./index.ts" + }, + "typesVersions": { + "*": { + "*": [ + "src/*" + ] + } + }, + "license": "MIT", + "scripts": { + "clean": "rm -rf .turbo node_modules", + "lint": "eslint", + "format": "prettier --check . --ignore-path ../../.gitignore", + "typecheck": "tsc --noEmit" + }, + "dependencies": { + "@homarr/common": "workspace:^0.1.0", + "@homarr/db": "workspace:^0.1.0", + "@homarr/definitions": "workspace:^0.1.0", + "@homarr/log": "workspace:^0.1.0", + "@homarr/old-schema": "workspace:^0.1.0", + "@homarr/validation": "workspace:^0.1.0", + "superjson": "2.2.1" + }, + "devDependencies": { + "@homarr/eslint-config": "workspace:^0.2.0", + "@homarr/prettier-config": "workspace:^0.1.0", + "@homarr/tsconfig": "workspace:^0.1.0", + "eslint": "^9.10.0", + "typescript": "^5.6.2" + }, + "prettier": "@homarr/prettier-config" +} diff --git a/packages/old-import/src/fix-section-issues.ts b/packages/old-import/src/fix-section-issues.ts new file mode 100644 index 000000000..8ac481031 --- /dev/null +++ b/packages/old-import/src/fix-section-issues.ts @@ -0,0 +1,49 @@ +import { createId } from "@homarr/db"; +import { logger } from "@homarr/log"; +import type { OldmarrConfig } from "@homarr/old-schema"; + +export const fixSectionIssues = (old: OldmarrConfig) => { + const wrappers = old.wrappers.sort((wrapperA, wrapperB) => wrapperA.position - wrapperB.position); + const categories = old.categories.sort((categoryA, categoryB) => categoryA.position - categoryB.position); + + const neededSectionCount = categories.length * 2 + 1; + const hasToMuchEmptyWrappers = wrappers.length > categories.length + 1; + + logger.debug( + `Fixing section issues neededSectionCount=${neededSectionCount} hasToMuchEmptyWrappers=${hasToMuchEmptyWrappers}`, + ); + + for (let position = 0; position < neededSectionCount; position++) { + const index = Math.floor(position / 2); + const isEmpty = position % 2 === 0; + const section = isEmpty ? wrappers[index] : categories[index]; + if (!section) { + // If there are not enough empty sections for categories we need to insert them + if (isEmpty) { + // Insert empty wrapper for between categories + wrappers.push({ + id: createId(), + position, + }); + } + continue; + } + + section.position = position; + } + + // Find all wrappers that should be merged into one + const wrapperIdsToMerge = wrappers.slice(categories.length).map((section) => section.id); + // Remove all wrappers after the first at the end + wrappers.splice(categories.length + 1); + + if (wrapperIdsToMerge.length >= 2) { + logger.debug(`Found wrappers to merge count=${wrapperIdsToMerge.length}`); + } + + return { + wrappers, + categories, + wrapperIdsToMerge, + }; +}; diff --git a/packages/old-import/src/import-apps.ts b/packages/old-import/src/import-apps.ts new file mode 100644 index 000000000..4ef2b2771 --- /dev/null +++ b/packages/old-import/src/import-apps.ts @@ -0,0 +1,59 @@ +import { createId, inArray } from "@homarr/db"; +import type { Database, InferInsertModel } from "@homarr/db"; +import { apps as appsTable } from "@homarr/db/schema/sqlite"; +import { logger } from "@homarr/log"; +import type { OldmarrApp } from "@homarr/old-schema"; + +export const insertAppsAsync = async ( + db: Database, + apps: OldmarrApp[], + distinctAppsByHref: boolean, + configName: string, +) => { + logger.info( + `Importing old homarr apps configuration=${configName} distinctAppsByHref=${distinctAppsByHref} apps=${apps.length}`, + ); + const existingAppsWithHref = distinctAppsByHref + ? await db.query.apps.findMany({ + where: inArray(appsTable.href, [...new Set(apps.map((app) => app.url))]), + }) + : []; + + logger.debug(`Found existing apps with href count=${existingAppsWithHref.length}`); + + const mappedApps = apps.map((app) => ({ + // Use id of existing app when it has the same href and distinctAppsByHref is true + newId: distinctAppsByHref + ? (existingAppsWithHref.find( + (existingApp) => + existingApp.href === (app.behaviour.externalUrl === "" ? app.url : app.behaviour.externalUrl) && + existingApp.name === app.name && + existingApp.iconUrl === app.appearance.iconUrl, + )?.id ?? createId()) + : createId(), + ...app, + })); + + const appsToCreate = mappedApps + .filter((app) => !existingAppsWithHref.some((existingApp) => existingApp.id === app.newId)) + .map( + (app) => + ({ + id: app.newId, + name: app.name, + iconUrl: app.appearance.iconUrl, + href: app.behaviour.externalUrl === "" ? app.url : app.behaviour.externalUrl, + description: app.behaviour.tooltipDescription, + }) satisfies InferInsertModel, + ); + + logger.debug(`Creating apps count=${appsToCreate.length}`); + + if (appsToCreate.length > 0) { + await db.insert(appsTable).values(appsToCreate); + } + + logger.info(`Imported apps count=${appsToCreate.length}`); + + return mappedApps; +}; diff --git a/packages/old-import/src/import-board.ts b/packages/old-import/src/import-board.ts new file mode 100644 index 000000000..9ea155929 --- /dev/null +++ b/packages/old-import/src/import-board.ts @@ -0,0 +1,35 @@ +import type { Database } from "@homarr/db"; +import { createId } from "@homarr/db"; +import { boards } from "@homarr/db/schema/sqlite"; +import { logger } from "@homarr/log"; +import type { OldmarrConfig } from "@homarr/old-schema"; +import type { OldmarrImportConfiguration } from "@homarr/validation"; + +import { mapColor } from "./mappers/map-colors"; +import { mapColumnCount } from "./mappers/map-column-count"; + +export const insertBoardAsync = async (db: Database, old: OldmarrConfig, configuration: OldmarrImportConfiguration) => { + logger.info(`Importing old homarr board configuration=${old.configProperties.name}`); + const boardId = createId(); + await db.insert(boards).values({ + id: boardId, + name: configuration.name, + backgroundImageAttachment: old.settings.customization.backgroundImageAttachment, + backgroundImageUrl: old.settings.customization.backgroundImageUrl, + backgroundImageRepeat: old.settings.customization.backgroundImageRepeat, + backgroundImageSize: old.settings.customization.backgroundImageSize, + columnCount: mapColumnCount(old, configuration.screenSize), + faviconImageUrl: old.settings.customization.faviconUrl, + isPublic: old.settings.access.allowGuests, + logoImageUrl: old.settings.customization.logoImageUrl, + pageTitle: old.settings.customization.pageTitle, + metaTitle: old.settings.customization.metaTitle, + opacity: old.settings.customization.appOpacity, + primaryColor: mapColor(old.settings.customization.colors.primary, "#fa5252"), + secondaryColor: mapColor(old.settings.customization.colors.secondary, "#fd7e14"), + }); + + logger.info(`Imported board id=${boardId}`); + + return boardId; +}; diff --git a/packages/old-import/src/import-error.ts b/packages/old-import/src/import-error.ts new file mode 100644 index 000000000..89479aa2f --- /dev/null +++ b/packages/old-import/src/import-error.ts @@ -0,0 +1,16 @@ +import type { OldmarrConfig } from "@homarr/old-schema"; +import type { OldmarrImportConfiguration } from "@homarr/validation"; + +export class OldHomarrImportError extends Error { + constructor(oldConfig: OldmarrConfig, cause: unknown) { + super(`Failed to import old homarr configuration name=${oldConfig.configProperties.name}`, { + cause, + }); + } +} + +export class OldHomarrScreenSizeError extends Error { + constructor(type: "app" | "widget", id: string, screenSize: OldmarrImportConfiguration["screenSize"]) { + super(`Screen size not found for type=${type} id=${id} screenSize=${screenSize}`); + } +} diff --git a/packages/old-import/src/import-items.ts b/packages/old-import/src/import-items.ts new file mode 100644 index 000000000..69a98a2c5 --- /dev/null +++ b/packages/old-import/src/import-items.ts @@ -0,0 +1,98 @@ +import SuperJSON from "superjson"; + +import type { Database } from "@homarr/db"; +import { createId } from "@homarr/db"; +import { items } from "@homarr/db/schema/sqlite"; +import { logger } from "@homarr/log"; +import type { OldmarrApp, OldmarrWidget } from "@homarr/old-schema"; +import type { OldmarrImportConfiguration } from "@homarr/validation"; + +import type { WidgetComponentProps } from "../../widgets/src/definition"; +import { OldHomarrScreenSizeError } from "./import-error"; +import { mapKind } from "./widgets/definitions"; +import { mapOptions } from "./widgets/options"; + +export const insertItemsAsync = async ( + db: Database, + widgets: OldmarrWidget[], + mappedApps: (OldmarrApp & { newId: string })[], + sectionIdMaps: Map, + configuration: OldmarrImportConfiguration, +) => { + logger.info(`Importing old homarr items widgets=${widgets.length} apps=${mappedApps.length}`); + + for (const widget of widgets) { + // All items should have been moved to the last wrapper + if (widget.area.type === "sidebar") { + continue; + } + + const kind = mapKind(widget.type); + + logger.debug(`Mapped widget kind id=${widget.id} previous=${widget.type} current=${kind}`); + + if (!kind) { + logger.error(`Widget has no kind id=${widget.id} type=${widget.type}`); + continue; + } + + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const sectionId = sectionIdMaps.get(widget.area.properties.id)!; + + logger.debug(`Inserting widget id=${widget.id} sectionId=${sectionId}`); + + const screenSizeShape = widget.shape[configuration.screenSize]; + if (!screenSizeShape) { + throw new OldHomarrScreenSizeError("widget", widget.id, configuration.screenSize); + } + + await db.insert(items).values({ + id: createId(), + sectionId, + height: screenSizeShape.size.height, + width: screenSizeShape.size.width, + xOffset: screenSizeShape.location.x, + yOffset: screenSizeShape.location.y, + kind, + options: SuperJSON.stringify(mapOptions(kind, widget.properties)), + }); + + logger.debug(`Inserted widget id=${widget.id} sectionId=${sectionId}`); + } + + for (const app of mappedApps) { + // All items should have been moved to the last wrapper + if (app.area.type === "sidebar") { + continue; + } + + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const sectionId = sectionIdMaps.get(app.area.properties.id)!; + + logger.debug(`Inserting app name=${app.name} sectionId=${sectionId}`); + + const screenSizeShape = app.shape[configuration.screenSize]; + if (!screenSizeShape) { + throw new OldHomarrScreenSizeError("app", app.id, configuration.screenSize); + } + + await db.insert(items).values({ + id: createId(), + sectionId, + height: screenSizeShape.size.height, + width: screenSizeShape.size.width, + xOffset: screenSizeShape.location.x, + yOffset: screenSizeShape.location.y, + kind: "app", + options: SuperJSON.stringify({ + appId: app.newId, + openInNewTab: app.behaviour.isOpeningNewTab, + pingEnabled: app.network.enabledStatusChecker, + showDescriptionTooltip: app.behaviour.tooltipDescription !== "", + showTitle: app.appearance.appNameStatus === "normal", + } satisfies WidgetComponentProps<"app">["options"]), + }); + + logger.debug(`Inserted app name=${app.name} sectionId=${sectionId}`); + } +}; diff --git a/packages/old-import/src/import-sections.ts b/packages/old-import/src/import-sections.ts new file mode 100644 index 000000000..1aa8afc87 --- /dev/null +++ b/packages/old-import/src/import-sections.ts @@ -0,0 +1,51 @@ +import { createId } from "@homarr/db"; +import type { Database } from "@homarr/db"; +import { sections } from "@homarr/db/schema/sqlite"; +import { logger } from "@homarr/log"; +import type { OldmarrConfig } from "@homarr/old-schema"; + +export const insertSectionsAsync = async ( + db: Database, + categories: OldmarrConfig["categories"], + wrappers: OldmarrConfig["wrappers"], + boardId: string, +) => { + logger.info( + `Importing old homarr sections boardId=${boardId} categories=${categories.length} wrappers=${wrappers.length}`, + ); + + const wrapperIds = wrappers.map((section) => section.id); + const categoryIds = categories.map((section) => section.id); + const idMaps = new Map([...wrapperIds, ...categoryIds].map((id) => [id, createId()])); + + const wrappersToInsert = wrappers.map((section) => ({ + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + id: idMaps.get(section.id)!, + boardId, + xOffset: 0, + yOffset: section.position, + kind: "empty" as const, + })); + + const categoriesToInsert = categories.map((section) => ({ + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + id: idMaps.get(section.id)!, + boardId, + xOffset: 0, + yOffset: section.position, + kind: "category" as const, + name: section.name, + })); + + if (wrappersToInsert.length > 0) { + await db.insert(sections).values(wrappersToInsert); + } + + if (categoriesToInsert.length > 0) { + await db.insert(sections).values(categoriesToInsert); + } + + logger.info(`Imported sections count=${wrappersToInsert.length + categoriesToInsert.length}`); + + return idMaps; +}; diff --git a/packages/old-import/src/index.ts b/packages/old-import/src/index.ts new file mode 100644 index 000000000..b1ed0caaa --- /dev/null +++ b/packages/old-import/src/index.ts @@ -0,0 +1,47 @@ +import type { Database } from "@homarr/db"; +import type { OldmarrConfig } from "@homarr/old-schema"; +import type { OldmarrImportConfiguration } from "@homarr/validation"; + +import { fixSectionIssues } from "./fix-section-issues"; +import { insertAppsAsync } from "./import-apps"; +import { insertBoardAsync } from "./import-board"; +import { OldHomarrImportError, OldHomarrScreenSizeError } from "./import-error"; +import { insertItemsAsync } from "./import-items"; +import { insertSectionsAsync } from "./import-sections"; +import { moveWidgetsAndAppsIfMerge } from "./move-widgets-and-apps-merge"; + +export const importAsync = async (db: Database, old: OldmarrConfig, configuration: OldmarrImportConfiguration) => { + if (configuration.onlyImportApps) { + await db + .transaction(async (trasaction) => { + await insertAppsAsync(trasaction, old.apps, configuration.distinctAppsByHref, old.configProperties.name); + }) + .catch((error) => { + throw new OldHomarrImportError(old, error); + }); + return; + } + + await db + .transaction(async (trasaction) => { + const { wrappers, categories, wrapperIdsToMerge } = fixSectionIssues(old); + const { apps, widgets } = moveWidgetsAndAppsIfMerge(old, wrapperIdsToMerge, configuration); + + const boardId = await insertBoardAsync(trasaction, old, configuration); + const sectionIdMaps = await insertSectionsAsync(trasaction, categories, wrappers, boardId); + const mappedApps = await insertAppsAsync( + trasaction, + apps, + configuration.distinctAppsByHref, + old.configProperties.name, + ); + await insertItemsAsync(trasaction, widgets, mappedApps, sectionIdMaps, configuration); + }) + .catch((error) => { + if (error instanceof OldHomarrScreenSizeError) { + throw error; + } + + throw new OldHomarrImportError(old, error); + }); +}; diff --git a/packages/old-import/src/mappers/map-colors.ts b/packages/old-import/src/mappers/map-colors.ts new file mode 100644 index 000000000..73318514c --- /dev/null +++ b/packages/old-import/src/mappers/map-colors.ts @@ -0,0 +1,48 @@ +const oldColors = [ + "dark", + "gray", + "red", + "pink", + "grape", + "violet", + "indigo", + "blue", + "cyan", + "green", + "lime", + "yellow", + "orange", + "teal", +] as const; +type OldColor = (typeof oldColors)[number]; + +export const mapColor = (color: string | undefined, fallback: string) => { + if (!color) { + return fallback; + } + + if (!oldColors.some((mantineColor) => color === mantineColor)) { + return fallback; + } + + const mantineColor = color as OldColor; + + return mappedColors[mantineColor]; +}; + +const mappedColors: Record<(typeof oldColors)[number], string> = { + blue: "#228be6", + cyan: "#15aabf", + dark: "#2e2e2e", + grape: "#be4bdb", + gray: "#868e96", + green: "#40c057", + indigo: "#4c6ef5", + lime: "#82c91e", + orange: "#fd7e14", + pink: "#e64980", + red: "#fa5252", + teal: "#12b886", + violet: "#7950f2", + yellow: "#fab005", +}; diff --git a/packages/old-import/src/mappers/map-column-count.ts b/packages/old-import/src/mappers/map-column-count.ts new file mode 100644 index 000000000..0f38a98e5 --- /dev/null +++ b/packages/old-import/src/mappers/map-column-count.ts @@ -0,0 +1,15 @@ +import type { OldmarrConfig } from "@homarr/old-schema"; +import type { OldmarrImportConfiguration } from "@homarr/validation"; + +export const mapColumnCount = (old: OldmarrConfig, screenSize: OldmarrImportConfiguration["screenSize"]) => { + switch (screenSize) { + case "lg": + return old.settings.customization.gridstack.columnCountLarge; + case "md": + return old.settings.customization.gridstack.columnCountMedium; + case "sm": + return old.settings.customization.gridstack.columnCountSmall; + default: + return 10; + } +}; diff --git a/packages/old-import/src/move-widgets-and-apps-merge.ts b/packages/old-import/src/move-widgets-and-apps-merge.ts new file mode 100644 index 000000000..0305a8832 --- /dev/null +++ b/packages/old-import/src/move-widgets-and-apps-merge.ts @@ -0,0 +1,300 @@ +import { objectEntries } from "@homarr/common"; +import { logger } from "@homarr/log"; +import type { OldmarrApp, OldmarrConfig, OldmarrWidget } from "@homarr/old-schema"; +import type { OldmarrImportConfiguration } from "@homarr/validation"; + +import { OldHomarrScreenSizeError } from "./import-error"; +import { mapColumnCount } from "./mappers/map-column-count"; + +export const moveWidgetsAndAppsIfMerge = ( + old: OldmarrConfig, + wrapperIdsToMerge: string[], + configuration: OldmarrImportConfiguration, +) => { + const firstId = wrapperIdsToMerge[0]; + if (!firstId) { + return { apps: old.apps, widgets: old.widgets }; + } + + const affectedMap = new Map( + wrapperIdsToMerge.map((id) => [ + id, + { + apps: old.apps.filter((app) => app.area.type !== "sidebar" && id === app.area.properties.id), + widgets: old.widgets.filter((app) => app.area.type !== "sidebar" && id === app.area.properties.id), + }, + ]), + ); + + logger.debug(`Merging wrappers at the end of the board count=${wrapperIdsToMerge.length}`); + + let offset = 0; + for (const id of wrapperIdsToMerge) { + let requiredHeight = 0; + const affected = affectedMap.get(id); + if (!affected) { + continue; + } + + const apps = affected.apps; + const widgets = affected.widgets; + + for (const app of apps) { + if (app.area.type === "sidebar") continue; + // Move item to first wrapper + app.area.properties.id = firstId; + + const screenSizeShape = app.shape[configuration.screenSize]; + if (!screenSizeShape) { + throw new OldHomarrScreenSizeError("app", app.id, configuration.screenSize); + } + + // Find the highest widget in the wrapper to increase the offset accordingly + if (screenSizeShape.location.y + screenSizeShape.size.height > requiredHeight) { + requiredHeight = screenSizeShape.location.y + screenSizeShape.size.height; + } + + // Move item down as much as needed to not overlap with other items + screenSizeShape.location.y += offset; + } + + for (const widget of widgets) { + if (widget.area.type === "sidebar") continue; + // Move item to first wrapper + widget.area.properties.id = firstId; + + const screenSizeShape = widget.shape[configuration.screenSize]; + if (!screenSizeShape) { + throw new OldHomarrScreenSizeError("widget", widget.id, configuration.screenSize); + } + + // Find the highest widget in the wrapper to increase the offset accordingly + if (screenSizeShape.location.y + screenSizeShape.size.height > requiredHeight) { + requiredHeight = screenSizeShape.location.y + screenSizeShape.size.height; + } + + // Move item down as much as needed to not overlap with other items + screenSizeShape.location.y += offset; + } + + offset += requiredHeight; + } + + if (configuration.sidebarBehaviour === "last-section") { + if (old.settings.customization.layout.enabledLeftSidebar) { + offset = moveWidgetsAndAppsInLeftSidebar(old, firstId, offset, configuration.screenSize); + } + + if (old.settings.customization.layout.enabledRightSidebar) { + moveWidgetsAndAppsInRightSidebar(old, firstId, offset, configuration.screenSize); + } + } + + return { apps: old.apps, widgets: old.widgets }; +}; + +const moveWidgetsAndAppsInLeftSidebar = ( + old: OldmarrConfig, + firstId: string, + offset: number, + screenSize: OldmarrImportConfiguration["screenSize"], +) => { + const columnCount = mapColumnCount(old, screenSize); + let requiredHeight = updateItems({ + // This should work as the reference of the items did not change, only the array reference did + items: [...old.widgets, ...old.apps], + screenSize, + filter: (item) => + item.area.type === "sidebar" && + item.area.properties.location === "left" && + (columnCount >= 2 || item.shape[screenSize]?.location.x === 0), + update: (item) => { + const screenSizeShape = item.shape[screenSize]; + if (!screenSizeShape) { + throw new OldHomarrScreenSizeError("kind" in item ? "widget" : "app", item.id, screenSize); + } + // Reduce width to one if column count is one + if (screenSizeShape.size.width > columnCount) { + screenSizeShape.size.width = columnCount; + } + + item.area = { + type: "wrapper", + properties: { + id: firstId, + }, + }; + + screenSizeShape.location.y += offset; + }, + }); + + // Only increase offset if there are less than 3 columns because then the items have to be stacked + if (columnCount <= 3) { + offset += requiredHeight; + } + + // When column count is 0 we need to stack the items of the sidebar on top of each other + if (columnCount !== 1) { + return offset; + } + + requiredHeight = updateItems({ + // This should work as the reference of the items did not change, only the array reference did + items: [...old.widgets, ...old.apps], + screenSize, + filter: (item) => + item.area.type === "sidebar" && + item.area.properties.location === "left" && + item.shape[screenSize]?.location.x === 1, + update: (item) => { + const screenSizeShape = item.shape[screenSize]; + if (!screenSizeShape) { + throw new OldHomarrScreenSizeError("kind" in item ? "widget" : "app", item.id, screenSize); + } + + item.area = { + type: "wrapper", + properties: { + id: firstId, + }, + }; + + screenSizeShape.location.x = 0; + screenSizeShape.location.y += offset; + }, + }); + + offset += requiredHeight; + return offset; +}; + +const moveWidgetsAndAppsInRightSidebar = ( + old: OldmarrConfig, + firstId: string, + offset: number, + screenSize: OldmarrImportConfiguration["screenSize"], +) => { + const columnCount = mapColumnCount(old, screenSize); + const xOffsetDelta = Math.max(columnCount - 2, 0); + const requiredHeight = updateItems({ + // This should work as the reference of the items did not change, only the array reference did + items: [...old.widgets, ...old.apps], + screenSize, + filter: (item) => + item.area.type === "sidebar" && + item.area.properties.location === "right" && + (columnCount >= 2 || item.shape[screenSize]?.location.x === 0), + update: (item) => { + const screenSizeShape = item.shape[screenSize]; + if (!screenSizeShape) { + throw new OldHomarrScreenSizeError("kind" in item ? "widget" : "app", item.id, screenSize); + } + + // Reduce width to one if column count is one + if (screenSizeShape.size.width > columnCount) { + screenSizeShape.size.width = columnCount; + } + + item.area = { + type: "wrapper", + properties: { + id: firstId, + }, + }; + + screenSizeShape.location.y += offset; + screenSizeShape.location.x += xOffsetDelta; + }, + }); + + // When column count is 0 we need to stack the items of the sidebar on top of each other + if (columnCount !== 1) { + return; + } + + offset += requiredHeight; + + updateItems({ + // This should work as the reference of the items did not change, only the array reference did + items: [...old.widgets, ...old.apps], + screenSize, + filter: (item) => + item.area.type === "sidebar" && + item.area.properties.location === "left" && + item.shape[screenSize]?.location.x === 1, + update: (item) => { + const screenSizeShape = item.shape[screenSize]; + if (!screenSizeShape) { + throw new OldHomarrScreenSizeError("kind" in item ? "widget" : "app", item.id, screenSize); + } + + item.area = { + type: "wrapper", + properties: { + id: firstId, + }, + }; + + screenSizeShape.location.x = 0; + screenSizeShape.location.y += offset; + }, + }); +}; + +const createItemSnapshot = ( + item: OldmarrApp | OldmarrWidget, + screenSize: OldmarrImportConfiguration["screenSize"], +) => ({ + x: item.shape[screenSize]?.location.x, + y: item.shape[screenSize]?.location.y, + height: item.shape[screenSize]?.size.height, + width: item.shape[screenSize]?.size.width, + section: + item.area.type === "sidebar" + ? { + type: "sidebar", + location: item.area.properties.location, + } + : { + type: item.area.type, + id: item.area.properties.id, + }, + toString(): string { + return objectEntries(this) + .filter(([key]) => key !== "toString") + .map(([key, value]) => `${key}: ${JSON.stringify(value)}`) + .join(" "); + }, +}); + +const updateItems = (options: { + items: (OldmarrApp | OldmarrWidget)[]; + filter: (item: OldmarrApp | OldmarrWidget) => boolean; + update: (item: OldmarrApp | OldmarrWidget) => void; + screenSize: OldmarrImportConfiguration["screenSize"]; +}) => { + const items = options.items.filter(options.filter); + let requiredHeight = 0; + for (const item of items) { + const before = createItemSnapshot(item, options.screenSize); + + const screenSizeShape = item.shape[options.screenSize]; + if (!screenSizeShape) { + throw new OldHomarrScreenSizeError("kind" in item ? "widget" : "app", item.id, options.screenSize); + } + + if (screenSizeShape.location.y + screenSizeShape.size.height > requiredHeight) { + requiredHeight = screenSizeShape.location.y + screenSizeShape.size.height; + } + + options.update(item); + const after = createItemSnapshot(item, options.screenSize); + + logger.debug( + `Moved item ${item.id}\n [snapshot before]: ${before.toString()}\n [snapshot after]: ${after.toString()}`, + ); + } + + return requiredHeight; +}; diff --git a/packages/old-import/src/widgets/definitions/bookmark.ts b/packages/old-import/src/widgets/definitions/bookmark.ts new file mode 100644 index 000000000..178185777 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/bookmark.ts @@ -0,0 +1,18 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrBookmarkDefinition = CommonOldmarrWidgetDefinition< + "bookmark", + { + name: string; + items: { + id: string; + name: string; + href: string; + iconUrl: string; + openNewTab: boolean; + hideHostname: boolean; + hideIcon: boolean; + }[]; + layout: "autoGrid" | "horizontal" | "vertical"; + } +>; diff --git a/packages/old-import/src/widgets/definitions/calendar.ts b/packages/old-import/src/widgets/definitions/calendar.ts new file mode 100644 index 000000000..0220cd832 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/calendar.ts @@ -0,0 +1,11 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrCalendarDefinition = CommonOldmarrWidgetDefinition< + "calendar", + { + hideWeekDays: boolean; + showUnmonitored: boolean; + radarrReleaseType: "inCinemas" | "physicalRelease" | "digitalRelease"; + fontSize: "xs" | "sm" | "md" | "lg" | "xl"; + } +>; diff --git a/packages/old-import/src/widgets/definitions/common.ts b/packages/old-import/src/widgets/definitions/common.ts new file mode 100644 index 000000000..254966e24 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/common.ts @@ -0,0 +1,9 @@ +import type { OldmarrWidgetKind } from "@homarr/old-schema"; + +export interface CommonOldmarrWidgetDefinition< + TId extends OldmarrWidgetKind, + TOptions extends Record, +> { + id: TId; + options: TOptions; +} diff --git a/packages/old-import/src/widgets/definitions/dashdot.ts b/packages/old-import/src/widgets/definitions/dashdot.ts new file mode 100644 index 000000000..229f194d8 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/dashdot.ts @@ -0,0 +1,53 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrDashdotDefinition = CommonOldmarrWidgetDefinition< + "dashdot", + { + dashName: string; + url: string; + usePercentages: boolean; + columns: number; + graphHeight: number; + graphsOrder: ( + | { + key: "storage"; + subValues: { + enabled: boolean; + compactView: boolean; + span: number; + multiView: boolean; + }; + } + | { + key: "network"; + subValues: { + enabled: boolean; + compactView: boolean; + span: number; + }; + } + | { + key: "cpu"; + subValues: { + enabled: boolean; + multiView: boolean; + span: number; + }; + } + | { + key: "ram"; + subValues: { + enabled: boolean; + span: number; + }; + } + | { + key: "gpu"; + subValues: { + enabled: boolean; + span: number; + }; + } + )[]; + } +>; diff --git a/packages/old-import/src/widgets/definitions/date.ts b/packages/old-import/src/widgets/definitions/date.ts new file mode 100644 index 000000000..b43594a02 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/date.ts @@ -0,0 +1,21 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrDateDefinition = CommonOldmarrWidgetDefinition< + "date", + { + timezone: string; + customTitle: string; + display24HourFormat: boolean; + dateFormat: + | "hide" + | "dddd, MMMM D" + | "dddd, D MMMM" + | "MMM D" + | "D MMM" + | "DD/MM/YYYY" + | "MM/DD/YYYY" + | "DD/MM" + | "MM/DD"; + titleState: "none" | "city" | "both"; + } +>; diff --git a/packages/old-import/src/widgets/definitions/dlspeed.ts b/packages/old-import/src/widgets/definitions/dlspeed.ts new file mode 100644 index 000000000..d77f33df9 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/dlspeed.ts @@ -0,0 +1,4 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +// eslint-disable-next-line @typescript-eslint/no-empty-object-type +export type OldmarrDlspeedDefinition = CommonOldmarrWidgetDefinition<"dlspeed", {}>; diff --git a/packages/old-import/src/widgets/definitions/dns-hole-controls.ts b/packages/old-import/src/widgets/definitions/dns-hole-controls.ts new file mode 100644 index 000000000..cb16aa36d --- /dev/null +++ b/packages/old-import/src/widgets/definitions/dns-hole-controls.ts @@ -0,0 +1,8 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrDnsHoleControlsDefinition = CommonOldmarrWidgetDefinition< + "dns-hole-controls", + { + showToggleAllButtons: boolean; + } +>; diff --git a/packages/old-import/src/widgets/definitions/dns-hole-summary.ts b/packages/old-import/src/widgets/definitions/dns-hole-summary.ts new file mode 100644 index 000000000..94190bf6f --- /dev/null +++ b/packages/old-import/src/widgets/definitions/dns-hole-summary.ts @@ -0,0 +1,6 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrDnsHoleSummaryDefinition = CommonOldmarrWidgetDefinition< + "dns-hole-summary", + { usePiHoleColors: boolean; layout: "column" | "row" | "grid" } +>; diff --git a/packages/old-import/src/widgets/definitions/health-monitoring.ts b/packages/old-import/src/widgets/definitions/health-monitoring.ts new file mode 100644 index 000000000..f310bb9dc --- /dev/null +++ b/packages/old-import/src/widgets/definitions/health-monitoring.ts @@ -0,0 +1,21 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrHealthMonitoringDefinition = CommonOldmarrWidgetDefinition< + "health-monitoring", + { + fahrenheit: boolean; + cpu: boolean; + memory: boolean; + fileSystem: boolean; + defaultTabState: "system" | "cluster"; + node: string; + defaultViewState: "storage" | "none" | "node" | "vm" | "lxc"; + summary: boolean; + showNode: boolean; + showVM: boolean; + showLXCs: boolean; + showStorage: boolean; + sectionIndicatorColor: "all" | "any"; + ignoreCert: boolean; + } +>; diff --git a/packages/old-import/src/widgets/definitions/iframe.ts b/packages/old-import/src/widgets/definitions/iframe.ts new file mode 100644 index 000000000..21e29e83d --- /dev/null +++ b/packages/old-import/src/widgets/definitions/iframe.ts @@ -0,0 +1,16 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrIframeDefinition = CommonOldmarrWidgetDefinition< + "iframe", + { + embedUrl: string; + allowFullScreen: boolean; + allowScrolling: boolean; + allowTransparency: boolean; + allowPayment: boolean; + allowAutoPlay: boolean; + allowMicrophone: boolean; + allowCamera: boolean; + allowGeolocation: boolean; + } +>; diff --git a/packages/old-import/src/widgets/definitions/index.ts b/packages/old-import/src/widgets/definitions/index.ts new file mode 100644 index 000000000..0ec256693 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/index.ts @@ -0,0 +1,77 @@ +import { objectEntries } from "@homarr/common"; +import type { WidgetKind } from "@homarr/definitions"; + +import type { OldmarrBookmarkDefinition } from "./bookmark"; +import type { OldmarrCalendarDefinition } from "./calendar"; +import type { OldmarrDashdotDefinition } from "./dashdot"; +import type { OldmarrDateDefinition } from "./date"; +import type { OldmarrDlspeedDefinition } from "./dlspeed"; +import type { OldmarrDnsHoleControlsDefinition } from "./dns-hole-controls"; +import type { OldmarrDnsHoleSummaryDefinition } from "./dns-hole-summary"; +import type { OldmarrHealthMonitoringDefinition } from "./health-monitoring"; +import type { OldmarrIframeDefinition } from "./iframe"; +import type { OldmarrIndexerManagerDefinition } from "./indexer-manager"; +import type { OldmarrMediaRequestListDefinition } from "./media-requests-list"; +import type { OldmarrMediaRequestStatsDefinition } from "./media-requests-stats"; +import type { OldmarrMediaServerDefinition } from "./media-server"; +import type { OldmarrMediaTranscodingDefinition } from "./media-transcoding"; +import type { OldmarrNotebookDefinition } from "./notebook"; +import type { OldmarrRssDefinition } from "./rss"; +import type { OldmarrSmartHomeEntityStateDefinition } from "./smart-home-entity-state"; +import type { OldmarrSmartHomeTriggerAutomationDefinition } from "./smart-home-trigger-automation"; +import type { OldmarrTorrentStatusDefinition } from "./torrent-status"; +import type { OldmarrUsenetDefinition } from "./usenet"; +import type { OldmarrVideoStreamDefinition } from "./video-stream"; +import type { OldmarrWeatherDefinition } from "./weather"; + +export type OldmarrWidgetDefinitions = + | OldmarrWeatherDefinition + | OldmarrDateDefinition + | OldmarrCalendarDefinition + | OldmarrIndexerManagerDefinition + | OldmarrDashdotDefinition + | OldmarrUsenetDefinition + | OldmarrTorrentStatusDefinition + | OldmarrDlspeedDefinition + | OldmarrRssDefinition + | OldmarrVideoStreamDefinition + | OldmarrIframeDefinition + | OldmarrMediaServerDefinition + | OldmarrMediaRequestListDefinition + | OldmarrMediaRequestStatsDefinition + | OldmarrDnsHoleSummaryDefinition + | OldmarrDnsHoleControlsDefinition + | OldmarrBookmarkDefinition + | OldmarrNotebookDefinition + | OldmarrSmartHomeEntityStateDefinition + | OldmarrSmartHomeTriggerAutomationDefinition + | OldmarrHealthMonitoringDefinition + | OldmarrMediaTranscodingDefinition; + +export const widgetKindMapping = { + app: null, // In oldmarr apps were not widgets + clock: "date", + calendar: "calendar", + downloads: "torrents-status", + weather: "weather", + rssFeed: "rss", + video: "video-stream", + iframe: "iframe", + mediaServer: "media-server", + dnsHoleSummary: "dns-hole-summary", + dnsHoleControls: "dns-hole-controls", + notebook: "notebook", + "smartHome-entityState": "smart-home/entity-state", + "smartHome-executeAutomation": "smart-home/trigger-automation", + "mediaRequests-requestList": "media-requests-list", + "mediaRequests-requestStats": "media-requests-stats", + indexerManager: "indexer-manager", +} satisfies Record; +// Use null for widgets that did not exist in oldmarr +// TODO: revert assignment so that only old widgets are needed in the object, +// this can be done ones all widgets are implemented + +export type WidgetMapping = typeof widgetKindMapping; + +export const mapKind = (kind: OldmarrWidgetDefinitions["id"]): WidgetKind | undefined => + objectEntries(widgetKindMapping).find(([_, value]) => value === kind)?.[0]; diff --git a/packages/old-import/src/widgets/definitions/indexer-manager.ts b/packages/old-import/src/widgets/definitions/indexer-manager.ts new file mode 100644 index 000000000..2061a8cfa --- /dev/null +++ b/packages/old-import/src/widgets/definitions/indexer-manager.ts @@ -0,0 +1,8 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrIndexerManagerDefinition = CommonOldmarrWidgetDefinition< + "indexer-manager", + { + openIndexerSiteInNewTab: boolean; + } +>; diff --git a/packages/old-import/src/widgets/definitions/media-requests-list.ts b/packages/old-import/src/widgets/definitions/media-requests-list.ts new file mode 100644 index 000000000..a8f8a7fc1 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/media-requests-list.ts @@ -0,0 +1,9 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrMediaRequestListDefinition = CommonOldmarrWidgetDefinition< + "media-requests-list", + { + replaceLinksWithExternalHost: boolean; + openInNewTab: boolean; + } +>; diff --git a/packages/old-import/src/widgets/definitions/media-requests-stats.ts b/packages/old-import/src/widgets/definitions/media-requests-stats.ts new file mode 100644 index 000000000..12fd9f388 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/media-requests-stats.ts @@ -0,0 +1,9 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrMediaRequestStatsDefinition = CommonOldmarrWidgetDefinition< + "media-requests-stats", + { + replaceLinksWithExternalHost: boolean; + openInNewTab: boolean; + } +>; diff --git a/packages/old-import/src/widgets/definitions/media-server.ts b/packages/old-import/src/widgets/definitions/media-server.ts new file mode 100644 index 000000000..4c3d46fd2 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/media-server.ts @@ -0,0 +1,4 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +// eslint-disable-next-line @typescript-eslint/no-empty-object-type +export type OldmarrMediaServerDefinition = CommonOldmarrWidgetDefinition<"media-server", {}>; diff --git a/packages/old-import/src/widgets/definitions/media-transcoding.ts b/packages/old-import/src/widgets/definitions/media-transcoding.ts new file mode 100644 index 000000000..82f278745 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/media-transcoding.ts @@ -0,0 +1,12 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrMediaTranscodingDefinition = CommonOldmarrWidgetDefinition< + "media-transcoding", + { + defaultView: "workers" | "queue" | "statistics"; + showHealthCheck: boolean; + showHealthChecksInQueue: boolean; + queuePageSize: number; + showAppIcon: boolean; + } +>; diff --git a/packages/old-import/src/widgets/definitions/notebook.ts b/packages/old-import/src/widgets/definitions/notebook.ts new file mode 100644 index 000000000..6f589a3c0 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/notebook.ts @@ -0,0 +1,10 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrNotebookDefinition = CommonOldmarrWidgetDefinition< + "notebook", + { + showToolbar: boolean; + allowReadOnlyCheck: boolean; + content: string; + } +>; diff --git a/packages/old-import/src/widgets/definitions/rss.ts b/packages/old-import/src/widgets/definitions/rss.ts new file mode 100644 index 000000000..095b6c2fc --- /dev/null +++ b/packages/old-import/src/widgets/definitions/rss.ts @@ -0,0 +1,14 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrRssDefinition = CommonOldmarrWidgetDefinition< + "rss", + { + rssFeedUrl: string[]; + refreshInterval: number; + dangerousAllowSanitizedItemContent: boolean; + textLinesClamp: number; + sortByPublishDateAscending: boolean; + sortPostsWithoutPublishDateToTheTop: boolean; + maximumAmountOfPosts: number; + } +>; diff --git a/packages/old-import/src/widgets/definitions/smart-home-entity-state.ts b/packages/old-import/src/widgets/definitions/smart-home-entity-state.ts new file mode 100644 index 000000000..169b9c46d --- /dev/null +++ b/packages/old-import/src/widgets/definitions/smart-home-entity-state.ts @@ -0,0 +1,13 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrSmartHomeEntityStateDefinition = CommonOldmarrWidgetDefinition< + "smart-home/entity-state", + { + entityId: string; + appendUnit: boolean; + genericToggle: boolean; + automationId: string; + displayName: string; + displayFriendlyName: boolean; + } +>; diff --git a/packages/old-import/src/widgets/definitions/smart-home-trigger-automation.ts b/packages/old-import/src/widgets/definitions/smart-home-trigger-automation.ts new file mode 100644 index 000000000..5991e4631 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/smart-home-trigger-automation.ts @@ -0,0 +1,9 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrSmartHomeTriggerAutomationDefinition = CommonOldmarrWidgetDefinition< + "smart-home/trigger-automation", + { + automationId: string; + displayName: string; + } +>; diff --git a/packages/old-import/src/widgets/definitions/torrent-status.ts b/packages/old-import/src/widgets/definitions/torrent-status.ts new file mode 100644 index 000000000..8e7adb341 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/torrent-status.ts @@ -0,0 +1,18 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrTorrentStatusDefinition = CommonOldmarrWidgetDefinition< + "torrents-status", + { + displayCompletedTorrents: boolean; + displayActiveTorrents: boolean; + speedLimitOfActiveTorrents: number; + displayStaleTorrents: boolean; + labelFilterIsWhitelist: boolean; + labelFilter: string[]; + displayRatioWithFilter: boolean; + columnOrdering: boolean; + rowSorting: boolean; + columns: ("up" | "down" | "eta" | "progress")[]; + nameColumnSize: number; + } +>; diff --git a/packages/old-import/src/widgets/definitions/usenet.ts b/packages/old-import/src/widgets/definitions/usenet.ts new file mode 100644 index 000000000..3e9e9ec5c --- /dev/null +++ b/packages/old-import/src/widgets/definitions/usenet.ts @@ -0,0 +1,4 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +// eslint-disable-next-line @typescript-eslint/no-empty-object-type +export type OldmarrUsenetDefinition = CommonOldmarrWidgetDefinition<"usenet", {}>; diff --git a/packages/old-import/src/widgets/definitions/video-stream.ts b/packages/old-import/src/widgets/definitions/video-stream.ts new file mode 100644 index 000000000..6294e2168 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/video-stream.ts @@ -0,0 +1,11 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrVideoStreamDefinition = CommonOldmarrWidgetDefinition< + "video-stream", + { + FeedUrl: string; + autoPlay: boolean; + muted: boolean; + controls: boolean; + } +>; diff --git a/packages/old-import/src/widgets/definitions/weather.ts b/packages/old-import/src/widgets/definitions/weather.ts new file mode 100644 index 000000000..f883eefa4 --- /dev/null +++ b/packages/old-import/src/widgets/definitions/weather.ts @@ -0,0 +1,16 @@ +import type { CommonOldmarrWidgetDefinition } from "./common"; + +export type OldmarrWeatherDefinition = CommonOldmarrWidgetDefinition< + "weather", + { + displayInFahrenheit: boolean; + displayCityName: boolean; + displayWeekly: boolean; + forecastDays: number; + location: { + name: string; + latitude: number; + longitude: number; + }; + } +>; diff --git a/packages/old-import/src/widgets/options.ts b/packages/old-import/src/widgets/options.ts new file mode 100644 index 000000000..afc89393f --- /dev/null +++ b/packages/old-import/src/widgets/options.ts @@ -0,0 +1,136 @@ +import { objectEntries } from "@homarr/common"; +import type { WidgetKind } from "@homarr/definitions"; +import { logger } from "@homarr/log"; + +import type { WidgetComponentProps } from "../../../widgets/src/definition"; +import type { OldmarrWidgetDefinitions, WidgetMapping } from "./definitions"; + +// This type enforces, that for all widget mappings there is a corresponding option mapping, +// each option of newmarr can be mapped from the value of the oldmarr options +type OptionMapping = { + [WidgetKey in keyof WidgetMapping]: WidgetMapping[WidgetKey] extends null + ? null + : { + [OptionsKey in keyof WidgetComponentProps["options"]]: ( + oldOptions: Extract["options"], + ) => WidgetComponentProps["options"][OptionsKey] | undefined; + }; +}; + +const optionMapping: OptionMapping = { + "mediaRequests-requestList": { + linksTargetNewTab: (oldOptions) => oldOptions.openInNewTab, + }, + "mediaRequests-requestStats": {}, + calendar: { + filterFutureMonths: () => undefined, + filterPastMonths: () => undefined, + }, + clock: { + customTitle: (oldOptions) => oldOptions.customTitle, + customTitleToggle: (oldOptions) => oldOptions.titleState !== "none", + dateFormat: (oldOptions) => (oldOptions.dateFormat === "hide" ? undefined : oldOptions.dateFormat), + is24HourFormat: (oldOptions) => oldOptions.display24HourFormat, + showDate: (oldOptions) => oldOptions.dateFormat !== "hide", + showSeconds: () => undefined, + timezone: (oldOptions) => oldOptions.timezone, + useCustomTimezone: () => true, + }, + downloads: { + activeTorrentThreshold: (oldOptions) => oldOptions.speedLimitOfActiveTorrents, + applyFilterToRatio: (oldOptions) => oldOptions.displayRatioWithFilter, + categoryFilter: (oldOptions) => oldOptions.labelFilter, + filterIsWhitelist: (oldOptions) => oldOptions.labelFilterIsWhitelist, + enableRowSorting: (oldOptions) => oldOptions.rowSorting, + showCompletedTorrent: (oldOptions) => oldOptions.displayCompletedTorrents, + columns: () => ["integration", "name", "progress", "time", "actions"], + defaultSort: () => "type", + descendingDefaultSort: () => false, + showCompletedUsenet: () => true, + }, + weather: { + forecastDayCount: (oldOptions) => oldOptions.forecastDays, + hasForecast: (oldOptions) => oldOptions.displayWeekly, + isFormatFahrenheit: (oldOptions) => oldOptions.displayInFahrenheit, + location: (oldOptions) => oldOptions.location, + showCity: (oldOptions) => oldOptions.displayCityName, + }, + iframe: { + embedUrl: (oldOptions) => oldOptions.embedUrl, + allowAutoPlay: (oldOptions) => oldOptions.allowAutoPlay, + allowFullScreen: (oldOptions) => oldOptions.allowFullScreen, + allowPayment: (oldOptions) => oldOptions.allowPayment, + allowCamera: (oldOptions) => oldOptions.allowCamera, + allowMicrophone: (oldOptions) => oldOptions.allowMicrophone, + allowGeolocation: (oldOptions) => oldOptions.allowGeolocation, + allowScrolling: (oldOptions) => oldOptions.allowScrolling, + allowTransparency: (oldOptions) => oldOptions.allowTransparency, + }, + video: { + feedUrl: (oldOptions) => oldOptions.FeedUrl, + hasAutoPlay: (oldOptions) => oldOptions.autoPlay, + hasControls: (oldOptions) => oldOptions.controls, + isMuted: (oldOptions) => oldOptions.muted, + }, + dnsHoleControls: { + showToggleAllButtons: (oldOptions) => oldOptions.showToggleAllButtons, + }, + dnsHoleSummary: { + layout: (oldOptions) => oldOptions.layout, + usePiHoleColors: (oldOptions) => oldOptions.usePiHoleColors, + }, + rssFeed: { + feedUrls: (oldOptions) => oldOptions.rssFeedUrl, + maximumAmountPosts: (oldOptions) => oldOptions.maximumAmountOfPosts, + textLinesClamp: (oldOptions) => oldOptions.textLinesClamp, + }, + notebook: { + allowReadOnlyCheck: (oldOptions) => oldOptions.allowReadOnlyCheck, + content: (oldOptions) => oldOptions.content, + showToolbar: (oldOptions) => oldOptions.showToolbar, + }, + "smartHome-entityState": { + entityId: (oldOptions) => oldOptions.entityId, + displayName: (oldOptions) => oldOptions.displayName, + clickable: () => undefined, + entityUnit: () => undefined, + }, + "smartHome-executeAutomation": { + automationId: (oldOptions) => oldOptions.automationId, + displayName: (oldOptions) => oldOptions.displayName, + }, + mediaServer: {}, + indexerManager: { + openIndexerSiteInNewTab: (oldOptions) => oldOptions.openIndexerSiteInNewTab, + }, + app: null, +}; + +/** + * Maps the oldmarr options to the newmarr options + * @param kind item kind to map + * @param oldOptions oldmarr options for this item + * @returns newmarr options for this item or null if the item did not exist in oldmarr + */ +export const mapOptions = ( + kind: K, + oldOptions: Extract["options"], +) => { + logger.debug(`Mapping old homarr options for widget kind=${kind} options=${JSON.stringify(oldOptions)}`); + if (optionMapping[kind] === null) { + return null; + } + + const mapping = optionMapping[kind]; + return objectEntries(mapping).reduce( + (acc, [key, value]) => { + const newValue = value(oldOptions as never); + logger.debug(`Mapping old homarr option kind=${kind} key=${key as string} newValue=${newValue as string}`); + if (newValue !== undefined) { + acc[key as string] = newValue; + } + return acc; + }, + {} as Record, + ) as WidgetComponentProps["options"]; +}; diff --git a/packages/old-import/tsconfig.json b/packages/old-import/tsconfig.json new file mode 100644 index 000000000..cbe8483d9 --- /dev/null +++ b/packages/old-import/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@homarr/tsconfig/base.json", + "compilerOptions": { + "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" + }, + "include": ["*.ts", "src"], + "exclude": ["node_modules"] +} diff --git a/packages/old-schema/eslint.config.js b/packages/old-schema/eslint.config.js new file mode 100644 index 000000000..5b19b6f8a --- /dev/null +++ b/packages/old-schema/eslint.config.js @@ -0,0 +1,9 @@ +import baseConfig from "@homarr/eslint-config/base"; + +/** @type {import('typescript-eslint').Config} */ +export default [ + { + ignores: [], + }, + ...baseConfig, +]; diff --git a/packages/old-schema/index.ts b/packages/old-schema/index.ts new file mode 100644 index 000000000..3bd16e178 --- /dev/null +++ b/packages/old-schema/index.ts @@ -0,0 +1 @@ +export * from "./src"; diff --git a/packages/old-schema/package.json b/packages/old-schema/package.json new file mode 100644 index 000000000..4bc8ef583 --- /dev/null +++ b/packages/old-schema/package.json @@ -0,0 +1,34 @@ +{ + "name": "@homarr/old-schema", + "private": true, + "version": "0.1.0", + "type": "module", + "exports": { + ".": "./index.ts" + }, + "typesVersions": { + "*": { + "*": [ + "src/*" + ] + } + }, + "license": "MIT", + "scripts": { + "clean": "rm -rf .turbo node_modules", + "lint": "eslint", + "format": "prettier --check . --ignore-path ../../.gitignore", + "typecheck": "tsc --noEmit" + }, + "dependencies": { + "zod": "^3.23.8" + }, + "devDependencies": { + "@homarr/eslint-config": "workspace:^0.2.0", + "@homarr/prettier-config": "workspace:^0.1.0", + "@homarr/tsconfig": "workspace:^0.1.0", + "eslint": "^9.10.0", + "typescript": "^5.6.2" + }, + "prettier": "@homarr/prettier-config" +} diff --git a/packages/old-schema/src/app.ts b/packages/old-schema/src/app.ts new file mode 100644 index 000000000..0befa9ae2 --- /dev/null +++ b/packages/old-schema/src/app.ts @@ -0,0 +1,77 @@ +import { z } from "zod"; + +import { tileBaseSchema } from "./tile"; + +const appBehaviourSchema = z.object({ + externalUrl: z.string(), + isOpeningNewTab: z.boolean(), + tooltipDescription: z.string().optional(), +}); + +const appNetworkSchema = z.object({ + enabledStatusChecker: z.boolean(), + okStatus: z.array(z.number()).optional(), + statusCodes: z.array(z.string()), +}); + +const appAppearanceSchema = z.object({ + iconUrl: z.string(), + appNameStatus: z.union([z.literal("normal"), z.literal("hover"), z.literal("hidden")]), + positionAppName: z.union([ + z.literal("row"), + z.literal("column"), + z.literal("row-reverse"), + z.literal("column-reverse"), + ]), + appNameFontSize: z.number(), + lineClampAppName: z.number(), +}); + +const integrationSchema = z.enum([ + "readarr", + "radarr", + "sonarr", + "lidarr", + "prowlarr", + "sabnzbd", + "jellyseerr", + "overseerr", + "deluge", + "qBittorrent", + "transmission", + "plex", + "jellyfin", + "nzbGet", + "pihole", + "adGuardHome", + "homeAssistant", + "openmediavault", + "proxmox", + "tdarr", +]); + +const appIntegrationPropertySchema = z.object({ + type: z.enum(["private", "public"]), + field: z.enum(["apiKey", "password", "username"]), + value: z.string().nullable().optional(), + isDefined: z.boolean().optional(), +}); + +const appIntegrationSchema = z.object({ + type: integrationSchema.optional().nullable(), + properties: z.array(appIntegrationPropertySchema), +}); + +export const oldmarrAppSchema = z + .object({ + id: z.string(), + name: z.string(), + url: z.string(), + behaviour: appBehaviourSchema, + network: appNetworkSchema, + appearance: appAppearanceSchema, + integration: appIntegrationSchema.optional(), + }) + .and(tileBaseSchema); + +export type OldmarrApp = z.infer; diff --git a/packages/old-schema/src/config.ts b/packages/old-schema/src/config.ts new file mode 100644 index 000000000..5ca103739 --- /dev/null +++ b/packages/old-schema/src/config.ts @@ -0,0 +1,30 @@ +import { z } from "zod"; + +import { oldmarrAppSchema } from "./app"; +import { settingsSchema } from "./setting"; +import { oldmarrWidgetSchema } from "./widget"; + +const categorySchema = z.object({ + id: z.string(), + position: z.number(), + name: z.string(), +}); + +const wrapperSchema = z.object({ + id: z.string(), + position: z.number(), +}); + +export const oldmarrConfigSchema = z.object({ + schemaVersion: z.number(), + configProperties: z.object({ + name: z.string(), + }), + categories: z.array(categorySchema), + wrappers: z.array(wrapperSchema), + apps: z.array(oldmarrAppSchema), + widgets: z.array(oldmarrWidgetSchema), + settings: settingsSchema, +}); + +export type OldmarrConfig = z.infer; diff --git a/packages/old-schema/src/index.ts b/packages/old-schema/src/index.ts new file mode 100644 index 000000000..6b2e36d27 --- /dev/null +++ b/packages/old-schema/src/index.ts @@ -0,0 +1,5 @@ +export type { OldmarrConfig } from "./config"; +export { oldmarrConfigSchema } from "./config"; +export type { OldmarrApp } from "./app"; +export type { OldmarrWidget, OldmarrWidgetKind } from "./widget"; +export { oldmarrWidgetKinds } from "./widget"; diff --git a/packages/old-schema/src/setting.ts b/packages/old-schema/src/setting.ts new file mode 100644 index 000000000..56c30c188 --- /dev/null +++ b/packages/old-schema/src/setting.ts @@ -0,0 +1,75 @@ +import { z } from "zod"; + +const baseSearchEngineSchema = z.object({ + properties: z.object({ + openInNewTab: z.boolean().default(true), + enabled: z.boolean().default(true), + }), +}); + +const commonSearchEngineSchema = z + .object({ + type: z.enum(["google", "duckDuckGo", "bing"]), + }) + .and(baseSearchEngineSchema); + +const customSearchEngineSchema = z + .object({ + type: z.literal("custom"), + properties: z.object({ + template: z.string(), + }), + }) + .and(baseSearchEngineSchema); + +const searchEngineSchema = z.union([commonSearchEngineSchema, customSearchEngineSchema]); + +const commonSettingsSchema = z.object({ + searchEngine: searchEngineSchema, +}); + +const accessSettingsSchema = z.object({ + allowGuests: z.boolean(), +}); + +const gridstackSettingsSchema = z.object({ + columnCountSmall: z.number(), + columnCountMedium: z.number(), + columnCountLarge: z.number(), +}); + +const layoutSettingsSchema = z.object({ + enabledLeftSidebar: z.boolean(), + enabledRightSidebar: z.boolean(), + enabledDocker: z.boolean(), + enabledPing: z.boolean(), + enabledSearchbar: z.boolean(), +}); + +const colorsSettingsSchema = z.object({ + primary: z.string().optional(), + secondary: z.string().optional(), + shade: z.number().optional(), +}); + +const customizationSettingsSchema = z.object({ + layout: layoutSettingsSchema, + pageTitle: z.string().optional(), + metaTitle: z.string().optional(), + logoImageUrl: z.string().optional(), + faviconUrl: z.string().optional(), + backgroundImageUrl: z.string().optional(), + backgroundImageAttachment: z.enum(["fixed", "scroll"]).optional(), + backgroundImageSize: z.enum(["cover", "contain"]).optional(), + backgroundImageRepeat: z.enum(["no-repeat", "repeat", "repeat-x", "repeat-y"]).optional(), + customCss: z.string().optional(), + colors: colorsSettingsSchema, + appOpacity: z.number().optional(), + gridstack: gridstackSettingsSchema, +}); + +export const settingsSchema = z.object({ + common: commonSettingsSchema, + customization: customizationSettingsSchema, + access: accessSettingsSchema, +}); diff --git a/packages/old-schema/src/tile.ts b/packages/old-schema/src/tile.ts new file mode 100644 index 000000000..f90071175 --- /dev/null +++ b/packages/old-schema/src/tile.ts @@ -0,0 +1,55 @@ +import { z } from "zod"; + +const createAreaSchema = ( + type: TType, + propertiesSchema: TPropertiesSchema, +) => + z.object({ + type: z.literal(type), + properties: propertiesSchema, + }); + +const wrapperAreaSchema = createAreaSchema( + "wrapper", + z.object({ + id: z.string(), + }), +); + +const categoryAreaSchema = createAreaSchema( + "category", + z.object({ + id: z.string(), + }), +); + +const sidebarAreaSchema = createAreaSchema( + "sidebar", + z.object({ + location: z.union([z.literal("right"), z.literal("left")]), + }), +); + +const areaSchema = z.union([wrapperAreaSchema, categoryAreaSchema, sidebarAreaSchema]); + +const sizedShapeSchema = z.object({ + location: z.object({ + x: z.number(), + y: z.number(), + }), + size: z.object({ + width: z.number(), + height: z.number(), + }), +}); + +const shapeSchema = z.object({ + lg: sizedShapeSchema.optional(), + md: sizedShapeSchema.optional(), + sm: sizedShapeSchema.optional(), +}); + +export const tileBaseSchema = z.object({ + area: areaSchema, + shape: shapeSchema, +}); diff --git a/packages/old-schema/src/widget.ts b/packages/old-schema/src/widget.ts new file mode 100644 index 000000000..96a7396ea --- /dev/null +++ b/packages/old-schema/src/widget.ts @@ -0,0 +1,40 @@ +import { z } from "zod"; + +import { tileBaseSchema } from "./tile"; + +export const oldmarrWidgetKinds = [ + "calendar", + "indexer-manager", + "dashdot", + "usenet", + "weather", + "torrents-status", + "dlspeed", + "date", + "rss", + "video-stream", + "iframe", + "media-server", + "media-requests-list", + "media-requests-stats", + "dns-hole-summary", + "dns-hole-controls", + "bookmark", + "notebook", + "smart-home/entity-state", + "smart-home/trigger-automation", + "health-monitoring", + "media-transcoding", +] as const; + +export type OldmarrWidgetKind = (typeof oldmarrWidgetKinds)[number]; + +export const oldmarrWidgetSchema = z + .object({ + id: z.string(), + type: z.enum(oldmarrWidgetKinds), + properties: z.record(z.unknown()), + }) + .and(tileBaseSchema); + +export type OldmarrWidget = z.infer; diff --git a/packages/old-schema/tsconfig.json b/packages/old-schema/tsconfig.json new file mode 100644 index 000000000..a7b28ed61 --- /dev/null +++ b/packages/old-schema/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@homarr/tsconfig/base.json", + "compilerOptions": { + "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" + }, + "include": ["*.ts", "src", "../old-import/src/widgets/options.ts"], + "exclude": ["node_modules"] +} diff --git a/packages/ping/package.json b/packages/ping/package.json index 741a63917..5c0a965c5 100644 --- a/packages/ping/package.json +++ b/packages/ping/package.json @@ -29,7 +29,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/redis/package.json b/packages/redis/package.json index d6de9128d..ac222d132 100644 --- a/packages/redis/package.json +++ b/packages/redis/package.json @@ -33,7 +33,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/server-settings/package.json b/packages/server-settings/package.json index b513928b9..0127e0c95 100644 --- a/packages/server-settings/package.json +++ b/packages/server-settings/package.json @@ -25,7 +25,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/server-settings/src/index.ts b/packages/server-settings/src/index.ts index 672481db4..ee5a6ade8 100644 --- a/packages/server-settings/src/index.ts +++ b/packages/server-settings/src/index.ts @@ -1,4 +1,4 @@ -export const defaultServerSettingsKeys = ["analytics"] as const; +export const defaultServerSettingsKeys = ["analytics", "crawlingAndIndexing"] as const; export type ServerSettingsRecord = { [key in (typeof defaultServerSettingsKeys)[number]]: Record; @@ -11,6 +11,12 @@ export const defaultServerSettings = { enableIntegrationData: false, enableUserData: false, }, + crawlingAndIndexing: { + noIndex: true, + noFollow: true, + noTranslate: true, + noSiteLinksSearchBox: false, + }, } satisfies ServerSettingsRecord; export type ServerSettings = typeof defaultServerSettings; diff --git a/packages/spotlight/package.json b/packages/spotlight/package.json index cd58026f6..baea3f973 100644 --- a/packages/spotlight/package.json +++ b/packages/spotlight/package.json @@ -28,9 +28,9 @@ "@mantine/core": "^7.12.2", "@mantine/hooks": "^7.12.2", "@mantine/spotlight": "^7.12.2", - "@tabler/icons-react": "^3.14.0", + "@tabler/icons-react": "^3.16.0", "jotai": "^2.9.3", - "next": "^14.2.8", + "next": "^14.2.11", "react": "^18.3.1", "use-deep-compare-effect": "^1.8.1" }, @@ -38,7 +38,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/translation/package.json b/packages/translation/package.json index 1afd60b4f..5d497ae46 100644 --- a/packages/translation/package.json +++ b/packages/translation/package.json @@ -33,7 +33,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/translation/src/lang/en.ts b/packages/translation/src/lang/en.ts index e251e1337..b22979d42 100644 --- a/packages/translation/src/lang/en.ts +++ b/packages/translation/src/lang/en.ts @@ -530,6 +530,7 @@ export default { symbols: { colon: ": ", }, + beta: "Beta", error: "Error", errors: { noData: "No data to show", @@ -541,6 +542,7 @@ export default { backToOverview: "Back to overview", create: "Create", edit: "Edit", + import: "Import", insert: "Insert", remove: "Remove", save: "Save", @@ -644,6 +646,9 @@ export default { passwordsDoNotMatch: "Passwords do not match", passwordRequirements: "Password does not meet the requirements", boardAlreadyExists: "A board with this name already exists", + invalidFileType: "Invalid file type, expected {expected}", + fileTooLarge: "File is too large, maximum size is {maxSize}", + invalidConfiguration: "Invalid configuration", }, }, }, @@ -1060,6 +1065,20 @@ export default { unknown: "Unknown", }, }, + indexerManager: { + name: "Indexer manager status", + description: "Status of your indexers", + option: { + openIndexerSiteInNewTab: { + label: "Open indexer site in new tab", + }, + }, + title: "Indexer manager", + testAll: "Test all", + error: { + internalServerError: "Failed to fetch indexers status", + }, + }, common: { location: { query: "City / Postal code", @@ -1119,6 +1138,99 @@ export default { description: "Show the current streams on your media servers", option: {}, }, + downloads: { + name: "Download Client", + description: "Allows you to view and manage your Downloads from both Torrent and Usenet clients.", + option: { + columns: { + label: "Columns to show", + }, + enableRowSorting: { + label: "Enable items sorting", + }, + defaultSort: { + label: "Column used for sorting by default", + }, + descendingDefaultSort: { + label: "Invert sorting", + }, + showCompletedUsenet: { + label: "Show usenet entries marked as completed", + }, + showCompletedTorrent: { + label: "Show torrent entries marked as completed", + }, + activeTorrentThreshold: { + label: "Hide completed torrent under this threshold (in kiB/s)", + }, + categoryFilter: { + label: "Categories/labels to filter", + }, + filterIsWhitelist: { + label: "Filter as a whitelist", + }, + applyFilterToRatio: { + label: "Use filter to calculate Ratio", + }, + }, + errors: { + noColumns: "Select Columns in Items", + noCommunications: "Can't load data from integration", + }, + items: { + actions: { columnTitle: "Controls" }, + added: { columnTitle: "Added", detailsTitle: "Date Added" }, + category: { columnTitle: "Extras", detailsTitle: "Categories (Or extra information)" }, + downSpeed: { columnTitle: "Down", detailsTitle: "Download Speed" }, + index: { columnTitle: "#", detailsTitle: "Current index within client" }, + id: { columnTitle: "Id" }, + integration: { columnTitle: "Integration" }, + name: { columnTitle: "Job name" }, + progress: { columnTitle: "Progress", detailsTitle: "Download Progress" }, + ratio: { columnTitle: "Ratio", detailsTitle: "Torrent ratio (received/sent)" }, + received: { columnTitle: "Total down", detailsTitle: "Total downloaded" }, + sent: { columnTitle: "Total up", detailsTitle: "Total Uploaded" }, + size: { columnTitle: "File Size", detailsTitle: "Total Size of selection/files" }, + state: { columnTitle: "State", detailsTitle: "Job State" }, + time: { columnTitle: "Finish time", detailsTitle: "Time since/to completion" }, + type: { columnTitle: "Type", detailsTitle: "Download Client type" }, + upSpeed: { columnTitle: "Up", detailsTitle: "Upload Speed" }, + }, + states: { + downloading: "Downloading", + queued: "Queued", + paused: "Paused", + completed: "Completed", + failed: "Failed", + processing: "Processing", + leeching: "Leeching", + stalled: "Stalled", + unknown: "Unknown", + seeding: "Seeding", + }, + actions: { + clients: { + modalTitle: "Download clients list", + pause: "Pause all clients/items", + resume: "Resume all clients/items", + }, + client: { + pause: "Pause client", + resume: "Resume client", + }, + item: { + pause: "Pause Item", + resume: "Resume Item", + delete: { + title: "Delete Item", + modalTitle: "Are you sure you want to delete this job?", + entry: "Delete entry", + entryAndFiles: "Delete entry and file(s)", + }, + }, + }, + globalRatio: "Global Ratio", + }, "mediaRequests-requestList": { name: "Media Requests List", description: "See a list of all media requests from your Overseerr or Jellyseerr instance", @@ -1202,6 +1314,61 @@ export default { }, }, }, + oldImport: { + label: "Import from homarr before 1.0.0", + notification: { + success: { + title: "Import successful", + message: "The board was successfully imported", + }, + error: { + title: "Import failed", + message: "The board could not be imported, check the logs for further details", + }, + }, + form: { + file: { + label: "Select JSON file", + invalidError: "Invalid configuration file", + }, + apps: { + label: "Apps", + avoidDuplicates: { + label: "Avoid duplicates", + description: "Ignores apps where an app with the same href already exists", + }, + onlyImportApps: { + label: "Only import apps", + description: "Only adds the apps, the board need to be recreated manually", + }, + }, + name: { + label: "Board name", + }, + screenSize: { + label: "Screen size", + option: { + sm: "Small", + md: "Medium", + lg: "Large", + }, + }, + sidebarBehavior: { + label: "Sidebar behavior", + description: "Sidebars were removed in 1.0, you can select what should happen with the items inside them.", + option: { + lastSection: { + label: "Last section", + description: "Sidebar will be displayed below the last section", + }, + removeItems: { + label: "Remove items", + description: "Items contained in the sidebar will be removed", + }, + }, + }, + }, + }, }, field: { pageTitle: { @@ -1622,6 +1789,27 @@ export default { text: "Send the amount of users and whether you've activated SSO", }, }, + crawlingAndIndexing: { + title: "Crawling and Indexing", + warning: + "Enabling or disabling any settings here will severely impact how search engines will index & crawl your page. Any setting is a request and it is up to the crawler to apply these settings. Any modification may take up to multiple days or weeks to apply. Some settings may be search engine specific.", + noIndex: { + title: "No index", + text: "Do not index the website on search engines and don't show it in any search results", + }, + noFollow: { + title: "No follow", + text: "Do not follow any links while indexing. Disabling this will lead to crawlers attempting to follow all links on Homarr.", + }, + noTranslate: { + title: "No translate", + text: "When the site language is likely not that the user is likely to want to read, Google will show a translation link in the search results", + }, + noSiteLinksSearchBox: { + title: "No site links search box", + text: "Google will build a search box with the crawled links along with other direct links. Enabling this will ask Google to disable that box.", + }, + }, }, }, tool: { @@ -1651,12 +1839,18 @@ export default { mediaOrganizer: { label: "Media Organizers", }, + downloads: { + label: "Downloads", + }, mediaRequests: { label: "Media Requests", }, rssFeeds: { label: "RSS feeds", }, + indexerManager: { + label: "Indexer Manager", + }, }, }, }, diff --git a/packages/ui/package.json b/packages/ui/package.json index 4777dfd96..9e65b6efd 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -31,9 +31,9 @@ "@mantine/core": "^7.12.2", "@mantine/dates": "^7.12.2", "@mantine/hooks": "^7.12.2", - "@tabler/icons-react": "^3.14.0", + "@tabler/icons-react": "^3.16.0", "mantine-react-table": "2.0.0-beta.6", - "next": "^14.2.8", + "next": "^14.2.11", "react": "^18.3.1" }, "devDependencies": { @@ -41,7 +41,7 @@ "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/css-modules": "^1.0.5", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/ui/src/components/beta-badge.tsx b/packages/ui/src/components/beta-badge.tsx new file mode 100644 index 000000000..4c7381196 --- /dev/null +++ b/packages/ui/src/components/beta-badge.tsx @@ -0,0 +1,17 @@ +import type { BadgeProps } from "@mantine/core"; +import { Badge } from "@mantine/core"; + +import { useI18n } from "@homarr/translation/client"; + +interface BetaBadgeProps { + size: BadgeProps["size"]; +} + +export const BetaBadge = ({ size }: BetaBadgeProps) => { + const t = useI18n(); + return ( + + {t("common.beta")} + + ); +}; diff --git a/packages/ui/src/components/index.tsx b/packages/ui/src/components/index.tsx index 442b76913..ff01de8b2 100644 --- a/packages/ui/src/components/index.tsx +++ b/packages/ui/src/components/index.tsx @@ -8,3 +8,4 @@ export { TextMultiSelect } from "./text-multi-select"; export { UserAvatar } from "./user-avatar"; export { UserAvatarGroup } from "./user-avatar-group"; export { CustomPasswordInput } from "./password-input/password-input"; +export { BetaBadge } from "./beta-badge"; diff --git a/packages/ui/src/components/select-with-custom-items.tsx b/packages/ui/src/components/select-with-custom-items.tsx index 94b756a58..410fe3429 100644 --- a/packages/ui/src/components/select-with-custom-items.tsx +++ b/packages/ui/src/components/select-with-custom-items.tsx @@ -13,6 +13,8 @@ interface BaseSelectItem { export interface SelectWithCustomItemsProps extends Pick { data: TSelectItem[]; + description?: string; + withAsterisk?: boolean; onBlur?: (event: React.FocusEvent) => void; onFocus?: (event: React.FocusEvent) => void; } diff --git a/packages/validation/package.json b/packages/validation/package.json index 4e716b625..d70262bcc 100644 --- a/packages/validation/package.json +++ b/packages/validation/package.json @@ -24,14 +24,16 @@ "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/definitions": "workspace:^0.1.0", + "@homarr/old-schema": "workspace:^0.1.0", "@homarr/translation": "workspace:^0.1.0", - "zod": "^3.23.8" + "zod": "^3.23.8", + "zod-form-data": "^2.0.2" }, "devDependencies": { "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/validation/src/board.ts b/packages/validation/src/board.ts index c7eff93a6..8e5302aa7 100644 --- a/packages/validation/src/board.ts +++ b/packages/validation/src/board.ts @@ -1,4 +1,5 @@ import { z } from "zod"; +import { zfd } from "zod-form-data"; import { backgroundImageAttachments, @@ -8,6 +9,7 @@ import { } from "@homarr/definitions"; import { zodEnumFromArray } from "./enums"; +import { createCustomErrorParams } from "./form/i18n"; import { createSavePermissionsSchema } from "./permissions"; import { commonItemSchema, createSectionSchema } from "./shared"; @@ -67,6 +69,61 @@ const permissionsSchema = z.object({ id: z.string(), }); +export const createOldmarrImportConfigurationSchema = (existingBoardNames: string[]) => + z.object({ + name: boardNameSchema.refine( + (value) => { + return existingBoardNames.every((name) => name.toLowerCase().trim() !== value.toLowerCase().trim()); + }, + { + params: createCustomErrorParams("boardAlreadyExists"), + }, + ), + onlyImportApps: z.boolean().default(false), + distinctAppsByHref: z.boolean().default(true), + screenSize: z.enum(["lg", "md", "sm"]).default("lg"), + sidebarBehaviour: z.enum(["remove-items", "last-section"]).default("last-section"), + }); + +export type OldmarrImportConfiguration = z.infer>; + +export const superRefineJsonImportFile = (value: File | null, context: z.RefinementCtx) => { + if (!value) { + return context.addIssue({ + code: "invalid_type", + expected: "object", + received: "null", + }); + } + + if (value.type !== "application/json") { + return context.addIssue({ + code: "custom", + params: createCustomErrorParams({ + key: "invalidFileType", + params: { expected: "JSON" }, + }), + }); + } + + if (value.size > 1024 * 1024) { + return context.addIssue({ + code: "custom", + params: createCustomErrorParams({ + key: "fileTooLarge", + params: { maxSize: "1 MB" }, + }), + }); + } + + return null; +}; + +const importJsonFileSchema = zfd.formData({ + file: zfd.file().superRefine(superRefineJsonImportFile), + configuration: zfd.json(createOldmarrImportConfigurationSchema([])), +}); + const savePermissionsSchema = createSavePermissionsSchema(zodEnumFromArray(boardPermissions)); z.object({ @@ -88,4 +145,5 @@ export const boardSchemas = { changeVisibility: changeVisibilitySchema, permissions: permissionsSchema, savePermissions: savePermissionsSchema, + importOldmarrConfig: importJsonFileSchema, }; diff --git a/packages/validation/src/form/i18n.ts b/packages/validation/src/form/i18n.ts index 1f94a5c8c..c0577248d 100644 --- a/packages/validation/src/form/i18n.ts +++ b/packages/validation/src/form/i18n.ts @@ -1,3 +1,4 @@ +import type { ParamsObject } from "international-types"; import type { ErrorMapCtx, z, ZodTooBigIssue, ZodTooSmallIssue } from "zod"; import { ZodIssueCode } from "zod"; @@ -114,16 +115,17 @@ const handleZodError = (issue: z.ZodIssueOptionalMessage, ctx: ErrorMapCtx) => { if (issue.code === ZodIssueCode.too_big) { return handleTooBigError(issue); } - if (issue.code === ZodIssueCode.invalid_type && ctx.data === "") { + if (issue.code === ZodIssueCode.invalid_type && (ctx.data === "" || issue.received === "null")) { return { key: "errors.required", params: {}, } as const; } if (issue.code === ZodIssueCode.custom && issue.params?.i18n) { - const { i18n } = issue.params as CustomErrorParams; + const { i18n } = issue.params as CustomErrorParams; return { key: `errors.custom.${i18n.key}`, + params: i18n.params, } as const; } @@ -132,12 +134,17 @@ const handleZodError = (issue: z.ZodIssueOptionalMessage, ctx: ErrorMapCtx) => { }; }; -export interface CustomErrorParams { +type CustomErrorKey = keyof TranslationObject["common"]["zod"]["errors"]["custom"]; + +export interface CustomErrorParams { i18n: { - key: keyof TranslationObject["common"]["zod"]["errors"]["custom"]; - params?: Record; + key: TKey; + params: ParamsObject; }; } -export const createCustomErrorParams = (i18n: CustomErrorParams["i18n"] | CustomErrorParams["i18n"]["key"]) => - typeof i18n === "string" ? { i18n: { key: i18n } } : { i18n }; +export const createCustomErrorParams = ( + i18n: keyof CustomErrorParams["i18n"]["params"] extends never + ? CustomErrorParams["i18n"]["key"] + : CustomErrorParams["i18n"], +) => (typeof i18n === "string" ? { i18n: { key: i18n, params: {} } } : { i18n }); diff --git a/packages/validation/src/index.ts b/packages/validation/src/index.ts index f18457678..6361c31a7 100644 --- a/packages/validation/src/index.ts +++ b/packages/validation/src/index.ts @@ -26,3 +26,5 @@ export { type BoardItemAdvancedOptions, } from "./shared"; export { passwordRequirements } from "./user"; +export { createOldmarrImportConfigurationSchema, superRefineJsonImportFile } from "./board"; +export type { OldmarrImportConfiguration } from "./board"; diff --git a/packages/widgets/package.json b/packages/widgets/package.json index 9243dfcb9..965497781 100644 --- a/packages/widgets/package.json +++ b/packages/widgets/package.json @@ -25,7 +25,9 @@ "dependencies": { "@extractus/feed-extractor": "^7.1.3", "@homarr/api": "workspace:^0.1.0", + "@homarr/auth": "workspace:^0.1.0", "@homarr/common": "workspace:^0.1.0", + "@homarr/db": "workspace:^0.1.0", "@homarr/definitions": "workspace:^0.1.0", "@homarr/form": "workspace:^0.1.0", "@homarr/integrations": "workspace:^0.1.0", @@ -38,7 +40,7 @@ "@homarr/validation": "workspace:^0.1.0", "@mantine/core": "^7.12.2", "@mantine/hooks": "^7.12.2", - "@tabler/icons-react": "^3.14.0", + "@tabler/icons-react": "^3.16.0", "@tiptap/extension-color": "2.6.6", "@tiptap/extension-highlight": "2.6.6", "@tiptap/extension-image": "2.6.6", @@ -57,16 +59,16 @@ "clsx": "^2.1.1", "dayjs": "^1.11.13", "mantine-react-table": "2.0.0-beta.6", - "next": "^14.2.8", + "next": "^14.2.11", "react": "^18.3.1", - "video.js": "^8.17.3" + "video.js": "^8.17.4" }, "devDependencies": { "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/video.js": "^7.3.58", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" } } diff --git a/packages/widgets/src/_inputs/widget-multiselect-input.tsx b/packages/widgets/src/_inputs/widget-multiselect-input.tsx index 6793dade3..41e38cb59 100644 --- a/packages/widgets/src/_inputs/widget-multiselect-input.tsx +++ b/packages/widgets/src/_inputs/widget-multiselect-input.tsx @@ -3,18 +3,20 @@ import { MultiSelect } from "@mantine/core"; import { translateIfNecessary } from "@homarr/translation"; +import { useI18n } from "@homarr/translation/client"; import type { CommonWidgetInputProps } from "./common"; import { useWidgetInputTranslation } from "./common"; import { useFormContext } from "./form"; export const WidgetMultiSelectInput = ({ property, kind, options }: CommonWidgetInputProps<"multiSelect">) => { - const t = useWidgetInputTranslation(kind, property); + const t = useI18n(); + const tWidget = useWidgetInputTranslation(kind, property); const form = useFormContext(); return ( typeof option === "string" ? option @@ -23,7 +25,7 @@ export const WidgetMultiSelectInput = ({ property, kind, options }: CommonWidget label: translateIfNecessary(t, option.label) ?? option.value, }, )} - description={options.withDescription ? t("description") : undefined} + description={options.withDescription ? tWidget("description") : undefined} searchable={options.searchable} {...form.getInputProps(`options.${property}`)} /> diff --git a/packages/widgets/src/calendar/index.ts b/packages/widgets/src/calendar/index.ts index 2adf42b13..ff7d8d8a5 100644 --- a/packages/widgets/src/calendar/index.ts +++ b/packages/widgets/src/calendar/index.ts @@ -1,5 +1,6 @@ import { IconCalendar } from "@tabler/icons-react"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; import { z } from "@homarr/validation"; import { createWidgetDefinition } from "../definition"; @@ -17,7 +18,7 @@ export const { definition, componentLoader, serverDataLoader } = createWidgetDef defaultValue: 2, }), })), - supportedIntegrations: ["sonarr", "radarr", "lidarr", "readarr"], + supportedIntegrations: getIntegrationKindsByCategory("calendar"), }) .withServerData(() => import("./serverData")) .withDynamicImport(() => import("./component")); diff --git a/packages/widgets/src/definition.ts b/packages/widgets/src/definition.ts index 0ee0e36b9..9bb36b275 100644 --- a/packages/widgets/src/definition.ts +++ b/packages/widgets/src/definition.ts @@ -93,6 +93,11 @@ export type WidgetComponentProps = WidgetProps } & { boardId: string | undefined; // undefined when in preview mode isEditMode: boolean; + setOptions: ({ + newOptions, + }: { + newOptions: Partial>>; + }) => void; width: number; height: number; }; diff --git a/packages/widgets/src/dns-hole/controls/index.ts b/packages/widgets/src/dns-hole/controls/index.ts index 8fb9027bb..da6e62659 100644 --- a/packages/widgets/src/dns-hole/controls/index.ts +++ b/packages/widgets/src/dns-hole/controls/index.ts @@ -1,5 +1,7 @@ import { IconDeviceGamepad, IconServerOff } from "@tabler/icons-react"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; + import { createWidgetDefinition } from "../../definition"; import { optionsBuilder } from "../../options"; @@ -10,7 +12,7 @@ export const { definition, componentLoader, serverDataLoader } = createWidgetDef defaultValue: true, }), })), - supportedIntegrations: ["piHole", "adGuardHome"], + supportedIntegrations: getIntegrationKindsByCategory("dnsHole"), errors: { INTERNAL_SERVER_ERROR: { icon: IconServerOff, diff --git a/packages/widgets/src/dns-hole/summary/index.ts b/packages/widgets/src/dns-hole/summary/index.ts index 9267f8462..bb4d280af 100644 --- a/packages/widgets/src/dns-hole/summary/index.ts +++ b/packages/widgets/src/dns-hole/summary/index.ts @@ -1,5 +1,7 @@ import { IconAd, IconServerOff } from "@tabler/icons-react"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; + import { createWidgetDefinition } from "../../definition"; import { optionsBuilder } from "../../options"; @@ -17,7 +19,7 @@ export const { definition, componentLoader, serverDataLoader } = createWidgetDef defaultValue: "grid", }), })), - supportedIntegrations: ["piHole", "adGuardHome"], + supportedIntegrations: getIntegrationKindsByCategory("dnsHole"), errors: { INTERNAL_SERVER_ERROR: { icon: IconServerOff, diff --git a/packages/widgets/src/downloads/component.tsx b/packages/widgets/src/downloads/component.tsx new file mode 100644 index 000000000..5fae5bce5 --- /dev/null +++ b/packages/widgets/src/downloads/component.tsx @@ -0,0 +1,922 @@ +"use client"; + +import "../widgets-common.css"; + +import { useMemo, useState } from "react"; +import type { MantineStyleProp } from "@mantine/core"; +import { + ActionIcon, + Avatar, + AvatarGroup, + Button, + Center, + Divider, + Group, + Modal, + Paper, + Progress, + Space, + Stack, + Text, + Title, + Tooltip, +} from "@mantine/core"; +import { useDisclosure, useListState, useTimeout } from "@mantine/hooks"; +import type { IconProps } from "@tabler/icons-react"; +import { + IconAlertTriangle, + IconCirclesRelation, + IconInfinity, + IconInfoCircle, + IconPlayerPause, + IconPlayerPlay, + IconTrash, + IconX, +} from "@tabler/icons-react"; +import dayjs from "dayjs"; +import type { MRT_ColumnDef, MRT_VisibilityState } from "mantine-react-table"; +import { MantineReactTable, useMantineReactTable } from "mantine-react-table"; + +import { clientApi } from "@homarr/api/client"; +import { useIntegrationsWithInteractAccess } from "@homarr/auth/client"; +import { humanFileSize } from "@homarr/common"; +import type { Integration } from "@homarr/db/schema/sqlite"; +import { getIconUrl, getIntegrationKindsByCategory } from "@homarr/definitions"; +import type { + DownloadClientJobsAndStatus, + ExtendedClientStatus, + ExtendedDownloadClientItem, +} from "@homarr/integrations"; +import { useScopedI18n } from "@homarr/translation/client"; + +import type { WidgetComponentProps } from "../definition"; +import { NoIntegrationSelectedError } from "../errors"; + +//Ratio table for relative width between columns +const columnsRatios: Record = { + actions: 2, + added: 4, + category: 1, + downSpeed: 3, + id: 1, + index: 1, + integration: 1, + name: 8, + progress: 4, + ratio: 2, + received: 3, + sent: 3, + size: 3, + state: 3, + time: 4, + type: 2, + upSpeed: 3, +}; + +const actionIconIconStyle: IconProps["style"] = { + height: "var(--ai-icon-size)", + width: "var(--ai-icon-size)", +}; + +const standardIconStyle: IconProps["style"] = { + height: "var(--icon-size)", + width: "var(--icon-size)", +}; + +const invalidateTime = 30000; + +export default function DownloadClientsWidget({ + isEditMode, + integrationIds, + options, + serverData, + setOptions, +}: WidgetComponentProps<"downloads">) { + const integrationsWithInteractions = useIntegrationsWithInteractAccess().flatMap(({ id }) => + integrationIds.includes(id) ? [id] : [], + ); + + const [currentItems, currentItemsHandlers] = useListState<{ + integration: Integration; + timestamp: Date; + data: DownloadClientJobsAndStatus | null; + }>( + //Automatically invalidate data older than 30 seconds + serverData?.initialData?.map((item) => + dayjs().diff(item.timestamp) < invalidateTime ? item : { ...item, timestamp: new Date(0), data: null }, + ) ?? [], + ); + + //Invalidate all data after no update for 30 seconds using timer + const invalidationTimer = useTimeout( + () => { + currentItemsHandlers.applyWhere( + () => true, + (item) => ({ ...item, timestamp: new Date(0), data: null }), + ); + }, + invalidateTime, + { autoInvoke: true }, + ); + + //Translations + const t = useScopedI18n("widget.downloads"); + const tCommon = useScopedI18n("common"); + + //Item modal state and selection + const [clickedIndex, setClickedIndex] = useState(0); + const [opened, { open, close }] = useDisclosure(false); + + //Get API mutation functions + const { mutate: mutateResumeItem } = clientApi.widget.downloads.resumeItem.useMutation(); + const { mutate: mutatePauseItem } = clientApi.widget.downloads.pauseItem.useMutation(); + const { mutate: mutateDeleteItem } = clientApi.widget.downloads.deleteItem.useMutation(); + + //Subscribe to dynamic data changes + clientApi.widget.downloads.subscribeToJobsAndStatuses.useSubscription( + { + integrationIds, + }, + { + onData: (data) => { + //Use cyclical update to invalidate data older than 30 seconds from unresponsive integrations + const invalidIndexes = currentItems + //Don't update already invalid data (new Date (0)) + .filter(({ timestamp }) => dayjs().diff(timestamp) > invalidateTime && timestamp > new Date(0)) + .map(({ integration }) => integration.id); + currentItemsHandlers.applyWhere( + ({ integration }) => invalidIndexes.includes(integration.id), + //Set date to now so it won't update that integration for at least 30 seconds + (item) => ({ ...item, timestamp: new Date(0), data: null }), + ); + //Find id to update + const updateIndex = currentItems.findIndex((pair) => pair.integration.id === data.integration.id); + if (updateIndex >= 0) { + //Update found index + currentItemsHandlers.setItem(updateIndex, data); + } else if (integrationIds.includes(data.integration.id)) { + //Append index not found (new integration) + currentItemsHandlers.append(data); + } + //Reset no update timer + invalidationTimer.clear(); + invalidationTimer.start(); + }, + }, + ); + + //Flatten Data array for which each element has it's integration, data (base + calculated) and actions. Memoized on data subscription + const data = useMemo( + () => + currentItems + //Insure it is only using selected integrations + .filter(({ integration }) => integrationIds.includes(integration.id)) + //Removing any integration with no data associated + .filter( + (pair): pair is { integration: Integration; timestamp: Date; data: DownloadClientJobsAndStatus } => + pair.data != null, + ) + //Construct normalized items list + .flatMap((pair) => + //Apply user white/black list + pair.data.items + .filter( + ({ category }) => + options.filterIsWhitelist === + options.categoryFilter.some((filter) => + (Array.isArray(category) ? category : [category]).includes(filter), + ), + ) + //Filter completed items following widget option + .filter( + ({ type, progress, upSpeed }) => + (type === "torrent" && + ((progress === 1 && + options.showCompletedTorrent && + (upSpeed ?? 0) >= Number(options.activeTorrentThreshold) * 1024) || + progress !== 1)) || + (type === "usenet" && ((progress === 1 && options.showCompletedUsenet) || progress !== 1)), + ) + //Add extrapolated data and actions if user is allowed interaction + .map((item): ExtendedDownloadClientItem => { + const received = Math.floor(item.size * item.progress); + const integrationIds = [pair.integration.id]; + return { + integration: pair.integration, + ...item, + category: item.category !== undefined && item.category.length > 0 ? item.category : undefined, + received, + ratio: item.sent !== undefined ? item.sent / received : undefined, + //Only add if permission to use mutations + actions: integrationsWithInteractions.includes(pair.integration.id) + ? { + resume: () => mutateResumeItem({ integrationIds, item }), + pause: () => mutatePauseItem({ integrationIds, item }), + delete: ({ fromDisk }) => mutateDeleteItem({ integrationIds, item, fromDisk }), + } + : undefined, + }; + }), + ) + //flatMap already sorts by integration by nature, add sorting by integration type (usenet | torrent) + .sort(({ type: typeA }, { type: typeB }) => typeA.length - typeB.length), + [currentItems, integrationIds, options], + ); + + //Flatten Clients Array for which each elements has the integration and general client infos. + const clients = useMemo( + () => + currentItems + .filter(({ integration }) => integrationIds.includes(integration.id)) + .flatMap(({ integration, data }): ExtendedClientStatus => { + const interact = integrationsWithInteractions.includes(integration.id); + if (!data) return { integration, interact }; + const isTorrent = getIntegrationKindsByCategory("torrent").some((kind) => kind === integration.kind); + /** Derived from current items */ + const { totalUp, totalDown } = data.items + .filter( + ({ category }) => + !options.applyFilterToRatio || + data.status.type !== "torrent" || + options.filterIsWhitelist === + options.categoryFilter.some((filter) => + (Array.isArray(category) ? category : [category]).includes(filter), + ), + ) + .reduce( + ({ totalUp, totalDown }, { sent, size, progress }) => ({ + totalUp: isTorrent ? (totalUp ?? 0) + (sent ?? 0) : undefined, + totalDown: totalDown + size * progress, + }), + { totalDown: 0, totalUp: isTorrent ? 0 : undefined }, + ); + return { + integration, + interact, + status: { + totalUp, + totalDown, + ratio: totalUp === undefined ? undefined : totalUp / totalDown, + ...data.status, + }, + }; + }) + .sort( + ({ status: statusA }, { status: statusB }) => + (statusA?.type.length ?? Infinity) - (statusB?.type.length ?? Infinity), + ), + [currentItems, integrationIds, options], + ); + + //Check existing types between torrents and usenet + const integrationTypes: ExtendedDownloadClientItem["type"][] = []; + if (data.some(({ type }) => type === "torrent")) integrationTypes.push("torrent"); + if (data.some(({ type }) => type === "usenet")) integrationTypes.push("usenet"); + + //Set the visibility of columns depending on widget settings and available data/integrations. + const columnVisibility: MRT_VisibilityState = { + id: options.columns.includes("id"), + actions: options.columns.includes("actions") && integrationsWithInteractions.length > 0, + added: options.columns.includes("added"), + category: options.columns.includes("category"), + downSpeed: options.columns.includes("downSpeed"), + index: options.columns.includes("index"), + integration: options.columns.includes("integration") && clients.length > 1, + name: options.columns.includes("name"), + progress: options.columns.includes("progress"), + ratio: options.columns.includes("ratio") && integrationTypes.includes("torrent"), + received: options.columns.includes("received"), + sent: options.columns.includes("sent") && integrationTypes.includes("torrent"), + size: options.columns.includes("size"), + state: options.columns.includes("state"), + time: options.columns.includes("time"), + type: options.columns.includes("type") && integrationTypes.length > 1, + upSpeed: options.columns.includes("upSpeed") && integrationTypes.includes("torrent"), + } satisfies Record; + + //Set a relative width using ratio table + const totalWidth = options.columns.reduce( + (count: number, column) => (columnVisibility[column] ? count + columnsRatios[column] : count), + 0, + ); + + //Default styling behavior for stopping interaction when editing. (Applied everywhere except the table header) + const editStyle: MantineStyleProp = { + pointerEvents: isEditMode ? "none" : undefined, + }; + + //General style sizing as vars that should apply or be applied to all elements + const baseStyle: MantineStyleProp = { + "--total-width": totalWidth, + "--ratio-width": "calc(100cqw / var(--total-width))", + "--space-size": "calc(var(--ratio-width) * 0.1)", //Standard gap and spacing value + "--text-fz": "calc(var(--ratio-width) * 0.45)", //General Font Size + "--button-fz": "var(--text-fz)", + "--icon-size": "calc(var(--ratio-width) * 2 / 3)", //Normal icon size + "--ai-icon-size": "calc(var(--ratio-width) * 0.5)", //Icon inside action icons size + "--button-size": "calc(var(--ratio-width) * 0.75)", //Action Icon, button and avatar size + "--image-size": "var(--button-size)", + "--mrt-base-background-color": "transparent", + }; + + //Base element in common with all columns + const columnsDefBase = ({ + key, + showHeader, + align, + }: { + key: keyof ExtendedDownloadClientItem; + showHeader: boolean; + align?: "center" | "left" | "right" | "justify" | "char"; + }): MRT_ColumnDef => { + const style: MantineStyleProp = { + minWidth: 0, + width: "var(--column-width)", + height: "var(--ratio-width)", + padding: "var(--space-size)", + transition: "unset", + "--key-width": columnsRatios[key], + "--column-width": "calc((var(--key-width)/var(--total-width) * 100cqw))", + }; + return { + id: key, + accessorKey: key, + header: key, + size: columnsRatios[key], + mantineTableBodyCellProps: { style, align }, + mantineTableHeadCellProps: { + style, + align: isEditMode ? "center" : align, + }, + Header: () => (showHeader && !isEditMode ? {t(`items.${key}.columnTitle`)} : ""), + }; + }; + + //Make columns and cell elements, Memoized to data with deps on data and EditMode + const columns = useMemo[]>( + () => [ + { + ...columnsDefBase({ key: "actions", showHeader: false, align: "center" }), + enableSorting: false, + Cell: ({ cell, row }) => { + const actions = cell.getValue(); + const pausedAction = row.original.state === "paused" ? "resume" : "pause"; + const [opened, { open, close }] = useDisclosure(false); + + return actions ? ( + + + + {pausedAction === "resume" ? ( + + ) : ( + + )} + + + + + + + + + + + + + + + + ) : ( + + + + ); + }, + }, + { + ...columnsDefBase({ key: "added", showHeader: true, align: "center" }), + sortUndefined: "last", + Cell: ({ cell }) => { + const added = cell.getValue(); + return {added !== undefined ? dayjs(added).fromNow() : "unknown"}; + }, + }, + { + ...columnsDefBase({ key: "category", showHeader: false, align: "center" }), + sortUndefined: "last", + Cell: ({ cell }) => { + const category = cell.getValue(); + return ( + category !== undefined && ( + + + + ) + ); + }, + }, + { + ...columnsDefBase({ key: "downSpeed", showHeader: true, align: "right" }), + sortUndefined: "last", + Cell: ({ cell }) => { + const downSpeed = cell.getValue(); + return downSpeed && {humanFileSize(downSpeed, "/s")}; + }, + }, + { + ...columnsDefBase({ key: "id", showHeader: false, align: "center" }), + enableSorting: false, + Cell: ({ cell }) => { + const id = cell.getValue(); + return ( + + + + ); + }, + }, + { + ...columnsDefBase({ key: "index", showHeader: true, align: "center" }), + Cell: ({ cell }) => { + const index = cell.getValue(); + return {index}; + }, + }, + { + ...columnsDefBase({ key: "integration", showHeader: false, align: "center" }), + Cell: ({ cell }) => { + const integration = cell.getValue(); + return ( + + + + ); + }, + }, + { + ...columnsDefBase({ key: "name", showHeader: true }), + Cell: ({ cell }) => { + const name = cell.getValue(); + return ( + + {name} + + ); + }, + }, + { + ...columnsDefBase({ key: "progress", showHeader: true, align: "center" }), + Cell: ({ cell, row }) => { + const progress = cell.getValue(); + return ( + + + {new Intl.NumberFormat("en", { style: "percent", notation: "compact", unitDisplay: "narrow" }).format( + progress, + )} + + + + ); + }, + }, + { + ...columnsDefBase({ key: "ratio", showHeader: true, align: "center" }), + sortUndefined: "last", + Cell: ({ cell }) => { + const ratio = cell.getValue(); + return ratio !== undefined && {ratio.toFixed(ratio >= 100 ? 0 : ratio >= 10 ? 1 : 2)}; + }, + }, + { + ...columnsDefBase({ key: "received", showHeader: true, align: "right" }), + Cell: ({ cell }) => { + const received = cell.getValue(); + return {humanFileSize(received)}; + }, + }, + { + ...columnsDefBase({ key: "sent", showHeader: true, align: "right" }), + sortUndefined: "last", + Cell: ({ cell }) => { + const sent = cell.getValue(); + return sent && {humanFileSize(sent)}; + }, + }, + { + ...columnsDefBase({ key: "size", showHeader: true, align: "right" }), + Cell: ({ cell }) => { + const size = cell.getValue(); + return {humanFileSize(size)}; + }, + }, + { + ...columnsDefBase({ key: "state", showHeader: true }), + enableSorting: false, + Cell: ({ cell }) => { + const state = cell.getValue(); + return {t(`states.${state}`)}; + }, + }, + { + ...columnsDefBase({ key: "time", showHeader: true, align: "center" }), + Cell: ({ cell }) => { + const time = cell.getValue(); + return time === 0 ? : {dayjs().add(time).fromNow()}; + }, + }, + { + ...columnsDefBase({ key: "type", showHeader: true }), + Cell: ({ cell }) => { + const type = cell.getValue(); + return {type}; + }, + }, + { + ...columnsDefBase({ key: "upSpeed", showHeader: true, align: "right" }), + sortUndefined: "last", + Cell: ({ cell }) => { + const upSpeed = cell.getValue(); + return upSpeed && {humanFileSize(upSpeed, "/s")}; + }, + }, + ], + [clickedIndex, isEditMode, data, integrationIds, options], + ); + + //Table build and config + const table = useMantineReactTable({ + columns, + data, + enablePagination: false, + enableTopToolbar: false, + enableBottomToolbar: false, + enableColumnActions: false, + enableSorting: options.enableRowSorting && !isEditMode, + enableMultiSort: true, + enableStickyHeader: false, + enableColumnOrdering: isEditMode, + enableRowVirtualization: true, + rowVirtualizerOptions: { overscan: 5 }, + mantinePaperProps: { flex: 1, withBorder: false, shadow: undefined }, + mantineTableContainerProps: { style: { height: "100%" } }, + mantineTableProps: { + className: "downloads-widget-table", + style: { + "--sortButtonSize": "var(--button-size)", + "--dragButtonSize": "var(--button-size)", + }, + }, + mantineTableBodyProps: { style: editStyle }, + mantineTableBodyCellProps: ({ cell, row }) => ({ + onClick: () => { + setClickedIndex(row.index); + if (cell.column.id !== "actions") open(); + }, + }), + onColumnOrderChange: (order) => { + //Order has a tendency to add the disabled column at the end of the the real ordered array + const columnOrder = (order as typeof options.columns).filter((column) => options.columns.includes(column)); + setOptions({ newOptions: { columns: columnOrder } }); + }, + initialState: { + sorting: [{ id: options.defaultSort, desc: options.descendingDefaultSort }], + columnVisibility: { + actions: false, + added: false, + category: false, + downSpeed: false, + id: false, + index: false, + integration: false, + name: false, + progress: false, + ratio: false, + received: false, + sent: false, + size: false, + state: false, + time: false, + type: false, + upSpeed: false, + } satisfies Record, + columnOrder: options.columns, + }, + state: { + columnVisibility, + columnOrder: options.columns, + }, + }); + + const isLangRtl = tCommon("rtl", { value: "0", symbol: "1" }).startsWith("1"); + + //Used for Global Torrent Ratio + const globalTraffic = clients + .filter(({ integration: { kind } }) => + getIntegrationKindsByCategory("torrent").some((integrationKind) => integrationKind === kind), + ) + .reduce( + ({ up, down }, { status }) => ({ + up: up + (status?.totalUp ?? 0), + down: down + (status?.totalDown ?? 0), + }), + { up: 0, down: 0 }, + ); + + if (integrationIds.length === 0) { + throw new NoIntegrationSelectedError(); + } + + if (options.columns.length === 0) + return ( +
+ {t("errors.noColumns")} +
+ ); + + //The actual widget + return ( + + + + {integrationTypes.includes("torrent") && ( + + {tCommon("rtl", { value: t("globalRatio"), symbol: tCommon("symbols.colon") })} + {(globalTraffic.up / globalTraffic.down).toFixed(2)} + + )} + + + + + ); +} + +interface ItemInfoModalProps { + items: ExtendedDownloadClientItem[]; + currentIndex: number; + opened: boolean; + onClose: () => void; +} + +const ItemInfoModal = ({ items, currentIndex, opened, onClose }: ItemInfoModalProps) => { + const item = useMemo( + () => items[currentIndex], + [items, currentIndex, opened], + ); + const t = useScopedI18n("widget.downloads.states"); + //The use case for "No item found" should be impossible, hence no translation + return ( + + {item === undefined ? ( +
{"No item found"}
+ ) : ( + + {item.name} + + + {`${item.integration.name} (${item.integration.kind})`} + + + + + + + + + + + + + + + + )} +
+ ); +}; + +const NormalizedLine = ({ + itemKey, + values, +}: { + itemKey: Exclude; + values?: number | string | string[]; +}) => { + const t = useScopedI18n("widget.downloads.items"); + const tCommon = useScopedI18n("common"); + const translatedKey = t(`${itemKey}.detailsTitle`); + const isLangRtl = tCommon("rtl", { value: "0", symbol: "1" }).startsWith("1"); //Maybe make a common "isLangRtl" somewhere + const keyString = tCommon("rtl", { value: translatedKey, symbol: tCommon("symbols.colon") }); + if (typeof values !== "number" && (values === undefined || values.length === 0)) return null; + return ( + + {keyString} + {Array.isArray(values) ? ( + + {values.map((value) => ( + {value} + ))} + + ) : ( + {values} + )} + + ); +}; + +interface ClientsControlProps { + clients: ExtendedClientStatus[]; + style?: MantineStyleProp; +} + +const ClientsControl = ({ clients, style }: ClientsControlProps) => { + const integrationsStatuses = clients.reduce( + (acc, { status, integration: { id }, interact }) => + status && interact ? (acc[status.paused ? "paused" : "active"].push(id), acc) : acc, + { paused: [] as string[], active: [] as string[] }, + ); + const someInteract = clients.some(({ interact }) => interact); + const totalSpeed = humanFileSize( + clients.reduce((count, { status }) => count + (status?.rates.down ?? 0), 0), + "/s", + ); + const { mutate: mutateResumeQueue } = clientApi.widget.downloads.resume.useMutation(); + const { mutate: mutatePauseQueue } = clientApi.widget.downloads.pause.useMutation(); + const [opened, { open, close }] = useDisclosure(false); + const t = useScopedI18n("widget.downloads"); + return ( + + + {clients.map((client) => ( + + ))} + + {someInteract && ( + + mutateResumeQueue({ integrationIds: integrationsStatuses.paused })} + > + + + + )} + + {someInteract && ( + + mutatePauseQueue({ integrationIds: integrationsStatuses.active })} + > + + + + )} + + + {clients.map((client) => ( + + + + + + + {client.status ? ( + + + {client.status.rates.up !== undefined ? ( + + + {`↑ ${humanFileSize(client.status.rates.up, "/s")}`} + + {"-"} + + {humanFileSize(client.status.totalUp ?? 0)} + + + ) : undefined} + + + {`↓ ${humanFileSize(client.status.rates.down, "/s")}`} + + {"-"} + + {humanFileSize(Math.floor(client.status.totalDown ?? 0))} + + + + + ) : ( + + {t("errors.noCommunications")} + + )} + + + + {client.integration.name} + + + {client.status && client.interact ? ( + + { + (client.status?.paused ? mutateResumeQueue : mutatePauseQueue)({ + integrationIds: [client.integration.id], + }); + }} + > + {client.status.paused ? : } + + + ) : ( + + + + )} + + + ))} + + + + ); +}; diff --git a/packages/widgets/src/downloads/index.ts b/packages/widgets/src/downloads/index.ts new file mode 100644 index 000000000..1aa15f359 --- /dev/null +++ b/packages/widgets/src/downloads/index.ts @@ -0,0 +1,110 @@ +import { IconDownload } from "@tabler/icons-react"; + +import { getIntegrationKindsByCategory } from "@homarr/definitions"; +import type { ExtendedDownloadClientItem } from "@homarr/integrations"; +import { z } from "@homarr/validation"; + +import { createWidgetDefinition } from "../definition"; +import { optionsBuilder } from "../options"; + +const columnsList = [ + "id", + "actions", + "added", + "category", + "downSpeed", + "index", + "integration", + "name", + "progress", + "ratio", + "received", + "sent", + "size", + "state", + "time", + "type", + "upSpeed", +] as const satisfies (keyof ExtendedDownloadClientItem)[]; +const sortingExclusion = ["actions", "id", "state"] as const satisfies readonly (typeof columnsList)[number][]; +const columnsSort = columnsList.filter((column) => + sortingExclusion.some((exclusion) => exclusion !== column), +) as Exclude; + +export const { definition, componentLoader, serverDataLoader } = createWidgetDefinition("downloads", { + icon: IconDownload, + options: optionsBuilder.from( + (factory) => ({ + columns: factory.multiSelect({ + defaultValue: ["integration", "name", "progress", "time", "actions"], + options: columnsList.map((value) => ({ + value, + label: (t) => t(`widget.downloads.items.${value}.columnTitle`), + })), + searchable: true, + }), + enableRowSorting: factory.switch({ + defaultValue: false, + }), + defaultSort: factory.select({ + defaultValue: "type", + options: columnsSort.map((value) => ({ + value, + label: (t) => t(`widget.downloads.items.${value}.columnTitle`), + })), + }), + descendingDefaultSort: factory.switch({ + defaultValue: false, + }), + showCompletedUsenet: factory.switch({ + defaultValue: true, + }), + showCompletedTorrent: factory.switch({ + defaultValue: true, + }), + activeTorrentThreshold: factory.number({ + //in KiB/s + validate: z.number().min(0), + defaultValue: 0, + step: 1, + }), + categoryFilter: factory.multiText({ + defaultValue: [] as string[], + validate: z.string(), + }), + filterIsWhitelist: factory.switch({ + defaultValue: false, + }), + applyFilterToRatio: factory.switch({ + defaultValue: true, + }), + }), + { + defaultSort: { + shouldHide: (options) => !options.enableRowSorting, + }, + descendingDefaultSort: { + shouldHide: (options) => !options.enableRowSorting, + }, + showCompletedUsenet: { + shouldHide: (_, integrationKinds) => + !getIntegrationKindsByCategory("usenet").some((kinds) => integrationKinds.includes(kinds)), + }, + showCompletedTorrent: { + shouldHide: (_, integrationKinds) => + !getIntegrationKindsByCategory("torrent").some((kinds) => integrationKinds.includes(kinds)), + }, + activeTorrentThreshold: { + shouldHide: (_, integrationKinds) => + !getIntegrationKindsByCategory("torrent").some((kinds) => integrationKinds.includes(kinds)), + }, + applyFilterToRatio: { + shouldHide: (_, integrationKinds) => + !getIntegrationKindsByCategory("torrent").some((kinds) => integrationKinds.includes(kinds)), + }, + }, + ), + supportedIntegrations: getIntegrationKindsByCategory("downloadClient"), +}) + .withServerData(() => import("./serverData")) + .withDynamicImport(() => import("./component")); diff --git a/packages/widgets/src/downloads/serverData.ts b/packages/widgets/src/downloads/serverData.ts new file mode 100644 index 000000000..8259fc5ac --- /dev/null +++ b/packages/widgets/src/downloads/serverData.ts @@ -0,0 +1,21 @@ +"use server"; + +import { api } from "@homarr/api/server"; + +import type { WidgetProps } from "../definition"; + +export default async function getServerDataAsync({ integrationIds }: WidgetProps<"downloads">) { + if (integrationIds.length === 0) { + return { + initialData: undefined, + }; + } + + const jobsAndStatuses = await api.widget.downloads.getJobsAndStatuses({ + integrationIds, + }); + + return { + initialData: jobsAndStatuses, + }; +} diff --git a/packages/widgets/src/iframe/component.tsx b/packages/widgets/src/iframe/component.tsx index a4a2ffd55..e8af4d864 100644 --- a/packages/widgets/src/iframe/component.tsx +++ b/packages/widgets/src/iframe/component.tsx @@ -7,7 +7,7 @@ import { useI18n } from "@homarr/translation/client"; import type { WidgetComponentProps } from "../definition"; import classes from "./component.module.css"; -export default function IFrameWidget({ options }: WidgetComponentProps<"iframe">) { +export default function IFrameWidget({ options, isEditMode }: WidgetComponentProps<"iframe">) { const t = useI18n(); const { embedUrl, ...permissions } = options; const allowedPermissions = getAllowedPermissions(permissions); @@ -16,7 +16,13 @@ export default function IFrameWidget({ options }: WidgetComponentProps<"iframe"> return ( - diff --git a/packages/widgets/src/index.tsx b/packages/widgets/src/index.tsx index 0585f760d..4c1b04b8c 100644 --- a/packages/widgets/src/index.tsx +++ b/packages/widgets/src/index.tsx @@ -11,8 +11,10 @@ import * as clock from "./clock"; import type { WidgetComponentProps } from "./definition"; import * as dnsHoleControls from "./dns-hole/controls"; import * as dnsHoleSummary from "./dns-hole/summary"; +import * as downloads from "./downloads"; import * as iframe from "./iframe"; import type { WidgetImportRecord } from "./import"; +import * as indexerManager from "./indexer-manager"; import * as mediaRequestsList from "./media-requests/list"; import * as mediaRequestsStats from "./media-requests/stats"; import * as mediaServer from "./media-server"; @@ -44,9 +46,11 @@ export const widgetImports = { "smartHome-executeAutomation": smartHomeExecuteAutomation, mediaServer, calendar, + downloads, "mediaRequests-requestList": mediaRequestsList, "mediaRequests-requestStats": mediaRequestsStats, rssFeed, + indexerManager, } satisfies WidgetImportRecord; export type WidgetImports = typeof widgetImports; diff --git a/packages/widgets/src/indexer-manager/component.tsx b/packages/widgets/src/indexer-manager/component.tsx new file mode 100644 index 000000000..d9d79020f --- /dev/null +++ b/packages/widgets/src/indexer-manager/component.tsx @@ -0,0 +1,85 @@ +"use client"; + +import { useState } from "react"; +import { Anchor, Button, Card, Container, Flex, Group, ScrollArea, Text } from "@mantine/core"; +import { IconCircleCheck, IconCircleX, IconReportSearch, IconTestPipe } from "@tabler/icons-react"; + +import { clientApi } from "@homarr/api/client"; +import type { Indexer } from "@homarr/integrations/types"; +import { useI18n } from "@homarr/translation/client"; + +import type { WidgetComponentProps } from "../definition"; +import { NoIntegrationSelectedError } from "../errors"; + +export default function IndexerManagerWidget({ + options, + integrationIds, + serverData, +}: WidgetComponentProps<"indexerManager">) { + if (integrationIds.length === 0) { + throw new NoIntegrationSelectedError(); + } + const t = useI18n(); + const [indexersData, setIndexersData] = useState<{ integrationId: string; indexers: Indexer[] }[]>( + serverData?.initialData ?? [], + ); + + const { mutate: testAll, isPending } = clientApi.widget.indexerManager.testAllIndexers.useMutation(); + + clientApi.widget.indexerManager.subscribeIndexersStatus.useSubscription( + { integrationIds }, + { + onData(newData) { + setIndexersData((prevData) => { + return prevData.map((item) => + item.integrationId === newData.integrationId ? { ...item, indexers: newData.indexers } : item, + ); + }); + }, + }, + ); + + return ( + + + {t("widget.indexerManager.title")} + + + + {indexersData.map(({ integrationId, indexers }) => ( + + {indexers.map((indexer) => ( + + + + {indexer.name} + + + {indexer.status === false || indexer.enabled === false ? ( + + ) : ( + + )} + + ))} + + ))} + + + + + ); +} diff --git a/packages/widgets/src/indexer-manager/index.ts b/packages/widgets/src/indexer-manager/index.ts new file mode 100644 index 000000000..9885a1764 --- /dev/null +++ b/packages/widgets/src/indexer-manager/index.ts @@ -0,0 +1,24 @@ +import { IconReportSearch, IconServerOff } from "@tabler/icons-react"; + +import { getIntegrationKindsByCategory } from "@homarr/definitions"; + +import { createWidgetDefinition } from "../definition"; +import { optionsBuilder } from "../options"; + +export const { definition, componentLoader, serverDataLoader } = createWidgetDefinition("indexerManager", { + icon: IconReportSearch, + options: optionsBuilder.from((factory) => ({ + openIndexerSiteInNewTab: factory.switch({ + defaultValue: true, + }), + })), + supportedIntegrations: getIntegrationKindsByCategory("indexerManager"), + errors: { + INTERNAL_SERVER_ERROR: { + icon: IconServerOff, + message: (t) => t("widget.indexerManager.error.internalServerError"), + }, + }, +}) + .withServerData(() => import("./serverData")) + .withDynamicImport(() => import("./component")); diff --git a/packages/widgets/src/indexer-manager/serverData.ts b/packages/widgets/src/indexer-manager/serverData.ts new file mode 100644 index 000000000..4ec1c92d5 --- /dev/null +++ b/packages/widgets/src/indexer-manager/serverData.ts @@ -0,0 +1,27 @@ +"use server"; + +import { api } from "@homarr/api/server"; + +import type { WidgetProps } from "../definition"; + +export default async function getServerDataAsync({ integrationIds }: WidgetProps<"indexerManager">) { + if (integrationIds.length === 0) { + return { + initialData: [], + }; + } + + try { + const currentIndexers = await api.widget.indexerManager.getIndexersStatus({ + integrationIds, + }); + + return { + initialData: currentIndexers, + }; + } catch { + return { + initialData: [], + }; + } +} diff --git a/packages/widgets/src/media-requests/list/index.ts b/packages/widgets/src/media-requests/list/index.ts index 4fe23f895..47ad762d9 100644 --- a/packages/widgets/src/media-requests/list/index.ts +++ b/packages/widgets/src/media-requests/list/index.ts @@ -1,5 +1,7 @@ import { IconZoomQuestion } from "@tabler/icons-react"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; + import { createWidgetDefinition } from "../../definition"; import { optionsBuilder } from "../../options"; @@ -10,7 +12,7 @@ export const { componentLoader, definition, serverDataLoader } = createWidgetDef defaultValue: true, }), })), - supportedIntegrations: ["overseerr", "jellyseerr"], + supportedIntegrations: getIntegrationKindsByCategory("mediaRequest"), }) .withServerData(() => import("./serverData")) .withDynamicImport(() => import("./component")); diff --git a/packages/widgets/src/media-requests/stats/index.ts b/packages/widgets/src/media-requests/stats/index.ts index 332a0885b..3d5576147 100644 --- a/packages/widgets/src/media-requests/stats/index.ts +++ b/packages/widgets/src/media-requests/stats/index.ts @@ -1,11 +1,13 @@ import { IconChartBar } from "@tabler/icons-react"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; + import { createWidgetDefinition } from "../../definition"; export const { componentLoader, definition, serverDataLoader } = createWidgetDefinition("mediaRequests-requestStats", { icon: IconChartBar, options: {}, - supportedIntegrations: ["overseerr", "jellyseerr"], + supportedIntegrations: getIntegrationKindsByCategory("mediaRequest"), }) .withServerData(() => import("./serverData")) .withDynamicImport(() => import("./component")); diff --git a/packages/widgets/src/modals/widget-edit-modal.tsx b/packages/widgets/src/modals/widget-edit-modal.tsx index 574911492..4a344bcf5 100644 --- a/packages/widgets/src/modals/widget-edit-modal.tsx +++ b/packages/widgets/src/modals/widget-edit-modal.tsx @@ -47,9 +47,9 @@ export const WidgetEditModal = createModal>(({ actions, i z.object({ options: z.object( objectEntries(widgetImports[innerProps.kind].definition.options).reduce( - (acc, [key, value]: [string, { validate?: z.ZodType }]) => { + (acc, [key, value]: [string, { type: string; validate?: z.ZodType }]) => { if (value.validate) { - acc[key] = value.validate; + acc[key] = value.type === "multiText" ? z.array(value.validate).optional() : value.validate; } return acc; diff --git a/packages/widgets/src/smart-home/entity-state/index.ts b/packages/widgets/src/smart-home/entity-state/index.ts index 300188e5f..4bfdaaaff 100644 --- a/packages/widgets/src/smart-home/entity-state/index.ts +++ b/packages/widgets/src/smart-home/entity-state/index.ts @@ -1,5 +1,7 @@ import { IconBinaryTree } from "@tabler/icons-react"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; + import { createWidgetDefinition } from "../../definition"; import { optionsBuilder } from "../../options"; @@ -15,5 +17,5 @@ export const { definition, componentLoader } = createWidgetDefinition("smartHome entityUnit: factory.text(), clickable: factory.switch(), })), - supportedIntegrations: ["homeAssistant"], + supportedIntegrations: getIntegrationKindsByCategory("smartHomeServer"), }).withDynamicImport(() => import("./component")); diff --git a/packages/widgets/src/smart-home/execute-automation/index.ts b/packages/widgets/src/smart-home/execute-automation/index.ts index a1996e9fe..96c6f8394 100644 --- a/packages/widgets/src/smart-home/execute-automation/index.ts +++ b/packages/widgets/src/smart-home/execute-automation/index.ts @@ -1,5 +1,7 @@ import { IconBinaryTree } from "@tabler/icons-react"; +import { getIntegrationKindsByCategory } from "@homarr/definitions"; + import { createWidgetDefinition } from "../../definition"; import { optionsBuilder } from "../../options"; @@ -9,5 +11,5 @@ export const { definition, componentLoader } = createWidgetDefinition("smartHome displayName: factory.text(), automationId: factory.text(), })), - supportedIntegrations: ["homeAssistant"], + supportedIntegrations: getIntegrationKindsByCategory("smartHomeServer"), }).withDynamicImport(() => import("./component")); diff --git a/packages/widgets/src/widgets-common.css b/packages/widgets/src/widgets-common.css new file mode 100644 index 000000000..0418074fe --- /dev/null +++ b/packages/widgets/src/widgets-common.css @@ -0,0 +1,36 @@ +.downloads-widget-table { + /*Set Header static and overflow body instead*/ + display: flex; + height: 100%; + flex-direction: column; + .mantine-Table-tbody { + overflow-y: auto; + flex: 1; + scrollbar-width: 0; + } + /*Hide scrollbar until I can apply an overlay scrollbar instead*/ + .mantine-Table-tbody::-webkit-scrollbar { + width: 0; + } + /*Properly size header*/ + .mrt-table-head-cell-labels { + min-height: var(--ratioWidth); + gap: 0; + padding: 0; + } + /*Properly size controls*/ + .mrt-grab-handle-button { + margin: unset; + width: var(--dragButtonSize); + min-width: var(--dragButtonSize); + height: var(--dragButtonSize); + min-height: var(--dragButtonSize); + } + .mrt-table-head-sort-button { + margin: unset; + width: var(--sortButtonSize); + min-width: var(--sortButtonSize); + height: var(--sortButtonSize); + min-height: var(--sortButtonSize); + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7aea20e2f..4ab214132 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,17 +17,17 @@ importers: specifier: workspace:^0.1.0 version: link:tooling/prettier '@turbo/gen': - specifier: ^2.1.1 - version: 2.1.1(@types/node@20.16.5)(typescript@5.5.4) + specifier: ^2.1.2 + version: 2.1.2(@types/node@20.16.5)(typescript@5.6.2) '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0)) + version: 4.3.1(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0)) '@vitest/coverage-v8': - specifier: ^2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@20.16.5)(@vitest/ui@2.0.5)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0)) + specifier: ^2.1.1 + version: 2.1.1(vitest@2.1.1(@types/node@20.16.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0)) '@vitest/ui': - specifier: ^2.0.5 - version: 2.0.5(vitest@2.0.5) + specifier: ^2.1.1 + version: 2.1.1(vitest@2.1.1) cross-env: specifier: ^7.0.3 version: 7.0.3 @@ -38,20 +38,20 @@ importers: specifier: ^3.3.3 version: 3.3.3 testcontainers: - specifier: ^10.13.0 - version: 10.13.0 + specifier: ^10.13.1 + version: 10.13.1 turbo: - specifier: ^2.1.1 - version: 2.1.1 + specifier: ^2.1.2 + version: 2.1.2 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 vite-tsconfig-paths: specifier: ^5.0.1 - version: 5.0.1(typescript@5.5.4)(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0)) + version: 5.0.1(typescript@5.6.2)(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0)) vitest: - specifier: ^2.0.5 - version: 2.0.5(@types/node@20.16.5)(@vitest/ui@2.0.5)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0) + specifier: ^2.1.1 + version: 2.1.1(@types/node@20.16.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0) apps/nextjs: dependencies: @@ -94,6 +94,9 @@ importers: '@homarr/notifications': specifier: workspace:^0.1.0 version: link:../../packages/notifications + '@homarr/old-schema': + specifier: workspace:^0.1.0 + version: link:../../packages/old-schema '@homarr/server-settings': specifier: workspace:^0.1.0 version: link:../../packages/server-settings @@ -114,7 +117,7 @@ importers: version: link:../../packages/widgets '@mantine/colors-generator': specifier: ^7.12.2 - version: 7.12.2(chroma-js@3.0.0) + version: 7.12.2(chroma-js@3.1.1) '@mantine/core': specifier: ^7.12.2 version: 7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -129,34 +132,34 @@ importers: version: 7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tiptap/extension-link@2.6.6(@tiptap/core@2.6.6(@tiptap/pm@2.6.6))(@tiptap/pm@2.6.6))(@tiptap/react@2.6.6(@tiptap/core@2.6.6(@tiptap/pm@2.6.6))(@tiptap/pm@2.6.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@million/lint': specifier: 1.0.0-rc.84 - version: 1.0.0-rc.84(rollup@4.17.2) + version: 1.0.0-rc.84(encoding@0.1.13)(rollup@4.17.2) '@t3-oss/env-nextjs': specifier: ^0.11.1 - version: 0.11.1(typescript@5.5.4)(zod@3.23.8) + version: 0.11.1(typescript@5.6.2)(zod@3.23.8) '@tabler/icons-react': - specifier: ^3.14.0 - version: 3.14.0(react@18.3.1) + specifier: ^3.16.0 + version: 3.16.0(react@18.3.1) '@tanstack/react-query': - specifier: ^5.55.0 - version: 5.55.0(react@18.3.1) + specifier: ^5.56.2 + version: 5.56.2(react@18.3.1) '@tanstack/react-query-devtools': - specifier: ^5.55.0 - version: 5.55.0(@tanstack/react-query@5.55.0(react@18.3.1))(react@18.3.1) + specifier: ^5.56.2 + version: 5.56.2(@tanstack/react-query@5.56.2(react@18.3.1))(react@18.3.1) '@tanstack/react-query-next-experimental': - specifier: 5.55.0 - version: 5.55.0(@tanstack/react-query@5.55.0(react@18.3.1))(next@14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react@18.3.1) + specifier: 5.56.2 + version: 5.56.2(@tanstack/react-query@5.56.2(react@18.3.1))(next@14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react@18.3.1) '@trpc/client': specifier: next - version: 11.0.0-rc.498(@trpc/server@11.0.0-rc.498) + version: 11.0.0-rc.502(@trpc/server@11.0.0-rc.502) '@trpc/next': specifier: next - version: 11.0.0-rc.498(@tanstack/react-query@5.55.0(react@18.3.1))(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/react-query@11.0.0-rc.498(@tanstack/react-query@5.55.0(react@18.3.1))(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/server@11.0.0-rc.498)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@trpc/server@11.0.0-rc.498)(next@14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.0.0-rc.502(@tanstack/react-query@5.56.2(react@18.3.1))(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/react-query@11.0.0-rc.502(@tanstack/react-query@5.56.2(react@18.3.1))(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/server@11.0.0-rc.502)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@trpc/server@11.0.0-rc.502)(next@14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@trpc/react-query': specifier: next - version: 11.0.0-rc.498(@tanstack/react-query@5.55.0(react@18.3.1))(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/server@11.0.0-rc.498)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.0.0-rc.502(@tanstack/react-query@5.56.2(react@18.3.1))(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/server@11.0.0-rc.502)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@trpc/server': specifier: next - version: 11.0.0-rc.498 + version: 11.0.0-rc.502 '@xterm/addon-canvas': specifier: ^0.7.0 version: 0.7.0(@xterm/xterm@5.5.0) @@ -167,8 +170,8 @@ importers: specifier: ^5.5.0 version: 5.5.0 chroma-js: - specifier: ^3.0.0 - version: 3.0.0 + specifier: ^3.1.1 + version: 3.1.1 clsx: specifier: ^2.1.1 version: 2.1.1 @@ -189,13 +192,13 @@ importers: version: 2.9.3(@types/react@18.3.5)(react@18.3.1) mantine-react-table: specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.14.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.16.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) next: - specifier: ^14.2.8 - version: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + specifier: ^14.2.11 + version: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) postcss-preset-mantine: specifier: ^1.17.0 - version: 1.17.0(postcss@8.4.38) + version: 1.17.0(postcss@8.4.45) prismjs: specifier: ^1.29.0 version: 1.29.0 @@ -252,11 +255,11 @@ importers: specifier: ^4.18.3 version: 4.18.3 concurrently: - specifier: ^8.2.2 - version: 8.2.2 + specifier: ^9.0.1 + version: 9.0.1 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 node-loader: specifier: ^2.0.0 version: 2.0.0(webpack@5.91.0) @@ -264,8 +267,8 @@ importers: specifier: ^3.3.3 version: 3.3.3 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 apps/tasks: dependencies: @@ -343,8 +346,8 @@ importers: specifier: ^7.4.2 version: 7.4.2 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 prettier: specifier: ^3.3.3 version: 3.3.3 @@ -352,8 +355,8 @@ importers: specifier: 4.13.3 version: 4.13.3 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 apps/websocket: dependencies: @@ -404,14 +407,14 @@ importers: specifier: ^8.5.12 version: 8.5.12 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 prettier: specifier: ^3.3.3 version: 3.3.3 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/analytics: dependencies: @@ -441,11 +444,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/api: dependencies: @@ -476,6 +479,12 @@ importers: '@homarr/log': specifier: workspace:^ version: link:../log + '@homarr/old-import': + specifier: workspace:^0.1.0 + version: link:../old-import + '@homarr/old-schema': + specifier: workspace:^0.1.0 + version: link:../old-schema '@homarr/ping': specifier: workspace:^0.1.0 version: link:../ping @@ -490,19 +499,19 @@ importers: version: link:../validation '@trpc/client': specifier: next - version: 11.0.0-rc.498(@trpc/server@11.0.0-rc.498) + version: 11.0.0-rc.502(@trpc/server@11.0.0-rc.502) '@trpc/react-query': specifier: next - version: 11.0.0-rc.498(@tanstack/react-query@5.55.0(react@18.3.1))(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/server@11.0.0-rc.498)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.0.0-rc.502(@tanstack/react-query@5.56.2(react@18.3.1))(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/server@11.0.0-rc.502)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@trpc/server': specifier: next - version: 11.0.0-rc.498 + version: 11.0.0-rc.502 dockerode: specifier: ^4.0.2 version: 4.0.2 next: - specifier: ^14.2.8 - version: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + specifier: ^14.2.11 + version: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) react: specifier: ^18.3.1 version: 18.3.1 @@ -511,7 +520,7 @@ importers: version: 2.2.1 trpc-swagger: specifier: ^1.2.6 - version: 1.2.6(patch_hash=6s72z7zx33c52iesv5sewipn6i)(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/server@11.0.0-rc.498)(zod@3.23.8) + version: 1.2.6(patch_hash=6s72z7zx33c52iesv5sewipn6i)(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/server@11.0.0-rc.502)(zod@3.23.8) devDependencies: '@homarr/eslint-config': specifier: workspace:^0.2.0 @@ -526,14 +535,14 @@ importers: specifier: ^3.3.31 version: 3.3.31 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 prettier: specifier: ^3.3.3 version: 3.3.3 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/auth: dependencies: @@ -560,22 +569,22 @@ importers: version: link:../validation '@t3-oss/env-nextjs': specifier: ^0.11.1 - version: 0.11.1(typescript@5.5.4)(zod@3.23.8) + version: 0.11.1(typescript@5.6.2)(zod@3.23.8) bcrypt: specifier: ^5.1.1 - version: 5.1.1 + version: 5.1.1(encoding@0.1.13) cookies: specifier: ^0.9.1 version: 0.9.1 ldapts: - specifier: 7.1.1 - version: 7.1.1 + specifier: 7.2.0 + version: 7.2.0 next: - specifier: ^14.2.8 - version: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + specifier: ^14.2.11 + version: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) next-auth: specifier: 5.0.0-beta.20 - version: 5.0.0-beta.20(next@14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react@18.3.1) + version: 5.0.0-beta.20(next@14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -599,14 +608,14 @@ importers: specifier: 0.9.0 version: 0.9.0 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 prettier: specifier: ^3.3.3 version: 3.3.3 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/cli: dependencies: @@ -636,11 +645,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/common: dependencies: @@ -648,14 +657,14 @@ importers: specifier: ^1.11.13 version: 1.11.13 next: - specifier: ^14.2.8 - version: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + specifier: ^14.2.11 + version: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) react: specifier: ^18.3.1 version: 18.3.1 tldts: - specifier: ^6.1.42 - version: 6.1.42 + specifier: ^6.1.44 + version: 6.1.44 devDependencies: '@homarr/eslint-config': specifier: workspace:^0.2.0 @@ -667,11 +676,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/cron-job-runner: dependencies: @@ -695,11 +704,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/cron-job-status: dependencies: @@ -717,17 +726,17 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/cron-jobs: dependencies: '@extractus/feed-extractor': specifier: ^7.1.3 - version: 7.1.3 + version: 7.1.3(encoding@0.1.13) '@homarr/analytics': specifier: workspace:^0.1.0 version: link:../analytics @@ -778,11 +787,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/cron-jobs-core: dependencies: @@ -806,11 +815,11 @@ importers: specifier: ^3.0.11 version: 3.0.11 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/db: dependencies: @@ -830,8 +839,8 @@ importers: specifier: ^2.2.2 version: 2.2.2 better-sqlite3: - specifier: ^11.2.1 - version: 11.2.1 + specifier: ^11.3.0 + version: 11.3.0 dotenv: specifier: ^16.4.5 version: 16.4.5 @@ -840,10 +849,10 @@ importers: version: 0.24.2 drizzle-orm: specifier: ^0.33.0 - version: 0.33.0(@prisma/client@5.16.1)(@types/better-sqlite3@7.6.11)(@types/react@18.3.5)(better-sqlite3@11.2.1)(mysql2@3.11.0)(react@18.3.1) + version: 0.33.0(@prisma/client@5.16.1)(@types/better-sqlite3@7.6.11)(@types/react@18.3.5)(better-sqlite3@11.3.0)(mysql2@3.11.2)(react@18.3.1) mysql2: - specifier: 3.11.0 - version: 3.11.0 + specifier: 3.11.2 + version: 3.11.2 devDependencies: '@homarr/eslint-config': specifier: workspace:^0.2.0 @@ -861,14 +870,14 @@ importers: specifier: ^7.4.2 version: 7.4.2 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 prettier: specifier: ^3.3.3 version: 3.3.3 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/definitions: dependencies: @@ -886,11 +895,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/form: dependencies: @@ -914,11 +923,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/icons: dependencies: @@ -939,17 +948,29 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/integrations: dependencies: + '@ctrl/deluge': + specifier: ^6.1.0 + version: 6.1.0 + '@ctrl/qbittorrent': + specifier: ^9.0.1 + version: 9.0.1 + '@ctrl/transmission': + specifier: ^6.1.0 + version: 6.1.0 '@homarr/common': specifier: workspace:^0.1.0 version: link:../common + '@homarr/db': + specifier: workspace:^0.1.0 + version: link:../db '@homarr/definitions': specifier: workspace:^0.1.0 version: link:../definitions @@ -965,6 +986,9 @@ importers: '@jellyfin/sdk': specifier: ^0.10.0 version: 0.10.0(axios@1.7.2) + typed-rpc: + specifier: ^5.1.0 + version: 5.1.0 devDependencies: '@homarr/eslint-config': specifier: workspace:^0.2.0 @@ -976,11 +1000,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/log: dependencies: @@ -1004,11 +1028,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/modals: dependencies: @@ -1038,11 +1062,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/notifications: dependencies: @@ -1053,8 +1077,8 @@ importers: specifier: ^7.12.2 version: 7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tabler/icons-react': - specifier: ^3.14.0 - version: 3.14.0(react@18.3.1) + specifier: ^3.16.0 + version: 3.16.0(react@18.3.1) devDependencies: '@homarr/eslint-config': specifier: workspace:^0.2.0 @@ -1066,11 +1090,73 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 + + packages/old-import: + dependencies: + '@homarr/common': + specifier: workspace:^0.1.0 + version: link:../common + '@homarr/db': + specifier: workspace:^0.1.0 + version: link:../db + '@homarr/definitions': + specifier: workspace:^0.1.0 + version: link:../definitions + '@homarr/log': + specifier: workspace:^0.1.0 + version: link:../log + '@homarr/old-schema': + specifier: workspace:^0.1.0 + version: link:../old-schema + '@homarr/validation': + specifier: workspace:^0.1.0 + version: link:../validation + superjson: + specifier: 2.2.1 + version: 2.2.1 + devDependencies: + '@homarr/eslint-config': + specifier: workspace:^0.2.0 + version: link:../../tooling/eslint + '@homarr/prettier-config': + specifier: workspace:^0.1.0 + version: link:../../tooling/prettier + '@homarr/tsconfig': + specifier: workspace:^0.1.0 + version: link:../../tooling/typescript + eslint: + specifier: ^9.10.0 + version: 9.10.0 + typescript: + specifier: ^5.6.2 + version: 5.6.2 + + packages/old-schema: + dependencies: + zod: + specifier: ^3.23.8 + version: 3.23.8 + devDependencies: + '@homarr/eslint-config': + specifier: workspace:^0.2.0 + version: link:../../tooling/eslint + '@homarr/prettier-config': + specifier: workspace:^0.1.0 + version: link:../../tooling/prettier + '@homarr/tsconfig': + specifier: workspace:^0.1.0 + version: link:../../tooling/typescript + eslint: + specifier: ^9.10.0 + version: 9.10.0 + typescript: + specifier: ^5.6.2 + version: 5.6.2 packages/ping: dependencies: @@ -1091,11 +1177,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/redis: dependencies: @@ -1128,11 +1214,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/server-settings: devDependencies: @@ -1146,11 +1232,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/spotlight: dependencies: @@ -1170,14 +1256,14 @@ importers: specifier: ^7.12.2 version: 7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tabler/icons-react': - specifier: ^3.14.0 - version: 3.14.0(react@18.3.1) + specifier: ^3.16.0 + version: 3.16.0(react@18.3.1) jotai: specifier: ^2.9.3 version: 2.9.3(@types/react@18.3.5)(react@18.3.1) next: - specifier: ^14.2.8 - version: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + specifier: ^14.2.11 + version: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) react: specifier: ^18.3.1 version: 18.3.1 @@ -1195,11 +1281,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/translation: dependencies: @@ -1208,7 +1294,7 @@ importers: version: 1.11.13 mantine-react-table: specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.14.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.16.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) next-international: specifier: ^1.2.4 version: 1.2.4 @@ -1223,11 +1309,11 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/ui: dependencies: @@ -1253,14 +1339,14 @@ importers: specifier: ^7.12.2 version: 7.12.2(react@18.3.1) '@tabler/icons-react': - specifier: ^3.14.0 - version: 3.14.0(react@18.3.1) + specifier: ^3.16.0 + version: 3.16.0(react@18.3.1) mantine-react-table: specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.14.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.16.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) next: - specifier: ^14.2.8 - version: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + specifier: ^14.2.11 + version: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) react: specifier: ^18.3.1 version: 18.3.1 @@ -1278,23 +1364,29 @@ importers: specifier: ^1.0.5 version: 1.0.5 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/validation: dependencies: '@homarr/definitions': specifier: workspace:^0.1.0 version: link:../definitions + '@homarr/old-schema': + specifier: workspace:^0.1.0 + version: link:../old-schema '@homarr/translation': specifier: workspace:^0.1.0 version: link:../translation zod: specifier: ^3.23.8 version: 3.23.8 + zod-form-data: + specifier: ^2.0.2 + version: 2.0.2(zod@3.23.8) devDependencies: '@homarr/eslint-config': specifier: workspace:^0.2.0 @@ -1306,23 +1398,29 @@ importers: specifier: workspace:^0.1.0 version: link:../../tooling/typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 packages/widgets: dependencies: '@extractus/feed-extractor': specifier: ^7.1.3 - version: 7.1.3 + version: 7.1.3(encoding@0.1.13) '@homarr/api': specifier: workspace:^0.1.0 version: link:../api + '@homarr/auth': + specifier: workspace:^0.1.0 + version: link:../auth '@homarr/common': specifier: workspace:^0.1.0 version: link:../common + '@homarr/db': + specifier: workspace:^0.1.0 + version: link:../db '@homarr/definitions': specifier: workspace:^0.1.0 version: link:../definitions @@ -1360,8 +1458,8 @@ importers: specifier: ^7.12.2 version: 7.12.2(react@18.3.1) '@tabler/icons-react': - specifier: ^3.14.0 - version: 3.14.0(react@18.3.1) + specifier: ^3.16.0 + version: 3.16.0(react@18.3.1) '@tiptap/extension-color': specifier: 2.6.6 version: 2.6.6(@tiptap/core@2.6.6(@tiptap/pm@2.6.6))(@tiptap/extension-text-style@2.6.6(@tiptap/core@2.6.6(@tiptap/pm@2.6.6))) @@ -1415,16 +1513,16 @@ importers: version: 1.11.13 mantine-react-table: specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.14.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.16.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) next: - specifier: ^14.2.8 - version: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + specifier: ^14.2.11 + version: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) react: specifier: ^18.3.1 version: 18.3.1 video.js: - specifier: ^8.17.3 - version: 8.17.3 + specifier: ^8.17.4 + version: 8.17.4 devDependencies: '@homarr/eslint-config': specifier: workspace:^0.2.0 @@ -1439,38 +1537,38 @@ importers: specifier: ^7.3.58 version: 7.3.58 eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 tooling/eslint: dependencies: '@next/eslint-plugin-next': - specifier: ^14.2.8 - version: 14.2.8 + specifier: ^14.2.11 + version: 14.2.11 eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@9.9.1) + version: 9.1.0(eslint@9.10.0) eslint-config-turbo: - specifier: ^2.1.1 - version: 2.1.1(eslint@9.9.1) + specifier: ^2.1.2 + version: 2.1.2(eslint@9.10.0) eslint-plugin-import: specifier: ^2.30.0 - version: 2.30.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1) + version: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0) eslint-plugin-jsx-a11y: specifier: ^6.10.0 - version: 6.10.0(eslint@9.9.1) + version: 6.10.0(eslint@9.10.0) eslint-plugin-react: - specifier: ^7.35.2 - version: 7.35.2(eslint@9.9.1) + specifier: ^7.36.1 + version: 7.36.1(eslint@9.10.0) eslint-plugin-react-hooks: specifier: ^4.6.2 - version: 4.6.2(eslint@9.9.1) + version: 4.6.2(eslint@9.10.0) typescript-eslint: - specifier: ^8.4.0 - version: 8.4.0(eslint@9.9.1)(typescript@5.5.4) + specifier: ^8.5.0 + version: 8.5.0(eslint@9.10.0)(typescript@5.6.2) devDependencies: '@homarr/prettier-config': specifier: workspace:^0.1.0 @@ -1479,11 +1577,11 @@ importers: specifier: workspace:^0.1.0 version: link:../typescript eslint: - specifier: ^9.9.1 - version: 9.9.1 + specifier: ^9.10.0 + version: 9.10.0 typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 tooling/github: {} @@ -1500,8 +1598,8 @@ importers: specifier: workspace:^0.1.0 version: link:../typescript typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.2 + version: 5.6.2 tooling/semver: {} @@ -1596,10 +1694,18 @@ packages: resolution: {integrity: sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.24.8': + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.6': resolution: {integrity: sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.7': + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.24.6': resolution: {integrity: sha512-Jktc8KkF3zIkePb48QO+IapbXlSapOW9S+ogZZkcO6bABgYAxtZcjZ/O005111YLf+j4M84uEgwYoidDkXbCkQ==} engines: {node: '>=6.9.0'} @@ -1617,6 +1723,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.25.6': + resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-transform-react-jsx-self@7.24.5': resolution: {integrity: sha512-RtCJoUO2oYrYwFPtR1/jkoBEcFuI1ae9a9IMxeyAVa3a1Ap4AnxmyIKG2b2FaJKqkidw/0cxRbWN+HOs6ZWd1w==} engines: {node: '>=6.9.0'} @@ -1649,6 +1760,10 @@ packages: resolution: {integrity: sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==} engines: {node: '>=6.9.0'} + '@babel/types@7.25.6': + resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} + engines: {node: '>=6.9.0'} + '@balena/dockerignore@1.0.2': resolution: {integrity: sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==} @@ -1674,6 +1789,30 @@ packages: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + '@ctrl/deluge@6.1.0': + resolution: {integrity: sha512-n8237DbSHlANTLBS3rxIKsnC3peltifJhV2h6fWp5lb7BNZuA3LFz0gVS02aAhj351G3A0ScSYLmuAAL2ld/Nw==} + engines: {node: '>=18'} + + '@ctrl/magnet-link@4.0.2': + resolution: {integrity: sha512-wENP7LH4BmCjz+gXVq7Nzz20zMjY/huuG7aDk/yu/LhFdC84e/l8222rCIAo0lwhU451lFcJKLcOmtG6TNrBAQ==} + engines: {node: '>=18'} + + '@ctrl/qbittorrent@9.0.1': + resolution: {integrity: sha512-MaQhyccZ30C1V8Uxqhc1NvrM/Lgb8x6AunIxjlbhYhw5Zx/l8G2etbjTKle3RIFExURKmzrJx7Odj3EM4AlqDQ==} + engines: {node: '>=18'} + + '@ctrl/shared-torrent@6.0.0': + resolution: {integrity: sha512-BZAPDv8syFArFTAAeb560JSBNTajFtP3G/5eYiUMsg0upGAQs6NWGiHYbyjvAt8uHCSzxXsiji/Wvq1b7CvXSQ==} + engines: {node: '>=18'} + + '@ctrl/torrent-file@4.1.0': + resolution: {integrity: sha512-mC6HdmCrRhhwpthM+OboJvGIywVR05IbdhVSBkfbGslzbQk2xNnx4UOKljV/x2YI2M1DDF3F3o0paIiYd5O0Og==} + engines: {node: '>=18'} + + '@ctrl/transmission@6.1.0': + resolution: {integrity: sha512-5LjNdNOFqeWKJ7yym2Iz6+bLpBWetE3gbH5AMhgPfpQdXlyoCvX4Ro/fD5pSDuTu4tnen3Eob2cHBgWmqPU47A==} + engines: {node: '>=18'} + '@dabh/diagnostics@2.0.3': resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} @@ -2112,14 +2251,18 @@ packages: resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.9.1': - resolution: {integrity: sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==} + '@eslint/js@9.10.0': + resolution: {integrity: sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.1.0': + resolution: {integrity: sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@extractus/feed-extractor@7.1.3': resolution: {integrity: sha512-USRVpGw4fWlnz8O8gB95UDJJaU5wg2EFESDe9nut0mHFJ8bOxDKGoo3g6EaKU24YzaPUBweKENdEJfuTUgr/uA==} engines: {node: '>= 18'} @@ -2207,8 +2350,8 @@ packages: '@jridgewell/source-map@0.3.6': resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -2298,62 +2441,62 @@ packages: resolution: {integrity: sha512-wtxyxMPAJNoX66LQMy/elx0JfikYD62zflc0q4LngQHGiCKmwgncTg9MebsPUtsBikGY1Aom28hKmhq1T51V/w==} hasBin: true - '@next/env@14.2.8': - resolution: {integrity: sha512-L44a+ynqkolyNBnYfF8VoCiSrjSZWgEHYKkKLGcs/a80qh7AkfVUD/MduVPgdsWZ31tgROR+yJRA0PZjSVBXWQ==} + '@next/env@14.2.11': + resolution: {integrity: sha512-HYsQRSIXwiNqvzzYThrBwq6RhXo3E0n8j8nQnAs8i4fCEo2Zf/3eS0IiRA8XnRg9Ha0YnpkyJZIZg1qEwemrHw==} - '@next/eslint-plugin-next@14.2.8': - resolution: {integrity: sha512-ue5vcq9Fjk3asACRDrzYjcGMEN7pMMDQ5zUD+FenkqvlPCVUD1x7PxBNOLfPYDZOrk/Vnl4GHmjj2mZDqPW8TQ==} + '@next/eslint-plugin-next@14.2.11': + resolution: {integrity: sha512-7mw+xW7Y03Ph4NTCcAzYe+vu4BNjEHZUfZayyF3Y1D9RX6c5NIe25m1grHEAkyUuaqjRxOYhnCNeglOkIqLkBA==} - '@next/swc-darwin-arm64@14.2.8': - resolution: {integrity: sha512-1VrQlG8OzdyvvGZhGJFnaNE2P10Jjy/2FopnqbY0nSa/gr8If3iINxvOEW3cmVeoAYkmW0RsBazQecA2dBFOSw==} + '@next/swc-darwin-arm64@14.2.11': + resolution: {integrity: sha512-eiY9u7wEJZWp/Pga07Qy3ZmNEfALmmSS1HtsJF3y1QEyaExu7boENz11fWqDmZ3uvcyAxCMhTrA1jfVxITQW8g==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@14.2.8': - resolution: {integrity: sha512-87t3I86rNRSOJB1gXIUzaQWWSWrkWPDyZGsR0Z7JAPtLeX3uUOW2fHxl7dNWD2BZvbvftctTQjgtfpp7nMtmWg==} + '@next/swc-darwin-x64@14.2.11': + resolution: {integrity: sha512-lnB0zYCld4yE0IX3ANrVMmtAbziBb7MYekcmR6iE9bujmgERl6+FK+b0MBq0pl304lYe7zO4yxJus9H/Af8jbg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@14.2.8': - resolution: {integrity: sha512-ta2sfVzbOpTbgBrF9HM5m+U58dv6QPuwU4n5EX4LLyCJGKc433Z0D9h9gay/HSOjLEXJ2fJYrMP5JYYbHdxhtw==} + '@next/swc-linux-arm64-gnu@14.2.11': + resolution: {integrity: sha512-Ulo9TZVocYmUAtzvZ7FfldtwUoQY0+9z3BiXZCLSUwU2bp7GqHA7/bqrfsArDlUb2xeGwn3ZuBbKtNK8TR0A8w==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@14.2.8': - resolution: {integrity: sha512-+IoLTPK6Z5uIgDhgeWnQF5/o5GBN7+zyUNrs4Bes1W3g9++YELb8y0unFybS8s87ntAKMDl6jeQ+mD7oNwp/Ng==} + '@next/swc-linux-arm64-musl@14.2.11': + resolution: {integrity: sha512-fH377DnKGyUnkWlmUpFF1T90m0dADBfK11dF8sOQkiELF9M+YwDRCGe8ZyDzvQcUd20Rr5U7vpZRrAxKwd3Rzg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@14.2.8': - resolution: {integrity: sha512-pO+hVXC+mvzUOQJJRG4RX4wJsRJ5BkURSf6dD6EjUXAX4Ml9es1WsEfkaZ4lcpmFzFvY47IkDaffks/GdCn9ag==} + '@next/swc-linux-x64-gnu@14.2.11': + resolution: {integrity: sha512-a0TH4ZZp4NS0LgXP/488kgvWelNpwfgGTUCDXVhPGH6pInb7yIYNgM4kmNWOxBFt+TIuOH6Pi9NnGG4XWFUyXQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@14.2.8': - resolution: {integrity: sha512-bCat9izctychCtf3uL1nqHq31N5e1VxvdyNcBQflkudPMLbxVnlrw45Vi87K+lt1CwrtVayHqzo4ie0Szcpwzg==} + '@next/swc-linux-x64-musl@14.2.11': + resolution: {integrity: sha512-DYYZcO4Uir2gZxA4D2JcOAKVs8ZxbOFYPpXSVIgeoQbREbeEHxysVsg3nY4FrQy51e5opxt5mOHl/LzIyZBoKA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@14.2.8': - resolution: {integrity: sha512-gbxfUaSPV7EyUobpavida2Hwi62GhSJaSg7iBjmBWoxkxlmETOD7U4tWt763cGIsyE6jM7IoNavq0BXqwdW2QA==} + '@next/swc-win32-arm64-msvc@14.2.11': + resolution: {integrity: sha512-PwqHeKG3/kKfPpM6of1B9UJ+Er6ySUy59PeFu0Un0LBzJTRKKAg2V6J60Yqzp99m55mLa+YTbU6xj61ImTv9mg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-ia32-msvc@14.2.8': - resolution: {integrity: sha512-PUXzEzjTTlUh3b5VAn1nlpwvujTnuCMMwbiCnaTazoVlN1nA3kWjlmp42IfURA2N/nyrlVEw7pURa/o4Qxj1cw==} + '@next/swc-win32-ia32-msvc@14.2.11': + resolution: {integrity: sha512-0U7PWMnOYIvM74GY6rbH6w7v+vNPDVH1gUhlwHpfInJnNe5LkmUZqhp7FNWeNa5wbVgRcRi1F1cyxp4dmeLLvA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@next/swc-win32-x64-msvc@14.2.8': - resolution: {integrity: sha512-EnPKv0ttq02E9/1KZ/8Dn7kuutv6hy1CKc0HlNcvzOQcm4/SQtvfws5gY0zrG9tuupd3HfC2L/zcTrnBhpjTuQ==} + '@next/swc-win32-x64-msvc@14.2.11': + resolution: {integrity: sha512-gQpS7mcgovWoaTG1FbS5/ojF7CGfql1Q0ZLsMrhcsi2Sr9HEqsUZ70MPJyaYBXbk6iEAP7UXMD9HC8KY1qNwvA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -2620,39 +2763,39 @@ packages: typescript: optional: true - '@tabler/icons-react@3.14.0': - resolution: {integrity: sha512-3XdbuyhBNq8aZW0qagR9YL8diACZYSAtaw6VuwcO2l6HzVFPN6N5TDex9WTz/3lf+uktAvOv1kNuuFBjSjN9yw==} + '@tabler/icons-react@3.16.0': + resolution: {integrity: sha512-u2ABvvw71+VZMmkQ9PXsBQb+xoox8YSV8+96Xbg5jocE+gqIrAJD/3dJxWN9YhEP3TBhbcFQdkY4svvhhE+FBw==} peerDependencies: react: '>= 16' - '@tabler/icons@3.14.0': - resolution: {integrity: sha512-OakKjK1kuDWKoNwdnHHVMt11kTZAC10iZpN/8o/CSYdeBH7S3v5n8IyqAYynFxLI8yBGTyBvljtvWdmWh57zSg==} + '@tabler/icons@3.16.0': + resolution: {integrity: sha512-GU7MSx4uQEr55BmyON6hD/QYTl6k1v0YlRhM91gBWDoKAbyCt6QIYw7rpJ/ecdh5zrHaTOJKPenZ4+luoutwFA==} '@tanstack/match-sorter-utils@8.15.1': resolution: {integrity: sha512-PnVV3d2poenUM31ZbZi/yXkBu3J7kd5k2u51CGwwNojag451AjTH9N6n41yjXz2fpLeewleyLBmNS6+HcGDlXw==} engines: {node: '>=12'} - '@tanstack/query-core@5.54.1': - resolution: {integrity: sha512-hKS+WRpT5zBFip21pB6Jx1C0hranWQrbv5EJ7qPoiV5MYI3C8rTCqWC9DdBseiPT1JgQWh8Y55YthuYZNiw3Xw==} + '@tanstack/query-core@5.56.2': + resolution: {integrity: sha512-gor0RI3/R5rVV3gXfddh1MM+hgl0Z4G7tj6Xxpq6p2I03NGPaJ8dITY9Gz05zYYb/EJq9vPas/T4wn9EaDPd4Q==} - '@tanstack/query-devtools@5.54.0': - resolution: {integrity: sha512-B8Sa6mh7/4m2fyk2/YnUXeOZ1/us7G/C/i1It8YcCbieXc8vf1AdSYjR+mZIoJeKOKLqA741hZqfj8d4F1NCVg==} + '@tanstack/query-devtools@5.56.1': + resolution: {integrity: sha512-xnp9jq/9dHfSCDmmf+A5DjbIjYqbnnUL2ToqlaaviUQGRTapXQ8J+GxusYUu1IG0vZMaWdiVUA4HRGGZYAUU+A==} - '@tanstack/react-query-devtools@5.55.0': - resolution: {integrity: sha512-omUloSS7Ru+LNmXeK56ygtAgMXMR5M74v8kn4lRjMkjT/aTJHWGI2yJh0I1EE1a8tjwXyviqy+qWfJaeqQcTIA==} + '@tanstack/react-query-devtools@5.56.2': + resolution: {integrity: sha512-7nINJtRZZVwhTTyDdMIcSaXo+EHMLYJu1S2e6FskvvD5prx87LlAXXWZDfU24Qm4HjshEtM5lS3HIOszNGblcw==} peerDependencies: - '@tanstack/react-query': ^5.55.0 + '@tanstack/react-query': ^5.56.2 react: ^18 || ^19 - '@tanstack/react-query-next-experimental@5.55.0': - resolution: {integrity: sha512-AKVc7ZkG/yomgWVFP0cr53a8DOlvu7Ig5sC0IUjghzoE0AfDCSSi/bn1kOCRqXSluUrA6RDUyp8MlCDFlvEseg==} + '@tanstack/react-query-next-experimental@5.56.2': + resolution: {integrity: sha512-9LjzJfqPzUP9Jfm3RU2elLw6g0OM/+o8O7xaIkZAtLjXvXVGw2NIEPSfoDzJ6Q+Kb1dcZpcftFpLpeHA1WsZgw==} peerDependencies: - '@tanstack/react-query': ^5.55.0 + '@tanstack/react-query': ^5.56.2 next: ^13 || ^14 || ^15 react: ^18 || ^19 - '@tanstack/react-query@5.55.0': - resolution: {integrity: sha512-2uYuxEbRQD8TORUiTUacEOwt1e8aoSqUOJFGY5TUrh6rQ3U85zrMS2wvbNhBhXGh6Vj69QDCP2yv8tIY7joo6Q==} + '@tanstack/react-query@5.56.2': + resolution: {integrity: sha512-SR0GzHVo6yzhN72pnRhkEFRAHMsUo5ZPzAxfTMvUxFIDVS6W9LYUp6nXW3fcHVdg0ZJl8opSH85jqahvm6DSVg==} peerDependencies: react: ^18 || ^19 @@ -2874,18 +3017,18 @@ packages: '@tootallnate/quickjs-emscripten@0.23.0': resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} - '@trpc/client@11.0.0-rc.498': - resolution: {integrity: sha512-a1VjvLHCo8gPENMfzI8lVF1ys6kOGI3f/cIAZUMB0d2TlkDERlFYANnSnzFvmiKy6ICh3lsQQ3OIMmIfyd8OtQ==} + '@trpc/client@11.0.0-rc.502': + resolution: {integrity: sha512-ysFQ3wHnjzLcAqeuwx9/B/YV+2XN/kmfAdTUG+O/SUAdP2wAwo6XbhOxlHw0HWS5pDCsTfJkxDr1nMVkuFM07Q==} peerDependencies: - '@trpc/server': 11.0.0-rc.498+5714423cc + '@trpc/server': 11.0.0-rc.502+2a8c56027 - '@trpc/next@11.0.0-rc.498': - resolution: {integrity: sha512-GoaRReGOd949aZbzJI8xv+QFcLUpp7+BOw5NdgLjEk47Nin2TcLl19Tk8JhXImFzwDLF8JQFrHvk91mnb6ka0Q==} + '@trpc/next@11.0.0-rc.502': + resolution: {integrity: sha512-Hs4/URqJ0noQTh2dNpJwPRAGIQN2N9SaHGHAuIBHawrWPWshoi2vwu7tDspmDH96cUAxyqvzSQ8HDIzFgq11Pw==} peerDependencies: '@tanstack/react-query': ^5.49.2 - '@trpc/client': 11.0.0-rc.498+5714423cc - '@trpc/react-query': 11.0.0-rc.498+5714423cc - '@trpc/server': 11.0.0-rc.498+5714423cc + '@trpc/client': 11.0.0-rc.502+2a8c56027 + '@trpc/react-query': 11.0.0-rc.502+2a8c56027 + '@trpc/server': 11.0.0-rc.502+2a8c56027 next: '*' react: '>=16.8.0' react-dom: '>=16.8.0' @@ -2895,17 +3038,17 @@ packages: '@trpc/react-query': optional: true - '@trpc/react-query@11.0.0-rc.498': - resolution: {integrity: sha512-il/fgO9DSTHmrJbDInGNl8PymLo19CEfIjBXmerTm4hg/p438fQb4ZKDVbpBxEThgAaaP6D0HTELWn5VDWG3VQ==} + '@trpc/react-query@11.0.0-rc.502': + resolution: {integrity: sha512-aWZZGFTxERXOzI0cb2zYoJQyLrnfJz7sqJVTR4/5UJQ1eCRdu7mFnni6rAlcAHI4r2iA+2xtBQ74JPlaVp5krg==} peerDependencies: '@tanstack/react-query': ^5.49.2 - '@trpc/client': 11.0.0-rc.498+5714423cc - '@trpc/server': 11.0.0-rc.498+5714423cc + '@trpc/client': 11.0.0-rc.502+2a8c56027 + '@trpc/server': 11.0.0-rc.502+2a8c56027 react: '>=18.2.0' react-dom: '>=18.2.0' - '@trpc/server@11.0.0-rc.498': - resolution: {integrity: sha512-LECCOz8JNB67CBasPA6fkLbhJIbUQRP1wq02xUfUMeaSEZFWJL+7fcTgLaWFQSHMMnMsvkLuDuDDkUSCF2SXmg==} + '@trpc/server@11.0.0-rc.502': + resolution: {integrity: sha512-n6B8Q/UqF+hFXyCTXq9AWSn6EkXBbVo/Bs7/QzZxe5KD5CdnBomC7A1y6Qr+i0eiOWwTHJZQ0az+gJetb2fdxw==} '@tsconfig/node10@1.0.11': resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} @@ -2922,12 +3065,12 @@ packages: '@tsconfig/svelte@1.0.13': resolution: {integrity: sha512-5lYJP45Xllo4yE/RUBccBT32eBlRDbqN8r1/MIvQbKxW3aFqaYPCNgm8D5V20X4ShHcwvYWNlKg3liDh1MlBoA==} - '@turbo/gen@2.1.1': - resolution: {integrity: sha512-IaC8k3u/00giD3WjEy81Zwj8CFZJCrSf7sCA8gdug76C2DUm79CdAQ+tImR3KOMwnefIP0LH1NSPtREMKi59zQ==} + '@turbo/gen@2.1.2': + resolution: {integrity: sha512-YsRYh6+J+1VCP+TI1wT6ZR7lXVcXTaAUZ0+jY5xHOs1zR9Z5AR0ltTOVM1r01YUHVdk2eULD8ukRPMVDgZxRvw==} hasBin: true - '@turbo/workspaces@2.1.1': - resolution: {integrity: sha512-E9tnNIBRC09IjM521TaExmHUBo26qT41OCSgFpg2FdmLiobqxG2G2hzmdbDFC7QwcVifVF9FD/3gRtDqRqDj5g==} + '@turbo/workspaces@2.1.2': + resolution: {integrity: sha512-PbowgdRe19+1LvG9yDoesSxtps2bTu1Riuaip1/VBq0AXhd417TzISWDti+V6jRCFE5cwtszNsJo+gGREIlWLQ==} hasBin: true '@types/asn1@0.2.4': @@ -2981,8 +3124,8 @@ packages: '@types/eslint-scope@3.7.7': resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} - '@types/eslint@8.56.10': - resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==} + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -3092,8 +3235,8 @@ packages: '@types/ws@8.5.12': resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} - '@typescript-eslint/eslint-plugin@8.4.0': - resolution: {integrity: sha512-rg8LGdv7ri3oAlenMACk9e+AR4wUV0yrrG+XKsGKOK0EVgeEDqurkXMPILG2836fW4ibokTB5v4b6Z9+GYQDEw==} + '@typescript-eslint/eslint-plugin@8.5.0': + resolution: {integrity: sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -3103,8 +3246,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.4.0': - resolution: {integrity: sha512-NHgWmKSgJk5K9N16GIhQ4jSobBoJwrmURaLErad0qlLjrpP5bECYg+wxVTGlGZmJbU03jj/dfnb6V9bw+5icsA==} + '@typescript-eslint/parser@8.5.0': + resolution: {integrity: sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -3113,12 +3256,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.4.0': - resolution: {integrity: sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==} + '@typescript-eslint/scope-manager@8.5.0': + resolution: {integrity: sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.4.0': - resolution: {integrity: sha512-pu2PAmNrl9KX6TtirVOrbLPLwDmASpZhK/XU7WvoKoCUkdtq9zF7qQ7gna0GBZFN0hci0vHaSusiL2WpsQk37A==} + '@typescript-eslint/type-utils@8.5.0': + resolution: {integrity: sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -3126,12 +3269,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.4.0': - resolution: {integrity: sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==} + '@typescript-eslint/types@8.5.0': + resolution: {integrity: sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.4.0': - resolution: {integrity: sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==} + '@typescript-eslint/typescript-estree@8.5.0': + resolution: {integrity: sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -3139,21 +3282,21 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.4.0': - resolution: {integrity: sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==} + '@typescript-eslint/utils@8.5.0': + resolution: {integrity: sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.4.0': - resolution: {integrity: sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==} + '@typescript-eslint/visitor-keys@8.5.0': + resolution: {integrity: sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@umami/node@0.4.0': resolution: {integrity: sha512-pyphprbiF7KiDSc+SWZ4/rVM8B5vU27zIiFfEPj2lEqczpI4xAKSp+dM3tlzyRAWJL32fcbCfAaLGhJZQV13Rg==} - '@videojs/http-streaming@3.13.2': - resolution: {integrity: sha512-eCfQp61w00hg7Y9npmLnsJ6UvDF+SsFYzu7mQJgVXxWpVm9AthYWA3KQEKA7F7Sy6yzlm/Sps8BHs5ItelNZgQ==} + '@videojs/http-streaming@3.13.3': + resolution: {integrity: sha512-L7H+iTeqHeZ5PylzOx+pT3CVyzn4TALWYTJKkIc1pDaV/cTVfNGtG+9/vXPAydD+wR/xH1M9/t2JH8tn/DCT4w==} engines: {node: '>=8', npm: '>=5'} peerDependencies: video.js: ^8.14.0 @@ -3175,33 +3318,49 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 - '@vitest/coverage-v8@2.0.5': - resolution: {integrity: sha512-qeFcySCg5FLO2bHHSa0tAZAOnAUbp4L6/A5JDuj9+bt53JREl8hpLjLHEWF0e/gWc8INVpJaqA7+Ene2rclpZg==} + '@vitest/coverage-v8@2.1.1': + resolution: {integrity: sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==} peerDependencies: - vitest: 2.0.5 + '@vitest/browser': 2.1.1 + vitest: 2.1.1 + peerDependenciesMeta: + '@vitest/browser': + optional: true - '@vitest/expect@2.0.5': - resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} + '@vitest/expect@2.1.1': + resolution: {integrity: sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==} - '@vitest/pretty-format@2.0.5': - resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} - - '@vitest/runner@2.0.5': - resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} - - '@vitest/snapshot@2.0.5': - resolution: {integrity: sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==} - - '@vitest/spy@2.0.5': - resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} - - '@vitest/ui@2.0.5': - resolution: {integrity: sha512-m+ZpVt/PVi/nbeRKEjdiYeoh0aOfI9zr3Ria9LO7V2PlMETtAXJS3uETEZkc8Be2oOl8mhd7Ew+5SRBXRYncNw==} + '@vitest/mocker@2.1.1': + resolution: {integrity: sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==} peerDependencies: - vitest: 2.0.5 + '@vitest/spy': 2.1.1 + msw: ^2.3.5 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true - '@vitest/utils@2.0.5': - resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} + '@vitest/pretty-format@2.1.1': + resolution: {integrity: sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==} + + '@vitest/runner@2.1.1': + resolution: {integrity: sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==} + + '@vitest/snapshot@2.1.1': + resolution: {integrity: sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==} + + '@vitest/spy@2.1.1': + resolution: {integrity: sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==} + + '@vitest/ui@2.1.1': + resolution: {integrity: sha512-IIxo2LkQDA+1TZdPLYPclzsXukBWd5dX2CKpGqH8CCt8Wh0ZuDn4+vuQ9qlppEju6/igDGzjWF/zyorfsf+nHg==} + peerDependencies: + vitest: 2.1.1 + + '@vitest/utils@2.1.1': + resolution: {integrity: sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==} '@vue/compiler-core@3.4.31': resolution: {integrity: sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==} @@ -3319,6 +3478,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + engines: {node: '>=0.4.0'} + hasBin: true + aes-decrypter@4.0.1: resolution: {integrity: sha512-H1nh/P9VZXUf17AA5NQfJML88CFjVBDuGkp5zDHa7oEhYN9TTpNLJknRY1ie0iSKWlDf6JRnJKaZVDSQdPy6Cg==} @@ -3531,8 +3695,8 @@ packages: resolution: {integrity: sha512-Wjss+Bc674ZABPr+SCKWTqA4V1pyYFhzDTjNBJy4jdmgOv0oGIGXeKBRJyINwP5tIy+iIZD9SfgZpztduzQ5QA==} engines: {node: '>= 18.4'} - better-sqlite3@11.2.1: - resolution: {integrity: sha512-Xbt1d68wQnUuFIEVsbt6V+RG30zwgbtCGQ4QOcXVrOH0FE4eHk64FWZ9NUfRHS4/x1PXqwz/+KOrnXD7f0WieA==} + better-sqlite3@11.3.0: + resolution: {integrity: sha512-iHt9j8NPYF3oKCNOO5ZI4JwThjt3Z6J6XrcwG85VNMVzv1ByqrHWv5VILEbCMFWDsoHhXvQ7oC8vgRXFAKgl9w==} big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -3566,6 +3730,11 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + browserslist@4.23.3: + resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + buffer-crc32@1.0.0: resolution: {integrity: sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==} engines: {node: '>=8.0.0'} @@ -3618,8 +3787,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001620: - resolution: {integrity: sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew==} + caniuse-lite@1.0.30001660: + resolution: {integrity: sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==} chai@5.1.1: resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} @@ -3674,8 +3843,8 @@ packages: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} - chroma-js@3.0.0: - resolution: {integrity: sha512-ZFn4qxtZTvRJ7XatOLgaHGJYN10LoS6T0EMsu7IVayFG5+b6Yw8wCGQL5qLgo4B+wrRZ9niCrozOQ4a584bvaA==} + chroma-js@3.1.1: + resolution: {integrity: sha512-CGr6w73Gi86142RWqZ1RjED/CyduYw2vMTikQZUvr2jGIihnZlMo/Kzm9rYHWDP2pJc6eebwc8CkX0iteBon+A==} chrome-trace-event@1.0.4: resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} @@ -3785,9 +3954,9 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - concurrently@8.2.2: - resolution: {integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==} - engines: {node: ^14.13.0 || >=16.0.0} + concurrently@9.0.1: + resolution: {integrity: sha512-wYKvCd/f54sTXJMSfV6Ln/B8UrfLBKOYa+lzc6CHay3Qek+LorVSBdMVfyewFhRbH0Rbabsk4D+3PL/VjQ5gzg==} + engines: {node: '>=18'} hasBin: true config-chain@1.1.13: @@ -3904,10 +4073,6 @@ packages: resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} engines: {node: '>= 0.4'} - date-fns@2.30.0: - resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} - engines: {node: '>=0.11'} - dayjs@1.11.13: resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} @@ -3946,6 +4111,15 @@ packages: supports-color: optional: true + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} @@ -4014,6 +4188,9 @@ packages: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} + destr@2.0.3: + resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} + detect-libc@2.0.3: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} @@ -4192,6 +4369,9 @@ packages: electron-to-chromium@1.4.772: resolution: {integrity: sha512-jFfEbxR/abTTJA3ci+2ok1NTuOBBtB4jH+UT6PUmRN+DY3WSD4FFRsgoVQ+QNIJ0T7wrXwzsWCI2WKC46b++2A==} + electron-to-chromium@1.5.18: + resolution: {integrity: sha512-1OfuVACu+zKlmjsNdcJuVQuVE61sZOLbNM4JAQ1Rvh6EOj0/EUKhMJjRH73InPlXSh8HIJk1cVZ8pyOV/FMdUQ==} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -4205,6 +4385,9 @@ packages: enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} + encoding@0.1.13: + resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} + end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} @@ -4215,8 +4398,8 @@ packages: resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} engines: {node: '>=10.0.0'} - enhanced-resolve@5.16.1: - resolution: {integrity: sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==} + enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} entities@4.5.0: @@ -4242,8 +4425,8 @@ packages: resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==} engines: {node: '>= 0.4'} - es-module-lexer@1.5.3: - resolution: {integrity: sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==} + es-module-lexer@1.5.4: + resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} @@ -4280,8 +4463,8 @@ packages: engines: {node: '>=12'} hasBin: true - escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} escape-goat@2.1.1: @@ -4307,8 +4490,8 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-config-turbo@2.1.1: - resolution: {integrity: sha512-JJF8SZErmgKCGkt124WUmTt0sQ5YLvPo2YxDsfzn9avGJC7/BQIa+3FZoDb3zeYYsZx91pZ6htQAJaKK8NQQAg==} + eslint-config-turbo@2.1.2: + resolution: {integrity: sha512-UCNwxBrTOx0K41h1OrwMg7vPdGvcGSAlj40ZzpuUi0S2Muac2UOs+6F2dMYQiKg7lX2HAtyHXlF0T2wlWNHjGg==} peerDependencies: eslint: '>6.6.0' @@ -4358,14 +4541,14 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - eslint-plugin-react@7.35.2: - resolution: {integrity: sha512-Rbj2R9zwP2GYNcIak4xoAMV57hrBh3hTaR0k7hVjwCQgryE/pw5px4b13EYjduOI0hfXyZhwBxaGpOTbWSGzKQ==} + eslint-plugin-react@7.36.1: + resolution: {integrity: sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-plugin-turbo@2.1.1: - resolution: {integrity: sha512-E/34kdQd0n3RP18+e0DSV0f3YTSCOojUh1p4X0Xrho2PBYmJ3umSnNo9FhkZt6UDACl+nBQcYTFkRHMz76lJdw==} + eslint-plugin-turbo@2.1.2: + resolution: {integrity: sha512-q2ikGubfVLZDPEKliiuubZc3sI5oqbKIZJ6fRi6Bldv8E3cMNH3Qt7g6hXZV4+GxwQbzEEteCYSBNbOn1DBqRg==} peerDependencies: eslint: '>6.6.0' @@ -4385,8 +4568,8 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.9.1: - resolution: {integrity: sha512-dHvhrbfr4xFQ9/dq+jcVneZMyRYLjggWjk6RVsIiHsP8Rz6yZ8LvZ//iU4TrZF+SXWG+JkNF2OyiZRvzgRDqMg==} + eslint@9.10.0: + resolution: {integrity: sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -4442,10 +4625,6 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} - execa@8.0.1: - resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} - engines: {node: '>=16.17'} - expand-template@2.0.3: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} @@ -4483,6 +4662,14 @@ packages: fault@1.0.4: resolution: {integrity: sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==} + fdir@6.3.0: + resolution: {integrity: sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fecha@4.2.3: resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} @@ -4623,10 +4810,6 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} - get-stream@8.0.1: - resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} - engines: {node: '>=16'} - get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} @@ -4806,10 +4989,6 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - human-signals@5.0.0: - resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} - engines: {node: '>=16.17.0'} - iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -4848,9 +5027,6 @@ packages: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - individual@2.0.0: - resolution: {integrity: sha512-pWt8hBCqJsUWI/HtcfWod7+N9SgAqyPEaF7JQjwzjn5vGrpg6aQ5qeAFQ7dx//UH4J1O+7xqew+gCeeFt6xN/g==} - inflation@2.1.0: resolution: {integrity: sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==} engines: {node: '>= 0.8.0'} @@ -5040,10 +5216,6 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -5230,8 +5402,8 @@ packages: resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} engines: {node: '>= 0.6.3'} - ldapts@7.1.1: - resolution: {integrity: sha512-6w12QlRVW1OFaAbEUxTAa3UfIsO8ipOx3h6gZCDdYzMK2brBWfwwPWJCKiDpKSb82Tq8epQFELniaLe2zSdlfw==} + ldapts@7.2.0: + resolution: {integrity: sha512-jFo3JI46nveXgILcEhUxR7N9it9d6gIooGAaem5OdXbXFjb6kIGdtI6FE2Y6SnT+XRvZvHy3diM5sdWzMsMK5w==} engines: {node: '>=18'} levn@0.4.1: @@ -5323,15 +5495,15 @@ packages: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} - lru-cache@8.0.5: - resolution: {integrity: sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==} - engines: {node: '>=16.14'} + lru.min@1.1.0: + resolution: {integrity: sha512-86xXMB6DiuKrTqkE/lRL0drlNh568awttBPJ7D66fzDHpy6NC5r3N+Ly/lKCS2zjmeGyvFDx670z0cD0PVBwGA==} + engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'} m3u8-parser@7.1.0: resolution: {integrity: sha512-7N+pk79EH4oLKPEYdgRXgAsKDyA/VCo0qCHlUwacttQA0WqsjZQYmNfywMvjlY9MpEBVZEt0jKFd73Kv15EBYQ==} - magic-string@0.30.10: - resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} magicast@0.3.4: resolution: {integrity: sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==} @@ -5406,10 +5578,6 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} - mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} @@ -5496,8 +5664,8 @@ packages: engines: {node: '>=8', npm: '>=5'} hasBin: true - mysql2@3.11.0: - resolution: {integrity: sha512-J9phbsXGvTOcRVPR95YedzVSxJecpW5A5+cQ57rhHIFXteTP10HCs+VBjS7DHIKfEaI1zQ5tlVrquCd64A6YvA==} + mysql2@3.11.2: + resolution: {integrity: sha512-3jhjAk4NHs3rcKjOiFTqmU76kdib/KDOC+lshrYa76QWkcfF1GbYGK4d5PqPljVmIAc0ChozCRmeYIlNp5bz5w==} engines: {node: '>= 8.0'} named-placeholders@1.1.3: @@ -5553,8 +5721,8 @@ packages: next-international@1.2.4: resolution: {integrity: sha512-JQvp+h2iSgA/t8hu5S/Lwow1ZErJutQRdpnplxjv4VTlCiND8T95fYih8BjkHcVhQbtM+Wu9Mb1CM32wD9hlWQ==} - next@14.2.8: - resolution: {integrity: sha512-EyEyJZ89r8C5FPlS/401AiF3O8jeMtHIE+bLom9MwcdWJJFBgRl+MR/2VgO0v5bI6tQORNY0a0DR5sjpFNrjbg==} + next@14.2.11: + resolution: {integrity: sha512-8MDFqHBhdmR2wdfaWc8+lW3A/hppFe1ggQ9vgIu/g2/2QEMYJrPoQP6b+VNk56gIug/bStysAmrpUKtj3XN8Bw==} engines: {node: '>=18.17.0'} hasBin: true peerDependencies: @@ -5603,6 +5771,9 @@ packages: resolution: {integrity: sha512-VBlAiynj3VMLrotgwOS3OyECFxas5y7ltLcK4t41lMUZeaK15Ym4QRkqN0EQKAFL42q9i21EPKjzLUPfltR72A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + node-fetch-native@1.6.4: + resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -5633,6 +5804,9 @@ packages: node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + nopt@5.0.0: resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} engines: {node: '>=6'} @@ -5646,10 +5820,6 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} - npm-run-path@5.3.0: - resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - npmlog@5.0.1: resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} deprecated: This package is no longer supported. @@ -5695,6 +5865,9 @@ packages: resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} engines: {node: '>= 0.4'} + ofetch@1.3.4: + resolution: {integrity: sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw==} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -5705,10 +5878,6 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} - onetime@6.0.0: - resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} - engines: {node: '>=12'} - openapi-path-templating@1.5.3: resolution: {integrity: sha512-NPL+3w4NsBmqTzCQGQbSUHTAUYM/ubm3tH9BWe77uvGyA8L32L73w+w7zhBCsql0zp+gqGvglaHdQTpWx/tzmA==} engines: {node: '>=12.20.0'} @@ -5804,10 +5973,6 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - path-key@4.0.0: - resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} - engines: {node: '>=12'} - path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} @@ -5836,10 +6001,17 @@ packages: picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.0: + resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + piscina@4.5.1: resolution: {integrity: sha512-DVhySLPfqAW+uRH9dF0bjA2xEWr5ANLAzkYXx5adSLMFnwssSIVJYhg0FlvgYsnT/khILQJ3WkjqbAlBvt+maw==} @@ -5888,8 +6060,8 @@ packages: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} - postcss@8.4.38: - resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} + postcss@8.4.45: + resolution: {integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==} engines: {node: ^10 || ^12 || >=14} preact-render-to-string@5.2.3: @@ -6311,6 +6483,9 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rfc4648@1.5.3: + resolution: {integrity: sha512-MjOWxM065+WswwnmNONOT+bD1nXzY9Km6u3kzvnx8F8/HXGZdz3T6e6vZJ8Q/RIMUSp/nxqjH3GwvJDy8ijeQQ==} + rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} deprecated: Rimraf versions prior to v4 are no longer supported @@ -6352,9 +6527,6 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - rust-result@1.0.0: - resolution: {integrity: sha512-6cJzSBU+J/RJCF063onnQf0cDUOHs9uZI1oroSGnHOph+CQTIJ5Pp2hK5kEQq1+7yE/EEWfulSNXAQ2jikPthA==} - rxjs@6.6.7: resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} engines: {npm: '>=2.0.0'} @@ -6372,9 +6544,6 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safe-json-parse@4.0.0: - resolution: {integrity: sha512-RjZPPHugjK0TOzFrLZ8inw44s9bKox99/0AZW9o/BEQVrJfhI+fIHMErnPyRa89/yRXUUr93q+tiN6zhoVV4wQ==} - safe-regex-test@1.0.3: resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} engines: {node: '>= 0.4'} @@ -6530,6 +6699,10 @@ packages: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} @@ -6540,9 +6713,6 @@ packages: space-separated-tokens@1.1.5: resolution: {integrity: sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==} - spawn-command@0.0.2: - resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} - split-ca@1.0.1: resolution: {integrity: sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==} @@ -6644,10 +6814,6 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} - strip-final-newline@3.0.0: - resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} - engines: {node: '>=12'} - strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -6759,8 +6925,8 @@ packages: uglify-js: optional: true - terser@5.31.0: - resolution: {integrity: sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==} + terser@5.32.0: + resolution: {integrity: sha512-v3Gtw3IzpBJ0ugkxEX8U0W6+TnPKRRCWGh1jC/iM/e3Ki5+qvO1L1EAZ56bZasc64aXHwRHNIQEzm6//i5cemQ==} engines: {node: '>=10'} hasBin: true @@ -6768,8 +6934,8 @@ packages: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} - testcontainers@10.13.0: - resolution: {integrity: sha512-SDblQvirbJw1ZpenxaAairGtAesw5XMOCHLbRhTTUBJtBkZJGce8Vx/I8lXQxWIM8HRXsg3HILTHGQvYo4x7wQ==} + testcontainers@10.13.1: + resolution: {integrity: sha512-JBbOhxmygj/ouH/47GnoVNt+c55Telh/45IjVxEbDoswsLchVmJiuKiw/eF6lE5i7LN+/99xsrSCttI3YRtirg==} text-decoder@1.1.0: resolution: {integrity: sha512-TmLJNj6UgX8xcUZo4UDStGQtDiTzF7BzWlzn9g7UWrjkpHr5uJTK1ld16wZ3LXb2vb6jH8qU89dW5whuMdXYdw==} @@ -6783,12 +6949,19 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - tinybench@2.8.0: - resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} tinycolor2@1.6.0: resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + + tinyglobby@0.2.6: + resolution: {integrity: sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==} + engines: {node: '>=12.0.0'} + tinygradient@1.1.5: resolution: {integrity: sha512-8nIfc2vgQ4TeLnk2lFj4tRLvvJwEfQuabdsmvDdQPT0xlk9TaNtpGd6nNRxXoK6vQhN6RSzj+Cnp5tTQmpxmbw==} @@ -6810,11 +6983,11 @@ packages: title-case@2.1.1: resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} - tldts-core@6.1.42: - resolution: {integrity: sha512-MJKxTFpAyUNxST7IrONoeQcFXuF3tQvnVuJ8IRBlA9rzlsAt1speUZSQxai3jrWwxMJ29FWrdpUWBW2pN99Ftw==} + tldts-core@6.1.44: + resolution: {integrity: sha512-DMOTcn8pGmuY65zDPH+M1xAOVtBj7Phrah0HxuspKEu33hOArCDmk3R4UEVymtuN+HveeUlVgX0+RNf4mFkoAw==} - tldts@6.1.42: - resolution: {integrity: sha512-4IQJNZrYPHLVdiaRGmg6X5XrtkwGcfV1BBudNsWlJrl3mXDPEs6IlDzb0rDcgyUx531thK6nT5OA13UpGfZUjA==} + tldts@6.1.44: + resolution: {integrity: sha512-Id5Kq3vy4fAHgrMasofrYZ4ghMa9rX64BfstBFgnGN+CAPdXYeZ0xWA2BXk3F+VgS+/jJ9PdYEQrP8LEZvGrCw==} hasBin: true tmp@0.0.33: @@ -6940,38 +7113,38 @@ packages: tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} - turbo-darwin-64@2.1.1: - resolution: {integrity: sha512-aYNuJpZlCoi0Htd79fl/2DywpewGKijdXeOfg9KzNuPVKzSMYlAXuAlNGh0MKjiOcyqxQGL7Mq9LFhwA0VpDpQ==} + turbo-darwin-64@2.1.2: + resolution: {integrity: sha512-3TEBxHWh99h2yIzkuIigMEOXt/ItYQp0aPiJjPd1xN4oDcsKK5AxiFKPH9pdtfIBzYsY59kQhZiFj0ELnSP7Bw==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.1.1: - resolution: {integrity: sha512-tifJKD8yHY48rHXPMcM8o1jI/Jk2KCaXiNjTKvvy9Zsim61BZksNVLelIbrRoCGwAN6PUBZO2lGU5iL/TQJ5Pw==} + turbo-darwin-arm64@2.1.2: + resolution: {integrity: sha512-he0miWNq2WxJzsH82jS2Z4MXpnkzn9SH8a79iPXiJkq25QREImucscM4RPasXm8wARp91pyysJMq6aasD45CeA==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.1.1: - resolution: {integrity: sha512-Js6d/bSQe9DuV9c7ITXYpsU/ADzFHABdz1UIHa7Oqjj9VOEbFeA9WpAn0c+mdJrVD+IXJFbbDZUjN7VYssmtcg==} + turbo-linux-64@2.1.2: + resolution: {integrity: sha512-fKUBcc0rK8Vdqv5a/E3CSpMBLG1bzwv+Q0Q83F8fG2ZfNCNKGbcEYABdonNZkkx141Rj03cZQFCgxu3MVEGU+A==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.1.1: - resolution: {integrity: sha512-LidzTCq0yvQ+N8w8Qub9FmhQ/mmEIeoqFi7DSupekEV2EjvE9jw/zYc9Pk67X+g7dHVfgOnvVzmrjChdxpFePw==} + turbo-linux-arm64@2.1.2: + resolution: {integrity: sha512-sV8Bpmm0WiuxgbhxymcC7wSsuxfBBieI98GegSwbr/bs1ANAgzCg93urIrdKdQ3/b31zZxQwcaP4FBF1wx1Qdg==} cpu: [arm64] os: [linux] - turbo-windows-64@2.1.1: - resolution: {integrity: sha512-GKc9ZywKwy4xLDhwXd6H07yzl0TB52HjXMrFLyHGhCVnf/w0oq4sLJv2sjbvuarPjsyx4xnCBJ3m3oyL2XmFtA==} + turbo-windows-64@2.1.2: + resolution: {integrity: sha512-wcmIJZI9ORT9ykHGliFE6kWRQrlH930QGSjSgWC8uFChFFuOyUlvC7ttcxuSvU9VqC7NF4C+GVAcFJQ8lTjN7g==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.1.1: - resolution: {integrity: sha512-oFKkMj11KKUv3xSK9/fhAEQTxLUp1Ol1EOktwc32+SFtEU0uls7kosAz0b+qe8k3pJGEMFdDPdqoEjyJidbxtQ==} + turbo-windows-arm64@2.1.2: + resolution: {integrity: sha512-zdnXjrhk7YO6CP+Q5wPueEvOCLH4lDa6C4rrwiakcWcPgcQGbVozJlo4uaQ6awo8HLWQEvOwu84RkWTdLAc/Hw==} cpu: [arm64] os: [win32] - turbo@2.1.1: - resolution: {integrity: sha512-u9gUDkmR9dFS8b5kAYqIETK4OnzsS4l2ragJ0+soSMHh6VEeNHjTfSjk1tKxCqLyziCrPogadxP680J+v6yGHw==} + turbo@2.1.2: + resolution: {integrity: sha512-Jb0rbU4iHEVQ18An/YfakdIv9rKnd3zUfSE117EngrfWXFHo3RndVH96US3GsT8VHpwTncPePDBT2t06PaFLrw==} hasBin: true tweetnacl@0.14.5: @@ -7013,14 +7186,17 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} + typed-rpc@5.1.0: + resolution: {integrity: sha512-qPWUQrLye3Z5kQ8GuVLIURIUNPaDrKgBBts5nXVjR87j8+4sva/sw7lmaBfOw+7m/S4F9jplkv9XZl0hUDUHZg==} + typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} types-ramda@0.30.0: resolution: {integrity: sha512-oVPw/KHB5M0Du0txTEKKM8xZOG9cZBRdCVXvwHYuNJUVkAiJ9oWyqkA+9Bj2gjMsHgkkhsYevobQBWs8I2/Xvw==} - typescript-eslint@8.4.0: - resolution: {integrity: sha512-67qoc3zQZe3CAkO0ua17+7aCLI0dU+sSQd1eKPGq06QE4rfQjstVXR6woHO5qQvGUa550NfGckT4tzh3b3c8Pw==} + typescript-eslint@8.5.0: + resolution: {integrity: sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -7028,19 +7204,26 @@ packages: typescript: optional: true - typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} hasBin: true uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} hasBin: true + uint8array-extras@1.4.0: + resolution: {integrity: sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ==} + engines: {node: '>=18'} + unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} @@ -7087,6 +7270,12 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + update-browserslist-db@1.1.0: + resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + update-check@1.5.4: resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==} @@ -7185,8 +7374,8 @@ packages: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - video.js@8.17.3: - resolution: {integrity: sha512-zhhmE0LNxJRA603/48oYzF7GYdT+rQRscvcsouYxFE71aKhalHLBP6S9/XjixnyjcrYgwIx8OQo6eSjcbbAW0Q==} + video.js@8.17.4: + resolution: {integrity: sha512-AECieAxKMKB/QgYK36ci50phfpWys6bFT6+pGMpSafeFYSoZaQ2Vpl83T9Qqcesv4TO7oNtiycnVeaBnrva2oA==} videojs-contrib-quality-levels@4.1.0: resolution: {integrity: sha512-TfrXJJg1Bv4t6TOCMEVMwF/CoS8iENYsWNKip8zfhB5kTcegiFYezEA0eHAJPU64ZC8NQbxQgOwAsYU8VXbOWA==} @@ -7200,8 +7389,8 @@ packages: videojs-vtt.js@0.15.5: resolution: {integrity: sha512-yZbBxvA7QMYn15Lr/ZfhhLPrNpI/RmCSCqgIff57GC2gIrV5YfyzLfLyZMj0NnZSAz8syB4N0nHXpZg9MyrMOQ==} - vite-node@2.0.5: - resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==} + vite-node@2.1.1: + resolution: {integrity: sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -7241,15 +7430,15 @@ packages: terser: optional: true - vitest@2.0.5: - resolution: {integrity: sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==} + vitest@2.1.1: + resolution: {integrity: sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.0.5 - '@vitest/ui': 2.0.5 + '@vitest/browser': 2.1.1 + '@vitest/ui': 2.1.1 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -7273,8 +7462,8 @@ packages: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'} - watchpack@2.4.1: - resolution: {integrity: sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==} + watchpack@2.4.2: + resolution: {integrity: sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==} engines: {node: '>=10.13.0'} wcwidth@1.0.1: @@ -7484,6 +7673,11 @@ packages: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} + zod-form-data@2.0.2: + resolution: {integrity: sha512-sKTi+k0fvkxdakD0V5rq+9WVJA3cuTQUfEmNqvHrTzPLvjfLmkkBLfR0ed3qOi9MScJXTHIDH/jUNnEJ3CBX4g==} + peerDependencies: + zod: '>= 3.11.0' + zod-to-json-schema@3.23.0: resolution: {integrity: sha512-az0uJ243PxsRIa2x1WmNE/pnuA05gUq/JB8Lwe1EDCCL/Fz9MgjYQ0fPlyc2Tcv6aF2ZA7WM5TWaRZVEFaAIag==} peerDependencies: @@ -7527,7 +7721,7 @@ snapshots: '@babel/code-frame@7.24.6': dependencies: '@babel/highlight': 7.24.6 - picocolors: 1.0.1 + picocolors: 1.1.0 '@babel/compat-data@7.24.6': {} @@ -7544,7 +7738,7 @@ snapshots: '@babel/traverse': 7.24.6 '@babel/types': 7.24.6 convert-source-map: 2.0.0 - debug: 4.3.5 + debug: 4.3.6 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -7571,15 +7765,15 @@ snapshots: '@babel/helper-function-name@7.24.6': dependencies: '@babel/template': 7.24.6 - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@babel/helper-hoist-variables@7.24.6': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@babel/helper-module-imports@7.24.6': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@babel/helper-module-transforms@7.24.6(@babel/core@7.24.6)': dependencies: @@ -7594,34 +7788,42 @@ snapshots: '@babel/helper-simple-access@7.24.6': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@babel/helper-split-export-declaration@7.24.6': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@babel/helper-string-parser@7.24.6': {} + '@babel/helper-string-parser@7.24.8': {} + '@babel/helper-validator-identifier@7.24.6': {} + '@babel/helper-validator-identifier@7.24.7': {} + '@babel/helper-validator-option@7.24.6': {} '@babel/helpers@7.24.6': dependencies: '@babel/template': 7.24.6 - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@babel/highlight@7.24.6': dependencies: - '@babel/helper-validator-identifier': 7.24.6 + '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.1 + picocolors: 1.1.0 '@babel/parser@7.24.7': dependencies: '@babel/types': 7.24.6 + '@babel/parser@7.25.6': + dependencies: + '@babel/types': 7.25.6 + '@babel/plugin-transform-react-jsx-self@7.24.5(@babel/core@7.24.6)': dependencies: '@babel/core': 7.24.6 @@ -7645,7 +7847,7 @@ snapshots: dependencies: '@babel/code-frame': 7.24.6 '@babel/parser': 7.24.7 - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@babel/traverse@7.24.6': dependencies: @@ -7657,7 +7859,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.6 '@babel/parser': 7.24.7 '@babel/types': 7.24.6 - debug: 4.3.6 + debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -7668,6 +7870,12 @@ snapshots: '@babel/helper-validator-identifier': 7.24.6 to-fast-properties: 2.0.0 + '@babel/types@7.25.6': + dependencies: + '@babel/helper-string-parser': 7.24.8 + '@babel/helper-validator-identifier': 7.24.7 + to-fast-properties: 2.0.0 + '@balena/dockerignore@1.0.2': {} '@bcoe/v8-coverage@0.2.3': {} @@ -7676,13 +7884,13 @@ snapshots: '@clack/core@0.3.4': dependencies: - picocolors: 1.0.1 + picocolors: 1.1.0 sisteransi: 1.0.5 '@clack/prompts@0.7.0': dependencies: '@clack/core': 0.3.4 - picocolors: 1.0.1 + picocolors: 1.1.0 sisteransi: 1.0.5 '@colors/colors@1.6.0': {} @@ -7691,6 +7899,46 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 + '@ctrl/deluge@6.1.0': + dependencies: + '@ctrl/magnet-link': 4.0.2 + '@ctrl/shared-torrent': 6.0.0 + node-fetch-native: 1.6.4 + ofetch: 1.3.4 + tough-cookie: 4.1.4 + ufo: 1.5.4 + uint8array-extras: 1.4.0 + + '@ctrl/magnet-link@4.0.2': + dependencies: + rfc4648: 1.5.3 + uint8array-extras: 1.4.0 + + '@ctrl/qbittorrent@9.0.1': + dependencies: + '@ctrl/magnet-link': 4.0.2 + '@ctrl/shared-torrent': 6.0.0 + '@ctrl/torrent-file': 4.1.0 + cookie: 0.6.0 + node-fetch-native: 1.6.4 + ofetch: 1.3.4 + ufo: 1.5.4 + uint8array-extras: 1.4.0 + + '@ctrl/shared-torrent@6.0.0': {} + + '@ctrl/torrent-file@4.1.0': + dependencies: + uint8array-extras: 1.4.0 + + '@ctrl/transmission@6.1.0': + dependencies: + '@ctrl/magnet-link': 4.0.2 + '@ctrl/shared-torrent': 6.0.0 + ofetch: 1.3.4 + ufo: 1.5.4 + uint8array-extras: 1.4.0 + '@dabh/diagnostics@2.0.3': dependencies: colorspace: 1.1.4 @@ -7913,9 +8161,9 @@ snapshots: '@esbuild/win32-x64@0.20.2': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.1)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.10.0)': dependencies: - eslint: 9.9.1 + eslint: 9.10.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} @@ -7923,7 +8171,7 @@ snapshots: '@eslint/config-array@0.18.0': dependencies: '@eslint/object-schema': 2.1.4 - debug: 4.3.5 + debug: 4.3.6 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -7931,7 +8179,7 @@ snapshots: '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.5 + debug: 4.3.6 espree: 10.1.0 globals: 14.0.0 ignore: 5.3.1 @@ -7942,14 +8190,18 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.9.1': {} + '@eslint/js@9.10.0': {} '@eslint/object-schema@2.1.4': {} - '@extractus/feed-extractor@7.1.3': + '@eslint/plugin-kit@0.1.0': + dependencies: + levn: 0.4.1 + + '@extractus/feed-extractor@7.1.3(encoding@0.1.13)': dependencies: bellajs: 11.2.0 - cross-fetch: 4.0.0 + cross-fetch: 4.0.0(encoding@0.1.13) fast-xml-parser: 4.4.0 html-entities: 2.5.2 transitivePeerDependencies: @@ -8026,7 +8278,7 @@ snapshots: '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/resolve-uri@3.1.2': {} @@ -8038,21 +8290,21 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 - '@mantine/colors-generator@7.12.2(chroma-js@3.0.0)': + '@mantine/colors-generator@7.12.2(chroma-js@3.1.1)': dependencies: - chroma-js: 3.0.0 + chroma-js: 3.1.1 '@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -8124,12 +8376,12 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@mapbox/node-pre-gyp@1.0.11': + '@mapbox/node-pre-gyp@1.0.11(encoding@0.1.13)': dependencies: detect-libc: 2.0.3 https-proxy-agent: 5.0.1 make-dir: 3.1.0 - node-fetch: 2.7.0 + node-fetch: 2.7.0(encoding@0.1.13) nopt: 5.0.0 npmlog: 5.0.1 rimraf: 3.0.2 @@ -8144,7 +8396,7 @@ snapshots: '@antfu/ni': 0.21.12 '@axiomhq/js': 1.0.0-rc.3 '@babel/core': 7.24.6 - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@clack/prompts': 0.7.0 cli-high: 0.4.2 diff: 5.2.0 @@ -8153,7 +8405,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@million/lint@1.0.0-rc.84(rollup@4.17.2)': + '@million/lint@1.0.0-rc.84(encoding@0.1.13)(rollup@4.17.2)': dependencies: '@axiomhq/js': 1.0.0-rc.3 '@babel/core': 7.24.6 @@ -8166,7 +8418,7 @@ snapshots: ci-info: 4.0.0 esbuild: 0.20.2 hono: 4.4.0 - isomorphic-fetch: 3.0.0 + isomorphic-fetch: 3.0.0(encoding@0.1.13) nanoid: 5.0.7 pako: 2.1.0 pathe: 1.1.2 @@ -8178,7 +8430,7 @@ snapshots: socket.io-client: 4.7.5 tmp: 0.2.3 unplugin: 1.10.1 - update-notifier-cjs: 5.1.6 + update-notifier-cjs: 5.1.6(encoding@0.1.13) transitivePeerDependencies: - bufferutil - encoding @@ -8186,37 +8438,37 @@ snapshots: - supports-color - utf-8-validate - '@next/env@14.2.8': {} + '@next/env@14.2.11': {} - '@next/eslint-plugin-next@14.2.8': + '@next/eslint-plugin-next@14.2.11': dependencies: glob: 10.3.10 - '@next/swc-darwin-arm64@14.2.8': + '@next/swc-darwin-arm64@14.2.11': optional: true - '@next/swc-darwin-x64@14.2.8': + '@next/swc-darwin-x64@14.2.11': optional: true - '@next/swc-linux-arm64-gnu@14.2.8': + '@next/swc-linux-arm64-gnu@14.2.11': optional: true - '@next/swc-linux-arm64-musl@14.2.8': + '@next/swc-linux-arm64-musl@14.2.11': optional: true - '@next/swc-linux-x64-gnu@14.2.8': + '@next/swc-linux-x64-gnu@14.2.11': optional: true - '@next/swc-linux-x64-musl@14.2.8': + '@next/swc-linux-x64-musl@14.2.11': optional: true - '@next/swc-win32-arm64-msvc@14.2.8': + '@next/swc-win32-arm64-msvc@14.2.11': optional: true - '@next/swc-win32-ia32-msvc@14.2.8': + '@next/swc-win32-ia32-msvc@14.2.11': optional: true - '@next/swc-win32-x64-msvc@14.2.8': + '@next/swc-win32-x64-msvc@14.2.11': optional: true '@noble/hashes@1.4.0': {} @@ -8666,49 +8918,49 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.6.2 - '@t3-oss/env-core@0.11.1(typescript@5.5.4)(zod@3.23.8)': + '@t3-oss/env-core@0.11.1(typescript@5.6.2)(zod@3.23.8)': dependencies: zod: 3.23.8 optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 - '@t3-oss/env-nextjs@0.11.1(typescript@5.5.4)(zod@3.23.8)': + '@t3-oss/env-nextjs@0.11.1(typescript@5.6.2)(zod@3.23.8)': dependencies: - '@t3-oss/env-core': 0.11.1(typescript@5.5.4)(zod@3.23.8) + '@t3-oss/env-core': 0.11.1(typescript@5.6.2)(zod@3.23.8) zod: 3.23.8 optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 - '@tabler/icons-react@3.14.0(react@18.3.1)': + '@tabler/icons-react@3.16.0(react@18.3.1)': dependencies: - '@tabler/icons': 3.14.0 + '@tabler/icons': 3.16.0 react: 18.3.1 - '@tabler/icons@3.14.0': {} + '@tabler/icons@3.16.0': {} '@tanstack/match-sorter-utils@8.15.1': dependencies: remove-accents: 0.5.0 - '@tanstack/query-core@5.54.1': {} + '@tanstack/query-core@5.56.2': {} - '@tanstack/query-devtools@5.54.0': {} + '@tanstack/query-devtools@5.56.1': {} - '@tanstack/react-query-devtools@5.55.0(@tanstack/react-query@5.55.0(react@18.3.1))(react@18.3.1)': + '@tanstack/react-query-devtools@5.56.2(@tanstack/react-query@5.56.2(react@18.3.1))(react@18.3.1)': dependencies: - '@tanstack/query-devtools': 5.54.0 - '@tanstack/react-query': 5.55.0(react@18.3.1) + '@tanstack/query-devtools': 5.56.1 + '@tanstack/react-query': 5.56.2(react@18.3.1) react: 18.3.1 - '@tanstack/react-query-next-experimental@5.55.0(@tanstack/react-query@5.55.0(react@18.3.1))(next@14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react@18.3.1)': + '@tanstack/react-query-next-experimental@5.56.2(@tanstack/react-query@5.56.2(react@18.3.1))(next@14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react@18.3.1)': dependencies: - '@tanstack/react-query': 5.55.0(react@18.3.1) - next: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + '@tanstack/react-query': 5.56.2(react@18.3.1) + next: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) react: 18.3.1 - '@tanstack/react-query@5.55.0(react@18.3.1)': + '@tanstack/react-query@5.56.2(react@18.3.1)': dependencies: - '@tanstack/query-core': 5.54.1 + '@tanstack/query-core': 5.56.2 react: 18.3.1 '@tanstack/react-table@8.19.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': @@ -8934,30 +9186,30 @@ snapshots: '@tootallnate/quickjs-emscripten@0.23.0': {} - '@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498)': + '@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502)': dependencies: - '@trpc/server': 11.0.0-rc.498 + '@trpc/server': 11.0.0-rc.502 - '@trpc/next@11.0.0-rc.498(@tanstack/react-query@5.55.0(react@18.3.1))(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/react-query@11.0.0-rc.498(@tanstack/react-query@5.55.0(react@18.3.1))(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/server@11.0.0-rc.498)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@trpc/server@11.0.0-rc.498)(next@14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@trpc/next@11.0.0-rc.502(@tanstack/react-query@5.56.2(react@18.3.1))(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/react-query@11.0.0-rc.502(@tanstack/react-query@5.56.2(react@18.3.1))(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/server@11.0.0-rc.502)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@trpc/server@11.0.0-rc.502)(next@14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@trpc/client': 11.0.0-rc.498(@trpc/server@11.0.0-rc.498) - '@trpc/server': 11.0.0-rc.498 - next: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + '@trpc/client': 11.0.0-rc.502(@trpc/server@11.0.0-rc.502) + '@trpc/server': 11.0.0-rc.502 + next: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: - '@tanstack/react-query': 5.55.0(react@18.3.1) - '@trpc/react-query': 11.0.0-rc.498(@tanstack/react-query@5.55.0(react@18.3.1))(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/server@11.0.0-rc.498)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@tanstack/react-query': 5.56.2(react@18.3.1) + '@trpc/react-query': 11.0.0-rc.502(@tanstack/react-query@5.56.2(react@18.3.1))(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/server@11.0.0-rc.502)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@trpc/react-query@11.0.0-rc.498(@tanstack/react-query@5.55.0(react@18.3.1))(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/server@11.0.0-rc.498)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@trpc/react-query@11.0.0-rc.502(@tanstack/react-query@5.56.2(react@18.3.1))(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/server@11.0.0-rc.502)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@tanstack/react-query': 5.55.0(react@18.3.1) - '@trpc/client': 11.0.0-rc.498(@trpc/server@11.0.0-rc.498) - '@trpc/server': 11.0.0-rc.498 + '@tanstack/react-query': 5.56.2(react@18.3.1) + '@trpc/client': 11.0.0-rc.502(@trpc/server@11.0.0-rc.502) + '@trpc/server': 11.0.0-rc.502 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@trpc/server@11.0.0-rc.498': {} + '@trpc/server@11.0.0-rc.502': {} '@tsconfig/node10@1.0.11': {} @@ -8969,9 +9221,9 @@ snapshots: '@tsconfig/svelte@1.0.13': {} - '@turbo/gen@2.1.1(@types/node@20.16.5)(typescript@5.5.4)': + '@turbo/gen@2.1.2(@types/node@20.16.5)(typescript@5.6.2)': dependencies: - '@turbo/workspaces': 2.1.1 + '@turbo/workspaces': 2.1.2 commander: 10.0.1 fs-extra: 10.1.0 inquirer: 8.2.6 @@ -8979,7 +9231,7 @@ snapshots: node-plop: 0.26.3 picocolors: 1.0.1 proxy-agent: 6.4.0 - ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.5.4) + ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) update-check: 1.5.4 validate-npm-package-name: 5.0.1 transitivePeerDependencies: @@ -8989,7 +9241,7 @@ snapshots: - supports-color - typescript - '@turbo/workspaces@2.1.1': + '@turbo/workspaces@2.1.2': dependencies: commander: 10.0.1 execa: 5.1.1 @@ -9018,16 +9270,16 @@ snapshots: '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.24.7 - '@babel/types': 7.24.6 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 '@types/babel__traverse@7.20.5': dependencies: - '@babel/types': 7.24.6 + '@babel/types': 7.25.6 '@types/bcrypt@5.0.2': dependencies: @@ -9074,10 +9326,10 @@ snapshots: '@types/eslint-scope@3.7.7': dependencies: - '@types/eslint': 8.56.10 + '@types/eslint': 9.6.1 '@types/estree': 1.0.5 - '@types/eslint@8.56.10': + '@types/eslint@9.6.1': dependencies: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 @@ -9203,90 +9455,90 @@ snapshots: dependencies: '@types/node': 20.16.5 - '@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/type-utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 8.4.0 - eslint: 9.9.1 + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/type-utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.5.0 + eslint: 9.10.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 8.4.0 - debug: 4.3.6 - eslint: 9.9.1 + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.5.0 + debug: 4.3.7 + eslint: 9.10.0 optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.4.0': + '@typescript-eslint/scope-manager@8.5.0': dependencies: - '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/visitor-keys': 8.4.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/visitor-keys': 8.5.0 - '@typescript-eslint/type-utils@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.5.0(eslint@9.10.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - debug: 4.3.6 - ts-api-utils: 1.3.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + debug: 4.3.7 + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - eslint - supports-color - '@typescript-eslint/types@8.4.0': {} + '@typescript-eslint/types@8.5.0': {} - '@typescript-eslint/typescript-estree@8.4.0(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/visitor-keys': 8.4.0 - debug: 4.3.6 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/visitor-keys': 8.5.0 + debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.4 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/utils@8.5.0(eslint@9.10.0)(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) - '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) - eslint: 9.9.1 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + eslint: 9.10.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.4.0': + '@typescript-eslint/visitor-keys@8.5.0': dependencies: - '@typescript-eslint/types': 8.4.0 + '@typescript-eslint/types': 8.5.0 eslint-visitor-keys: 3.4.3 '@umami/node@0.4.0': {} - '@videojs/http-streaming@3.13.2(video.js@8.17.3)': + '@videojs/http-streaming@3.13.3(video.js@8.17.4)': dependencies: '@babel/runtime': 7.24.5 '@videojs/vhs-utils': 4.0.0 @@ -9295,7 +9547,7 @@ snapshots: m3u8-parser: 7.1.0 mpd-parser: 1.3.0 mux.js: 7.0.3 - video.js: 8.17.3 + video.js: 8.17.4 '@videojs/vhs-utils@3.0.5': dependencies: @@ -9315,86 +9567,93 @@ snapshots: global: 4.4.0 is-function: 1.0.2 - '@vitejs/plugin-react@4.3.1(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0))': + '@vitejs/plugin-react@4.3.1(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0))': dependencies: '@babel/core': 7.24.6 '@babel/plugin-transform-react-jsx-self': 7.24.5(@babel/core@7.24.6) '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.6) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0) + vite: 5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0) transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@20.16.5)(@vitest/ui@2.0.5)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0))': + '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@20.16.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.5 + debug: 4.3.7 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 istanbul-reports: 3.1.7 - magic-string: 0.30.10 + magic-string: 0.30.11 magicast: 0.3.4 std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@20.16.5)(@vitest/ui@2.0.5)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0) + vitest: 2.1.1(@types/node@20.16.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0) transitivePeerDependencies: - supports-color - '@vitest/expect@2.0.5': + '@vitest/expect@2.1.1': dependencies: - '@vitest/spy': 2.0.5 - '@vitest/utils': 2.0.5 + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.0.5': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0))': + dependencies: + '@vitest/spy': 2.1.1 + estree-walker: 3.0.3 + magic-string: 0.30.11 + optionalDependencies: + vite: 5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0) + + '@vitest/pretty-format@2.1.1': dependencies: tinyrainbow: 1.2.0 - '@vitest/runner@2.0.5': + '@vitest/runner@2.1.1': dependencies: - '@vitest/utils': 2.0.5 + '@vitest/utils': 2.1.1 pathe: 1.1.2 - '@vitest/snapshot@2.0.5': + '@vitest/snapshot@2.1.1': dependencies: - '@vitest/pretty-format': 2.0.5 - magic-string: 0.30.10 + '@vitest/pretty-format': 2.1.1 + magic-string: 0.30.11 pathe: 1.1.2 - '@vitest/spy@2.0.5': + '@vitest/spy@2.1.1': dependencies: tinyspy: 3.0.0 - '@vitest/ui@2.0.5(vitest@2.0.5)': + '@vitest/ui@2.1.1(vitest@2.1.1)': dependencies: - '@vitest/utils': 2.0.5 - fast-glob: 3.3.2 + '@vitest/utils': 2.1.1 fflate: 0.8.2 flatted: 3.3.1 pathe: 1.1.2 sirv: 2.0.4 + tinyglobby: 0.2.6 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@20.16.5)(@vitest/ui@2.0.5)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0) + vitest: 2.1.1(@types/node@20.16.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0) - '@vitest/utils@2.0.5': + '@vitest/utils@2.1.1': dependencies: - '@vitest/pretty-format': 2.0.5 - estree-walker: 3.0.3 + '@vitest/pretty-format': 2.1.1 loupe: 3.1.1 tinyrainbow: 1.2.0 '@vue/compiler-core@3.4.31': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.6 '@vue/shared': 3.4.31 entities: 4.5.0 estree-walker: 2.0.2 - source-map-js: 1.2.0 + source-map-js: 1.2.1 optional: true '@vue/compiler-dom@3.4.31': @@ -9405,15 +9664,15 @@ snapshots: '@vue/compiler-sfc@3.4.31': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.6 '@vue/compiler-core': 3.4.31 '@vue/compiler-dom': 3.4.31 '@vue/compiler-ssr': 3.4.31 '@vue/shared': 3.4.31 estree-walker: 2.0.2 - magic-string: 0.30.10 - postcss: 8.4.38 - source-map-js: 1.2.0 + magic-string: 0.30.11 + postcss: 8.4.45 + source-map-js: 1.2.1 optional: true '@vue/compiler-ssr@3.4.31': @@ -9530,9 +9789,9 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-import-assertions@1.9.0(acorn@8.12.0): + acorn-import-assertions@1.9.0(acorn@8.12.1): dependencies: - acorn: 8.12.0 + acorn: 8.12.1 acorn-jsx@5.3.2(acorn@8.12.0): dependencies: @@ -9542,6 +9801,8 @@ snapshots: acorn@8.12.0: {} + acorn@8.12.1: {} + aes-decrypter@4.0.1: dependencies: '@babel/runtime': 7.24.5 @@ -9551,13 +9812,13 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.6 + debug: 4.3.7 transitivePeerDependencies: - supports-color agent-base@7.1.1: dependencies: - debug: 4.3.6 + debug: 4.3.7 transitivePeerDependencies: - supports-color @@ -9793,9 +10054,9 @@ snapshots: dependencies: tweetnacl: 0.14.5 - bcrypt@5.1.1: + bcrypt@5.1.1(encoding@0.1.13): dependencies: - '@mapbox/node-pre-gyp': 1.0.11 + '@mapbox/node-pre-gyp': 1.0.11(encoding@0.1.13) node-addon-api: 5.1.0 transitivePeerDependencies: - encoding @@ -9803,7 +10064,7 @@ snapshots: bellajs@11.2.0: {} - better-sqlite3@11.2.1: + better-sqlite3@11.3.0: dependencies: bindings: 1.5.0 prebuild-install: 7.1.2 @@ -9848,11 +10109,18 @@ snapshots: browserslist@4.23.0: dependencies: - caniuse-lite: 1.0.30001620 + caniuse-lite: 1.0.30001660 electron-to-chromium: 1.4.772 node-releases: 2.0.14 update-browserslist-db: 1.0.16(browserslist@4.23.0) + browserslist@4.23.3: + dependencies: + caniuse-lite: 1.0.30001660 + electron-to-chromium: 1.5.18 + node-releases: 2.0.18 + update-browserslist-db: 1.1.0(browserslist@4.23.3) + buffer-crc32@1.0.0: {} buffer-from@1.1.2: {} @@ -9899,7 +10167,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001620: {} + caniuse-lite@1.0.30001660: {} chai@5.1.1: dependencies: @@ -9980,7 +10248,7 @@ snapshots: chownr@2.0.0: {} - chroma-js@3.0.0: {} + chroma-js@3.1.1: {} chrome-trace-event@1.0.4: {} @@ -10080,14 +10348,12 @@ snapshots: concat-map@0.0.1: {} - concurrently@8.2.2: + concurrently@9.0.1: dependencies: chalk: 4.1.2 - date-fns: 2.30.0 lodash: 4.17.21 rxjs: 7.8.1 shell-quote: 1.8.1 - spawn-command: 0.0.2 supports-color: 8.1.1 tree-kill: 1.2.2 yargs: 17.7.2 @@ -10159,9 +10425,9 @@ snapshots: dependencies: cross-spawn: 7.0.3 - cross-fetch@4.0.0: + cross-fetch@4.0.0(encoding@0.1.13): dependencies: - node-fetch: 2.7.0 + node-fetch: 2.7.0(encoding@0.1.13) transitivePeerDependencies: - encoding @@ -10210,10 +10476,6 @@ snapshots: es-errors: 1.3.0 is-data-view: 1.0.1 - date-fns@2.30.0: - dependencies: - '@babel/runtime': 7.24.5 - dayjs@1.11.13: {} debug@3.2.7: @@ -10232,6 +10494,10 @@ snapshots: dependencies: ms: 2.1.2 + debug@4.3.7: + dependencies: + ms: 2.1.3 + decimal.js@10.4.3: {} decompress-response@6.0.0: @@ -10312,6 +10578,8 @@ snapshots: dequal@2.0.3: {} + destr@2.0.3: {} + detect-libc@2.0.3: {} detect-node-es@1.1.0: {} @@ -10330,7 +10598,7 @@ snapshots: docker-modem@3.0.8: dependencies: - debug: 4.3.6 + debug: 4.3.7 readable-stream: 3.6.2 split-ca: 1.0.1 ssh2: 1.15.0 @@ -10339,7 +10607,7 @@ snapshots: docker-modem@5.0.3: dependencies: - debug: 4.3.5 + debug: 4.3.6 readable-stream: 3.6.2 split-ca: 1.0.1 ssh2: 1.15.0 @@ -10407,19 +10675,21 @@ snapshots: transitivePeerDependencies: - supports-color - drizzle-orm@0.33.0(@prisma/client@5.16.1)(@types/better-sqlite3@7.6.11)(@types/react@18.3.5)(better-sqlite3@11.2.1)(mysql2@3.11.0)(react@18.3.1): + drizzle-orm@0.33.0(@prisma/client@5.16.1)(@types/better-sqlite3@7.6.11)(@types/react@18.3.5)(better-sqlite3@11.3.0)(mysql2@3.11.2)(react@18.3.1): optionalDependencies: '@prisma/client': 5.16.1 '@types/better-sqlite3': 7.6.11 '@types/react': 18.3.5 - better-sqlite3: 11.2.1 - mysql2: 3.11.0 + better-sqlite3: 11.3.0 + mysql2: 3.11.2 react: 18.3.1 eastasianwidth@0.2.0: {} electron-to-chromium@1.4.772: {} + electron-to-chromium@1.5.18: {} + emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} @@ -10428,6 +10698,11 @@ snapshots: enabled@2.0.0: {} + encoding@0.1.13: + dependencies: + iconv-lite: 0.6.3 + optional: true + end-of-stream@1.4.4: dependencies: once: 1.4.0 @@ -10435,7 +10710,7 @@ snapshots: engine.io-client@6.5.4: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.6 + debug: 4.3.7 engine.io-parser: 5.2.3 ws: 8.17.1 xmlhttprequest-ssl: 2.0.0 @@ -10446,7 +10721,7 @@ snapshots: engine.io-parser@5.2.3: {} - enhanced-resolve@5.16.1: + enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 @@ -10537,7 +10812,7 @@ snapshots: iterator.prototype: 1.1.2 safe-array-concat: 1.1.2 - es-module-lexer@1.5.3: {} + es-module-lexer@1.5.4: {} es-object-atoms@1.0.0: dependencies: @@ -10561,7 +10836,7 @@ snapshots: esbuild-register@3.5.0(esbuild@0.19.12): dependencies: - debug: 4.3.5 + debug: 4.3.6 esbuild: 0.19.12 transitivePeerDependencies: - supports-color @@ -10643,7 +10918,7 @@ snapshots: '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 - escalade@3.1.2: {} + escalade@3.2.0: {} escape-goat@2.1.1: {} @@ -10659,14 +10934,14 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-prettier@9.1.0(eslint@9.9.1): + eslint-config-prettier@9.1.0(eslint@9.10.0): dependencies: - eslint: 9.9.1 + eslint: 9.10.0 - eslint-config-turbo@2.1.1(eslint@9.9.1): + eslint-config-turbo@2.1.2(eslint@9.10.0): dependencies: - eslint: 9.9.1 - eslint-plugin-turbo: 2.1.1(eslint@9.9.1) + eslint: 9.10.0 + eslint-plugin-turbo: 2.1.2(eslint@9.10.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -10676,17 +10951,17 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.9.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.1): + eslint-module-utils@2.9.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.10.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - eslint: 9.9.1 + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + eslint: 9.10.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -10695,9 +10970,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.9.1 + eslint: 9.10.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.9.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint@9.9.1) + eslint-module-utils: 2.9.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.10.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -10708,13 +10983,13 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.10.0(eslint@9.9.1): + eslint-plugin-jsx-a11y@6.10.0(eslint@9.10.0): dependencies: aria-query: 5.1.3 array-includes: 3.1.8 @@ -10725,7 +11000,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.19 - eslint: 9.9.1 + eslint: 9.10.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -10734,11 +11009,11 @@ snapshots: safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 - eslint-plugin-react-hooks@4.6.2(eslint@9.9.1): + eslint-plugin-react-hooks@4.6.2(eslint@9.10.0): dependencies: - eslint: 9.9.1 + eslint: 9.10.0 - eslint-plugin-react@7.35.2(eslint@9.9.1): + eslint-plugin-react@7.36.1(eslint@9.10.0): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -10746,7 +11021,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.0.19 - eslint: 9.9.1 + eslint: 9.10.0 estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -10760,10 +11035,10 @@ snapshots: string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 - eslint-plugin-turbo@2.1.1(eslint@9.9.1): + eslint-plugin-turbo@2.1.2(eslint@9.10.0): dependencies: dotenv: 16.0.3 - eslint: 9.9.1 + eslint: 9.10.0 eslint-scope@5.1.1: dependencies: @@ -10779,20 +11054,21 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@9.9.1: + eslint@9.10.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) '@eslint-community/regexpp': 4.11.0 '@eslint/config-array': 0.18.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.1 + '@eslint/js': 9.10.0 + '@eslint/plugin-kit': 0.1.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.5 + debug: 4.3.6 escape-string-regexp: 4.0.0 eslint-scope: 8.0.2 eslint-visitor-keys: 4.0.0 @@ -10808,7 +11084,6 @@ snapshots: is-glob: 4.0.3 is-path-inside: 3.0.3 json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 @@ -10862,18 +11137,6 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - execa@8.0.1: - dependencies: - cross-spawn: 7.0.3 - get-stream: 8.0.1 - human-signals: 5.0.0 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.3.0 - onetime: 6.0.0 - signal-exit: 4.1.0 - strip-final-newline: 3.0.0 - expand-template@2.0.3: {} external-editor@3.1.0: @@ -10912,6 +11175,10 @@ snapshots: dependencies: format: 0.2.2 + fdir@6.3.0(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + fecha@4.2.3: {} fetch-retry@6.0.0: {} @@ -11041,8 +11308,6 @@ snapshots: get-stream@6.0.1: {} - get-stream@8.0.1: {} - get-symbol-description@1.0.2: dependencies: call-bind: 1.0.7 @@ -11057,7 +11322,7 @@ snapshots: dependencies: basic-ftp: 5.0.5 data-uri-to-buffer: 6.0.2 - debug: 4.3.6 + debug: 4.3.7 fs-extra: 11.2.0 transitivePeerDependencies: - supports-color @@ -11234,28 +11499,26 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.6 + debug: 4.3.7 transitivePeerDependencies: - supports-color https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.6 + debug: 4.3.7 transitivePeerDependencies: - supports-color https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.1 - debug: 4.3.6 + debug: 4.3.7 transitivePeerDependencies: - supports-color human-signals@2.1.0: {} - human-signals@5.0.0: {} - iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 @@ -11283,8 +11546,6 @@ snapshots: indent-string@4.0.0: {} - individual@2.0.0: {} - inflation@2.1.0: {} inflight@1.0.6: @@ -11485,8 +11746,6 @@ snapshots: is-stream@2.0.1: {} - is-stream@3.0.0: {} - is-string@1.0.7: dependencies: has-tostringtag: 1.0.2 @@ -11530,9 +11789,9 @@ snapshots: isexe@2.0.0: {} - isomorphic-fetch@3.0.0: + isomorphic-fetch@3.0.0(encoding@0.1.13): dependencies: - node-fetch: 2.7.0 + node-fetch: 2.7.0(encoding@0.1.13) whatwg-fetch: 3.6.20 transitivePeerDependencies: - encoding @@ -11548,7 +11807,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.6 + debug: 4.3.7 istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -11686,11 +11945,11 @@ snapshots: dependencies: readable-stream: 2.3.8 - ldapts@7.1.1: + ldapts@7.2.0: dependencies: '@types/asn1': 0.2.4 asn1: 0.2.6 - debug: 4.3.6 + debug: 4.3.7 strict-event-emitter-types: 2.0.0 uuid: 10.0.0 whatwg-url: 14.0.0 @@ -11783,7 +12042,7 @@ snapshots: lru-cache@7.18.3: {} - lru-cache@8.0.5: {} + lru.min@1.1.0: {} m3u8-parser@7.1.0: dependencies: @@ -11791,15 +12050,15 @@ snapshots: '@videojs/vhs-utils': 3.0.5 global: 4.4.0 - magic-string@0.30.10: + magic-string@0.30.11: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 magicast@0.3.4: dependencies: - '@babel/parser': 7.24.7 - '@babel/types': 7.24.6 - source-map-js: 1.2.0 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 + source-map-js: 1.2.1 make-dir@3.1.0: dependencies: @@ -11811,12 +12070,12 @@ snapshots: make-error@1.3.6: {} - mantine-react-table@2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.14.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + mantine-react-table@2.0.0-beta.6(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(@tabler/icons-react@3.16.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@mantine/core': 7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mantine/dates': 7.12.2(@mantine/core@7.12.2(@mantine/hooks@7.12.2(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.12.2(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mantine/hooks': 7.12.2(react@18.3.1) - '@tabler/icons-react': 3.14.0(react@18.3.1) + '@tabler/icons-react': 3.16.0(react@18.3.1) '@tanstack/match-sorter-utils': 8.15.1 '@tanstack/react-table': 8.19.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/react-virtual': 3.8.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -11861,8 +12120,6 @@ snapshots: mimic-fn@2.1.0: {} - mimic-fn@4.0.0: {} - mimic-response@3.1.0: {} min-document@2.19.0: @@ -11938,14 +12195,14 @@ snapshots: '@babel/runtime': 7.24.5 global: 4.4.0 - mysql2@3.11.0: + mysql2@3.11.2: dependencies: aws-ssl-profiles: 1.1.1 denque: 2.1.0 generate-function: 2.3.1 iconv-lite: 0.6.3 long: 5.2.3 - lru-cache: 8.0.5 + lru.min: 1.1.0 named-placeholders: 1.1.3 seq-queue: 0.0.5 sqlstring: 2.3.3 @@ -11971,10 +12228,10 @@ snapshots: netmask@2.0.2: {} - next-auth@5.0.0-beta.20(next@14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react@18.3.1): + next-auth@5.0.0-beta.20(next@14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0))(react@18.3.1): dependencies: '@auth/core': 0.34.2 - next: 14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) + next: 14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0) react: 18.3.1 next-international@1.2.4: @@ -11983,27 +12240,27 @@ snapshots: international-types: 0.8.1 server-only: 0.0.1 - next@14.2.8(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0): + next@14.2.11(@babel/core@7.24.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.78.0): dependencies: - '@next/env': 14.2.8 + '@next/env': 14.2.11 '@swc/helpers': 0.5.5 busboy: 1.6.0 - caniuse-lite: 1.0.30001620 + caniuse-lite: 1.0.30001660 graceful-fs: 4.2.11 postcss: 8.4.31 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) styled-jsx: 5.1.1(@babel/core@7.24.6)(react@18.3.1) optionalDependencies: - '@next/swc-darwin-arm64': 14.2.8 - '@next/swc-darwin-x64': 14.2.8 - '@next/swc-linux-arm64-gnu': 14.2.8 - '@next/swc-linux-arm64-musl': 14.2.8 - '@next/swc-linux-x64-gnu': 14.2.8 - '@next/swc-linux-x64-musl': 14.2.8 - '@next/swc-win32-arm64-msvc': 14.2.8 - '@next/swc-win32-ia32-msvc': 14.2.8 - '@next/swc-win32-x64-msvc': 14.2.8 + '@next/swc-darwin-arm64': 14.2.11 + '@next/swc-darwin-x64': 14.2.11 + '@next/swc-linux-arm64-gnu': 14.2.11 + '@next/swc-linux-arm64-musl': 14.2.11 + '@next/swc-linux-x64-gnu': 14.2.11 + '@next/swc-linux-x64-musl': 14.2.11 + '@next/swc-win32-arm64-msvc': 14.2.11 + '@next/swc-win32-ia32-msvc': 14.2.11 + '@next/swc-win32-x64-msvc': 14.2.11 sass: 1.78.0 transitivePeerDependencies: - '@babel/core' @@ -12041,9 +12298,13 @@ snapshots: node-domexception: 1.0.0 web-streams-polyfill: 3.3.3 - node-fetch@2.7.0: + node-fetch-native@1.6.4: {} + + node-fetch@2.7.0(encoding@0.1.13): dependencies: whatwg-url: 5.0.0 + optionalDependencies: + encoding: 0.1.13 node-gyp-build@4.8.1: optional: true @@ -12084,6 +12345,8 @@ snapshots: node-releases@2.0.14: {} + node-releases@2.0.18: {} + nopt@5.0.0: dependencies: abbrev: 1.1.1 @@ -12094,10 +12357,6 @@ snapshots: dependencies: path-key: 3.1.1 - npm-run-path@5.3.0: - dependencies: - path-key: 4.0.0 - npmlog@5.0.1: dependencies: are-we-there-yet: 2.0.0 @@ -12152,6 +12411,12 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.0.0 + ofetch@1.3.4: + dependencies: + destr: 2.0.3 + node-fetch-native: 1.6.4 + ufo: 1.5.4 + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -12164,10 +12429,6 @@ snapshots: dependencies: mimic-fn: 2.1.0 - onetime@6.0.0: - dependencies: - mimic-fn: 4.0.0 - openapi-path-templating@1.5.3: dependencies: apg-lite: 1.0.3 @@ -12230,7 +12491,7 @@ snapshots: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.1 - debug: 4.3.6 + debug: 4.3.7 get-uri: 6.0.3 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 @@ -12288,8 +12549,6 @@ snapshots: path-key@3.1.1: {} - path-key@4.0.0: {} - path-parse@1.0.7: {} path-scurry@1.11.1: @@ -12312,8 +12571,12 @@ snapshots: picocolors@1.0.1: {} + picocolors@1.1.0: {} + picomatch@2.3.1: {} + picomatch@4.0.2: {} + piscina@4.5.1: optionalDependencies: nice-napi: 1.0.2 @@ -12324,50 +12587,50 @@ snapshots: possible-typed-array-names@1.0.0: {} - postcss-js@4.0.1(postcss@8.4.38): + postcss-js@4.0.1(postcss@8.4.45): dependencies: camelcase-css: 2.0.1 - postcss: 8.4.38 + postcss: 8.4.45 - postcss-mixins@9.0.4(postcss@8.4.38): + postcss-mixins@9.0.4(postcss@8.4.45): dependencies: fast-glob: 3.3.2 - postcss: 8.4.38 - postcss-js: 4.0.1(postcss@8.4.38) - postcss-simple-vars: 7.0.1(postcss@8.4.38) - sugarss: 4.0.1(postcss@8.4.38) + postcss: 8.4.45 + postcss-js: 4.0.1(postcss@8.4.45) + postcss-simple-vars: 7.0.1(postcss@8.4.45) + sugarss: 4.0.1(postcss@8.4.45) - postcss-nested@6.0.1(postcss@8.4.38): + postcss-nested@6.0.1(postcss@8.4.45): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 postcss-selector-parser: 6.0.16 - postcss-preset-mantine@1.17.0(postcss@8.4.38): + postcss-preset-mantine@1.17.0(postcss@8.4.45): dependencies: - postcss: 8.4.38 - postcss-mixins: 9.0.4(postcss@8.4.38) - postcss-nested: 6.0.1(postcss@8.4.38) + postcss: 8.4.45 + postcss-mixins: 9.0.4(postcss@8.4.45) + postcss-nested: 6.0.1(postcss@8.4.45) postcss-selector-parser@6.0.16: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-simple-vars@7.0.1(postcss@8.4.38): + postcss-simple-vars@7.0.1(postcss@8.4.45): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 postcss@8.4.31: dependencies: nanoid: 3.3.7 - picocolors: 1.0.1 - source-map-js: 1.2.0 + picocolors: 1.1.0 + source-map-js: 1.2.1 - postcss@8.4.38: + postcss@8.4.45: dependencies: nanoid: 3.3.7 - picocolors: 1.0.1 - source-map-js: 1.2.0 + picocolors: 1.1.0 + source-map-js: 1.2.1 preact-render-to-string@5.2.3(preact@10.11.3): dependencies: @@ -12536,7 +12799,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.1 - debug: 4.3.6 + debug: 4.3.7 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 lru-cache: 7.18.3 @@ -12853,6 +13116,8 @@ snapshots: reusify@1.0.4: {} + rfc4648@1.5.3: {} + rimraf@3.0.2: dependencies: glob: 7.2.3 @@ -12896,7 +13161,7 @@ snapshots: rrweb-snapshot@2.0.0-alpha.17: dependencies: - postcss: 8.4.38 + postcss: 8.4.45 rrweb-snapshot@2.0.0-alpha.4: {} @@ -12917,10 +13182,6 @@ snapshots: dependencies: queue-microtask: 1.2.3 - rust-result@1.0.0: - dependencies: - individual: 2.0.0 - rxjs@6.6.7: dependencies: tslib: 1.14.1 @@ -12940,10 +13201,6 @@ snapshots: safe-buffer@5.2.1: {} - safe-json-parse@4.0.0: - dependencies: - rust-result: 1.0.0 - safe-regex-test@1.0.3: dependencies: call-bind: 1.0.7 @@ -13080,7 +13337,7 @@ snapshots: socket.io-client@4.7.5: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.5 + debug: 4.3.6 engine.io-client: 6.5.4 socket.io-parser: 4.2.4 transitivePeerDependencies: @@ -13091,14 +13348,14 @@ snapshots: socket.io-parser@4.2.4: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.6 + debug: 4.3.7 transitivePeerDependencies: - supports-color socks-proxy-agent@8.0.3: dependencies: agent-base: 7.1.1 - debug: 4.3.6 + debug: 4.3.7 socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -13110,6 +13367,8 @@ snapshots: source-map-js@1.2.0: {} + source-map-js@1.2.1: {} + source-map-support@0.5.21: dependencies: buffer-from: 1.1.2 @@ -13119,8 +13378,6 @@ snapshots: space-separated-tokens@1.1.5: {} - spawn-command@0.0.2: {} - split-ca@1.0.1: {} sprintf-js@1.0.3: {} @@ -13244,8 +13501,6 @@ snapshots: strip-final-newline@2.0.0: {} - strip-final-newline@3.0.0: {} - strip-json-comments@2.0.1: {} strip-json-comments@3.1.1: {} @@ -13261,9 +13516,9 @@ snapshots: sugar-high@0.6.1: {} - sugarss@4.0.1(postcss@8.4.38): + sugarss@4.0.1(postcss@8.4.45): dependencies: - postcss: 8.4.38 + postcss: 8.4.45 superjson@2.2.1: dependencies: @@ -13410,13 +13665,13 @@ snapshots: jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 - terser: 5.31.0 + terser: 5.32.0 webpack: 5.91.0 - terser@5.31.0: + terser@5.32.0: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.12.0 + acorn: 8.12.1 commander: 2.20.3 source-map-support: 0.5.21 @@ -13426,14 +13681,14 @@ snapshots: glob: 10.4.5 minimatch: 9.0.4 - testcontainers@10.13.0: + testcontainers@10.13.1: dependencies: '@balena/dockerignore': 1.0.2 '@types/dockerode': 3.3.31 archiver: 7.0.1 async-lock: 1.4.1 byline: 5.0.0 - debug: 4.3.6 + debug: 4.3.7 docker-compose: 0.24.8 dockerode: 3.3.5 get-port: 5.1.1 @@ -13456,10 +13711,17 @@ snapshots: through@2.3.8: {} - tinybench@2.8.0: {} + tinybench@2.9.0: {} tinycolor2@1.6.0: {} + tinyexec@0.3.0: {} + + tinyglobby@0.2.6: + dependencies: + fdir: 6.3.0(picomatch@4.0.2) + picomatch: 4.0.2 + tinygradient@1.1.5: dependencies: '@types/tinycolor2': 1.4.6 @@ -13480,11 +13742,11 @@ snapshots: no-case: 2.3.2 upper-case: 1.1.3 - tldts-core@6.1.42: {} + tldts-core@6.1.44: {} - tldts@6.1.42: + tldts@6.1.44: dependencies: - tldts-core: 6.1.42 + tldts-core: 6.1.44 tmp@0.0.33: dependencies: @@ -13539,10 +13801,10 @@ snapshots: triple-beam@1.4.1: {} - trpc-swagger@1.2.6(patch_hash=6s72z7zx33c52iesv5sewipn6i)(@trpc/client@11.0.0-rc.498(@trpc/server@11.0.0-rc.498))(@trpc/server@11.0.0-rc.498)(zod@3.23.8): + trpc-swagger@1.2.6(patch_hash=6s72z7zx33c52iesv5sewipn6i)(@trpc/client@11.0.0-rc.502(@trpc/server@11.0.0-rc.502))(@trpc/server@11.0.0-rc.502)(zod@3.23.8): dependencies: - '@trpc/client': 11.0.0-rc.498(@trpc/server@11.0.0-rc.498) - '@trpc/server': 11.0.0-rc.498 + '@trpc/client': 11.0.0-rc.502(@trpc/server@11.0.0-rc.502) + '@trpc/server': 11.0.0-rc.502 chalk-scripts: 1.2.8 co-body: 6.2.0 lodash.clonedeep: 4.5.0 @@ -13551,13 +13813,13 @@ snapshots: zod: 3.23.8 zod-to-json-schema: 3.23.0(zod@3.23.8) - ts-api-utils@1.3.0(typescript@5.5.4): + ts-api-utils@1.3.0(typescript@5.6.2): dependencies: - typescript: 5.5.4 + typescript: 5.6.2 ts-mixer@6.0.4: {} - ts-node@10.9.2(@types/node@20.16.5)(typescript@5.5.4): + ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -13565,21 +13827,21 @@ snapshots: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 '@types/node': 20.16.5 - acorn: 8.12.0 + acorn: 8.12.1 acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.5.4 + typescript: 5.6.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 ts-toolbelt@9.6.0: {} - tsconfck@3.0.3(typescript@5.5.4): + tsconfck@3.0.3(typescript@5.6.2): optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 tsconfig-paths@3.15.0: dependencies: @@ -13605,32 +13867,32 @@ snapshots: dependencies: safe-buffer: 5.2.1 - turbo-darwin-64@2.1.1: + turbo-darwin-64@2.1.2: optional: true - turbo-darwin-arm64@2.1.1: + turbo-darwin-arm64@2.1.2: optional: true - turbo-linux-64@2.1.1: + turbo-linux-64@2.1.2: optional: true - turbo-linux-arm64@2.1.1: + turbo-linux-arm64@2.1.2: optional: true - turbo-windows-64@2.1.1: + turbo-windows-64@2.1.2: optional: true - turbo-windows-arm64@2.1.1: + turbo-windows-arm64@2.1.2: optional: true - turbo@2.1.1: + turbo@2.1.2: optionalDependencies: - turbo-darwin-64: 2.1.1 - turbo-darwin-arm64: 2.1.1 - turbo-linux-64: 2.1.1 - turbo-linux-arm64: 2.1.1 - turbo-windows-64: 2.1.1 - turbo-windows-arm64: 2.1.1 + turbo-darwin-64: 2.1.2 + turbo-darwin-arm64: 2.1.2 + turbo-linux-64: 2.1.2 + turbo-linux-arm64: 2.1.2 + turbo-windows-64: 2.1.2 + turbo-windows-arm64: 2.1.2 tweetnacl@0.14.5: {} @@ -13681,6 +13943,8 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 + typed-rpc@5.1.0: {} + typedarray-to-buffer@3.1.5: dependencies: is-typedarray: 1.0.0 @@ -13689,24 +13953,28 @@ snapshots: dependencies: ts-toolbelt: 9.6.0 - typescript-eslint@8.4.0(eslint@9.9.1)(typescript@5.5.4): + typescript-eslint@8.5.0(eslint@9.10.0)(typescript@5.6.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - eslint - supports-color - typescript@5.5.4: {} + typescript@5.6.2: {} uc.micro@2.1.0: {} + ufo@1.5.4: {} + uglify-js@3.17.4: optional: true + uint8array-extras@1.4.0: {} + unbox-primitive@1.0.2: dependencies: call-bind: 1.0.7 @@ -13746,15 +14014,21 @@ snapshots: update-browserslist-db@1.0.16(browserslist@4.23.0): dependencies: browserslist: 4.23.0 - escalade: 3.1.2 - picocolors: 1.0.1 + escalade: 3.2.0 + picocolors: 1.1.0 + + update-browserslist-db@1.1.0(browserslist@4.23.3): + dependencies: + browserslist: 4.23.3 + escalade: 3.2.0 + picocolors: 1.1.0 update-check@1.5.4: dependencies: registry-auth-token: 3.3.2 registry-url: 3.1.0 - update-notifier-cjs@5.1.6: + update-notifier-cjs@5.1.6(encoding@0.1.13): dependencies: boxen: 5.1.2 chalk: 4.1.2 @@ -13765,7 +14039,7 @@ snapshots: is-installed-globally: 0.4.0 is-npm: 5.0.0 is-yarn-global: 0.3.0 - isomorphic-fetch: 3.0.0 + isomorphic-fetch: 3.0.0(encoding@0.1.13) pupa: 2.1.1 registry-auth-token: 5.0.2 registry-url: 5.1.0 @@ -13846,10 +14120,10 @@ snapshots: validate-npm-package-name@5.0.1: {} - video.js@8.17.3: + video.js@8.17.4: dependencies: '@babel/runtime': 7.24.5 - '@videojs/http-streaming': 3.13.2(video.js@8.17.3) + '@videojs/http-streaming': 3.13.3(video.js@8.17.4) '@videojs/vhs-utils': 4.0.0 '@videojs/xhr': 2.7.0 aes-decrypter: 4.0.1 @@ -13857,15 +14131,14 @@ snapshots: m3u8-parser: 7.1.0 mpd-parser: 1.3.0 mux.js: 7.0.3 - safe-json-parse: 4.0.0 - videojs-contrib-quality-levels: 4.1.0(video.js@8.17.3) + videojs-contrib-quality-levels: 4.1.0(video.js@8.17.4) videojs-font: 4.2.0 videojs-vtt.js: 0.15.5 - videojs-contrib-quality-levels@4.1.0(video.js@8.17.3): + videojs-contrib-quality-levels@4.1.0(video.js@8.17.4): dependencies: global: 4.4.0 - video.js: 8.17.3 + video.js: 8.17.4 videojs-font@4.2.0: {} @@ -13873,13 +14146,12 @@ snapshots: dependencies: global: 4.4.0 - vite-node@2.0.5(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0): + vite-node@2.1.1(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0): dependencies: cac: 6.7.14 - debug: 4.3.6 + debug: 4.3.7 pathe: 1.1.2 - tinyrainbow: 1.2.0 - vite: 5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0) + vite: 5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0) transitivePeerDependencies: - '@types/node' - less @@ -13890,57 +14162,58 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.5.4)(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0)): + vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0)): dependencies: debug: 4.3.5 globrex: 0.1.2 - tsconfck: 3.0.3(typescript@5.5.4) + tsconfck: 3.0.3(typescript@5.6.2) optionalDependencies: - vite: 5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0) + vite: 5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0) transitivePeerDependencies: - supports-color - typescript - vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0): + vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0): dependencies: esbuild: 0.20.2 - postcss: 8.4.38 + postcss: 8.4.45 rollup: 4.17.2 optionalDependencies: '@types/node': 20.16.5 fsevents: 2.3.3 sass: 1.78.0 - sugarss: 4.0.1(postcss@8.4.38) - terser: 5.31.0 + sugarss: 4.0.1(postcss@8.4.45) + terser: 5.32.0 - vitest@2.0.5(@types/node@20.16.5)(@vitest/ui@2.0.5)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0): + vitest@2.1.1(@types/node@20.16.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0): dependencies: - '@ampproject/remapping': 2.3.0 - '@vitest/expect': 2.0.5 - '@vitest/pretty-format': 2.0.5 - '@vitest/runner': 2.0.5 - '@vitest/snapshot': 2.0.5 - '@vitest/spy': 2.0.5 - '@vitest/utils': 2.0.5 + '@vitest/expect': 2.1.1 + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0)) + '@vitest/pretty-format': 2.1.1 + '@vitest/runner': 2.1.1 + '@vitest/snapshot': 2.1.1 + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 chai: 5.1.1 - debug: 4.3.5 - execa: 8.0.1 - magic-string: 0.30.10 + debug: 4.3.7 + magic-string: 0.30.11 pathe: 1.1.2 std-env: 3.7.0 - tinybench: 2.8.0 + tinybench: 2.9.0 + tinyexec: 0.3.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 - vite: 5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0) - vite-node: 2.0.5(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.38))(terser@5.31.0) + vite: 5.2.11(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0) + vite-node: 2.1.1(@types/node@20.16.5)(sass@1.78.0)(sugarss@4.0.1(postcss@8.4.45))(terser@5.32.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.16.5 - '@vitest/ui': 2.0.5(vitest@2.0.5) + '@vitest/ui': 2.1.1(vitest@2.1.1) jsdom: 25.0.0 transitivePeerDependencies: - less - lightningcss + - msw - sass - stylus - sugarss @@ -13953,7 +14226,7 @@ snapshots: dependencies: xml-name-validator: 5.0.0 - watchpack@2.4.1: + watchpack@2.4.2: dependencies: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 @@ -13982,12 +14255,12 @@ snapshots: '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/wasm-edit': 1.12.1 '@webassemblyjs/wasm-parser': 1.12.1 - acorn: 8.12.0 - acorn-import-assertions: 1.9.0(acorn@8.12.0) - browserslist: 4.23.0 + acorn: 8.12.1 + acorn-import-assertions: 1.9.0(acorn@8.12.1) + browserslist: 4.23.3 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.16.1 - es-module-lexer: 1.5.3 + enhanced-resolve: 5.17.1 + es-module-lexer: 1.5.4 eslint-scope: 5.1.1 events: 3.3.0 glob-to-regexp: 0.4.1 @@ -13999,7 +14272,7 @@ snapshots: schema-utils: 3.3.0 tapable: 2.2.1 terser-webpack-plugin: 5.3.10(webpack@5.91.0) - watchpack: 2.4.1 + watchpack: 2.4.2 webpack-sources: 3.2.3 transitivePeerDependencies: - '@swc/core' @@ -14165,7 +14438,7 @@ snapshots: yargs@17.7.2: dependencies: cliui: 8.0.1 - escalade: 3.1.2 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 @@ -14184,6 +14457,10 @@ snapshots: compress-commons: 6.0.2 readable-stream: 4.5.2 + zod-form-data@2.0.2(zod@3.23.8): + dependencies: + zod: 3.23.8 + zod-to-json-schema@3.23.0(zod@3.23.8): dependencies: zod: 3.23.8 diff --git a/tooling/eslint/package.json b/tooling/eslint/package.json index e08564a53..0184d30b2 100644 --- a/tooling/eslint/package.json +++ b/tooling/eslint/package.json @@ -16,20 +16,20 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@next/eslint-plugin-next": "^14.2.8", + "@next/eslint-plugin-next": "^14.2.11", "eslint-config-prettier": "^9.1.0", - "eslint-config-turbo": "^2.1.1", + "eslint-config-turbo": "^2.1.2", "eslint-plugin-import": "^2.30.0", "eslint-plugin-jsx-a11y": "^6.10.0", - "eslint-plugin-react": "^7.35.2", + "eslint-plugin-react": "^7.36.1", "eslint-plugin-react-hooks": "^4.6.2", - "typescript-eslint": "^8.4.0" + "typescript-eslint": "^8.5.0" }, "devDependencies": { "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.9.1", - "typescript": "^5.5.4" + "eslint": "^9.10.0", + "typescript": "^5.6.2" }, "prettier": "@homarr/prettier-config" } diff --git a/tooling/prettier/package.json b/tooling/prettier/package.json index 7a27f2286..55461d536 100644 --- a/tooling/prettier/package.json +++ b/tooling/prettier/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@homarr/tsconfig": "workspace:^0.1.0", - "typescript": "^5.5.4" + "typescript": "^5.6.2" }, "prettier": "@homarr/prettier-config" } diff --git a/turbo/generators/templates/package.json.hbs b/turbo/generators/templates/package.json.hbs index cd72632c4..f49557ca7 100644 --- a/turbo/generators/templates/package.json.hbs +++ b/turbo/generators/templates/package.json.hbs @@ -24,7 +24,7 @@ "@homarr/eslint-config": "workspace:^0.2.0", "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "^9.8.0", + "eslint": "^9.9.1", "typescript": "^5.5.4" }, "prettier": "@homarr/prettier-config"