Compare commits
25
Commits
No files matched your search
@@ -30,9 +30,8 @@ const nextConfig: NextConfig = {
|
|||||||
serverExternalPackages: ["dockerode", "isomorphic-dompurify", "jsdom"],
|
serverExternalPackages: ["dockerode", "isomorphic-dompurify", "jsdom"],
|
||||||
experimental: {
|
experimental: {
|
||||||
optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"],
|
optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"],
|
||||||
turbopackFileSystemCacheForDev: true,
|
turbopackFileSystemCacheForDev: false,
|
||||||
preloadEntriesOnStart: false,
|
webpackMemoryOptimizations: false,
|
||||||
webpackMemoryOptimizations: true,
|
|
||||||
},
|
},
|
||||||
transpilePackages: ["@homarr/ui", "@homarr/notifications", "@homarr/modals", "@homarr/spotlight", "@homarr/widgets"],
|
transpilePackages: ["@homarr/ui", "@homarr/notifications", "@homarr/modals", "@homarr/spotlight", "@homarr/widgets"],
|
||||||
images: {
|
images: {
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
const bytesToMiB = (bytes: number) => Number((bytes / (1024 * 1024)).toFixed(2));
|
||||||
|
|
||||||
|
const getActiveHandlesCount = () => {
|
||||||
|
const processWithHandles = process as NodeJS.Process & {
|
||||||
|
_getActiveHandles?: () => unknown[];
|
||||||
|
};
|
||||||
|
return processWithHandles._getActiveHandles?.().length ?? null;
|
||||||
|
};
|
||||||
|
|
||||||
|
const getActiveRequestsCount = () => {
|
||||||
|
const processWithRequests = process as NodeJS.Process & {
|
||||||
|
_getActiveRequests?: () => unknown[];
|
||||||
|
};
|
||||||
|
return processWithRequests._getActiveRequests?.().length ?? null;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getTasksRuntimeDiagnostics = () => {
|
||||||
|
const memory = process.memoryUsage();
|
||||||
|
const resources = process.resourceUsage();
|
||||||
|
|
||||||
|
return {
|
||||||
|
rssMiB: bytesToMiB(memory.rss),
|
||||||
|
heapUsedMiB: bytesToMiB(memory.heapUsed),
|
||||||
|
heapTotalMiB: bytesToMiB(memory.heapTotal),
|
||||||
|
externalMiB: bytesToMiB(memory.external),
|
||||||
|
arrayBuffersMiB: bytesToMiB(memory.arrayBuffers),
|
||||||
|
uptimeSeconds: Number(process.uptime().toFixed(0)),
|
||||||
|
userCpuMicros: resources.userCPUTime,
|
||||||
|
systemCpuMicros: resources.systemCPUTime,
|
||||||
|
maxRssKiB: resources.maxRSS,
|
||||||
|
activeHandles: getActiveHandlesCount(),
|
||||||
|
activeRequests: getActiveRequestsCount(),
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -2,11 +2,41 @@
|
|||||||
import "./overrides";
|
import "./overrides";
|
||||||
|
|
||||||
import { jobGroup } from "@homarr/cron-jobs";
|
import { jobGroup } from "@homarr/cron-jobs";
|
||||||
|
import { createLogger } from "@homarr/core/infrastructure/logs";
|
||||||
|
|
||||||
|
import { getTasksRuntimeDiagnostics } from "./diagnostics";
|
||||||
import { onStartAsync } from "./on-start";
|
import { onStartAsync } from "./on-start";
|
||||||
|
|
||||||
|
const logger = createLogger({ module: "tasksMain" });
|
||||||
|
const RUNTIME_DIAGNOSTICS_INTERVAL_MS = 60_000;
|
||||||
|
|
||||||
|
const scheduleRuntimeDiagnostics = () => {
|
||||||
|
setInterval(() => {
|
||||||
|
logger.info("Tasks runtime diagnostics", {
|
||||||
|
diagnostics: getTasksRuntimeDiagnostics(),
|
||||||
|
});
|
||||||
|
}, RUNTIME_DIAGNOSTICS_INTERVAL_MS).unref();
|
||||||
|
};
|
||||||
|
|
||||||
void (async () => {
|
void (async () => {
|
||||||
|
logger.info("Tasks runtime bootstrap started", {
|
||||||
|
diagnostics: getTasksRuntimeDiagnostics(),
|
||||||
|
});
|
||||||
|
|
||||||
await onStartAsync();
|
await onStartAsync();
|
||||||
|
logger.info("Tasks on-start hooks completed", {
|
||||||
|
diagnostics: getTasksRuntimeDiagnostics(),
|
||||||
|
});
|
||||||
|
|
||||||
await jobGroup.initializeAsync();
|
await jobGroup.initializeAsync();
|
||||||
|
logger.info("Cron job group initialized in tasks runtime", {
|
||||||
|
diagnostics: getTasksRuntimeDiagnostics(),
|
||||||
|
});
|
||||||
|
|
||||||
await jobGroup.startAllAsync();
|
await jobGroup.startAllAsync();
|
||||||
|
logger.info("Cron job group started in tasks runtime", {
|
||||||
|
diagnostics: getTasksRuntimeDiagnostics(),
|
||||||
|
jobs: jobGroup.getKeys(),
|
||||||
|
});
|
||||||
|
scheduleRuntimeDiagnostics();
|
||||||
})();
|
})();
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
import { setGlobalDispatcher } from "undici";
|
import { setGlobalDispatcher } from "undici";
|
||||||
|
|
||||||
import { UndiciHttpAgent } from "@homarr/core/infrastructure/http";
|
import { UndiciHttpAgent } from "@homarr/core/infrastructure/http";
|
||||||
|
import { createLogger } from "@homarr/core/infrastructure/logs";
|
||||||
|
|
||||||
|
const logger = createLogger({ module: "tasksOverrides" });
|
||||||
setGlobalDispatcher(new UndiciHttpAgent());
|
setGlobalDispatcher(new UndiciHttpAgent());
|
||||||
|
logger.info("Configured global undici dispatcher for tasks runtime");
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24.16.0",
|
"node": ">=24.16.0",
|
||||||
"pnpm": ">=10.33.4"
|
"pnpm": ">=10.34.1"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.33.4",
|
"packageManager": "pnpm@10.34.1",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
"better-sqlite3"
|
"better-sqlite3"
|
||||||
|
|||||||
+6
-6
@@ -60,9 +60,9 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24.16.0",
|
"node": ">=24.16.0",
|
||||||
"pnpm": ">=10.33.4"
|
"pnpm": ">=10.34.1"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.33.4",
|
"packageManager": "pnpm@10.34.1",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
"@tree-sitter-grammars/tree-sitter-yaml",
|
"@tree-sitter-grammars/tree-sitter-yaml",
|
||||||
@@ -76,14 +76,14 @@
|
|||||||
"tree-sitter-json"
|
"tree-sitter-json"
|
||||||
],
|
],
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@babel/helpers@<7.26.10": ">=7.29.2",
|
"@babel/helpers@<7.26.10": ">=7.29.7",
|
||||||
"@babel/runtime@<7.26.10": ">=7.29.2",
|
"@babel/runtime@<7.26.10": ">=7.29.7",
|
||||||
"axios@>=1.0.0 <1.8.2": ">=1.16.1",
|
"axios@>=1.0.0 <1.8.2": ">=1.16.1",
|
||||||
"brace-expansion@>=2.0.0 <=2.0.1": ">=5.0.6",
|
"brace-expansion@>=2.0.0 <=2.0.1": ">=5.0.6",
|
||||||
"brace-expansion@>=1.0.0 <=1.1.11": ">=5.0.6",
|
"brace-expansion@>=1.0.0 <=1.1.11": ">=5.0.6",
|
||||||
"esbuild@<=0.24.2": ">=0.28.0",
|
"esbuild@<=0.24.2": ">=0.28.0",
|
||||||
"form-data@>=4.0.0 <4.0.4": ">=4.0.5",
|
"form-data@>=4.0.0 <4.0.4": ">=4.0.5",
|
||||||
"hono@<4.6.5": ">=4.12.22",
|
"hono@<4.6.5": ">=4.12.23",
|
||||||
"linkifyjs@<4.3.2": ">=4.3.3",
|
"linkifyjs@<4.3.2": ">=4.3.3",
|
||||||
"nanoid@>=4.0.0 <5.0.9": ">=5.1.11",
|
"nanoid@>=4.0.0 <5.0.9": ">=5.1.11",
|
||||||
"prismjs@<1.30.0": ">=1.30.0",
|
"prismjs@<1.30.0": ">=1.30.0",
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
"sha.js@<=2.4.11": ">=2.4.12",
|
"sha.js@<=2.4.11": ">=2.4.12",
|
||||||
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.2",
|
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.2",
|
||||||
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.2",
|
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.2",
|
||||||
"tmp@<=0.2.3": ">=0.2.5",
|
"tmp@<=0.2.3": ">=0.2.7",
|
||||||
"vite@>=5.0.0 <=5.4.18": ">=8.0.14"
|
"vite@>=5.0.0 <=5.4.18": ">=8.0.14"
|
||||||
},
|
},
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
|
|||||||
@@ -9,11 +9,18 @@ import {
|
|||||||
getAllTrustedCertificatesAsync,
|
getAllTrustedCertificatesAsync,
|
||||||
getTrustedCertificateHostnamesAsync,
|
getTrustedCertificateHostnamesAsync,
|
||||||
} from "@homarr/core/infrastructure/certificates";
|
} from "@homarr/core/infrastructure/certificates";
|
||||||
import { UndiciHttpAgent } from "@homarr/core/infrastructure/http";
|
|
||||||
|
|
||||||
import type { TrustedCertificateHostname } from "../certificates/hostnames";
|
import type { TrustedCertificateHostname } from "../certificates/hostnames";
|
||||||
|
import { UndiciHttpAgent } from "./http-agent";
|
||||||
import { withTimeoutAsync } from "./timeout";
|
import { withTimeoutAsync } from "./timeout";
|
||||||
|
|
||||||
|
const CERTIFICATE_DISPATCHER_TTL_MS = 5 * 60 * 1000;
|
||||||
|
let trustedCertificateDispatcher: {
|
||||||
|
dispatcher: UndiciHttpAgent;
|
||||||
|
expiresAt: number;
|
||||||
|
} | null = null;
|
||||||
|
let creatingTrustedCertificateDispatcherPromise: Promise<UndiciHttpAgent> | null = null;
|
||||||
|
|
||||||
export const createCustomCheckServerIdentity = (
|
export const createCustomCheckServerIdentity = (
|
||||||
trustedHostnames: TrustedCertificateHostname[],
|
trustedHostnames: TrustedCertificateHostname[],
|
||||||
): typeof checkServerIdentity => {
|
): typeof checkServerIdentity => {
|
||||||
@@ -41,6 +48,36 @@ export const createCertificateAgentAsync = async (override?: {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getSharedCertificateAgentAsync = async () => {
|
||||||
|
const now = Date.now();
|
||||||
|
if (trustedCertificateDispatcher && trustedCertificateDispatcher.expiresAt > now) {
|
||||||
|
return trustedCertificateDispatcher.dispatcher;
|
||||||
|
}
|
||||||
|
if (creatingTrustedCertificateDispatcherPromise) {
|
||||||
|
return await creatingTrustedCertificateDispatcherPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
creatingTrustedCertificateDispatcherPromise = createCertificateAgentAsync(undefined)
|
||||||
|
.then((dispatcher) => {
|
||||||
|
const previousDispatcher = trustedCertificateDispatcher?.dispatcher;
|
||||||
|
trustedCertificateDispatcher = {
|
||||||
|
dispatcher,
|
||||||
|
expiresAt: Date.now() + CERTIFICATE_DISPATCHER_TTL_MS,
|
||||||
|
};
|
||||||
|
if (previousDispatcher) {
|
||||||
|
void previousDispatcher.close().catch(() => {
|
||||||
|
previousDispatcher.destroy();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return dispatcher;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
creatingTrustedCertificateDispatcherPromise = null;
|
||||||
|
});
|
||||||
|
|
||||||
|
return await creatingTrustedCertificateDispatcherPromise;
|
||||||
|
};
|
||||||
|
|
||||||
export const createHttpsAgentAsync = async (override?: Pick<AgentOptions, "ca" | "checkServerIdentity">) => {
|
export const createHttpsAgentAsync = async (override?: Pick<AgentOptions, "ca" | "checkServerIdentity">) => {
|
||||||
return new HttpsAgent({
|
return new HttpsAgent({
|
||||||
ca: await getAllTrustedCertificatesAsync(),
|
ca: await getAllTrustedCertificatesAsync(),
|
||||||
@@ -63,7 +100,7 @@ export const fetchWithTrustedCertificatesAsync = async (
|
|||||||
url: RequestInfo,
|
url: RequestInfo,
|
||||||
options?: RequestInit & { timeout?: number },
|
options?: RequestInit & { timeout?: number },
|
||||||
): Promise<Response> => {
|
): Promise<Response> => {
|
||||||
const agent = await createCertificateAgentAsync(undefined);
|
const agent = await getSharedCertificateAgentAsync();
|
||||||
if (options?.timeout) {
|
if (options?.timeout) {
|
||||||
return await withTimeoutAsync(
|
return await withTimeoutAsync(
|
||||||
async (signal) =>
|
async (signal) =>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { db } from "@homarr/db";
|
|||||||
|
|
||||||
import type { Logger } from "./logger";
|
import type { Logger } from "./logger";
|
||||||
import type { ValidateCron } from "./validation";
|
import type { ValidateCron } from "./validation";
|
||||||
|
import { createProcessDiagnosticsDelta, createProcessDiagnosticsSnapshot } from "./diagnostics";
|
||||||
|
|
||||||
export interface CreateCronJobCreatorOptions<TAllowedNames extends string> {
|
export interface CreateCronJobCreatorOptions<TAllowedNames extends string> {
|
||||||
beforeCallback?: (name: TAllowedNames) => MaybePromise<void>;
|
beforeCallback?: (name: TAllowedNames) => MaybePromise<void>;
|
||||||
@@ -33,19 +34,25 @@ const createCallback = <TAllowedNames extends string, TName extends TAllowedName
|
|||||||
const expectedMaximumDurationInMillis = options.expectedMaximumDurationInMillis ?? 2500;
|
const expectedMaximumDurationInMillis = options.expectedMaximumDurationInMillis ?? 2500;
|
||||||
return (callback: () => MaybePromise<void>) => {
|
return (callback: () => MaybePromise<void>) => {
|
||||||
const catchingCallbackAsync = async () => {
|
const catchingCallbackAsync = async () => {
|
||||||
|
const beforeExecutionSnapshot = createProcessDiagnosticsSnapshot();
|
||||||
try {
|
try {
|
||||||
creatorOptions.logger.logDebug("The callback of cron job started", {
|
creatorOptions.logger.logDebug("The callback of cron job started", {
|
||||||
name,
|
name,
|
||||||
|
diagnostics: beforeExecutionSnapshot,
|
||||||
});
|
});
|
||||||
const stopwatch = new Stopwatch();
|
const stopwatch = new Stopwatch();
|
||||||
await creatorOptions.beforeCallback?.(name);
|
await creatorOptions.beforeCallback?.(name);
|
||||||
const beforeCallbackTook = stopwatch.getElapsedInHumanWords();
|
const beforeCallbackTook = stopwatch.getElapsedInHumanWords();
|
||||||
await callback();
|
await callback();
|
||||||
|
const afterExecutionSnapshot = createProcessDiagnosticsSnapshot();
|
||||||
const callbackTook = stopwatch.getElapsedInHumanWords();
|
const callbackTook = stopwatch.getElapsedInHumanWords();
|
||||||
creatorOptions.logger.logDebug("The callback of cron job succeeded", {
|
creatorOptions.logger.logDebug("The callback of cron job succeeded", {
|
||||||
name,
|
name,
|
||||||
beforeCallbackTook,
|
beforeCallbackTook,
|
||||||
callbackTook,
|
callbackTook,
|
||||||
|
diagnosticsBefore: beforeExecutionSnapshot,
|
||||||
|
diagnosticsAfter: afterExecutionSnapshot,
|
||||||
|
diagnosticsDelta: createProcessDiagnosticsDelta(beforeExecutionSnapshot, afterExecutionSnapshot),
|
||||||
});
|
});
|
||||||
|
|
||||||
const durationInMillis = stopwatch.getElapsedInMilliseconds();
|
const durationInMillis = stopwatch.getElapsedInMilliseconds();
|
||||||
@@ -58,11 +65,15 @@ const createCallback = <TAllowedNames extends string, TName extends TAllowedName
|
|||||||
}
|
}
|
||||||
await creatorOptions.onCallbackSuccess?.(name);
|
await creatorOptions.onCallbackSuccess?.(name);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
const failedExecutionSnapshot = createProcessDiagnosticsSnapshot();
|
||||||
creatorOptions.logger.logError(
|
creatorOptions.logger.logError(
|
||||||
new ErrorWithMetadata(
|
new ErrorWithMetadata(
|
||||||
"The callback of cron job failed",
|
"The callback of cron job failed",
|
||||||
{
|
{
|
||||||
name,
|
name,
|
||||||
|
diagnosticsBefore: beforeExecutionSnapshot,
|
||||||
|
diagnosticsAfter: failedExecutionSnapshot,
|
||||||
|
diagnosticsDelta: createProcessDiagnosticsDelta(beforeExecutionSnapshot, failedExecutionSnapshot),
|
||||||
},
|
},
|
||||||
{ cause: error },
|
{ cause: error },
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
const bytesToMiB = (bytes: number) => Number((bytes / (1024 * 1024)).toFixed(2));
|
||||||
|
|
||||||
|
const getActiveHandlesCount = () => {
|
||||||
|
const processWithHandles = process as NodeJS.Process & {
|
||||||
|
_getActiveHandles?: () => unknown[];
|
||||||
|
};
|
||||||
|
return processWithHandles._getActiveHandles?.().length ?? null;
|
||||||
|
};
|
||||||
|
|
||||||
|
const getActiveRequestsCount = () => {
|
||||||
|
const processWithRequests = process as NodeJS.Process & {
|
||||||
|
_getActiveRequests?: () => unknown[];
|
||||||
|
};
|
||||||
|
return processWithRequests._getActiveRequests?.().length ?? null;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface ProcessDiagnosticsSnapshot {
|
||||||
|
rssMiB: number;
|
||||||
|
heapUsedMiB: number;
|
||||||
|
heapTotalMiB: number;
|
||||||
|
externalMiB: number;
|
||||||
|
arrayBuffersMiB: number;
|
||||||
|
uptimeSeconds: number;
|
||||||
|
userCpuMicros: number;
|
||||||
|
systemCpuMicros: number;
|
||||||
|
maxRssKiB: number;
|
||||||
|
activeHandles: number | null;
|
||||||
|
activeRequests: number | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const createProcessDiagnosticsSnapshot = (): ProcessDiagnosticsSnapshot => {
|
||||||
|
const memory = process.memoryUsage();
|
||||||
|
const resources = process.resourceUsage();
|
||||||
|
|
||||||
|
return {
|
||||||
|
rssMiB: bytesToMiB(memory.rss),
|
||||||
|
heapUsedMiB: bytesToMiB(memory.heapUsed),
|
||||||
|
heapTotalMiB: bytesToMiB(memory.heapTotal),
|
||||||
|
externalMiB: bytesToMiB(memory.external),
|
||||||
|
arrayBuffersMiB: bytesToMiB(memory.arrayBuffers),
|
||||||
|
uptimeSeconds: Number(process.uptime().toFixed(0)),
|
||||||
|
userCpuMicros: resources.userCPUTime,
|
||||||
|
systemCpuMicros: resources.systemCPUTime,
|
||||||
|
maxRssKiB: resources.maxRSS,
|
||||||
|
activeHandles: getActiveHandlesCount(),
|
||||||
|
activeRequests: getActiveRequestsCount(),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export const createProcessDiagnosticsDelta = (
|
||||||
|
before: ProcessDiagnosticsSnapshot,
|
||||||
|
after: ProcessDiagnosticsSnapshot,
|
||||||
|
) => {
|
||||||
|
return {
|
||||||
|
rssMiB: Number((after.rssMiB - before.rssMiB).toFixed(2)),
|
||||||
|
heapUsedMiB: Number((after.heapUsedMiB - before.heapUsedMiB).toFixed(2)),
|
||||||
|
heapTotalMiB: Number((after.heapTotalMiB - before.heapTotalMiB).toFixed(2)),
|
||||||
|
externalMiB: Number((after.externalMiB - before.externalMiB).toFixed(2)),
|
||||||
|
arrayBuffersMiB: Number((after.arrayBuffersMiB - before.arrayBuffersMiB).toFixed(2)),
|
||||||
|
uptimeSeconds: Number((after.uptimeSeconds - before.uptimeSeconds).toFixed(0)),
|
||||||
|
userCpuMicros: after.userCpuMicros - before.userCpuMicros,
|
||||||
|
systemCpuMicros: after.systemCpuMicros - before.systemCpuMicros,
|
||||||
|
maxRssKiB: after.maxRssKiB - before.maxRssKiB,
|
||||||
|
activeHandles:
|
||||||
|
before.activeHandles === null || after.activeHandles === null ? null : after.activeHandles - before.activeHandles,
|
||||||
|
activeRequests:
|
||||||
|
before.activeRequests === null || after.activeRequests === null
|
||||||
|
? null
|
||||||
|
: after.activeRequests - before.activeRequests,
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -4,6 +4,7 @@ import { objectEntries, objectKeys } from "@homarr/common";
|
|||||||
import { db } from "@homarr/db";
|
import { db } from "@homarr/db";
|
||||||
|
|
||||||
import type { JobCallback } from "./creator";
|
import type { JobCallback } from "./creator";
|
||||||
|
import { createProcessDiagnosticsSnapshot } from "./diagnostics";
|
||||||
import type { Logger } from "./logger";
|
import type { Logger } from "./logger";
|
||||||
import { jobRegistry } from "./registry";
|
import { jobRegistry } from "./registry";
|
||||||
|
|
||||||
@@ -38,6 +39,10 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
initializeAsync: async () => {
|
initializeAsync: async () => {
|
||||||
|
options.logger.logInfo("Initializing cron job group", {
|
||||||
|
registeredJobs: [...jobRegistry.keys()],
|
||||||
|
diagnostics: createProcessDiagnosticsSnapshot(),
|
||||||
|
});
|
||||||
const configurations = await db.query.cronJobConfigurations.findMany();
|
const configurations = await db.query.cronJobConfigurations.findMany();
|
||||||
for (const job of jobRegistry.values()) {
|
for (const job of jobRegistry.values()) {
|
||||||
const configuration = configurations.find(({ name }) => name === job.name);
|
const configuration = configurations.find(({ name }) => name === job.name);
|
||||||
@@ -51,7 +56,15 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
|
|||||||
const scheduledTask = await job.createTaskAsync();
|
const scheduledTask = await job.createTaskAsync();
|
||||||
|
|
||||||
tasks.set(job.name, scheduledTask);
|
tasks.set(job.name, scheduledTask);
|
||||||
|
options.logger.logDebug("Created scheduled task for cron job", {
|
||||||
|
name: job.name,
|
||||||
|
diagnostics: createProcessDiagnosticsSnapshot(),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
options.logger.logInfo("Cron job group initialized", {
|
||||||
|
taskCount: tasks.size,
|
||||||
|
diagnostics: createProcessDiagnosticsSnapshot(),
|
||||||
|
});
|
||||||
},
|
},
|
||||||
startAsync: async (name: keyof TJobs) => {
|
startAsync: async (name: keyof TJobs) => {
|
||||||
const job = jobRegistry.get(name as string);
|
const job = jobRegistry.get(name as string);
|
||||||
@@ -65,6 +78,10 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
|
|||||||
tasks.get(name as string)?.resume();
|
tasks.get(name as string)?.resume();
|
||||||
},
|
},
|
||||||
startAllAsync: async () => {
|
startAllAsync: async () => {
|
||||||
|
options.logger.logInfo("Starting all cron jobs", {
|
||||||
|
taskCount: tasks.size,
|
||||||
|
diagnostics: createProcessDiagnosticsSnapshot(),
|
||||||
|
});
|
||||||
for (const job of jobRegistry.values()) {
|
for (const job of jobRegistry.values()) {
|
||||||
if (!tasks.has(job.name)) {
|
if (!tasks.has(job.name)) {
|
||||||
continue;
|
continue;
|
||||||
@@ -76,6 +93,10 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
|
|||||||
await job.onStartAsync();
|
await job.onStartAsync();
|
||||||
tasks.get(job.name)?.resume();
|
tasks.get(job.name)?.resume();
|
||||||
}
|
}
|
||||||
|
options.logger.logInfo("Started all cron jobs", {
|
||||||
|
taskCount: tasks.size,
|
||||||
|
diagnostics: createProcessDiagnosticsSnapshot(),
|
||||||
|
});
|
||||||
},
|
},
|
||||||
runManuallyAsync: async (name: keyof TJobs) => {
|
runManuallyAsync: async (name: keyof TJobs) => {
|
||||||
const job = jobRegistry.get(name as string);
|
const job = jobRegistry.get(name as string);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";
|
|||||||
import { createGetSetChannel } from "@homarr/redis";
|
import { createGetSetChannel } from "@homarr/redis";
|
||||||
|
|
||||||
const logger = createLogger({ module: "imageProxy" });
|
const logger = createLogger({ module: "imageProxy" });
|
||||||
|
const IMAGE_PROXY_ENTRY_TTL_SECONDS = 60 * 60 * 24 * 7;
|
||||||
|
|
||||||
const createHmacChannel = (hmac: `${string}.${string}`) => createGetSetChannel<string>(`image-proxy:hmac:${hmac}`);
|
const createHmacChannel = (hmac: `${string}.${string}`) => createGetSetChannel<string>(`image-proxy:hmac:${hmac}`);
|
||||||
const createUrlByIdChannel = (id: string) =>
|
const createUrlByIdChannel = (id: string) =>
|
||||||
@@ -31,12 +32,17 @@ export class ImageProxy {
|
|||||||
public async createImageAsync(url: string, headers?: Record<string, string>): Promise<string> {
|
public async createImageAsync(url: string, headers?: Record<string, string>): Promise<string> {
|
||||||
const existingId = await this.getExistingIdAsync(url, headers);
|
const existingId = await this.getExistingIdAsync(url, headers);
|
||||||
if (existingId) {
|
if (existingId) {
|
||||||
logger.debug("Image already exists in the proxy", {
|
const existingImageData = await createUrlByIdChannel(existingId).getAsync();
|
||||||
id: existingId,
|
if (!existingImageData) {
|
||||||
url: this.redactUrl(url),
|
await this.removeHashForImageAsync(url, headers);
|
||||||
headers: this.redactHeaders(headers ?? null),
|
} else {
|
||||||
});
|
logger.debug("Image already exists in the proxy", {
|
||||||
return this.createImageUrl(existingId);
|
id: existingId,
|
||||||
|
url: this.redactUrl(url),
|
||||||
|
headers: this.redactHeaders(headers ?? null),
|
||||||
|
});
|
||||||
|
return this.createImageUrl(existingId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const id = createId();
|
const id = createId();
|
||||||
@@ -116,8 +122,10 @@ export class ImageProxy {
|
|||||||
await urlHeaderChannel.setAsync({
|
await urlHeaderChannel.setAsync({
|
||||||
url: encryptSecret(url),
|
url: encryptSecret(url),
|
||||||
headers: encryptSecret(JSON.stringify(headers ?? null)),
|
headers: encryptSecret(JSON.stringify(headers ?? null)),
|
||||||
|
}, {
|
||||||
|
ttlSeconds: IMAGE_PROXY_ENTRY_TTL_SECONDS,
|
||||||
});
|
});
|
||||||
await hashChannel.setAsync(id);
|
await hashChannel.setAsync(id, { ttlSeconds: IMAGE_PROXY_ENTRY_TTL_SECONDS });
|
||||||
|
|
||||||
logger.debug("Stored image in the proxy", {
|
logger.debug("Stored image in the proxy", {
|
||||||
id,
|
id,
|
||||||
@@ -126,6 +134,13 @@ export class ImageProxy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async removeHashForImageAsync(url: string, headers: Record<string, string> | undefined): Promise<void> {
|
||||||
|
const urlHash = this.hashSecret(url);
|
||||||
|
const headerHash = this.hashSecret(JSON.stringify(headers ?? null));
|
||||||
|
|
||||||
|
await createHmacChannel(`${urlHash}.${headerHash}`).removeAsync();
|
||||||
|
}
|
||||||
|
|
||||||
private hashSecret(value: string): string {
|
private hashSecret(value: string): string {
|
||||||
return createHmac("sha256", ImageProxy.getHmacKey()).update(value).digest("hex");
|
return createHmac("sha256", ImageProxy.getHmacKey()).update(value).digest("hex");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,8 +113,14 @@ export const createGetSetChannel = <TData>(name: string) => {
|
|||||||
* Set data in the channel
|
* Set data in the channel
|
||||||
* @param data data to be stored in the channel
|
* @param data data to be stored in the channel
|
||||||
*/
|
*/
|
||||||
setAsync: async (data: TData) => {
|
setAsync: async (data: TData, options?: { ttlSeconds?: number }) => {
|
||||||
await getSetClient.set(name, superjson.stringify(data));
|
const ttlSeconds = options?.ttlSeconds;
|
||||||
|
const serializedData = superjson.stringify(data);
|
||||||
|
if (ttlSeconds && ttlSeconds > 0) {
|
||||||
|
await getSetClient.set(name, serializedData, "EX", Math.ceil(ttlSeconds));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await getSetClient.set(name, serializedData);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Remove data from the channel
|
* Remove data from the channel
|
||||||
|
|||||||
@@ -1056,7 +1056,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"noResults": {
|
"noResults": {
|
||||||
"title": ""
|
"title": "Nessun media caricato"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
@@ -1088,8 +1088,8 @@
|
|||||||
"checkLogs": "Controlla i log per maggiori dettagli",
|
"checkLogs": "Controlla i log per maggiori dettagli",
|
||||||
"tryAgain": "Riprova",
|
"tryAgain": "Riprova",
|
||||||
"loading": "Caricamento",
|
"loading": "Caricamento",
|
||||||
"show": "",
|
"show": "Visualizza",
|
||||||
"hide": ""
|
"hide": "Nascondi"
|
||||||
},
|
},
|
||||||
"here": "qui",
|
"here": "qui",
|
||||||
"iconPicker": {
|
"iconPicker": {
|
||||||
@@ -1255,7 +1255,7 @@
|
|||||||
"label": {
|
"label": {
|
||||||
"create": "Nuova categoria",
|
"create": "Nuova categoria",
|
||||||
"changePosition": "Cambia posizione",
|
"changePosition": "Cambia posizione",
|
||||||
"settings": ""
|
"settings": "Impostazioni"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"openAllInNewTabs": {
|
"openAllInNewTabs": {
|
||||||
@@ -3459,7 +3459,7 @@
|
|||||||
"private": "Questa board è privata"
|
"private": "Questa board è privata"
|
||||||
},
|
},
|
||||||
"noResults": {
|
"noResults": {
|
||||||
"title": ""
|
"title": "Ancora nessuna board"
|
||||||
},
|
},
|
||||||
"modal": {
|
"modal": {
|
||||||
"createBoard": {
|
"createBoard": {
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
"form": {
|
"form": {
|
||||||
"name": {
|
"name": {
|
||||||
"label": "Gruppens namn",
|
"label": "Gruppens namn",
|
||||||
"description": ""
|
"description": "Namnet måste matcha admin-grupp i extern tjänst"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
"label": "Visa sökresultat i ny flik"
|
"label": "Visa sökresultat i ny flik"
|
||||||
},
|
},
|
||||||
"ddgBangs": {
|
"ddgBangs": {
|
||||||
"label": ""
|
"label": "Aktivera DuckDuckGo bangs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -252,10 +252,10 @@
|
|||||||
"changeDdgBangs": {
|
"changeDdgBangs": {
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"message": ""
|
"message": "DuckDuckGo bangs inställningen ändrad"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"message": ""
|
"message": "DuckDuckGo bangs inställningen kunde inte ändras"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -350,12 +350,12 @@
|
|||||||
"description": "Tillåt medlemmar att addera valfri applikation på sina tavlor"
|
"description": "Tillåt medlemmar att addera valfri applikation på sina tavlor"
|
||||||
},
|
},
|
||||||
"modify-all": {
|
"modify-all": {
|
||||||
"label": "",
|
"label": "Modifiera alla appar",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar modifierar alla appar"
|
||||||
},
|
},
|
||||||
"full-all": {
|
"full-all": {
|
||||||
"label": "",
|
"label": "Fullständiga rättigheter till appar",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar hanterar, använder och raderar alla appar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -363,20 +363,20 @@
|
|||||||
"title": "Tavlor",
|
"title": "Tavlor",
|
||||||
"item": {
|
"item": {
|
||||||
"create": {
|
"create": {
|
||||||
"label": "",
|
"label": "Skapa tavlor",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar skapar tavlor"
|
||||||
},
|
},
|
||||||
"view-all": {
|
"view-all": {
|
||||||
"label": "",
|
"label": "Se alla tavlor",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar ser alla tavlor"
|
||||||
},
|
},
|
||||||
"modify-all": {
|
"modify-all": {
|
||||||
"label": "",
|
"label": "Modifiera alla tavlor",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar modifierar alla tavlor (Detta inkluderar inte åtkomstkontroll eller farozonen)"
|
||||||
},
|
},
|
||||||
"full-all": {
|
"full-all": {
|
||||||
"label": "",
|
"label": "Fullständiga rättigheter till tavlor",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar ser, modifierar och tar bort alla tavlor (detta inkluderar åtkomstkontroll och farozonen)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -392,38 +392,38 @@
|
|||||||
"description": "Tillåter medlemmar att addera valfri integration till sina tavlor"
|
"description": "Tillåter medlemmar att addera valfri integration till sina tavlor"
|
||||||
},
|
},
|
||||||
"interact-all": {
|
"interact-all": {
|
||||||
"label": "",
|
"label": "Interagera med alla integrationer",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar interagerar med alla integrationer"
|
||||||
},
|
},
|
||||||
"full-all": {
|
"full-all": {
|
||||||
"label": "",
|
"label": "Fullständiga rättigheter till integrationer",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar hanterar, använder och interagerar med alla integrationer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"media": {
|
"media": {
|
||||||
"title": "",
|
"title": "Media",
|
||||||
"item": {
|
"item": {
|
||||||
"upload": {
|
"upload": {
|
||||||
"label": "",
|
"label": "Ladda upp media",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar laddar upp media"
|
||||||
},
|
},
|
||||||
"view-all": {
|
"view-all": {
|
||||||
"label": "",
|
"label": "Se all media",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar ser all media"
|
||||||
},
|
},
|
||||||
"full-all": {
|
"full-all": {
|
||||||
"label": "",
|
"label": "Fullständiga rättigheter till media",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar hanterar och raderar all media"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"title": "",
|
"title": "Annat",
|
||||||
"item": {
|
"item": {
|
||||||
"view-logs": {
|
"view-logs": {
|
||||||
"label": "",
|
"label": "Se loggar",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar ser loggar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -435,32 +435,32 @@
|
|||||||
"description": "Tillåt medlemmar att skapa sökmotorer"
|
"description": "Tillåt medlemmar att skapa sökmotorer"
|
||||||
},
|
},
|
||||||
"modify-all": {
|
"modify-all": {
|
||||||
"label": "",
|
"label": "Modifiera alla sökmotorer",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar modifierar alla sökmotorer"
|
||||||
},
|
},
|
||||||
"full-all": {
|
"full-all": {
|
||||||
"label": "",
|
"label": "Fullständiga rättigheter till sökmotorer",
|
||||||
"description": ""
|
"description": "Tillåt att medlemmar hanterar och raderar alla sökmotorer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"memberNotice": {
|
"memberNotice": {
|
||||||
"mixed": "",
|
"mixed": "Vissa medlemmar är från externa tjänster och kan inte hantera här",
|
||||||
"external": ""
|
"external": "Alla medlemmar är från externa tjänster och kan inte hanteras här"
|
||||||
},
|
},
|
||||||
"reservedNotice": {
|
"reservedNotice": {
|
||||||
"message": ""
|
"message": "Denna grupp är reserverad för systemet så vissa åtgärder är begränsade. <checkoutDocs></checkoutDocs>"
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"create": {
|
"create": {
|
||||||
"label": "Addera en grupp",
|
"label": "Addera en grupp",
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"message": ""
|
"message": "Gruppen har skapats"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"message": ""
|
"message": "Gruppen kunde inte skapas"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -470,7 +470,7 @@
|
|||||||
"confirm": "Är du säker på att du vill överföra ägarskapet för gruppen {name} till {username}?",
|
"confirm": "Är du säker på att du vill överföra ägarskapet för gruppen {name} till {username}?",
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"message": ""
|
"message": "Överfört grupp {group} till {user}"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"message": "Kunde inte överföra ägarskap"
|
"message": "Kunde inte överföra ägarskap"
|
||||||
@@ -501,38 +501,38 @@
|
|||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "Behörigheter sparade",
|
"title": "Behörigheter sparade",
|
||||||
"message": ""
|
"message": "Rättigheterna sparade"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "",
|
"title": "Rättigheterna ej sparade",
|
||||||
"message": ""
|
"message": "Rättigheterna har inte sparats"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"update": {
|
"update": {
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"message": ""
|
"message": "Gruppen {name} har sparats"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"message": ""
|
"message": "Kunde inte spara gruppen {name}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
"label": "Välj en grupp",
|
"label": "Välj en grupp",
|
||||||
"notFound": ""
|
"notFound": "Ingen grupp hittad"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"board": {
|
"board": {
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "Inställningarna sparades",
|
"title": "Inställningarna sparades",
|
||||||
"message": ""
|
"message": "Inställningarna för tavlan har sparats"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "Kunde inte spara inställningarna",
|
"title": "Kunde inte spara inställningarna",
|
||||||
"message": ""
|
"message": "Kunde inte spara inställningarna för tavlan"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -540,10 +540,10 @@
|
|||||||
"changePosition": {
|
"changePosition": {
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"message": ""
|
"message": "Ordning ändrad"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"message": ""
|
"message": "Ordningen kunde ändras"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -559,20 +559,20 @@
|
|||||||
"list": {
|
"list": {
|
||||||
"title": "Applikationer",
|
"title": "Applikationer",
|
||||||
"noResults": {
|
"noResults": {
|
||||||
"title": "",
|
"title": "Det finns inga appar ännu",
|
||||||
"action": ""
|
"action": "Skapa din första app"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"create": {
|
"create": {
|
||||||
"title": "Addera applikation",
|
"title": "Addera applikation",
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "",
|
"title": "Skapandet lyckades",
|
||||||
"message": ""
|
"message": "Appen skapades framgångsrikt"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "",
|
"title": "Skapandet misslyckades",
|
||||||
"message": ""
|
"message": "Appen kunde inte skapas"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -581,11 +581,11 @@
|
|||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "Ändringarna har sparats",
|
"title": "Ändringarna har sparats",
|
||||||
"message": ""
|
"message": "Appen sparades"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "Misslyckades med att spara ändringarna",
|
"title": "Misslyckades med att spara ändringarna",
|
||||||
"message": ""
|
"message": "Appen kunde inte sparas"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -594,12 +594,12 @@
|
|||||||
"message": "Är du säker på att du vill ta bort applikationen {name}?",
|
"message": "Är du säker på att du vill ta bort applikationen {name}?",
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "",
|
"title": "Borttagning lyckades",
|
||||||
"message": ""
|
"message": "Appen har tagits bort"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "",
|
"title": "Borttagning misslyckades",
|
||||||
"message": ""
|
"message": "Kunde inte ta bort appen"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -612,21 +612,21 @@
|
|||||||
"label": "Beskrivning"
|
"label": "Beskrivning"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"label": ""
|
"label": "URL"
|
||||||
},
|
},
|
||||||
"useDifferentUrlForPing": {
|
"useDifferentUrlForPing": {
|
||||||
"checkbox": {
|
"checkbox": {
|
||||||
"label": "",
|
"label": "Använd annan URL för ping",
|
||||||
"description": ""
|
"description": "Användbart om Homarr kan komma åt appen direkt via ett internt host-namn eller nätverk för att undvika bandbreddsanvändning hos internetleverantör"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"select": {
|
"select": {
|
||||||
"label": "",
|
"label": "Välj app",
|
||||||
"notFound": "",
|
"notFound": "Ingen app hittades",
|
||||||
"search": "Sök efter en applikation",
|
"search": "Sök efter en applikation",
|
||||||
"noResults": "",
|
"noResults": "Inga resultat",
|
||||||
"action": "Välj {app}",
|
"action": "Välj {app}",
|
||||||
"title": "Välj en applikation att lägga till på tavlan"
|
"title": "Välj en applikation att lägga till på tavlan"
|
||||||
},
|
},
|
||||||
@@ -642,56 +642,56 @@
|
|||||||
"page": {
|
"page": {
|
||||||
"list": {
|
"list": {
|
||||||
"title": "Integrationer",
|
"title": "Integrationer",
|
||||||
"search": "",
|
"search": "Sök integrationer",
|
||||||
"noResults": {
|
"noResults": {
|
||||||
"title": ""
|
"title": "Det finns inga integrationer ännu"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"create": {
|
"create": {
|
||||||
"title": "",
|
"title": "Ny {name} integration",
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "",
|
"title": "Skapandet lyckades",
|
||||||
"message": ""
|
"message": "Integrationen har skapats"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "",
|
"title": "Skapandet misslyckades",
|
||||||
"message": ""
|
"message": "Integrationen kunde inte skapas"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
"option": {
|
"option": {
|
||||||
"existing": {
|
"existing": {
|
||||||
"title": "",
|
"title": "Befintlig",
|
||||||
"label": ""
|
"label": "Välj befintlig app"
|
||||||
},
|
},
|
||||||
"new": {
|
"new": {
|
||||||
"title": "",
|
"title": "Ny",
|
||||||
"url": {
|
"url": {
|
||||||
"label": "",
|
"label": "App URL",
|
||||||
"description": ""
|
"description": "URL:en som appen kommer att öppna när den används från tavlan"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
"title": "",
|
"title": "Redigera {name} integration",
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "Ändringarna har sparats",
|
"title": "Ändringarna har sparats",
|
||||||
"message": ""
|
"message": "Integrationen sparad"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "",
|
"title": "Kunde inte tillämpa ändringar",
|
||||||
"message": ""
|
"message": "Integrationen kunde inte sparas"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
"action": {
|
"action": {
|
||||||
"add": "",
|
"add": "Länka en app",
|
||||||
"remove": "",
|
"remove": "Ta bort länk",
|
||||||
"select": ""
|
"select": "Välj en app att länka till"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -700,12 +700,12 @@
|
|||||||
"message": "Är du säker på att du vill ta bort integrationen {name}?",
|
"message": "Är du säker på att du vill ta bort integrationen {name}?",
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "",
|
"title": "Borttagning lyckades",
|
||||||
"message": ""
|
"message": "Integrationen har tagits bort"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "",
|
"title": "Borttagning misslyckades",
|
||||||
"message": ""
|
"message": "Kunde inte ta bort integrationen"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -715,44 +715,44 @@
|
|||||||
"label": "Namn"
|
"label": "Namn"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"label": ""
|
"label": "URL"
|
||||||
},
|
},
|
||||||
"attemptSearchEngineCreation": {
|
"attemptSearchEngineCreation": {
|
||||||
"label": "",
|
"label": "Skapa sökmotor",
|
||||||
"description": ""
|
"description": "Integrationen \"{kind}\" kan inte användas med sökmotorer. Markera detta för att automatiskt konfigurera sökmotorn."
|
||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
"sectionTitle": ""
|
"sectionTitle": "Länkad app"
|
||||||
},
|
},
|
||||||
"createApp": {
|
"createApp": {
|
||||||
"label": "",
|
"label": "Skapa app",
|
||||||
"description": ""
|
"description": "Skapa en app med samma namn och ikon som integrationen. Lämna fältet nedan tomt för att skapa en app med integrationens URL."
|
||||||
},
|
},
|
||||||
"appHref": {
|
"appHref": {
|
||||||
"placeholder": ""
|
"placeholder": "Egen app-URL"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"create": ""
|
"create": "Ny integration"
|
||||||
},
|
},
|
||||||
"testConnection": {
|
"testConnection": {
|
||||||
"action": {
|
"action": {
|
||||||
"create": "",
|
"create": "Testa anslutningen och skapa",
|
||||||
"edit": ""
|
"edit": "Testa anslutningen och skapa"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"common": {
|
"common": {
|
||||||
"cause": {
|
"cause": {
|
||||||
"title": ""
|
"title": "Orsak med mer detaljer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"unknown": {
|
"unknown": {
|
||||||
"title": "",
|
"title": "Okänt fel",
|
||||||
"description": ""
|
"description": "Ett okänt fel inträffade, öppna orsaken nedan för att se mer detaljer"
|
||||||
},
|
},
|
||||||
"parse": {
|
"parse": {
|
||||||
"title": "",
|
"title": "Parsningsfel",
|
||||||
"description": ""
|
"description": "Svaret kunde inte analyseras. Verifiera att URL pekar på bas-URL för tjänsten."
|
||||||
},
|
},
|
||||||
"authorization": {
|
"authorization": {
|
||||||
"title": "",
|
"title": "",
|
||||||
|
|||||||
Generated
+474
-498
File diff suppressed because it is too large.
Load diff
+29
-29
@@ -6,7 +6,7 @@ catalog:
|
|||||||
"@auth/core": ^0.41.2
|
"@auth/core": ^0.41.2
|
||||||
"@auth/drizzle-adapter": ^1.11.2
|
"@auth/drizzle-adapter": ^1.11.2
|
||||||
"@ctrl/deluge": ^8.0.0
|
"@ctrl/deluge": ^8.0.0
|
||||||
"@ctrl/qbittorrent": ^9.12.1
|
"@ctrl/qbittorrent": ^9.12.2
|
||||||
"@ctrl/transmission": ^7.4.0
|
"@ctrl/transmission": ^7.4.0
|
||||||
"@dnd-kit/core": ^6.3.1
|
"@dnd-kit/core": ^6.3.1
|
||||||
"@dnd-kit/modifiers": ^9.0.0
|
"@dnd-kit/modifiers": ^9.0.0
|
||||||
@@ -20,17 +20,17 @@ catalog:
|
|||||||
"@immich/sdk": ^2.7.5
|
"@immich/sdk": ^2.7.5
|
||||||
"@jellyfin/sdk": ^0.13.0
|
"@jellyfin/sdk": ^0.13.0
|
||||||
"@kubernetes/client-node": ^1.4.0
|
"@kubernetes/client-node": ^1.4.0
|
||||||
"@mantine/charts": ^9.2.1
|
"@mantine/charts": ^9.2.2
|
||||||
"@mantine/colors-generator": ^9.2.1
|
"@mantine/colors-generator": ^9.2.2
|
||||||
"@mantine/core": ^9.2.1
|
"@mantine/core": ^9.2.2
|
||||||
"@mantine/dates": ^9.2.1
|
"@mantine/dates": ^9.2.2
|
||||||
"@mantine/dropzone": ^9.2.1
|
"@mantine/dropzone": ^9.2.2
|
||||||
"@mantine/form": ^9.2.1
|
"@mantine/form": ^9.2.2
|
||||||
"@mantine/hooks": ^9.2.1
|
"@mantine/hooks": ^9.2.2
|
||||||
"@mantine/modals": ^9.2.1
|
"@mantine/modals": ^9.2.2
|
||||||
"@mantine/notifications": ^9.2.1
|
"@mantine/notifications": ^9.2.2
|
||||||
"@mantine/spotlight": ^9.2.1
|
"@mantine/spotlight": ^9.2.2
|
||||||
"@mantine/tiptap": ^9.2.1
|
"@mantine/tiptap": ^9.2.2
|
||||||
"@next/eslint-plugin-next": 16.2.6
|
"@next/eslint-plugin-next": 16.2.6
|
||||||
"@octokit/auth-app": ^8.2.0
|
"@octokit/auth-app": ^8.2.0
|
||||||
"@paralleldrive/cuid2": ^3.3.0
|
"@paralleldrive/cuid2": ^3.3.0
|
||||||
@@ -43,12 +43,12 @@ catalog:
|
|||||||
"@semantic-release/release-notes-generator": ^14.1.1
|
"@semantic-release/release-notes-generator": ^14.1.1
|
||||||
"@t3-oss/env-nextjs": ^0.13.11
|
"@t3-oss/env-nextjs": ^0.13.11
|
||||||
"@tabler/icons-react": ^3.44.0
|
"@tabler/icons-react": ^3.44.0
|
||||||
"@tanstack/react-query": ^5.100.13
|
"@tanstack/react-query": ^5.100.14
|
||||||
"@tanstack/react-query-devtools": ^5.100.13
|
"@tanstack/react-query-devtools": ^5.100.14
|
||||||
"@tanstack/react-query-next-experimental": ^5.100.13
|
"@tanstack/react-query-next-experimental": ^5.100.14
|
||||||
"@testcontainers/mysql": ^12.0.0
|
"@testcontainers/mysql": ^12.0.1
|
||||||
"@testcontainers/postgresql": ^12.0.0
|
"@testcontainers/postgresql": ^12.0.1
|
||||||
"@testcontainers/redis": ^12.0.0
|
"@testcontainers/redis": ^12.0.1
|
||||||
"@tiptap/extension-color": 3.23.6
|
"@tiptap/extension-color": 3.23.6
|
||||||
"@tiptap/extension-highlight": 3.23.6
|
"@tiptap/extension-highlight": 3.23.6
|
||||||
"@tiptap/extension-image": 3.23.6
|
"@tiptap/extension-image": 3.23.6
|
||||||
@@ -70,7 +70,7 @@ catalog:
|
|||||||
"@trpc/react-query": ^11.17.0
|
"@trpc/react-query": ^11.17.0
|
||||||
"@trpc/server": ^11.17.0
|
"@trpc/server": ^11.17.0
|
||||||
"@trpc/tanstack-react-query": ^11.17.0
|
"@trpc/tanstack-react-query": ^11.17.0
|
||||||
"@turbo/gen": ^2.9.14
|
"@turbo/gen": ^2.9.16
|
||||||
"@types/adm-zip": 0.5.8
|
"@types/adm-zip": 0.5.8
|
||||||
"@types/bcrypt": 6.0.0
|
"@types/bcrypt": 6.0.0
|
||||||
"@types/better-sqlite3": 7.6.13
|
"@types/better-sqlite3": 7.6.13
|
||||||
@@ -109,7 +109,7 @@ catalog:
|
|||||||
croner: 10.0.1
|
croner: 10.0.1
|
||||||
cross-env: ^10.1.0
|
cross-env: ^10.1.0
|
||||||
crypto-js: ^4.2.0
|
crypto-js: ^4.2.0
|
||||||
dayjs: ^1.11.20
|
dayjs: ^1.11.21
|
||||||
deepmerge: 4.3.1
|
deepmerge: 4.3.1
|
||||||
dns-caching: ^0.2.9
|
dns-caching: ^0.2.9
|
||||||
dockerode: ^5.0.0
|
dockerode: ^5.0.0
|
||||||
@@ -124,8 +124,8 @@ catalog:
|
|||||||
flag-icons: ^7.5.0
|
flag-icons: ^7.5.0
|
||||||
glob: ^13.0.6
|
glob: ^13.0.6
|
||||||
ical.js: ^2.2.1
|
ical.js: ^2.2.1
|
||||||
ioredis: 5.10.1
|
ioredis: 5.11.0
|
||||||
isomorphic-dompurify: ^3.14.0
|
isomorphic-dompurify: ^3.15.0
|
||||||
jotai: ^2.20.0
|
jotai: ^2.20.0
|
||||||
jsdom: ^29.1.1
|
jsdom: ^29.1.1
|
||||||
json5: ^2.2.3
|
json5: ^2.2.3
|
||||||
@@ -133,21 +133,21 @@ catalog:
|
|||||||
lodash.clonedeep: ^4.5.0
|
lodash.clonedeep: ^4.5.0
|
||||||
mantine-react-table: 2.0.0-beta.9
|
mantine-react-table: 2.0.0-beta.9
|
||||||
maria2: ^0.4.1
|
maria2: ^0.4.1
|
||||||
mysql2: 3.22.3
|
mysql2: 3.22.4
|
||||||
next: 16.2.6
|
next: 16.2.6
|
||||||
next-auth: 5.0.0-beta.31
|
next-auth: 5.0.0-beta.31
|
||||||
next-intl: 4.12.0
|
next-intl: 4.13.0
|
||||||
node-loader: ^2.1.0
|
node-loader: ^2.1.0
|
||||||
octokit: ^5.0.5
|
octokit: ^5.0.5
|
||||||
oxfmt: ^0.51.0
|
oxfmt: ^0.52.0
|
||||||
oxlint: ^1.66.0
|
oxlint: ^1.67.0
|
||||||
pg: ^8.21.0
|
pg: ^8.21.0
|
||||||
postcss-preset-mantine: ^1.18.0
|
postcss-preset-mantine: ^1.18.0
|
||||||
prismjs: ^1.30.0
|
prismjs: ^1.30.0
|
||||||
proxmox-api: 1.1.1
|
proxmox-api: 1.1.1
|
||||||
react: 19.2.6
|
react: 19.2.6
|
||||||
react-dom: 19.2.6
|
react-dom: 19.2.6
|
||||||
react-error-boundary: ^6.1.1
|
react-error-boundary: ^6.1.2
|
||||||
react-markdown: ^10.1.0
|
react-markdown: ^10.1.0
|
||||||
react-quill-new: ^3.8.3
|
react-quill-new: ^3.8.3
|
||||||
react-simple-code-editor: ^0.14.1
|
react-simple-code-editor: ^0.14.1
|
||||||
@@ -158,12 +158,12 @@ catalog:
|
|||||||
superjson: 2.2.6
|
superjson: 2.2.6
|
||||||
svgson: ^5.3.1
|
svgson: ^5.3.1
|
||||||
swagger-ui-react: ^5.32.6
|
swagger-ui-react: ^5.32.6
|
||||||
testcontainers: ^12.0.0
|
testcontainers: ^12.0.1
|
||||||
timezones-ical-library: ^2.2.0
|
timezones-ical-library: ^2.2.0
|
||||||
trpc-to-openapi: ^3.3.0
|
trpc-to-openapi: ^3.3.0
|
||||||
tsdav: ^2.2.2
|
tsdav: ^2.2.2
|
||||||
tsx: 4.20.4
|
tsx: 4.20.4
|
||||||
turbo: ^2.9.14
|
turbo: ^2.9.16
|
||||||
typescript: ^5.9.3
|
typescript: ^5.9.3
|
||||||
undici: 7.24.6
|
undici: 7.24.6
|
||||||
use-deep-compare-effect: ^1.8.1
|
use-deep-compare-effect: ^1.8.1
|
||||||
|
|||||||
Reference in new issue
Block a user