fix: migrate from node-cron to croner (#5407)
This commit is contained in:
1 parent
ed6680ba6a
commit
e8edc203b6
10 files changed
+72
-116
No files matched your search
@@ -37,6 +37,7 @@
|
|||||||
"@homarr/server-settings": "workspace:^0.1.0",
|
"@homarr/server-settings": "workspace:^0.1.0",
|
||||||
"@homarr/validation": "workspace:^0.1.0",
|
"@homarr/validation": "workspace:^0.1.0",
|
||||||
"@homarr/widgets": "workspace:^0.1.0",
|
"@homarr/widgets": "workspace:^0.1.0",
|
||||||
|
"croner": "catalog:",
|
||||||
"dayjs": "catalog:",
|
"dayjs": "catalog:",
|
||||||
"dotenv": "catalog:",
|
"dotenv": "catalog:",
|
||||||
"fastify": "catalog:",
|
"fastify": "catalog:",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { schedule, validate as validateCron } from "node-cron";
|
import { Cron } from "croner";
|
||||||
|
|
||||||
import { createLogger } from "@homarr/core/infrastructure/logs";
|
import { createLogger } from "@homarr/core/infrastructure/logs";
|
||||||
import type { IJobManager } from "@homarr/cron-job-api";
|
import type { IJobManager } from "@homarr/cron-job-api";
|
||||||
@@ -21,28 +21,31 @@ export class JobManager implements IJobManager {
|
|||||||
public async triggerAsync(name: JobGroupKeys): Promise<void> {
|
public async triggerAsync(name: JobGroupKeys): Promise<void> {
|
||||||
await this.jobGroup.runManuallyAsync(name);
|
await this.jobGroup.runManuallyAsync(name);
|
||||||
}
|
}
|
||||||
public async stopAsync(name: JobGroupKeys): Promise<void> {
|
public stop(name: JobGroupKeys): void {
|
||||||
await this.jobGroup.stopAsync(name);
|
this.jobGroup.stop(name);
|
||||||
}
|
}
|
||||||
public async updateIntervalAsync(name: JobGroupKeys, cron: string): Promise<void> {
|
public async updateIntervalAsync(name: JobGroupKeys, cron: string): Promise<void> {
|
||||||
logger.info("Updating cron job interval", { name, expression: cron });
|
logger.info("Updating cron job interval", { name, expression: cron });
|
||||||
const job = this.jobGroup.getJobRegistry().get(name);
|
const job = this.jobGroup.getJobRegistry().get(name);
|
||||||
if (!job) throw new Error(`Job ${name} not found`);
|
if (!job) throw new Error(`Job ${name} not found`);
|
||||||
if (!validateCron(cron)) {
|
|
||||||
throw new Error(`Invalid cron expression: ${cron}`);
|
|
||||||
}
|
|
||||||
if (job.preventCustomInterval && cron !== job.cronExpression) {
|
if (job.preventCustomInterval && cron !== job.cronExpression) {
|
||||||
throw new Error(`Custom cron expressions are not allowed for job ${name}`);
|
throw new Error(`Custom cron expressions are not allowed for job ${name}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.updateConfigurationAsync(name, { cronExpression: cron });
|
const updatedConfig = await this.updateConfigurationAsync(name, { cronExpression: cron });
|
||||||
await this.jobGroup.getTask(name)?.destroy();
|
this.jobGroup.getTask(name)?.stop();
|
||||||
|
|
||||||
this.jobGroup.setTask(
|
this.jobGroup.setTask(
|
||||||
name,
|
name,
|
||||||
schedule(cron, () => void job.executeAsync(), {
|
new Cron(
|
||||||
name,
|
cron,
|
||||||
}),
|
{
|
||||||
|
name,
|
||||||
|
timezone: job.timezone,
|
||||||
|
paused: !updatedConfig.isEnabled,
|
||||||
|
},
|
||||||
|
() => void job.executeAsync(),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
logger.info("Cron job interval updated", { name, expression: cron });
|
logger.info("Cron job interval updated", { name, expression: cron });
|
||||||
}
|
}
|
||||||
@@ -52,7 +55,7 @@ export class JobManager implements IJobManager {
|
|||||||
if (!job) throw new Error(`Job ${name} not found`);
|
if (!job) throw new Error(`Job ${name} not found`);
|
||||||
|
|
||||||
await this.updateConfigurationAsync(name, { isEnabled: false });
|
await this.updateConfigurationAsync(name, { isEnabled: false });
|
||||||
await this.jobGroup.stopAsync(name);
|
this.jobGroup.stop(name);
|
||||||
logger.info("Cron job disabled", { name });
|
logger.info("Cron job disabled", { name });
|
||||||
}
|
}
|
||||||
public async enableAsync(name: JobGroupKeys): Promise<void> {
|
public async enableAsync(name: JobGroupKeys): Promise<void> {
|
||||||
@@ -86,21 +89,27 @@ export class JobManager implements IJobManager {
|
|||||||
name,
|
name,
|
||||||
configuration: JSON.stringify(configuration),
|
configuration: JSON.stringify(configuration),
|
||||||
});
|
});
|
||||||
return;
|
return {
|
||||||
|
name,
|
||||||
|
cronExpression: configuration.cronExpression ?? existingConfig.cronExpression,
|
||||||
|
isEnabled: configuration.isEnabled ?? existingConfig.isEnabled,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const job = this.jobGroup.getJobRegistry().get(name);
|
const job = this.jobGroup.getJobRegistry().get(name);
|
||||||
if (!job) throw new Error(`Job ${name} not found`);
|
if (!job) throw new Error(`Job ${name} not found`);
|
||||||
|
|
||||||
await this.db.insert(cronJobConfigurations).values({
|
const updatedConfig = {
|
||||||
name,
|
name,
|
||||||
cronExpression: configuration.cronExpression ?? job.cronExpression,
|
cronExpression: configuration.cronExpression ?? job.cronExpression,
|
||||||
isEnabled: configuration.isEnabled ?? true,
|
isEnabled: configuration.isEnabled ?? true,
|
||||||
});
|
};
|
||||||
|
await this.db.insert(cronJobConfigurations).values(updatedConfig);
|
||||||
logger.debug("Cron job configuration updated", {
|
logger.debug("Cron job configuration updated", {
|
||||||
name,
|
name,
|
||||||
configuration: JSON.stringify(configuration),
|
configuration: JSON.stringify(configuration),
|
||||||
});
|
});
|
||||||
|
return updatedConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getAllAsync(): Promise<
|
public async getAllAsync(): Promise<
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { observable } from "@trpc/server/observable";
|
|||||||
import z from "zod/v4";
|
import z from "zod/v4";
|
||||||
|
|
||||||
import { createLogger } from "@homarr/core/infrastructure/logs";
|
import { createLogger } from "@homarr/core/infrastructure/logs";
|
||||||
import { cronExpressionSchema, jobGroupKeys, jobNameSchema } from "@homarr/cron-job-api";
|
import { jobGroupKeys, jobNameSchema } from "@homarr/cron-job-api";
|
||||||
import { cronJobApi } from "@homarr/cron-job-api/client";
|
import { cronJobApi } from "@homarr/cron-job-api/client";
|
||||||
import type { TaskStatus } from "@homarr/cron-job-status";
|
import type { TaskStatus } from "@homarr/cron-job-status";
|
||||||
import { createCronJobStatusChannel } from "@homarr/cron-job-status";
|
import { createCronJobStatusChannel } from "@homarr/cron-job-status";
|
||||||
@@ -35,7 +35,7 @@ export const cronJobsRouter = createTRPCRouter({
|
|||||||
.input(
|
.input(
|
||||||
z.object({
|
z.object({
|
||||||
name: jobNameSchema,
|
name: jobNameSchema,
|
||||||
cron: cronExpressionSchema,
|
cron: z.string(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
"@trpc/client": "catalog:",
|
"@trpc/client": "catalog:",
|
||||||
"@trpc/server": "catalog:",
|
"@trpc/server": "catalog:",
|
||||||
"@trpc/tanstack-react-query": "catalog:",
|
"@trpc/tanstack-react-query": "catalog:",
|
||||||
"node-cron": "catalog:",
|
|
||||||
"react": "catalog:",
|
"react": "catalog:",
|
||||||
"zod": "catalog:"
|
"zod": "catalog:"
|
||||||
},
|
},
|
||||||
@@ -40,7 +39,6 @@
|
|||||||
"@homarr/eslint-config": "workspace:^0.2.0",
|
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||||
"@homarr/prettier-config": "workspace:^0.1.0",
|
"@homarr/prettier-config": "workspace:^0.1.0",
|
||||||
"@homarr/tsconfig": "workspace:^0.1.0",
|
"@homarr/tsconfig": "workspace:^0.1.0",
|
||||||
"@types/node-cron": "catalog:",
|
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { initTRPC, TRPCError } from "@trpc/server";
|
import { initTRPC, TRPCError } from "@trpc/server";
|
||||||
import { validate } from "node-cron";
|
|
||||||
import { z } from "zod/v4";
|
import { z } from "zod/v4";
|
||||||
|
|
||||||
import type { JobGroupKeys } from "@homarr/cron-jobs";
|
import type { JobGroupKeys } from "@homarr/cron-jobs";
|
||||||
@@ -13,7 +12,7 @@ export const jobNameSchema = z.enum(jobGroup.getKeys());
|
|||||||
export interface IJobManager {
|
export interface IJobManager {
|
||||||
startAsync(name: JobGroupKeys): Promise<void>;
|
startAsync(name: JobGroupKeys): Promise<void>;
|
||||||
triggerAsync(name: JobGroupKeys): Promise<void>;
|
triggerAsync(name: JobGroupKeys): Promise<void>;
|
||||||
stopAsync(name: JobGroupKeys): Promise<void>;
|
stop(name: JobGroupKeys): void;
|
||||||
updateIntervalAsync(name: JobGroupKeys, cron: string): Promise<void>;
|
updateIntervalAsync(name: JobGroupKeys, cron: string): Promise<void>;
|
||||||
disableAsync(name: JobGroupKeys): Promise<void>;
|
disableAsync(name: JobGroupKeys): Promise<void>;
|
||||||
enableAsync(name: JobGroupKeys): Promise<void>;
|
enableAsync(name: JobGroupKeys): Promise<void>;
|
||||||
@@ -52,10 +51,6 @@ const apiKeyProcedure = t.procedure.use(({ ctx, next }) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
export const cronExpressionSchema = z.string().refine((expression) => validate(expression), {
|
|
||||||
error: "Invalid cron expression",
|
|
||||||
});
|
|
||||||
|
|
||||||
export const jobRouter = createTrpcRouter({
|
export const jobRouter = createTrpcRouter({
|
||||||
start: apiKeyProcedure.input(jobNameSchema).mutation(async ({ input, ctx }) => {
|
start: apiKeyProcedure.input(jobNameSchema).mutation(async ({ input, ctx }) => {
|
||||||
await ctx.manager.startAsync(input);
|
await ctx.manager.startAsync(input);
|
||||||
@@ -63,14 +58,14 @@ export const jobRouter = createTrpcRouter({
|
|||||||
trigger: apiKeyProcedure.input(jobNameSchema).mutation(async ({ input, ctx }) => {
|
trigger: apiKeyProcedure.input(jobNameSchema).mutation(async ({ input, ctx }) => {
|
||||||
await ctx.manager.triggerAsync(input);
|
await ctx.manager.triggerAsync(input);
|
||||||
}),
|
}),
|
||||||
stop: apiKeyProcedure.input(jobNameSchema).mutation(async ({ input, ctx }) => {
|
stop: apiKeyProcedure.input(jobNameSchema).mutation(({ input, ctx }) => {
|
||||||
await ctx.manager.stopAsync(input);
|
ctx.manager.stop(input);
|
||||||
}),
|
}),
|
||||||
updateInterval: apiKeyProcedure
|
updateInterval: apiKeyProcedure
|
||||||
.input(
|
.input(
|
||||||
z.object({
|
z.object({
|
||||||
name: jobNameSchema,
|
name: jobNameSchema,
|
||||||
cron: cronExpressionSchema,
|
cron: z.string(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.mutation(async ({ input, ctx }) => {
|
.mutation(async ({ input, ctx }) => {
|
||||||
|
|||||||
@@ -27,13 +27,12 @@
|
|||||||
"@homarr/common": "workspace:^0.1.0",
|
"@homarr/common": "workspace:^0.1.0",
|
||||||
"@homarr/core": "workspace:^",
|
"@homarr/core": "workspace:^",
|
||||||
"@homarr/db": "workspace:^0.1.0",
|
"@homarr/db": "workspace:^0.1.0",
|
||||||
"node-cron": "catalog:"
|
"croner": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@homarr/eslint-config": "workspace:^0.2.0",
|
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||||
"@homarr/prettier-config": "workspace:^0.1.0",
|
"@homarr/prettier-config": "workspace:^0.1.0",
|
||||||
"@homarr/tsconfig": "workspace:^0.1.0",
|
"@homarr/tsconfig": "workspace:^0.1.0",
|
||||||
"@types/node-cron": "catalog:",
|
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createTask, validate } from "node-cron";
|
import { Cron } from "croner";
|
||||||
|
|
||||||
import { Stopwatch } from "@homarr/common";
|
import { Stopwatch } from "@homarr/common";
|
||||||
import type { MaybePromise } from "@homarr/common/types";
|
import type { MaybePromise } from "@homarr/common/types";
|
||||||
@@ -83,10 +83,15 @@ const createCallback = <TAllowedNames extends string, TName extends TAllowedName
|
|||||||
? defaultCronExpression
|
? defaultCronExpression
|
||||||
: (configuration?.cronExpression ?? defaultCronExpression);
|
: (configuration?.cronExpression ?? defaultCronExpression);
|
||||||
|
|
||||||
const scheduledTask = createTask(cronExpression, () => void catchingCallbackAsync(), {
|
const scheduledTask = new Cron(
|
||||||
name,
|
cronExpression,
|
||||||
timezone: creatorOptions.timezone,
|
{
|
||||||
});
|
name,
|
||||||
|
timezone: creatorOptions.timezone,
|
||||||
|
paused: true,
|
||||||
|
},
|
||||||
|
() => void catchingCallbackAsync(),
|
||||||
|
);
|
||||||
creatorOptions.logger.logDebug("The scheduled task for cron job was created", {
|
creatorOptions.logger.logDebug("The scheduled task for cron job was created", {
|
||||||
name,
|
name,
|
||||||
cronExpression: defaultCronExpression,
|
cronExpression: defaultCronExpression,
|
||||||
@@ -116,6 +121,7 @@ const createCallback = <TAllowedNames extends string, TName extends TAllowedName
|
|||||||
},
|
},
|
||||||
preventManualExecution: options.preventManualExecution ?? false,
|
preventManualExecution: options.preventManualExecution ?? false,
|
||||||
preventCustomInterval: options.preventCustomInterval ?? false,
|
preventCustomInterval: options.preventCustomInterval ?? false,
|
||||||
|
timezone: creatorOptions.timezone,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -132,13 +138,6 @@ export const createCronJobCreator = <TAllowedNames extends string = string>(
|
|||||||
defaultCronExpression: TExpression,
|
defaultCronExpression: TExpression,
|
||||||
options: CreateCronJobOptions = { runOnStart: false },
|
options: CreateCronJobOptions = { runOnStart: false },
|
||||||
) => {
|
) => {
|
||||||
creatorOptions.logger.logDebug("Validating cron expression for cron job", {
|
|
||||||
name,
|
|
||||||
cronExpression: defaultCronExpression,
|
|
||||||
});
|
|
||||||
if (!validate(defaultCronExpression)) {
|
|
||||||
throw new Error(`Invalid cron expression '${defaultCronExpression}' for job '${name}'`);
|
|
||||||
}
|
|
||||||
creatorOptions.logger.logDebug("Cron job expression for cron job is valid", {
|
creatorOptions.logger.logDebug("Cron job expression for cron job is valid", {
|
||||||
name,
|
name,
|
||||||
cronExpression: defaultCronExpression,
|
cronExpression: defaultCronExpression,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ScheduledTask } from "node-cron";
|
import type { Cron } from "croner";
|
||||||
|
|
||||||
import { objectEntries, objectKeys } from "@homarr/common";
|
import { objectEntries, objectKeys } from "@homarr/common";
|
||||||
import { db } from "@homarr/db";
|
import { db } from "@homarr/db";
|
||||||
@@ -34,7 +34,7 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const tasks = new Map<string, ScheduledTask>();
|
const tasks = new Map<string, Cron>();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
initializeAsync: async () => {
|
initializeAsync: async () => {
|
||||||
@@ -62,7 +62,7 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
|
|||||||
name: job.name,
|
name: job.name,
|
||||||
});
|
});
|
||||||
await job.onStartAsync();
|
await job.onStartAsync();
|
||||||
await tasks.get(name as string)?.start();
|
tasks.get(name as string)?.resume();
|
||||||
},
|
},
|
||||||
startAllAsync: async () => {
|
startAllAsync: async () => {
|
||||||
for (const job of jobRegistry.values()) {
|
for (const job of jobRegistry.values()) {
|
||||||
@@ -74,7 +74,7 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
|
|||||||
name: job.name,
|
name: job.name,
|
||||||
});
|
});
|
||||||
await job.onStartAsync();
|
await job.onStartAsync();
|
||||||
await tasks.get(job.name)?.start();
|
tasks.get(job.name)?.resume();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
runManuallyAsync: async (name: keyof TJobs) => {
|
runManuallyAsync: async (name: keyof TJobs) => {
|
||||||
@@ -87,23 +87,23 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
|
|||||||
options.logger.logInfo("Running schedule cron job manually.", {
|
options.logger.logInfo("Running schedule cron job manually.", {
|
||||||
name: job.name,
|
name: job.name,
|
||||||
});
|
});
|
||||||
await tasks.get(name as string)?.execute();
|
await tasks.get(name as string)?.trigger();
|
||||||
},
|
},
|
||||||
stopAsync: async (name: keyof TJobs) => {
|
stop: (name: keyof TJobs) => {
|
||||||
const job = jobRegistry.get(name as string);
|
const job = jobRegistry.get(name as string);
|
||||||
if (!job) return;
|
if (!job) return;
|
||||||
|
|
||||||
options.logger.logInfo("Stopping schedule of cron job.", {
|
options.logger.logInfo("Stopping schedule of cron job.", {
|
||||||
name: job.name,
|
name: job.name,
|
||||||
});
|
});
|
||||||
await tasks.get(name as string)?.stop();
|
tasks.get(name as string)?.pause();
|
||||||
},
|
},
|
||||||
stopAllAsync: async () => {
|
stopAll: () => {
|
||||||
for (const job of jobRegistry.values()) {
|
for (const job of jobRegistry.values()) {
|
||||||
options.logger.logInfo("Stopping schedule of cron job.", {
|
options.logger.logInfo("Stopping schedule of cron job.", {
|
||||||
name: job.name,
|
name: job.name,
|
||||||
});
|
});
|
||||||
await tasks.get(job.name)?.stop();
|
tasks.get(job.name)?.pause();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getJobRegistry() {
|
getJobRegistry() {
|
||||||
@@ -112,8 +112,8 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
|
|||||||
getTask(name: keyof TJobs) {
|
getTask(name: keyof TJobs) {
|
||||||
return tasks.get(name as string) ?? null;
|
return tasks.get(name as string) ?? null;
|
||||||
},
|
},
|
||||||
setTask(name: keyof TJobs, task: ScheduledTask) {
|
setTask(name: keyof TJobs, cron: Cron) {
|
||||||
tasks.set(name as string, task);
|
tasks.set(name as string, cron);
|
||||||
},
|
},
|
||||||
getKeys() {
|
getKeys() {
|
||||||
return objectKeys(jobs);
|
return objectKeys(jobs);
|
||||||
|
|||||||
Generated
+17
-61
@@ -240,9 +240,6 @@ catalogs:
|
|||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^24.12.2
|
specifier: ^24.12.2
|
||||||
version: 24.12.2
|
version: 24.12.2
|
||||||
'@types/node-cron':
|
|
||||||
specifier: ^3.0.11
|
|
||||||
version: 3.0.11
|
|
||||||
'@types/node-unifi':
|
'@types/node-unifi':
|
||||||
specifier: ^2.5.1
|
specifier: ^2.5.1
|
||||||
version: 2.5.1
|
version: 2.5.1
|
||||||
@@ -321,6 +318,9 @@ catalogs:
|
|||||||
cookies:
|
cookies:
|
||||||
specifier: ^0.9.1
|
specifier: ^0.9.1
|
||||||
version: 0.9.1
|
version: 0.9.1
|
||||||
|
croner:
|
||||||
|
specifier: 10.0.1
|
||||||
|
version: 10.0.1
|
||||||
cross-env:
|
cross-env:
|
||||||
specifier: ^10.1.0
|
specifier: ^10.1.0
|
||||||
version: 10.1.0
|
version: 10.1.0
|
||||||
@@ -435,9 +435,6 @@ catalogs:
|
|||||||
next-intl:
|
next-intl:
|
||||||
specifier: 4.9.1
|
specifier: 4.9.1
|
||||||
version: 4.9.1
|
version: 4.9.1
|
||||||
node-cron:
|
|
||||||
specifier: ^4.2.1
|
|
||||||
version: 4.2.1
|
|
||||||
node-loader:
|
node-loader:
|
||||||
specifier: ^2.1.0
|
specifier: ^2.1.0
|
||||||
version: 2.1.0
|
version: 2.1.0
|
||||||
@@ -986,6 +983,9 @@ importers:
|
|||||||
'@homarr/widgets':
|
'@homarr/widgets':
|
||||||
specifier: workspace:^0.1.0
|
specifier: workspace:^0.1.0
|
||||||
version: link:../../packages/widgets
|
version: link:../../packages/widgets
|
||||||
|
croner:
|
||||||
|
specifier: 'catalog:'
|
||||||
|
version: 10.0.1
|
||||||
dayjs:
|
dayjs:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 1.11.20
|
version: 1.11.20
|
||||||
@@ -1526,9 +1526,6 @@ importers:
|
|||||||
'@trpc/tanstack-react-query':
|
'@trpc/tanstack-react-query':
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 11.16.0(@tanstack/react-query@5.100.5(react@19.2.5))(@trpc/client@11.16.0(@trpc/server@11.16.0(typescript@5.9.3))(typescript@5.9.3))(@trpc/server@11.16.0(typescript@5.9.3))(react@19.2.5)(typescript@5.9.3)
|
version: 11.16.0(@tanstack/react-query@5.100.5(react@19.2.5))(@trpc/client@11.16.0(@trpc/server@11.16.0(typescript@5.9.3))(typescript@5.9.3))(@trpc/server@11.16.0(typescript@5.9.3))(react@19.2.5)(typescript@5.9.3)
|
||||||
node-cron:
|
|
||||||
specifier: 'catalog:'
|
|
||||||
version: 4.2.1
|
|
||||||
react:
|
react:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 19.2.5
|
version: 19.2.5
|
||||||
@@ -1545,9 +1542,6 @@ importers:
|
|||||||
'@homarr/tsconfig':
|
'@homarr/tsconfig':
|
||||||
specifier: workspace:^0.1.0
|
specifier: workspace:^0.1.0
|
||||||
version: link:../../tooling/typescript
|
version: link:../../tooling/typescript
|
||||||
'@types/node-cron':
|
|
||||||
specifier: 'catalog:'
|
|
||||||
version: 3.0.11
|
|
||||||
'@types/react':
|
'@types/react':
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 19.2.14
|
version: 19.2.14
|
||||||
@@ -1661,9 +1655,9 @@ importers:
|
|||||||
'@homarr/db':
|
'@homarr/db':
|
||||||
specifier: workspace:^0.1.0
|
specifier: workspace:^0.1.0
|
||||||
version: link:../db
|
version: link:../db
|
||||||
node-cron:
|
croner:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 4.2.1
|
version: 10.0.1
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@homarr/eslint-config':
|
'@homarr/eslint-config':
|
||||||
specifier: workspace:^0.2.0
|
specifier: workspace:^0.2.0
|
||||||
@@ -1674,9 +1668,6 @@ importers:
|
|||||||
'@homarr/tsconfig':
|
'@homarr/tsconfig':
|
||||||
specifier: workspace:^0.1.0
|
specifier: workspace:^0.1.0
|
||||||
version: link:../../tooling/typescript
|
version: link:../../tooling/typescript
|
||||||
'@types/node-cron':
|
|
||||||
specifier: 'catalog:'
|
|
||||||
version: 3.0.11
|
|
||||||
eslint:
|
eslint:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 9.39.4
|
version: 9.39.4
|
||||||
@@ -4383,7 +4374,6 @@ packages:
|
|||||||
|
|
||||||
'@million/lint@1.0.14':
|
'@million/lint@1.0.14':
|
||||||
resolution: {integrity: sha512-u6/kglVwZRu5+GMmtkNlGLqJVkgTl0TtM+hLa9rBg7pldx+5NG5bk45NvL37uZmAr2Xfa1C6qHb7GrFwfP372g==}
|
resolution: {integrity: sha512-u6/kglVwZRu5+GMmtkNlGLqJVkgTl0TtM+hLa9rBg7pldx+5NG5bk45NvL37uZmAr2Xfa1C6qHb7GrFwfP372g==}
|
||||||
deprecated: This package is no longer maintained
|
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
'@ndaidong/bellajs@12.0.1':
|
'@ndaidong/bellajs@12.0.1':
|
||||||
@@ -5688,9 +5678,6 @@ packages:
|
|||||||
'@types/ms@2.1.0':
|
'@types/ms@2.1.0':
|
||||||
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
|
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
|
||||||
|
|
||||||
'@types/node-cron@3.0.11':
|
|
||||||
resolution: {integrity: sha512-0ikrnug3/IyneSHqCBeslAhlK2aBfYek1fGo4bP4QnZPmiqSGRK+Oy7ZMisLWkesffJvQ1cqAcBnJC+8+nxIAg==}
|
|
||||||
|
|
||||||
'@types/node-fetch@2.6.13':
|
'@types/node-fetch@2.6.13':
|
||||||
resolution: {integrity: sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==}
|
resolution: {integrity: sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==}
|
||||||
|
|
||||||
@@ -6635,6 +6622,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==}
|
resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
|
|
||||||
|
croner@10.0.1:
|
||||||
|
resolution: {integrity: sha512-ixNtAJndqh173VQ4KodSdJEI6nuioBWI0V1ITNKhZZsO0pEMoDxz539T4FTTbSZ/xIOSuDnzxLVRqBVSvPNE2g==}
|
||||||
|
engines: {node: '>=18.0'}
|
||||||
|
|
||||||
cross-env@10.1.0:
|
cross-env@10.1.0:
|
||||||
resolution: {integrity: sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==}
|
resolution: {integrity: sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==}
|
||||||
engines: {node: '>=20'}
|
engines: {node: '>=20'}
|
||||||
@@ -6886,9 +6877,6 @@ packages:
|
|||||||
dom-walk@0.1.2:
|
dom-walk@0.1.2:
|
||||||
resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==}
|
resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==}
|
||||||
|
|
||||||
dompurify@3.3.3:
|
|
||||||
resolution: {integrity: sha512-Oj6pzI2+RqBfFG+qOaOLbFXLQ90ARpcGG6UePL82bJLtdsa6CYJD7nmiU8MW9nQNOtCHV3lZ/Bzq1X0QYbBZCA==}
|
|
||||||
|
|
||||||
dompurify@3.4.1:
|
dompurify@3.4.1:
|
||||||
resolution: {integrity: sha512-JahakDAIg1gyOm7dlgWSDjV4n7Ip2PKR55NIT6jrMfIgLFgWo81vdr1/QGqWtFNRqXP9UV71oVePtjqS2ebnPw==}
|
resolution: {integrity: sha512-JahakDAIg1gyOm7dlgWSDjV4n7Ip2PKR55NIT6jrMfIgLFgWo81vdr1/QGqWtFNRqXP9UV71oVePtjqS2ebnPw==}
|
||||||
|
|
||||||
@@ -7403,10 +7391,6 @@ packages:
|
|||||||
fast-xml-builder@1.1.5:
|
fast-xml-builder@1.1.5:
|
||||||
resolution: {integrity: sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==}
|
resolution: {integrity: sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==}
|
||||||
|
|
||||||
fast-xml-parser@5.7.1:
|
|
||||||
resolution: {integrity: sha512-8Cc3f8GUGUULg34pBch/KGyPLglS+OFs05deyOlY7fL2MTagYPKrVQNmR1fLF/yJ9PH5ZSTd3YDF6pnmeZU+zA==}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
fast-xml-parser@5.7.2:
|
fast-xml-parser@5.7.2:
|
||||||
resolution: {integrity: sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w==}
|
resolution: {integrity: sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@@ -7503,15 +7487,6 @@ packages:
|
|||||||
fn.name@1.1.0:
|
fn.name@1.1.0:
|
||||||
resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==}
|
resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==}
|
||||||
|
|
||||||
follow-redirects@1.15.9:
|
|
||||||
resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==}
|
|
||||||
engines: {node: '>=4.0'}
|
|
||||||
peerDependencies:
|
|
||||||
debug: '*'
|
|
||||||
peerDependenciesMeta:
|
|
||||||
debug:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
follow-redirects@1.16.0:
|
follow-redirects@1.16.0:
|
||||||
resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==}
|
resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==}
|
||||||
engines: {node: '>=4.0'}
|
engines: {node: '>=4.0'}
|
||||||
@@ -8793,10 +8768,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-lytcDEdxKjGJPTLEfW4mYMigRezMlyJY8W4wxJK8zE533Jlb8L8dRuObJFWg2P+AuOIxoCgKF+2Oq4d4Zd0OUA==}
|
resolution: {integrity: sha512-lytcDEdxKjGJPTLEfW4mYMigRezMlyJY8W4wxJK8zE533Jlb8L8dRuObJFWg2P+AuOIxoCgKF+2Oq4d4Zd0OUA==}
|
||||||
engines: {node: ^18 || ^20 || >= 21}
|
engines: {node: ^18 || ^20 || >= 21}
|
||||||
|
|
||||||
node-cron@4.2.1:
|
|
||||||
resolution: {integrity: sha512-lgimEHPE/QDgFlywTd8yTR61ptugX3Qer29efeyWw2rv259HtGBNn1vZVmp8lB9uo9wC0t/AT4iGqXxia+CJFg==}
|
|
||||||
engines: {node: '>=6.0.0'}
|
|
||||||
|
|
||||||
node-domexception@1.0.0:
|
node-domexception@1.0.0:
|
||||||
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
|
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
|
||||||
engines: {node: '>=10.5.0'}
|
engines: {node: '>=10.5.0'}
|
||||||
@@ -11867,7 +11838,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@ndaidong/bellajs': 12.0.1
|
'@ndaidong/bellajs': 12.0.1
|
||||||
cross-fetch: 4.1.0
|
cross-fetch: 4.1.0
|
||||||
fast-xml-parser: 5.7.1
|
fast-xml-parser: 5.7.2
|
||||||
html-entities: 2.6.0
|
html-entities: 2.6.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- encoding
|
- encoding
|
||||||
@@ -14021,8 +13992,6 @@ snapshots:
|
|||||||
|
|
||||||
'@types/ms@2.1.0': {}
|
'@types/ms@2.1.0': {}
|
||||||
|
|
||||||
'@types/node-cron@3.0.11': {}
|
|
||||||
|
|
||||||
'@types/node-fetch@2.6.13':
|
'@types/node-fetch@2.6.13':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 24.12.2
|
'@types/node': 24.12.2
|
||||||
@@ -14675,7 +14644,7 @@ snapshots:
|
|||||||
|
|
||||||
axios@1.9.0:
|
axios@1.9.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
follow-redirects: 1.15.9
|
follow-redirects: 1.16.0
|
||||||
form-data: 4.0.5
|
form-data: 4.0.5
|
||||||
proxy-from-env: 1.1.0
|
proxy-from-env: 1.1.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -15103,6 +15072,8 @@ snapshots:
|
|||||||
crc-32: 1.2.2
|
crc-32: 1.2.2
|
||||||
readable-stream: 4.5.2
|
readable-stream: 4.5.2
|
||||||
|
|
||||||
|
croner@10.0.1: {}
|
||||||
|
|
||||||
cross-env@10.1.0:
|
cross-env@10.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@epic-web/invariant': 1.0.0
|
'@epic-web/invariant': 1.0.0
|
||||||
@@ -15340,10 +15311,6 @@ snapshots:
|
|||||||
|
|
||||||
dom-walk@0.1.2: {}
|
dom-walk@0.1.2: {}
|
||||||
|
|
||||||
dompurify@3.3.3:
|
|
||||||
optionalDependencies:
|
|
||||||
'@types/trusted-types': 2.0.7
|
|
||||||
|
|
||||||
dompurify@3.4.1:
|
dompurify@3.4.1:
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@types/trusted-types': 2.0.7
|
'@types/trusted-types': 2.0.7
|
||||||
@@ -15991,13 +15958,6 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
path-expression-matcher: 1.5.0
|
path-expression-matcher: 1.5.0
|
||||||
|
|
||||||
fast-xml-parser@5.7.1:
|
|
||||||
dependencies:
|
|
||||||
'@nodable/entities': 2.1.0
|
|
||||||
fast-xml-builder: 1.1.5
|
|
||||||
path-expression-matcher: 1.5.0
|
|
||||||
strnum: 2.2.3
|
|
||||||
|
|
||||||
fast-xml-parser@5.7.2:
|
fast-xml-parser@5.7.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nodable/entities': 2.1.0
|
'@nodable/entities': 2.1.0
|
||||||
@@ -16102,8 +16062,6 @@ snapshots:
|
|||||||
|
|
||||||
fn.name@1.1.0: {}
|
fn.name@1.1.0: {}
|
||||||
|
|
||||||
follow-redirects@1.15.9: {}
|
|
||||||
|
|
||||||
follow-redirects@1.16.0: {}
|
follow-redirects@1.16.0: {}
|
||||||
|
|
||||||
for-each@0.3.5:
|
for-each@0.3.5:
|
||||||
@@ -17512,8 +17470,6 @@ snapshots:
|
|||||||
|
|
||||||
node-addon-api@8.3.1: {}
|
node-addon-api@8.3.1: {}
|
||||||
|
|
||||||
node-cron@4.2.1: {}
|
|
||||||
|
|
||||||
node-domexception@1.0.0: {}
|
node-domexception@1.0.0: {}
|
||||||
|
|
||||||
node-emoji@2.2.0:
|
node-emoji@2.2.0:
|
||||||
@@ -19220,7 +19176,7 @@ snapshots:
|
|||||||
classnames: 2.5.1
|
classnames: 2.5.1
|
||||||
css.escape: 1.5.1
|
css.escape: 1.5.1
|
||||||
deep-extend: 0.6.0
|
deep-extend: 0.6.0
|
||||||
dompurify: 3.3.3
|
dompurify: 3.4.1
|
||||||
ieee754: 1.2.1
|
ieee754: 1.2.1
|
||||||
immutable: 3.8.2
|
immutable: 3.8.2
|
||||||
js-file-download: 0.4.12
|
js-file-download: 0.4.12
|
||||||
|
|||||||
+1
-2
@@ -86,7 +86,6 @@ catalog:
|
|||||||
"@types/css-modules": ^1.0.5
|
"@types/css-modules": ^1.0.5
|
||||||
"@types/dockerode": ^4.0.1
|
"@types/dockerode": ^4.0.1
|
||||||
"@types/node": ^24.12.2
|
"@types/node": ^24.12.2
|
||||||
"@types/node-cron": ^3.0.11
|
|
||||||
"@types/node-unifi": ^2.5.1
|
"@types/node-unifi": ^2.5.1
|
||||||
"@types/pg": ^8.20.0
|
"@types/pg": ^8.20.0
|
||||||
"@types/prismjs": ^1.26.6
|
"@types/prismjs": ^1.26.6
|
||||||
@@ -113,6 +112,7 @@ catalog:
|
|||||||
conventional-changelog-conventionalcommits: ^9.3.1
|
conventional-changelog-conventionalcommits: ^9.3.1
|
||||||
cookie: 1.1.1
|
cookie: 1.1.1
|
||||||
cookies: ^0.9.1
|
cookies: ^0.9.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.20
|
||||||
@@ -151,7 +151,6 @@ catalog:
|
|||||||
next: 16.2.4
|
next: 16.2.4
|
||||||
next-auth: 5.0.0-beta.31
|
next-auth: 5.0.0-beta.31
|
||||||
next-intl: 4.9.1
|
next-intl: 4.9.1
|
||||||
node-cron: ^4.2.1
|
|
||||||
node-loader: ^2.1.0
|
node-loader: ^2.1.0
|
||||||
octokit: ^5.0.5
|
octokit: ^5.0.5
|
||||||
pg: ^8.20.0
|
pg: ^8.20.0
|
||||||
|
|||||||
Reference in new issue
Block a user