Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbebf494bb | ||
|
|
d9873355b7 | ||
|
|
bac28d9e1c | ||
|
|
7a4de03c0e | ||
|
|
68f8e8146b | ||
|
|
1297e6c2ac | ||
|
|
31288dcbfe | ||
|
|
fc2c251557 | ||
|
|
d067261171 | ||
|
|
ae2f05c834 | ||
|
|
c7fa7cdb50 | ||
|
|
0c28224e82 | ||
|
|
4e6272dbe2 | ||
|
|
f5bc090d36 | ||
|
|
f23e06dff1 | ||
|
|
24188ce51f | ||
|
|
e31f60fdec | ||
|
|
6bb547f3c5 | ||
|
|
b07cc14d0e | ||
|
|
0dc93c1a02 | ||
|
|
00661c9b3d |
No files matched your search
+8
-1
@@ -59,4 +59,11 @@ TURBO_TELEMETRY_DISABLED=1
|
||||
# ENABLE_KUBERNETES=true
|
||||
|
||||
# Enable mock integration
|
||||
UNSAFE_ENABLE_MOCK_INTEGRATION=true
|
||||
UNSAFE_ENABLE_MOCK_INTEGRATION=true
|
||||
|
||||
# Enable demo mode (seeds a demo user "demo"/"demo", a sample board and a mock integration)
|
||||
# DEMO_MODE=true
|
||||
|
||||
# Whether demo mode is read-only. Defaults to true (the public demo blocks all mutations).
|
||||
# Set to false for writable preview deployments so the demo user can modify the dashboard.
|
||||
# DEMO_READ_ONLY=false
|
||||
@@ -25,7 +25,7 @@ env:
|
||||
|
||||
jobs:
|
||||
lint-format-autofix:
|
||||
if: github.event_name == 'pull_request'
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.id == github.repository_id
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
// Algolia DocSearch crawler for homarr.dev
|
||||
// Crawler ID: cd77a285-2756-4557-bf21-ee703748df15
|
||||
// DocSearch-managed crawlers: paste this in the Algolia crawler editor or send to DocSearch support.
|
||||
// Template: https://docsearch.algolia.com/docs/templates/#docusaurus-v3-template
|
||||
// Markdown indexing: https://www.algolia.com/doc/guides/algolia-ai/askai/guides/markdown-indexing
|
||||
// Paste this in the Algolia crawler editor.
|
||||
|
||||
new Crawler({
|
||||
appId: "N69WSPZTID",
|
||||
apiKey: "YOUR_CRAWLER_ADMIN_API_KEY",
|
||||
rateLimit: 8,
|
||||
maxDepth: 10,
|
||||
indexPrefix: "",
|
||||
rateLimit: 32,
|
||||
maxDepth: 4,
|
||||
startUrls: ["https://homarr.dev/"],
|
||||
sitemaps: ["https://homarr.dev/sitemap.xml"],
|
||||
ignoreCanonicalTo: true,
|
||||
discoveryPatterns: ["https://homarr.dev/**"],
|
||||
exclusionPatterns: [
|
||||
"https://homarr.dev/docs/tags/**",
|
||||
"https://homarr.dev/blog/tags/**",
|
||||
"https://homarr.dev/blog/authors/**",
|
||||
"https://homarr.dev/blog/archive/**",
|
||||
"https://homarr.dev/search/**",
|
||||
"https://homarr.dev/docs/category/**",
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
indexName: "Docusaurus",
|
||||
@@ -105,7 +112,6 @@ new Crawler({
|
||||
advancedSyntax: true,
|
||||
attributeCriteriaComputedByMinProximity: true,
|
||||
removeWordsIfNoResults: "allOptional",
|
||||
separatorsToIndex: "_",
|
||||
},
|
||||
markdown: {
|
||||
attributesForFaceting: ["lang", "language", "version", "docusaurus_tag"],
|
||||
@@ -119,4 +125,10 @@ new Crawler({
|
||||
advancedSyntax: false,
|
||||
},
|
||||
},
|
||||
apiKey: "YOUR_CRAWLER_ADMIN_API_KEY",
|
||||
schedule: "on saturday",
|
||||
renderJavaScript: false,
|
||||
maxUrls: null,
|
||||
cache: { enabled: false },
|
||||
safetyChecks: { beforeIndexPublishing: { maxLostRecordsPercentage: 99 } },
|
||||
});
|
||||
@@ -8,7 +8,7 @@ const config: Config = {
|
||||
tagline: "A simple yet powerful dashboard for your server.",
|
||||
url: "https://homarr.dev",
|
||||
baseUrl: "/",
|
||||
trailingSlash: true,
|
||||
trailingSlash: undefined,
|
||||
favicon: "img/logo.png",
|
||||
organizationName: "homarr-labs",
|
||||
projectName: "homarr",
|
||||
@@ -79,8 +79,27 @@ const config: Config = {
|
||||
sitemap: {
|
||||
changefreq: "weekly",
|
||||
priority: 0.5,
|
||||
ignorePatterns: ["/tags/**"],
|
||||
ignorePatterns: ["/tags/**", "/docs/category/**"],
|
||||
filename: "sitemap.xml",
|
||||
createSitemapItems: async ({ routes, siteConfig, defaultCreateSitemapItems }) => {
|
||||
const items = await defaultCreateSitemapItems({ routes, siteConfig });
|
||||
return items.map((item) => {
|
||||
const path = new URL(item.url).pathname;
|
||||
if (path === "/" || path === "") {
|
||||
return { ...item, priority: 1.0, changefreq: "weekly" };
|
||||
}
|
||||
if (path.startsWith("/docs/")) {
|
||||
return { ...item, priority: 0.7, changefreq: "monthly" };
|
||||
}
|
||||
if (path.startsWith("/blog/")) {
|
||||
return { ...item, priority: 0.3, changefreq: "never" };
|
||||
}
|
||||
if (path.startsWith("/about-us")) {
|
||||
return { ...item, priority: 0.4, changefreq: "yearly" };
|
||||
}
|
||||
return item;
|
||||
});
|
||||
},
|
||||
},
|
||||
} satisfies Preset.Options,
|
||||
],
|
||||
|
||||
@@ -123,9 +123,9 @@ async function QueryCacheHydration({ userId, boardId }: { userId: string; boardI
|
||||
const serialized = await getQueryCacheAsync(userId, boardId);
|
||||
if (!serialized) return null;
|
||||
|
||||
const persisted = superjson.parse<PersistedClient>(serialized);
|
||||
if (persisted.buster !== queryCacheBuster) return null;
|
||||
if (!persisted?.clientState?.queries?.length) return null;
|
||||
const persisted = superjson.parse<PersistedClient | undefined>(serialized);
|
||||
if (!persisted || persisted.buster !== queryCacheBuster) return null;
|
||||
if (!persisted.clientState?.queries?.length) return null;
|
||||
|
||||
return <HydrationBoundary state={persisted.clientState} />;
|
||||
} catch (error) {
|
||||
|
||||
@@ -45,7 +45,9 @@ export const BoardContentHeaderActions = () => {
|
||||
const [isEditMode] = useEditMode();
|
||||
const board = useRequiredBoard();
|
||||
const { hasChangeAccess } = useBoardPermissions(board);
|
||||
const { data: demoMode, isLoading } = clientApi.info.isDemoMode.useQuery();
|
||||
// Fall back to read-only if the query has no data (e.g. errored) so we never expose
|
||||
// edit/save/settings UI that would then fail server-side.
|
||||
const { data: demoReadOnly = true, isLoading } = clientApi.info.isDemoReadOnly.useQuery();
|
||||
|
||||
if (!hasChangeAccess || isLoading) {
|
||||
return <SelectBoardsMenu />;
|
||||
@@ -55,9 +57,9 @@ export const BoardContentHeaderActions = () => {
|
||||
<>
|
||||
{isEditMode && <AddMenu />}
|
||||
|
||||
<EditModeMenu demoMode={demoMode ?? false} />
|
||||
<EditModeMenu demoReadOnly={demoReadOnly} />
|
||||
|
||||
{!demoMode && (
|
||||
{!demoReadOnly && (
|
||||
<OnboardingTour.Target id="board-settings">
|
||||
<HeaderButton href={`/boards/${board.name}/settings`}>
|
||||
<IconSettings stroke={1.5} />
|
||||
@@ -158,7 +160,7 @@ const AddMenu = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const EditModeMenu = ({ demoMode }: { demoMode: boolean }) => {
|
||||
const EditModeMenu = ({ demoReadOnly }: { demoReadOnly: boolean }) => {
|
||||
const [isEditMode, { open, close }] = useEditMode();
|
||||
const board = useRequiredBoard();
|
||||
const utils = clientApi.useUtils();
|
||||
@@ -188,11 +190,11 @@ const EditModeMenu = ({ demoMode }: { demoMode: boolean }) => {
|
||||
|
||||
const toggle = useCallback(() => {
|
||||
if (isEditMode) {
|
||||
if (demoMode) return discardDemoChanges();
|
||||
if (demoReadOnly) return discardDemoChanges();
|
||||
return saveBoard(board);
|
||||
}
|
||||
open();
|
||||
}, [board, isEditMode, demoMode, saveBoard, open, discardDemoChanges]);
|
||||
}, [board, isEditMode, demoReadOnly, saveBoard, open, discardDemoChanges]);
|
||||
|
||||
useHotkeys([[hotkeys.toggleBoardEdit, toggle]]);
|
||||
usePreventLeaveWithDirty(isEditMode);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import type { MutableRefObject, ReactNode } from "react";
|
||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import { Group, Menu, Switch, Text } from "@mantine/core";
|
||||
import { Group, Loader, Menu, Switch, Text } from "@mantine/core";
|
||||
import { IconCopy, IconLayoutKanban, IconRefresh, IconSettings, IconTrash } from "@tabler/icons-react";
|
||||
import type { QueryClient } from "@tanstack/react-query";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { useIsFetching, useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
import { clientApi } from "@homarr/api/client";
|
||||
import { useSession } from "@homarr/auth/client";
|
||||
@@ -50,8 +50,9 @@ export const WidgetContextMenu = ({ item, widgetStateRef, children }: WidgetCont
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const widgetQueryKey = useMemo(() => [["widget", item.kind]], [item.kind]);
|
||||
const isWidgetFetching = useIsFetching({ queryKey: widgetQueryKey }) > 0;
|
||||
const handleRefetch = useCallback(() => {
|
||||
void queryClient.invalidateQueries({ queryKey: widgetQueryKey });
|
||||
void queryClient.refetchQueries({ queryKey: widgetQueryKey, type: "all" });
|
||||
}, [queryClient, widgetQueryKey]);
|
||||
|
||||
const options = useMemo(
|
||||
@@ -223,11 +224,15 @@ export const WidgetContextMenu = ({ item, widgetStateRef, children }: WidgetCont
|
||||
|
||||
<>
|
||||
{(toggleOptions.length > 0 || visibleWidgetActions.length > 0 || isEditMode) && <Menu.Divider />}
|
||||
<Menu.Item closeMenuOnClick leftSection={<IconRefresh size={16} />} onClick={handleRefetch}>
|
||||
<Menu.Item
|
||||
leftSection={isWidgetFetching ? <Loader size={16} /> : <IconRefresh size={16} />}
|
||||
onClick={handleRefetch}
|
||||
disabled={isWidgetFetching}
|
||||
>
|
||||
<Group justify="space-between" wrap="nowrap">
|
||||
{tMenu("refresh")}
|
||||
<Text size="xs" c="dimmed">
|
||||
<WidgetCacheAge queryClient={queryClient} queryKey={widgetQueryKey} />
|
||||
<WidgetCacheAge queryClient={queryClient} queryKey={widgetQueryKey} isFetching={isWidgetFetching} />
|
||||
</Text>
|
||||
</Group>
|
||||
</Menu.Item>
|
||||
@@ -265,13 +270,24 @@ export const WidgetContextMenu = ({ item, widgetStateRef, children }: WidgetCont
|
||||
);
|
||||
};
|
||||
|
||||
const WidgetCacheAge = ({ queryClient, queryKey }: { queryClient: QueryClient; queryKey: unknown[] }) => {
|
||||
const WidgetCacheAge = ({
|
||||
queryClient,
|
||||
queryKey,
|
||||
isFetching,
|
||||
}: {
|
||||
queryClient: QueryClient;
|
||||
queryKey: unknown[];
|
||||
isFetching: boolean;
|
||||
}) => {
|
||||
// 1s tick for "just now" → "1s ago" label transition; isFetching prop handles refetch reactivity
|
||||
const [, setTick] = useState(0);
|
||||
useEffect(() => {
|
||||
const id = setInterval(() => setTick((n) => n + 1), 1000);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
if (isFetching) return <Loader size={12} />;
|
||||
|
||||
const timestamps = queryClient
|
||||
.getQueryCache()
|
||||
.findAll({ queryKey })
|
||||
|
||||
@@ -6,9 +6,11 @@ export const env = createEnv({
|
||||
server: {
|
||||
KUBERNETES_SERVICE_ACCOUNT_NAME: z.string().optional(),
|
||||
DEMO_MODE: createBooleanSchema(false),
|
||||
DEMO_READ_ONLY: createBooleanSchema(true),
|
||||
},
|
||||
runtimeEnv: {
|
||||
KUBERNETES_SERVICE_ACCOUNT_NAME: process.env.KUBERNETES_SERVICE_ACCOUNT_NAME,
|
||||
DEMO_MODE: process.env.DEMO_MODE,
|
||||
DEMO_READ_ONLY: process.env.DEMO_READ_ONLY,
|
||||
},
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
import z from "zod/v4";
|
||||
|
||||
import packageJson from "../../../../package.json";
|
||||
import { createTRPCRouter, isDemoMode, publicProcedure, protectedProcedure } from "../trpc";
|
||||
import { createTRPCRouter, isDemoMode, isDemoReadOnly, publicProcedure, protectedProcedure } from "../trpc";
|
||||
|
||||
export const infoRouter = createTRPCRouter({
|
||||
getInfo: protectedProcedure
|
||||
@@ -20,4 +20,5 @@ export const infoRouter = createTRPCRouter({
|
||||
};
|
||||
}),
|
||||
isDemoMode: publicProcedure.query(() => isDemoMode),
|
||||
isDemoReadOnly: publicProcedure.query(() => isDemoReadOnly),
|
||||
});
|
||||
@@ -95,8 +95,12 @@ export const createTRPCRouter = t.router;
|
||||
|
||||
export const isDemoMode = env.DEMO_MODE;
|
||||
|
||||
// The public "real demo" (demo + mock integrations) stays read-only, while preview
|
||||
// deployments run with DEMO_MODE + DEMO_READ_ONLY=false to allow mutations.
|
||||
export const isDemoReadOnly = env.DEMO_MODE && env.DEMO_READ_ONLY;
|
||||
|
||||
const enforceDemoModeReadOnly = t.middleware(({ ctx, next, type }) => {
|
||||
if (env.DEMO_MODE && type === "mutation") {
|
||||
if (isDemoReadOnly && type === "mutation") {
|
||||
throw new TRPCError({
|
||||
code: "FORBIDDEN",
|
||||
message: "Mutations are disabled in demo mode",
|
||||
@@ -105,7 +109,7 @@ const enforceDemoModeReadOnly = t.middleware(({ ctx, next, type }) => {
|
||||
return next({ ctx });
|
||||
});
|
||||
|
||||
const baseProcedure = env.DEMO_MODE ? t.procedure.use(enforceDemoModeReadOnly) : t.procedure;
|
||||
const baseProcedure = isDemoReadOnly ? t.procedure.use(enforceDemoModeReadOnly) : t.procedure;
|
||||
|
||||
/**
|
||||
* Public (unauthed) procedure
|
||||
|
||||
@@ -60,8 +60,8 @@ export type HomarrDocumentationPath =
|
||||
| "/docs/tags/connections"
|
||||
| "/docs/tags/custom-widgets"
|
||||
| "/docs/tags/customization"
|
||||
| "/docs/tags/data-sources"
|
||||
| "/docs/tags/data"
|
||||
| "/docs/tags/data-sources"
|
||||
| "/docs/tags/database"
|
||||
| "/docs/tags/developer"
|
||||
| "/docs/tags/development"
|
||||
@@ -99,8 +99,8 @@ export type HomarrDocumentationPath =
|
||||
| "/docs/tags/redis"
|
||||
| "/docs/tags/responsive"
|
||||
| "/docs/tags/roles"
|
||||
| "/docs/tags/search-engines"
|
||||
| "/docs/tags/search"
|
||||
| "/docs/tags/search-engines"
|
||||
| "/docs/tags/secrets"
|
||||
| "/docs/tags/security"
|
||||
| "/docs/tags/self-signed"
|
||||
@@ -132,15 +132,6 @@ export type HomarrDocumentationPath =
|
||||
| "/docs/advanced/running-as-different-user"
|
||||
| "/docs/advanced/single-sign-on"
|
||||
| "/docs/advanced/styling"
|
||||
| "/docs/category/advanced"
|
||||
| "/docs/category/community"
|
||||
| "/docs/category/developer-guides"
|
||||
| "/docs/category/getting-started"
|
||||
| "/docs/category/installation-1"
|
||||
| "/docs/category/installation"
|
||||
| "/docs/category/integrations"
|
||||
| "/docs/category/management"
|
||||
| "/docs/category/widgets"
|
||||
| "/docs/community/donate"
|
||||
| "/docs/community/faq"
|
||||
| "/docs/community/get-in-touch"
|
||||
|
||||
@@ -46,7 +46,7 @@ const gluetunServerSelectionSchema = z.object({
|
||||
isps: z.array(z.string()).nullable(),
|
||||
names: z.array(z.string()).nullable(),
|
||||
numbers: z.array(z.number()).nullable(),
|
||||
hostnames: z.array(z.string()),
|
||||
hostnames: z.array(z.string()).nullable(),
|
||||
owned_only: z.boolean(),
|
||||
free_only: z.boolean(),
|
||||
premium_only: z.boolean(),
|
||||
@@ -65,7 +65,7 @@ const gluetunPortForwardingSchema = z.object({
|
||||
status_file_path: z.string(),
|
||||
up_command: z.string(),
|
||||
down_command: z.string(),
|
||||
listening_port: z.number(),
|
||||
listening_port: z.union([z.number(), z.array(z.number())]),
|
||||
username: z.string(),
|
||||
password: z.string(),
|
||||
});
|
||||
@@ -98,7 +98,7 @@ const gluetunOpenvpnSettingsSchema = z.object({
|
||||
const gluetunWireguardSettingsSchema = z.object({
|
||||
private_key: z.string(),
|
||||
pre_shared_key: z.string(),
|
||||
addresses: z.array(z.string()),
|
||||
addresses: z.array(z.string()).nullable(),
|
||||
allowed_ips: z.array(z.string()),
|
||||
interface: z.string(),
|
||||
persistent_keep_alive_interval: z.number(),
|
||||
|
||||
@@ -124,6 +124,126 @@ const VPN_SETTINGS_PAYLOAD = {
|
||||
},
|
||||
};
|
||||
|
||||
const ALT_VPN_SETTINGS_PAYLOAD = {
|
||||
type: "openvpn",
|
||||
provider: {
|
||||
name: "custom",
|
||||
server_selection: {
|
||||
vpn: "openvpn",
|
||||
countries: null,
|
||||
categories: null,
|
||||
regions: null,
|
||||
cities: null,
|
||||
isps: null,
|
||||
names: null,
|
||||
numbers: null,
|
||||
hostnames: null,
|
||||
owned_only: false,
|
||||
free_only: false,
|
||||
premium_only: false,
|
||||
stream_only: false,
|
||||
multi_hop_only: false,
|
||||
port_forward_only: false,
|
||||
secure_core_only: false,
|
||||
tor_only: false,
|
||||
openvpn: {
|
||||
config_file_path: "/gluetun/custom.conf",
|
||||
protocol: "tcp",
|
||||
endpoint_ip: "0.0.0.0",
|
||||
custom_port: 0,
|
||||
pia_encryption_preset: "",
|
||||
},
|
||||
wireguard: {
|
||||
endpoint_ip: "0.0.0.0",
|
||||
endpoint_port: 0,
|
||||
public_key: "",
|
||||
},
|
||||
},
|
||||
port_forwarding: {
|
||||
enabled: false,
|
||||
provider: "",
|
||||
status_file_path: "/tmp/gluetun/forwarded_port",
|
||||
up_command: "",
|
||||
down_command: "",
|
||||
listening_port: [0],
|
||||
ports_count: 0,
|
||||
username: "",
|
||||
password: "",
|
||||
},
|
||||
},
|
||||
amneziawg: {
|
||||
wireguard: {
|
||||
private_key: "",
|
||||
pre_shared_key: "",
|
||||
addresses: null,
|
||||
allowed_ips: ["0.0.0.0/0", "::/0"],
|
||||
interface: "tun0",
|
||||
persistent_keep_alive_interval: 0,
|
||||
mtu: 0,
|
||||
implementation: "userspace",
|
||||
},
|
||||
junk_packet_count: 0,
|
||||
junk_packet_min: 0,
|
||||
junk_packet_max: 0,
|
||||
padding_s1: 0,
|
||||
padding_s2: 0,
|
||||
padding_s3: 0,
|
||||
padding_s4: 0,
|
||||
header_h1: "",
|
||||
header_h2: "",
|
||||
header_h3: "",
|
||||
header_h4: "",
|
||||
init_packet_i1: "",
|
||||
init_packet_i2: "",
|
||||
init_packet_i3: "",
|
||||
init_packet_i4: "",
|
||||
init_packet_i5: "",
|
||||
},
|
||||
openvpn: {
|
||||
version: "2.6",
|
||||
user: "",
|
||||
password: "",
|
||||
config_file_path: "/gluetun/custom.conf",
|
||||
ciphers: null,
|
||||
auth: "",
|
||||
cert: "",
|
||||
key: "",
|
||||
encrypted_key: "",
|
||||
key_passphrase: "",
|
||||
pia_encryption_preset: "",
|
||||
mssfix: 0,
|
||||
interface: "tun0",
|
||||
process_user: "nonrootuser",
|
||||
verbosity: 1,
|
||||
flags: null,
|
||||
},
|
||||
wireguard: {
|
||||
private_key: "",
|
||||
pre_shared_key: "",
|
||||
addresses: null,
|
||||
allowed_ips: ["0.0.0.0/0", "::/0"],
|
||||
interface: "tun0",
|
||||
persistent_keep_alive_interval: 0,
|
||||
mtu: 0,
|
||||
implementation: "auto",
|
||||
},
|
||||
pmtud: {
|
||||
icmp_addresses: ["1.1.1.1", "8.8.8.8"],
|
||||
tcp_addresses: [
|
||||
"1.1.1.1:443",
|
||||
"8.8.8.8:443",
|
||||
"1.1.1.1:53",
|
||||
"8.8.8.8:53",
|
||||
"[2606:4700:4700::1111]:53",
|
||||
"[2001:4860:4860::8888]:53",
|
||||
"[2606:4700:4700::1111]:443",
|
||||
"[2001:4860:4860::8888]:443",
|
||||
],
|
||||
},
|
||||
up_command: "",
|
||||
down_command: "",
|
||||
};
|
||||
|
||||
const jsonResponse = (body: unknown, init: ResponseInit = { status: 200 }): FetchResponse =>
|
||||
new Response(JSON.stringify(body), {
|
||||
...init,
|
||||
@@ -368,4 +488,54 @@ describe("gluetun schemas", () => {
|
||||
test("vpn settings schema rejects a non-string type", () => {
|
||||
expect(() => gluetunVpnSettingsSchema.parse({ ...VPN_SETTINGS_PAYLOAD, type: 1 })).toThrow();
|
||||
});
|
||||
|
||||
test("vpn settings schema parses the live gluetun-latest custom/OpenVPN payload", () => {
|
||||
const parsed = gluetunVpnSettingsSchema.parse(ALT_VPN_SETTINGS_PAYLOAD);
|
||||
expect(parsed.type).toBe("openvpn");
|
||||
expect(parsed.provider.name).toBe("custom");
|
||||
});
|
||||
|
||||
test("vpn settings schema accepts null server-selection hostnames", () => {
|
||||
const payload = {
|
||||
...VPN_SETTINGS_PAYLOAD,
|
||||
provider: {
|
||||
...VPN_SETTINGS_PAYLOAD.provider,
|
||||
server_selection: {
|
||||
...VPN_SETTINGS_PAYLOAD.provider.server_selection,
|
||||
hostnames: null,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
expect(() => gluetunVpnSettingsSchema.parse(payload)).not.toThrow();
|
||||
});
|
||||
|
||||
test("vpn settings schema accepts listening_port as a number or a list", () => {
|
||||
const asList = {
|
||||
...VPN_SETTINGS_PAYLOAD,
|
||||
provider: {
|
||||
...VPN_SETTINGS_PAYLOAD.provider,
|
||||
port_forwarding: {
|
||||
...VPN_SETTINGS_PAYLOAD.provider.port_forwarding,
|
||||
listening_port: [0],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// The happy-path fixture already exercises the scalar form (listening_port: 0).
|
||||
expect(() => gluetunVpnSettingsSchema.parse(VPN_SETTINGS_PAYLOAD)).not.toThrow();
|
||||
expect(() => gluetunVpnSettingsSchema.parse(asList)).not.toThrow();
|
||||
});
|
||||
|
||||
test("vpn settings schema accepts null wireguard addresses", () => {
|
||||
const payload = {
|
||||
...VPN_SETTINGS_PAYLOAD,
|
||||
wireguard: {
|
||||
...VPN_SETTINGS_PAYLOAD.wireguard,
|
||||
addresses: null,
|
||||
},
|
||||
};
|
||||
|
||||
expect(() => gluetunVpnSettingsSchema.parse(payload)).not.toThrow();
|
||||
});
|
||||
});
|
||||
Generated
+453
-1266
File diff suppressed because it is too large.
Load diff
+13
-14
@@ -14,7 +14,7 @@ catalog:
|
||||
"@dnd-kit/utilities": ^3.2.2
|
||||
"@drizzle-team/brocli": ^0.12.0
|
||||
"@extractus/feed-extractor": 7.2.1
|
||||
'@gfazioli/mantine-onboarding-tour': ^4.0.6
|
||||
"@gfazioli/mantine-onboarding-tour": ^4.0.6
|
||||
"@gitbeaker/rest": ^43.8.0
|
||||
"@homarr/gridstack": ^1.12.0
|
||||
"@homarr/node-unifi": ^2.6.0
|
||||
@@ -33,14 +33,14 @@ catalog:
|
||||
"@mantine/notifications": ^9.4.1
|
||||
"@mantine/spotlight": ^9.4.1
|
||||
"@mantine/tiptap": ^9.4.1
|
||||
"@next/eslint-plugin-next": 16.2.9
|
||||
"@next/eslint-plugin-next": 16.2.10
|
||||
"@octokit/auth-app": ^8.2.0
|
||||
"@paralleldrive/cuid2": ^3.3.0
|
||||
"@playwright/test": ^1.61.1
|
||||
"@semantic-release/changelog": ^6.0.3
|
||||
"@semantic-release/commit-analyzer": ^13.0.1
|
||||
"@semantic-release/git": ^10.0.1
|
||||
"@semantic-release/github": ^12.0.8
|
||||
"@semantic-release/github": ^12.0.9
|
||||
"@semantic-release/npm": ^13.1.5
|
||||
"@semantic-release/release-notes-generator": ^14.1.1
|
||||
"@t3-oss/env-nextjs": ^0.13.11
|
||||
@@ -89,12 +89,12 @@ catalog:
|
||||
"@types/prismjs": ^1.26.6
|
||||
"@types/react": 19.2.17
|
||||
"@types/react-dom": 19.2.3
|
||||
"@scalar/api-reference-react": ^0.9.50
|
||||
"@scalar/api-reference-react": ^0.9.51
|
||||
"@types/video.js": ^7.3.58
|
||||
"@types/ws": ^8.18.1
|
||||
"@types/xml2js": ^0.4.14
|
||||
posthog-js: ^1.396.3
|
||||
posthog-node: ^5.39.1
|
||||
posthog-js: ^1.396.4
|
||||
posthog-node: ^5.39.2
|
||||
"@vitejs/plugin-react": ^6.0.3
|
||||
"@vitest/coverage-v8": ^4.1.9
|
||||
"@vitest/ui": ^4.1.9
|
||||
@@ -110,8 +110,8 @@ catalog:
|
||||
chroma-js: ^3.2.0
|
||||
clsx: ^2.1.1
|
||||
concurrently: ^10.0.3
|
||||
conventional-changelog-conventionalcommits: ^10.0.0
|
||||
cookie: 2.0.0
|
||||
conventional-changelog-conventionalcommits: ^10.2.0
|
||||
cookie: 2.0.1
|
||||
cookies: ^0.9.1
|
||||
croner: 10.0.1
|
||||
cross-env: ^10.1.0
|
||||
@@ -139,14 +139,14 @@ catalog:
|
||||
jsonpath-plus: ^10.4.0
|
||||
ldapts: 8.1.8
|
||||
lodash.clonedeep: ^4.5.0
|
||||
lucide-react: ^1.22.0
|
||||
lucide-react: ^1.23.0
|
||||
"mantine-contextmenu": ^9.3.1
|
||||
mantine-datatable: ^9.3.1
|
||||
mantine-react-table: npm:mantine-react-table-open@9.0.3
|
||||
mcp-handler: ^1.1.0
|
||||
maria2: ^0.4.1
|
||||
mysql2: 3.22.5
|
||||
next: 16.2.9
|
||||
next: 16.2.10
|
||||
next-auth: 5.0.0-beta.31
|
||||
next-intl: 4.13.1
|
||||
node-loader: ^2.1.0
|
||||
@@ -177,7 +177,7 @@ catalog:
|
||||
tsdav: ^2.3.0
|
||||
tsx: 4.20.4
|
||||
turbo: ^2.10.2
|
||||
typescript: ^7.0.1-rc
|
||||
typescript: ^6.0.3
|
||||
vite: ^8.1.2
|
||||
undici: 7.28.0
|
||||
use-deep-compare-effect: ^1.8.1
|
||||
@@ -202,8 +202,6 @@ minimumReleaseAgeExclude:
|
||||
- next
|
||||
- "@next/*"
|
||||
- "@immich/sdk@3.0.0"
|
||||
- typescript@7.0.1-rc
|
||||
- "@typescript/*"
|
||||
# Renovate security update: turbo@2.9.14
|
||||
- turbo@2.9.14
|
||||
# Renovate security update: form-data@4.0.6
|
||||
@@ -231,10 +229,11 @@ overrides:
|
||||
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.3"
|
||||
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.3"
|
||||
"tmp@<=0.2.3": ">=0.2.7"
|
||||
"vite@>=5.0.0 <=5.4.18": ">=8.1.2"
|
||||
"vite@>=5.0.0 <=5.4.18": ">=8.1.3"
|
||||
patchedDependencies:
|
||||
"@types/node-unifi": "patches/@types__node-unifi.patch"
|
||||
"trpc-to-openapi": "patches/trpc-to-openapi.patch"
|
||||
|
||||
allowUnusedPatches: true
|
||||
allowBuilds:
|
||||
"@tree-sitter-grammars/tree-sitter-yaml": true
|
||||
|
||||
Reference in new issue
Block a user