Compare commits

...
Author SHA1 Message Date
Manuel cb77f588e9 Merge remote-tracking branch 'origin/experiment/tasks' into experiment/tasks
# Conflicts:
#	packages/job-scheduler/package.json
2026-03-25 21:12:12 +01:00
Manuel 4192cdaa6e experiment: tasks 2026-03-25 19:46:10 +00:00
Manuel 718b03cdb3 experiment: tasks 2026-03-25 20:35:53 +01:00
homarr-renovate[bot] d4e4c9669d fix(deps): update dependency typescript-eslint to ^8.57.1 (#5286)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-25 02:24:41 +00:00
homarr-renovate[bot] 1db20df19c chore(deps): update dependency proxmox-api&gt;undici to v7.24.0 [security] (#5235)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-24 23:35:41 +00:00
homarr-renovate[bot] feaf022965 fix(deps): update dependency @immich/sdk to ^2.6.1 (#5319)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-24 21:47:26 +00:00
homarr-renovate[bot] 5b4e6fcc11 fix(deps): update turbo monorepo to ^2.8.20 (#5317)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-24 20:52:30 +00:00
homarr-renovate[bot] 20a9b3d556 fix(deps): update dependency @immich/sdk to ^2.6.0 (#5318)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-24 19:21:16 +00:00
homarr-renovate[bot] 47b2d36f7a fix(deps): update dependency ioredis to v5.10.1 (#5316)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-24 18:05:01 +00:00
homarr-renovate[bot] 2336f9ee5e fix(deps): update dependency fast-xml-parser to ^5.5.7 (#5315)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-24 18:04:14 +00:00
homarr-renovate[bot] 6fa6ba385e fix(deps): update dependency @tanstack/react-query to ^5.91.2 (#5314)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-24 11:02:14 +00:00
homarr-renovate[bot] dadf596a31 chore(deps): update dependency vite@&gt;&#x3d;5.0.0 &lt;&#x3d;5.4.18 to >=8.0.1 (#5312)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-24 05:00:20 +00:00
homarr-renovate[bot] 7537184a81 fix(deps): update turbo monorepo to ^2.8.19 (#5310)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-03-23 22:41:28 +00:00
34 changed files with 531 additions and 452 deletions

No files matched your search

+2 -1
View File
@@ -43,10 +43,11 @@ RUN mkdir -p /var/cache/nginx && \
COPY --from=builder /app/apps/nextjs/next.config.ts .
COPY --from=builder /app/apps/nextjs/package.json .
COPY --from=builder /app/apps/tasks/tasks.cjs ./apps/tasks/tasks.cjs
COPY --from=builder /app/apps/websocket/wssServer.cjs ./apps/websocket/wssServer.cjs
COPY --from=builder /app/node_modules/better-sqlite3/build/Release/better_sqlite3.node /app/build/better_sqlite3.node
COPY scripts/job-scheduler.js ./scripts/job-scheduler.js
COPY --from=builder /app/packages/db/migrations ./db/migrations
# Automatically leverage output traces to reduce image size
+1 -1
View File
@@ -56,7 +56,7 @@
"@mantine/tiptap": "^8.3.18",
"@million/lint": "1.0.14",
"@tabler/icons-react": "^3.40.0",
"@tanstack/react-query": "^5.91.0",
"@tanstack/react-query": "^5.91.2",
"@tanstack/react-query-devtools": "^5.91.3",
"@tanstack/react-query-next-experimental": "^5.91.0",
"@trpc/client": "^11.13.4",
+4
View File
@@ -26,6 +26,7 @@ import { Analytics } from "~/components/layout/analytics";
import { CrowdinLiveTranslation } from "~/components/layout/crowdin-live-translation";
import { SearchEngineOptimization } from "~/components/layout/search-engine-optimization";
import { getCurrentColorSchemeAsync } from "~/theme/color-scheme";
import { initializeJobManager } from "~/lib/job-manager";
import { DayJsLoader } from "./_client-providers/dayjs-loader";
import { JotaiProvider } from "./_client-providers/jotai";
import { CustomMantineProvider } from "./_client-providers/mantine";
@@ -83,6 +84,9 @@ export default async function Layout(props: {
const colorScheme = await getCurrentColorSchemeAsync();
const direction = isLocaleRTL((await props.params).locale) ? "rtl" : "ltr";
// Initialize job manager
await initializeJobManager();
const StackedProvider = composeWrappers([
(innerProps) => {
return <AuthProvider session={session} logoutUrl={env.AUTH_LOGOUT_REDIRECT_URL} {...innerProps} />;
@@ -0,0 +1,20 @@
import { NextRequest, NextResponse } from "next/server";
import { getJobManager } from "~/lib/job-manager";
export async function POST(request: NextRequest) {
// Only allow internal requests
const internalHeader = request.headers.get("x-internal-request");
if (internalHeader !== "true") {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
try {
const jobManager = getJobManager();
await jobManager.triggerJobsAsync();
return NextResponse.json({ success: true });
} catch (error) {
console.error("Error triggering jobs:", error);
return NextResponse.json({ error: "Internal server error" }, { status: 500 });
}
}
+2 -1
View File
@@ -9,6 +9,7 @@ import { ipAddressFromHeaders } from "@homarr/common/server";
import { createLogger } from "@homarr/core/infrastructure/logs";
import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";
import { db } from "@homarr/db";
import { getJobManager } from "~/lib/job-manager";
const logger = createLogger({ module: "trpcRoute" });
@@ -45,7 +46,7 @@ const handler = auth(async (req) => {
endpoint: trpcPath,
router: appRouter,
req,
createContext: () => createTRPCContext({ session, headers: req.headers }),
createContext: () => createTRPCContext({ session, headers: req.headers, jobManager: getJobManager() }),
onError({ error, path, type }) {
logger.error(new ErrorWithMetadata("tRPC Error occured", { path, type }, { cause: error }));
},
+17
View File
@@ -0,0 +1,17 @@
import { JobManager } from "@homarr/job-scheduler";
import { jobGroup } from "@homarr/cron-jobs";
import { db } from "@homarr/db";
let jobManagerInstance: JobManager | null = null;
export function getJobManager(): JobManager {
if (!jobManagerInstance) {
jobManagerInstance = new JobManager(db, jobGroup);
}
return jobManagerInstance;
}
export async function initializeJobManager(): Promise<void> {
const manager = getJobManager();
await jobGroup.initializeAsync();
}
-9
View File
@@ -1,9 +0,0 @@
import baseConfig from "@homarr/eslint-config/base";
/** @type {import('typescript-eslint').Config} */
export default [
{
ignores: ["tasks.cjs"],
},
...baseConfig,
];
-58
View File
@@ -1,58 +0,0 @@
{
"name": "@homarr/tasks",
"version": "0.1.0",
"private": true,
"license": "Apache-2.0",
"type": "module",
"exports": {
".": "./src/index.ts"
},
"main": "./src/main.ts",
"types": "./src/main.ts",
"scripts": {
"build": "esbuild src/main.ts --bundle --platform=node --loader:.scss=text --external:*.node --external:@opentelemetry/api --external:deasync --external:bcrypt --outfile=tasks.cjs",
"clean": "rm -rf .turbo node_modules",
"dev": "pnpm with-env tsx ./src/main.ts",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"typecheck": "tsc --noEmit",
"with-env": "dotenv -e ../../.env --"
},
"prettier": "@homarr/prettier-config",
"dependencies": {
"@homarr/analytics": "workspace:^0.1.0",
"@homarr/auth": "workspace:^0.1.0",
"@homarr/common": "workspace:^0.1.0",
"@homarr/core": "workspace:^",
"@homarr/cron-job-api": "workspace:^0.1.0",
"@homarr/cron-jobs": "workspace:^0.1.0",
"@homarr/cron-jobs-core": "workspace:^0.1.0",
"@homarr/db": "workspace:^0.1.0",
"@homarr/definitions": "workspace:^0.1.0",
"@homarr/icons": "workspace:^0.1.0",
"@homarr/integrations": "workspace:^0.1.0",
"@homarr/ping": "workspace:^0.1.0",
"@homarr/redis": "workspace:^0.1.0",
"@homarr/request-handler": "workspace:^0.1.0",
"@homarr/server-settings": "workspace:^0.1.0",
"@homarr/validation": "workspace:^0.1.0",
"@homarr/widgets": "workspace:^0.1.0",
"dayjs": "^1.11.20",
"dotenv": "^17.3.1",
"fastify": "^5.8.2",
"superjson": "2.2.6",
"undici": "7.18.2"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"@types/node": "^24.12.0",
"dotenv-cli": "^11.0.0",
"esbuild": "^0.27.4",
"eslint": "^9.39.4",
"prettier": "^3.8.1",
"tsx": "4.20.4",
"typescript": "^5.9.3"
}
}
-52
View File
@@ -1,52 +0,0 @@
// This import has to be the first import in the file so that the agent is overridden before any other modules are imported.
import "./overrides";
import type { FastifyTRPCPluginOptions } from "@trpc/server/adapters/fastify";
import { fastifyTRPCPlugin } from "@trpc/server/adapters/fastify";
import fastify from "fastify";
import { createLogger } from "@homarr/core/infrastructure/logs";
import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";
import type { JobRouter } from "@homarr/cron-job-api";
import { jobRouter } from "@homarr/cron-job-api";
import { CRON_JOB_API_KEY_HEADER, CRON_JOB_API_PATH, CRON_JOB_API_PORT } from "@homarr/cron-job-api/constants";
import { jobGroup } from "@homarr/cron-jobs";
import { db } from "@homarr/db";
import { JobManager } from "./job-manager";
import { onStartAsync } from "./on-start";
const logger = createLogger({ module: "tasksMain" });
const server = fastify({
maxParamLength: 5000,
});
server.register(fastifyTRPCPlugin, {
prefix: CRON_JOB_API_PATH,
trpcOptions: {
router: jobRouter,
createContext: ({ req }) => ({
manager: new JobManager(db, jobGroup),
apiKey: req.headers[CRON_JOB_API_KEY_HEADER] as string | undefined,
}),
onError({ path, error }) {
logger.error(new ErrorWithMetadata("Error in tasks tRPC handler", { path }, { cause: error }));
},
} satisfies FastifyTRPCPluginOptions<JobRouter>["trpcOptions"],
});
void (async () => {
await onStartAsync();
await jobGroup.initializeAsync();
await jobGroup.startAllAsync();
try {
await server.listen({ port: CRON_JOB_API_PORT });
logger.info("Tasks web server started successfully", { port: CRON_JOB_API_PORT });
} catch (err) {
logger.error(
new ErrorWithMetadata("Failed to start tasks web server", { port: CRON_JOB_API_PORT }, { cause: err }),
);
process.exit(1);
}
})();
-7
View File
@@ -1,7 +0,0 @@
import { invalidateUpdateCheckerCacheAsync } from "./invalidate-update-checker-cache";
import { cleanupSessionsAsync } from "./session-cleanup";
export async function onStartAsync() {
await cleanupSessionsAsync();
await invalidateUpdateCheckerCacheAsync();
}
@@ -1,18 +0,0 @@
import { createLogger } from "@homarr/core/infrastructure/logs";
import { updateCheckerRequestHandler } from "@homarr/request-handler/update-checker";
const logger = createLogger({ module: "invalidateUpdateCheckerCache" });
/**
* Invalidates the update checker cache on startup to ensure fresh data.
* It is important as we want to avoid showing pending updates after the update to latest version.
*/
export async function invalidateUpdateCheckerCacheAsync() {
try {
const handler = updateCheckerRequestHandler.handler({});
await handler.invalidateAsync();
logger.debug("Update checker cache invalidated");
} catch (error) {
logger.error(new Error("Failed to invalidate update checker cache", { cause: error }));
}
}
@@ -1,41 +0,0 @@
import { env } from "@homarr/auth/env";
import { createLogger } from "@homarr/core/infrastructure/logs";
import { db, eq, inArray } from "@homarr/db";
import { sessions, users } from "@homarr/db/schema";
import { supportedAuthProviders } from "@homarr/definitions";
const logger = createLogger({ module: "sessionCleanup" });
/**
* Deletes sessions for users that have inactive auth providers.
* Sessions from other providers are deleted so they can no longer be used.
*/
export async function cleanupSessionsAsync() {
try {
const currentAuthProviders = env.AUTH_PROVIDERS;
const inactiveAuthProviders = supportedAuthProviders.filter((provider) => !currentAuthProviders.includes(provider));
const subQuery = db
.select({ id: users.id })
.from(users)
.where(inArray(users.provider, inactiveAuthProviders))
.as("sq");
const sessionsWithInactiveProviders = await db
.select({ userId: sessions.userId })
.from(sessions)
.rightJoin(subQuery, eq(sessions.userId, subQuery.id));
const userIds = sessionsWithInactiveProviders.map(({ userId }) => userId).filter((value) => value !== null);
await db.delete(sessions).where(inArray(sessions.userId, userIds));
if (sessionsWithInactiveProviders.length > 0) {
logger.info("Deleted sessions for inactive providers", {
count: userIds.length,
});
} else {
logger.debug("No sessions to delete");
}
} catch (error) {
logger.error(new Error("Failed to clean up sessions", { cause: error }));
}
}
-5
View File
@@ -1,5 +0,0 @@
import { setGlobalDispatcher } from "undici";
import { UndiciHttpAgent } from "@homarr/core/infrastructure/http";
setGlobalDispatcher(new UndiciHttpAgent());
-13
View File
@@ -1,13 +0,0 @@
{
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["src/*"],
"@homarr/node-unifi": ["../../node_modules/@types/node-unifi"]
},
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["."],
"exclude": ["node_modules"]
}
+4 -4
View File
@@ -43,7 +43,7 @@
"@semantic-release/npm": "^13.1.5",
"@semantic-release/release-notes-generator": "^14.1.0",
"@testcontainers/redis": "^11.13.0",
"@turbo/gen": "^2.8.18",
"@turbo/gen": "^2.8.20",
"@vitejs/plugin-react": "^5.2.0",
"@vitest/coverage-v8": "^4.1.0",
"@vitest/ui": "^4.1.0",
@@ -54,7 +54,7 @@
"prettier": "^3.8.1",
"semantic-release": "^25.0.3",
"testcontainers": "^11.13.0",
"turbo": "^2.8.18",
"turbo": "^2.8.20",
"typescript": "^5.9.3",
"vite-tsconfig-paths": "^6.1.1",
"vitest": "^4.1.0"
@@ -88,14 +88,14 @@
"linkifyjs@<4.3.2": ">=4.3.2",
"nanoid@>=4.0.0 <5.0.9": ">=5.1.7",
"prismjs@<1.30.0": ">=1.30.0",
"proxmox-api>undici": "7.19.2",
"proxmox-api>undici": "7.24.0",
"react-is": "^19.2.4",
"rollup@>=4.0.0 <4.22.4": ">=4.59.0",
"sha.js@<=2.4.11": ">=2.4.12",
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.2",
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.2",
"tmp@<=0.2.3": ">=0.2.5",
"vite@>=5.0.0 <=5.4.18": ">=8.0.0"
"vite@>=5.0.0 <=5.4.18": ">=8.0.1"
},
"patchedDependencies": {
"@types/node-unifi": "patches/@types__node-unifi.patch",
+1 -1
View File
@@ -41,7 +41,7 @@
"@homarr/translation": "workspace:^0.1.0",
"@homarr/validation": "workspace:^0.1.0",
"@kubernetes/client-node": "^1.4.0",
"@tanstack/react-query": "^5.91.0",
"@tanstack/react-query": "^5.91.2",
"@trpc/client": "^11.13.4",
"@trpc/react-query": "^11.13.4",
"@trpc/server": "^11.13.4",
+14 -15
View File
@@ -3,7 +3,6 @@ import z from "zod/v4";
import { createLogger } from "@homarr/core/infrastructure/logs";
import { cronExpressionSchema, jobGroupKeys, jobNameSchema } from "@homarr/cron-job-api";
import { cronJobApi } from "@homarr/cron-job-api/client";
import type { TaskStatus } from "@homarr/cron-job-status";
import { createCronJobStatusChannel } from "@homarr/cron-job-status";
@@ -15,20 +14,20 @@ export const cronJobsRouter = createTRPCRouter({
triggerJob: permissionRequiredProcedure
.requiresPermission("admin")
.input(jobNameSchema)
.mutation(async ({ input }) => {
await cronJobApi.trigger.mutate(input);
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.triggerAsync(input);
}),
startJob: permissionRequiredProcedure
.requiresPermission("admin")
.input(jobNameSchema)
.mutation(async ({ input }) => {
await cronJobApi.start.mutate(input);
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.startAsync(input);
}),
stopJob: permissionRequiredProcedure
.requiresPermission("admin")
.input(jobNameSchema)
.mutation(async ({ input }) => {
await cronJobApi.stop.mutate(input);
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.stopAsync(input);
}),
updateJobInterval: permissionRequiredProcedure
.requiresPermission("admin")
@@ -38,23 +37,23 @@ export const cronJobsRouter = createTRPCRouter({
cron: cronExpressionSchema,
}),
)
.mutation(async ({ input }) => {
await cronJobApi.updateInterval.mutate(input);
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.updateIntervalAsync(input.name, input.cron);
}),
disableJob: permissionRequiredProcedure
.requiresPermission("admin")
.input(jobNameSchema)
.mutation(async ({ input }) => {
await cronJobApi.disable.mutate(input);
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.disableAsync(input);
}),
enableJob: permissionRequiredProcedure
.requiresPermission("admin")
.input(jobNameSchema)
.mutation(async ({ input }) => {
await cronJobApi.enable.mutate(input);
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.enableAsync(input);
}),
getJobs: permissionRequiredProcedure.requiresPermission("admin").query(async () => {
return await cronJobApi.getAll.query();
getJobs: permissionRequiredProcedure.requiresPermission("admin").query(async ({ ctx }) => {
return await ctx.jobManager.getAllAsync();
}),
subscribeToStatusUpdates: permissionRequiredProcedure.requiresPermission("admin").subscription(() => {
return observable<TaskStatus>((emit) => {
+59
View File
@@ -0,0 +1,59 @@
import { TRPCError } from "@trpc/server";
import { z } from "zod/v4";
import { createTRPCRouter, protectedProcedure } from "../trpc";
import type { JobGroupKeys } from "@homarr/cron-jobs";
import { jobGroup } from "@homarr/cron-jobs";
import { cronExpressionSchema } from "@homarr/cron-job-api";
const jobNameSchema = z.enum(jobGroup.getKeys());
export const cronJobsRouter = createTRPCRouter({
start: protectedProcedure
.meta({ requiredPermission: "admin" })
.input(jobNameSchema)
.mutation(async ({ input, ctx }) => {
// Use the job manager from context
await ctx.jobManager.startAsync(input);
}),
trigger: protectedProcedure
.meta({ requiredPermission: "admin" })
.input(jobNameSchema)
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.triggerAsync(input);
}),
stop: protectedProcedure
.meta({ requiredPermission: "admin" })
.input(jobNameSchema)
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.stopAsync(input);
}),
updateInterval: protectedProcedure
.meta({ requiredPermission: "admin" })
.input(
z.object({
name: jobNameSchema,
cron: cronExpressionSchema,
}),
)
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.updateIntervalAsync(input.name, input.cron);
}),
disable: protectedProcedure
.meta({ requiredPermission: "admin" })
.input(jobNameSchema)
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.disableAsync(input);
}),
enable: protectedProcedure
.meta({ requiredPermission: "admin" })
.input(jobNameSchema)
.mutation(async ({ input, ctx }) => {
await ctx.jobManager.enableAsync(input);
}),
getAll: protectedProcedure
.meta({ requiredPermission: "admin" })
.query(async ({ ctx }) => {
return ctx.jobManager.getAllAsync();
}),
});
+2 -1
View File
@@ -34,7 +34,7 @@ const logger = createLogger({ module: "trpc" });
*
* @see https://trpc.io/docs/server/context
*/
export const createTRPCContext = (opts: { headers: Headers; session: Session | null }) => {
export const createTRPCContext = (opts: { headers: Headers; session: Session | null; jobManager?: any }) => {
const session = opts.session;
const source = opts.headers.get("x-trpc-source") ?? "unknown";
@@ -44,6 +44,7 @@ export const createTRPCContext = (opts: { headers: Headers; session: Session | n
session,
deviceType: userAgent(opts.headers).device.type,
db,
jobManager: opts.jobManager,
};
};
+1 -1
View File
@@ -41,7 +41,7 @@
"better-sqlite3": "^12.6.2",
"dns-caching": "^0.2.9",
"drizzle-orm": "^0.45.1",
"ioredis": "5.10.0",
"ioredis": "5.10.1",
"mysql2": "3.20.0",
"pg": "^8.20.0",
"superjson": "2.2.6",
+1 -1
View File
@@ -28,7 +28,7 @@
"@homarr/common": "workspace:^0.1.0",
"@homarr/core": "workspace:^0.1.0",
"@homarr/cron-jobs": "workspace:^0.1.0",
"@tanstack/react-query": "^5.91.0",
"@tanstack/react-query": "^5.91.2",
"@trpc/client": "^11.13.4",
"@trpc/server": "^11.13.4",
"@trpc/tanstack-react-query": "^11.13.4",
+1 -28
View File
@@ -1,12 +1,9 @@
import { createTask, validate } from "node-cron";
import { Stopwatch } from "@homarr/common";
import type { MaybePromise } from "@homarr/common/types";
import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";
import { db } from "@homarr/db";
import type { Logger } from "./logger";
import type { ValidateCron } from "./validation";
export interface CreateCronJobCreatorOptions<TAllowedNames extends string> {
beforeCallback?: (name: TAllowedNames) => MaybePromise<void>;
@@ -74,28 +71,6 @@ const createCallback = <TAllowedNames extends string, TName extends TAllowedName
return {
name,
cronExpression: defaultCronExpression,
async createTaskAsync() {
const configuration = await db.query.cronJobConfigurations.findFirst({
where: (cronJobConfigurations, { eq }) => eq(cronJobConfigurations.name, name),
});
const cronExpression = options.preventCustomInterval
? defaultCronExpression
: (configuration?.cronExpression ?? defaultCronExpression);
const scheduledTask = createTask(cronExpression, () => void catchingCallbackAsync(), {
name,
timezone: creatorOptions.timezone,
});
creatorOptions.logger.logDebug("The scheduled task for cron job was created", {
name,
cronExpression: defaultCronExpression,
timezone: creatorOptions.timezone,
runOnStart: options.runOnStart,
});
return scheduledTask;
},
async onStartAsync() {
if (options.beforeStart) {
creatorOptions.logger.logDebug("Running beforeStart for job", {
@@ -136,9 +111,7 @@ export const createCronJobCreator = <TAllowedNames extends string = string>(
name,
cronExpression: defaultCronExpression,
});
if (!validate(defaultCronExpression)) {
throw new Error(`Invalid cron expression '${defaultCronExpression}' for job '${name}'`);
}
// Validation will be done by cron-parser when needed
creatorOptions.logger.logDebug("Cron job expression for cron job is valid", {
name,
cronExpression: defaultCronExpression,
+29 -38
View File
@@ -1,11 +1,9 @@
import type { ScheduledTask } from "node-cron";
import { objectEntries, objectKeys } from "@homarr/common";
import { db } from "@homarr/db";
import { jobRegistry } from "./registry";
import type { JobCallback } from "./creator";
import type { Logger } from "./logger";
import { jobRegistry } from "./registry";
type Jobs<TAllowedNames extends string> = {
[name in TAllowedNames]: ReturnType<JobCallback<TAllowedNames, name>>;
@@ -34,86 +32,79 @@ export const createJobGroupCreator = <TAllowedNames extends string = string>(
});
}
const tasks = new Map<string, ScheduledTask>();
return {
initializeAsync: async () => {
// No tasks to create, just ensure jobs are registered
const configurations = await db.query.cronJobConfigurations.findMany();
for (const job of jobRegistry.values()) {
for (const job of jobs) {
const configuration = configurations.find(({ name }) => name === job.name);
if (configuration?.isEnabled === false) {
continue;
}
if (tasks.has(job.name)) {
continue;
}
const scheduledTask = await job.createTaskAsync();
tasks.set(job.name, scheduledTask);
// Run onStart if needed
await job.onStartAsync();
}
},
startAsync: async (name: keyof TJobs) => {
const job = jobRegistry.get(name as string);
// In new system, start means enable, but since we trigger manually, just log
const job = jobs[name];
if (!job) return;
if (!tasks.has(job.name)) return;
options.logger.logInfo("Starting schedule of cron job.", {
options.logger.logInfo("Enabling cron job.", {
name: job.name,
});
await job.onStartAsync();
await tasks.get(name as string)?.start();
},
startAllAsync: async () => {
for (const job of jobRegistry.values()) {
if (!tasks.has(job.name)) {
continue;
}
options.logger.logInfo("Starting schedule of cron job.", {
for (const job of Object.values(jobs)) {
options.logger.logInfo("Enabling cron job.", {
name: job.name,
});
await job.onStartAsync();
await tasks.get(job.name)?.start();
}
},
runManuallyAsync: async (name: keyof TJobs) => {
const job = jobRegistry.get(name as string);
const job = jobs[name];
if (!job) return;
if (job.preventManualExecution) {
throw new Error(`The job "${job.name}" can not be executed manually.`);
}
options.logger.logInfo("Running schedule cron job manually.", {
options.logger.logInfo("Running cron job manually.", {
name: job.name,
});
await tasks.get(name as string)?.execute();
await job.executeAsync();
},
stopAsync: async (name: keyof TJobs) => {
const job = jobRegistry.get(name as string);
// In new system, stop means disable, but since no tasks, just log
const job = jobs[name];
if (!job) return;
options.logger.logInfo("Stopping schedule of cron job.", {
options.logger.logInfo("Disabling cron job.", {
name: job.name,
});
await tasks.get(name as string)?.stop();
},
stopAllAsync: async () => {
for (const job of jobRegistry.values()) {
options.logger.logInfo("Stopping schedule of cron job.", {
for (const job of Object.values(jobs)) {
options.logger.logInfo("Disabling cron job.", {
name: job.name,
});
await tasks.get(job.name)?.stop();
}
},
getJobRegistry() {
return jobRegistry as Map<TAllowedNames, ReturnType<JobCallback<TAllowedNames, TAllowedNames>>>;
// Return a map of jobs
const registry = new Map();
for (const [key, job] of objectEntries(jobs)) {
registry.set(key, job);
}
return registry;
},
getTask(name: keyof TJobs) {
return tasks.get(name as string) ?? null;
getTask() {
// No tasks in new system
return null;
},
setTask(name: keyof TJobs, task: ScheduledTask) {
tasks.set(name as string, task);
setTask() {
// No tasks
},
getKeys() {
return objectKeys(jobs);
+1 -1
View File
@@ -24,7 +24,7 @@
"prettier": "@homarr/prettier-config",
"dependencies": {
"@homarr/common": "workspace:^0.1.0",
"fast-xml-parser": "^5.5.6",
"fast-xml-parser": "^5.5.7",
"zod": "^4.2.1"
},
"devDependencies": {
+1 -1
View File
@@ -38,7 +38,7 @@
"@homarr/redis": "workspace:^0.1.0",
"@homarr/translation": "workspace:^0.1.0",
"@homarr/validation": "workspace:^0.1.0",
"@immich/sdk": "^2.5.6",
"@immich/sdk": "^2.6.1",
"@jellyfin/sdk": "^0.13.0",
"@octokit/auth-app": "^8.2.0",
"ical.js": "^2.2.1",
+18
View File
@@ -0,0 +1,18 @@
{
"name": "@homarr/job-scheduler",
"version": "0.1.0",
"private": true,
"main": "src/index.ts",
"types": "src/index.ts",
"dependencies": {
"@homarr/common": "workspace:*",
"@homarr/core": "workspace:*",
"@homarr/cron-job-api": "workspace:*",
"@homarr/cron-jobs": "workspace:*",
"@homarr/cron-jobs-core": "workspace:*",
"@homarr/cron-job-status": "workspace:*",
"@homarr/db": "workspace:*",
"@homarr/redis": "workspace:*",
"cron-parser": "^4.9.0"
}
}
+114
View File
@@ -0,0 +1,114 @@
import { objectEntries, objectKeys } from "@homarr/common";
import { db } from "@homarr/db";
import { jobRegistry } from "@homarr/cron-jobs-core";
import type { JobCallback } from "@homarr/cron-jobs-core";
import type { Logger } from "@homarr/cron-jobs-core";
type Jobs<TAllowedNames extends string> = {
[name in TAllowedNames]: ReturnType<JobCallback<TAllowedNames, name>>;
};
export interface CreateCronJobGroupCreatorOptions {
logger: Logger;
}
export const createJobGroupCreator = <TAllowedNames extends string = string>(
options: CreateCronJobGroupCreatorOptions,
) => {
return <TJobs extends Jobs<TAllowedNames>>(jobs: TJobs) => {
options.logger.logDebug("Creating job group.", {
jobCount: Object.keys(jobs).length,
});
for (const [key, job] of objectEntries(jobs)) {
if (typeof key !== "string" || typeof job.name !== "string") continue;
options.logger.logDebug("Registering job in the job registry.", {
name: job.name,
});
jobRegistry.set(key, {
...job,
name: job.name,
});
}
return {
initializeAsync: async () => {
// No tasks to create, just ensure jobs are registered
const configurations = await db.query.cronJobConfigurations.findMany();
for (const job of jobs) {
const configuration = configurations.find(({ name }) => name === job.name);
if (configuration?.isEnabled === false) {
continue;
}
// Run onStart if needed
await job.onStartAsync();
}
},
startAsync: async (name: keyof TJobs) => {
// In new system, start means enable, but since we trigger manually, just log
const job = jobs[name];
if (!job) return;
options.logger.logInfo("Enabling cron job.", {
name: job.name,
});
await job.onStartAsync();
},
startAllAsync: async () => {
for (const job of Object.values(jobs)) {
options.logger.logInfo("Enabling cron job.", {
name: job.name,
});
await job.onStartAsync();
}
},
runManuallyAsync: async (name: keyof TJobs) => {
const job = jobs[name];
if (!job) return;
if (job.preventManualExecution) {
throw new Error(`The job "${job.name}" can not be executed manually.`);
}
options.logger.logInfo("Running cron job manually.", {
name: job.name,
});
await job.executeAsync();
},
stopAsync: async (name: keyof TJobs) => {
// In new system, stop means disable, but since no tasks, just log
const job = jobs[name];
if (!job) return;
options.logger.logInfo("Disabling cron job.", {
name: job.name,
});
},
stopAllAsync: async () => {
for (const job of Object.values(jobs)) {
options.logger.logInfo("Disabling cron job.", {
name: job.name,
});
}
},
getJobRegistry() {
// Return a map of jobs
const registry = new Map();
for (const [key, job] of objectEntries(jobs)) {
registry.set(key, job);
}
return registry;
},
getTask() {
// No tasks in new system
return null;
},
setTask() {
// No tasks
},
getKeys() {
return objectKeys(jobs);
},
};
};
};
+1
View File
@@ -0,0 +1 @@
export { JobManager } from "./job-manager";
@@ -1,4 +1,4 @@
import { schedule, validate as validateCron } from "node-cron";
import { parseExpression } from "cron-parser";
import { createLogger } from "@homarr/core/infrastructure/logs";
import type { IJobManager } from "@homarr/cron-job-api";
@@ -10,58 +10,103 @@ import { cronJobConfigurations } from "@homarr/db/schema";
const logger = createLogger({ module: "jobManager" });
export class JobManager implements IJobManager {
private runningJobs = new Set<string>();
constructor(
private db: Database,
private jobGroup: typeof cronJobGroup,
) {}
public async startAsync(name: JobGroupKeys): Promise<void> {
await this.jobGroup.startAsync(name);
// In the new system, start just means enable
await this.enableAsync(name);
}
public async triggerAsync(name: JobGroupKeys): Promise<void> {
await this.jobGroup.runManuallyAsync(name);
}
public async stopAsync(name: JobGroupKeys): Promise<void> {
await this.jobGroup.stopAsync(name);
// In the new system, stop means disable
await this.disableAsync(name);
}
public async updateIntervalAsync(name: JobGroupKeys, cron: string): Promise<void> {
logger.info("Updating cron job interval", { name, expression: cron });
const job = this.jobGroup.getJobRegistry().get(name);
if (!job) throw new Error(`Job ${name} not found`);
if (!validateCron(cron)) {
// Validate cron expression
try {
parseExpression(cron);
} catch {
throw new Error(`Invalid cron expression: ${cron}`);
}
if (job.preventCustomInterval && cron !== job.cronExpression) {
throw new Error(`Custom cron expressions are not allowed for job ${name}`);
}
await this.updateConfigurationAsync(name, { cronExpression: cron });
await this.jobGroup.getTask(name)?.destroy();
this.jobGroup.setTask(
name,
schedule(cron, () => void job.executeAsync(), {
name,
}),
);
logger.info("Cron job interval updated", { name, expression: cron });
}
public async disableAsync(name: JobGroupKeys): Promise<void> {
logger.info("Disabling cron job", { name });
const job = this.jobGroup.getJobRegistry().get(name);
if (!job) throw new Error(`Job ${name} not found`);
await this.updateConfigurationAsync(name, { isEnabled: false });
await this.jobGroup.stopAsync(name);
logger.info("Cron job disabled", { name });
}
public async enableAsync(name: JobGroupKeys): Promise<void> {
logger.info("Enabling cron job", { name });
await this.updateConfigurationAsync(name, { isEnabled: true });
await this.jobGroup.startAsync(name);
logger.info("Cron job enabled", { name });
}
// New method to trigger jobs based on current time
public async triggerJobsAsync(): Promise<void> {
const jobs = await this.getAllAsync();
const now = new Date();
for (const jobInfo of jobs) {
if (!jobInfo.isEnabled) continue;
if (this.runningJobs.has(jobInfo.name)) continue; // Prevent parallel execution
try {
const cronExpression = jobInfo.cron;
const interval = parseExpression(cronExpression);
const nextRun = interval.next();
const prevRun = interval.prev();
// Check if current time matches the cron (within a small tolerance)
const timeDiff = Math.abs(now.getTime() - nextRun.getTime());
if (timeDiff < 1000) { // Within 1 second
await this.executeJobAsync(jobInfo.name);
}
} catch (error) {
logger.error("Error checking job schedule", { name: jobInfo.name, error });
}
}
}
private async executeJobAsync(name: string): Promise<void> {
if (this.runningJobs.has(name)) return;
this.runningJobs.add(name);
try {
logger.info("Executing scheduled job", { name });
await this.jobGroup.runManuallyAsync(name as JobGroupKeys);
logger.info("Job executed successfully", { name });
} catch (error) {
logger.error("Job execution failed", { name, error });
} finally {
this.runningJobs.delete(name);
}
}
private async updateConfigurationAsync(
name: JobGroupKeys,
configuration: Omit<Partial<InferInsertModel<typeof cronJobConfigurations>>, "name">,
@@ -79,7 +124,6 @@ export class JobManager implements IJobManager {
if (existingConfig) {
await this.db
.update(cronJobConfigurations)
// prevent updating the name, as it is the primary key
.set({ ...configuration, name: undefined })
.where(eq(cronJobConfigurations.name, name));
logger.debug("Cron job configuration updated", {
@@ -97,7 +141,7 @@ export class JobManager implements IJobManager {
cronExpression: configuration.cronExpression ?? job.cronExpression,
isEnabled: configuration.isEnabled ?? true,
});
logger.debug("Cron job configuration updated", {
logger.debug("Cron job configuration created", {
name,
configuration: JSON.stringify(configuration),
});
@@ -125,4 +169,4 @@ export class JobManager implements IJobManager {
};
});
}
}
}
+1 -1
View File
@@ -26,7 +26,7 @@
"@homarr/core": "workspace:^",
"@homarr/db": "workspace:^",
"@homarr/definitions": "workspace:^",
"ioredis": "5.10.0",
"ioredis": "5.10.1",
"superjson": "2.2.6"
},
"devDependencies": {
+134 -134
View File
@@ -16,14 +16,14 @@ overrides:
linkifyjs@<4.3.2: '>=4.3.2'
nanoid@>=4.0.0 <5.0.9: '>=5.1.7'
prismjs@<1.30.0: '>=1.30.0'
proxmox-api>undici: 7.19.2
proxmox-api>undici: 7.24.0
react-is: ^19.2.4
rollup@>=4.0.0 <4.22.4: '>=4.59.0'
sha.js@<=2.4.11: '>=2.4.12'
tar-fs@>=3.0.0 <3.0.9: '>=3.1.2'
tar-fs@>=2.0.0 <2.1.3: '>=3.1.2'
tmp@<=0.2.3: '>=0.2.5'
vite@>=5.0.0 <=5.4.18: '>=8.0.0'
vite@>=5.0.0 <=5.4.18: '>=8.0.1'
patchedDependencies:
'@types/node-unifi':
@@ -62,7 +62,7 @@ importers:
specifier: ^11.13.0
version: 11.13.0
'@turbo/gen':
specifier: ^2.8.18
specifier: ^2.8.20
version: 2.8.20(@types/node@24.12.0)
'@vitejs/plugin-react':
specifier: ^5.2.0
@@ -95,8 +95,8 @@ importers:
specifier: ^11.13.0
version: 11.13.0
turbo:
specifier: ^2.8.18
version: 2.8.19
specifier: ^2.8.20
version: 2.8.20
typescript:
specifier: ^5.9.3
version: 5.9.3
@@ -233,7 +233,7 @@ importers:
specifier: ^3.40.0
version: 3.40.0(react@19.2.4)
'@tanstack/react-query':
specifier: ^5.91.0
specifier: ^5.91.2
version: 5.91.3(react@19.2.4)
'@tanstack/react-query-devtools':
specifier: ^5.91.3
@@ -639,7 +639,7 @@ importers:
specifier: ^1.4.0
version: 1.4.0
'@tanstack/react-query':
specifier: ^5.91.0
specifier: ^5.91.2
version: 5.91.3(react@19.2.4)
'@trpc/client':
specifier: ^11.13.4
@@ -902,8 +902,8 @@ importers:
specifier: ^0.45.1
version: 0.45.1(@libsql/client-wasm@0.14.0)(@types/better-sqlite3@7.6.13)(@types/pg@8.18.0)(better-sqlite3@12.6.2)(gel@2.0.0)(mysql2@3.20.0(@types/node@24.12.0))(pg@8.20.0)
ioredis:
specifier: 5.10.0
version: 5.10.0
specifier: 5.10.1
version: 5.10.1
mysql2:
specifier: 3.20.0
version: 3.20.0(@types/node@24.12.0)
@@ -954,7 +954,7 @@ importers:
specifier: workspace:^0.1.0
version: link:../cron-jobs
'@tanstack/react-query':
specifier: ^5.91.0
specifier: ^5.91.2
version: 5.91.3(react@19.2.4)
'@trpc/client':
specifier: ^11.13.4
@@ -1217,7 +1217,7 @@ importers:
specifier: workspace:^0.1.0
version: link:../common
fast-xml-parser:
specifier: ^5.5.6
specifier: ^5.5.7
version: 5.5.7
zod:
specifier: ^4.2.1
@@ -1466,8 +1466,8 @@ importers:
specifier: workspace:^0.1.0
version: link:../validation
'@immich/sdk':
specifier: ^2.5.6
version: 2.5.6
specifier: ^2.6.1
version: 2.6.1
'@jellyfin/sdk':
specifier: ^0.13.0
version: 0.13.0(axios@1.12.2)
@@ -1806,8 +1806,8 @@ importers:
specifier: workspace:^
version: link:../definitions
ioredis:
specifier: 5.10.0
version: 5.10.0
specifier: 5.10.1
version: 5.10.1
superjson:
specifier: 2.2.6
version: 2.2.6
@@ -2364,11 +2364,11 @@ importers:
specifier: ^10.1.8
version: 10.1.8(eslint@9.39.4)
eslint-config-turbo:
specifier: ^2.8.18
version: 2.8.20(eslint@9.39.4)(turbo@2.8.19)
specifier: ^2.8.20
version: 2.8.20(eslint@9.39.4)(turbo@2.8.20)
eslint-plugin-import:
specifier: ^2.32.0
version: 2.32.0(@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)
version: 2.32.0(@typescript-eslint/parser@8.57.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)
eslint-plugin-jsx-a11y:
specifier: ^6.10.2
version: 6.10.2(eslint@9.39.4)
@@ -2379,8 +2379,8 @@ importers:
specifier: ^6.1.1
version: 6.1.1(eslint@9.39.4)
typescript-eslint:
specifier: ^8.57.0
version: 8.57.0(eslint@9.39.4)(typescript@5.9.3)
specifier: ^8.57.1
version: 8.57.1(eslint@9.39.4)(typescript@5.9.3)
devDependencies:
'@homarr/prettier-config':
specifier: workspace:^0.1.0
@@ -3529,8 +3529,8 @@ packages:
cpu: [x64]
os: [win32]
'@immich/sdk@2.5.6':
resolution: {integrity: sha512-u6o0rNBsTbAkl/6vz3Z63A/yNkLYeuKiHKoJgLuvRqTpPahgxAFcfDeN8rLd0Ya1kM5I2c610/VDcvItzzVcWg==}
'@immich/sdk@2.6.1':
resolution: {integrity: sha512-b8G0Qm8FZ4+D4IPq5cbXb3Lh3VvpUSnMf9Uz8nB4Yr8ivPG3TmGcw3lRsB00mdAPyQFuMqB8UL6LiMC6rtWy5Q==}
'@inquirer/ansi@1.0.2':
resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==}
@@ -4967,13 +4967,13 @@ packages:
'@tsconfig/svelte@1.0.13':
resolution: {integrity: sha512-5lYJP45Xllo4yE/RUBccBT32eBlRDbqN8r1/MIvQbKxW3aFqaYPCNgm8D5V20X4ShHcwvYWNlKg3liDh1MlBoA==}
'@turbo/darwin-64@2.8.19':
resolution: {integrity: sha512-WNzpqJV7rO/oKmsxjtSFXuV87fZb/qxzeGWXJng4oHFz7iPOFSWrPb2gTazJgoTvXUfe1kOH2o0F+zFrerwzRw==}
'@turbo/darwin-64@2.8.20':
resolution: {integrity: sha512-FQ9EX1xMU5nbwjxXxM3yU88AQQ6Sqc6S44exPRroMcx9XZHqqppl5ymJF0Ig/z3nvQNwDmz1Gsnvxubo+nXWjQ==}
cpu: [x64]
os: [darwin]
'@turbo/darwin-arm64@2.8.19':
resolution: {integrity: sha512-KTq8/PH0/ml9bNFomZ2VjmOqW6RYPRqBqV5CfNeD5ekJMuNwJUdeQz0qXguxCzW4OkHCnTdPeKIehR0cdQObPg==}
'@turbo/darwin-arm64@2.8.20':
resolution: {integrity: sha512-Gpyh9ATFGThD6/s9L95YWY54cizg/VRWl2B67h0yofG8BpHf67DFAh9nuJVKG7bY0+SBJDAo5cMur+wOl9YOYw==}
cpu: [arm64]
os: [darwin]
@@ -4981,23 +4981,23 @@ packages:
resolution: {integrity: sha512-SazKn5Pc9mitpc3uc6Pmf+QhkNtvF5t6Ro0V1cuc0QFhblbfw4KwWqFnnfTEmGzgDtb2CZJB3BK8LFMBX52eLg==}
hasBin: true
'@turbo/linux-64@2.8.19':
resolution: {integrity: sha512-d0xcXiGUt1Q/HzMfgkqai5KyXrassLRuUZhxmUs4ZX99tQFbqRL2/CkSKCnMqyDv7c0K5eugLerVUY+DYr1DQg==}
'@turbo/linux-64@2.8.20':
resolution: {integrity: sha512-p2QxWUYyYUgUFG0b0kR+pPi8t7c9uaVlRtjTTI1AbCvVqkpjUfCcReBn6DgG/Hu8xrWdKLuyQFaLYFzQskZbcA==}
cpu: [x64]
os: [linux]
'@turbo/linux-arm64@2.8.19':
resolution: {integrity: sha512-UX3r1iwqsOK8dMgKFtZpDqZk7feqHXZJ/EQAknh0SVQrnc4vkm6mZqjX4j2j3DVoSo4Ho8xGITYlor9Xxsyomw==}
'@turbo/linux-arm64@2.8.20':
resolution: {integrity: sha512-Gn5yjlZGLRZWarLWqdQzv0wMqyBNIdq1QLi48F1oY5Lo9kiohuf7BPQWtWxeNVS2NgJ1+nb/DzK1JduYC4AWOA==}
cpu: [arm64]
os: [linux]
'@turbo/windows-64@2.8.19':
resolution: {integrity: sha512-3MrvD/gMYWfQKZVZOeilKm1629zPG0+KlErZbI0n9Nr3L32+5qrZOF/cgWErukLnOSR38whgf8t2WaPJQALqxg==}
'@turbo/windows-64@2.8.20':
resolution: {integrity: sha512-vyaDpYk/8T6Qz5V/X+ihKvKFEZFUoC0oxYpC1sZanK6gaESJlmV3cMRT3Qhcg4D2VxvtC2Jjs9IRkrZGL+exLw==}
cpu: [x64]
os: [win32]
'@turbo/windows-arm64@2.8.19':
resolution: {integrity: sha512-j+8mi7kyEgT7cUTPOtPJS8KbTWxu4+OQBiDIo+zklz/RKV4hoN+k4+J8iCM9Nj+o+SVnzc01xSI+s3eBG0MDSA==}
'@turbo/windows-arm64@2.8.20':
resolution: {integrity: sha512-voicVULvUV5yaGXo0Iue13BcHGYW3u0VgqSbfQwBaHbpj1zLjYV4KIe+7fYIo6DO8FVUJzxFps3ODCQG/Wy2Qw==}
cpu: [arm64]
os: [win32]
@@ -5231,63 +5231,63 @@ packages:
'@types/xml2js@0.4.14':
resolution: {integrity: sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==}
'@typescript-eslint/eslint-plugin@8.57.0':
resolution: {integrity: sha512-qeu4rTHR3/IaFORbD16gmjq9+rEs9fGKdX0kF6BKSfi+gCuG3RCKLlSBYzn/bGsY9Tj7KE/DAQStbp8AHJGHEQ==}
'@typescript-eslint/eslint-plugin@8.57.1':
resolution: {integrity: sha512-Gn3aqnvNl4NGc6x3/Bqk1AOn0thyTU9bqDRhiRnUWezgvr2OnhYCWCgC8zXXRVqBsIL1pSDt7T9nJUe0oM0kDQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
'@typescript-eslint/parser': ^8.57.0
'@typescript-eslint/parser': ^8.57.1
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.0.0'
'@typescript-eslint/parser@8.57.0':
resolution: {integrity: sha512-XZzOmihLIr8AD1b9hL9ccNMzEMWt/dE2u7NyTY9jJG6YNiNthaD5XtUHVF2uCXZ15ng+z2hT3MVuxnUYhq6k1g==}
'@typescript-eslint/parser@8.57.1':
resolution: {integrity: sha512-k4eNDan0EIMTT/dUKc/g+rsJ6wcHYhNPdY19VoX/EOtaAG8DLtKCykhrUnuHPYvinn5jhAPgD2Qw9hXBwrahsw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.0.0'
'@typescript-eslint/project-service@8.57.0':
resolution: {integrity: sha512-pR+dK0BlxCLxtWfaKQWtYr7MhKmzqZxuii+ZjuFlZlIGRZm22HnXFqa2eY+90MUz8/i80YJmzFGDUsi8dMOV5w==}
'@typescript-eslint/project-service@8.57.1':
resolution: {integrity: sha512-vx1F37BRO1OftsYlmG9xay1TqnjNVlqALymwWVuYTdo18XuKxtBpCj1QlzNIEHlvlB27osvXFWptYiEWsVdYsg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <6.0.0'
'@typescript-eslint/scope-manager@8.57.0':
resolution: {integrity: sha512-nvExQqAHF01lUM66MskSaZulpPL5pgy5hI5RfrxviLgzZVffB5yYzw27uK/ft8QnKXI2X0LBrHJFr1TaZtAibw==}
'@typescript-eslint/scope-manager@8.57.1':
resolution: {integrity: sha512-hs/QcpCwlwT2L5S+3fT6gp0PabyGk4Q0Rv2doJXA0435/OpnSR3VRgvrp8Xdoc3UAYSg9cyUjTeFXZEPg/3OKg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/tsconfig-utils@8.57.0':
resolution: {integrity: sha512-LtXRihc5ytjJIQEH+xqjB0+YgsV4/tW35XKX3GTZHpWtcC8SPkT/d4tqdf1cKtesryHm2bgp6l555NYcT2NLvA==}
'@typescript-eslint/tsconfig-utils@8.57.1':
resolution: {integrity: sha512-0lgOZB8cl19fHO4eI46YUx2EceQqhgkPSuCGLlGi79L2jwYY1cxeYc1Nae8Aw1xjgW3PKVDLlr3YJ6Bxx8HkWg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <6.0.0'
'@typescript-eslint/type-utils@8.57.0':
resolution: {integrity: sha512-yjgh7gmDcJ1+TcEg8x3uWQmn8ifvSupnPfjP21twPKrDP/pTHlEQgmKcitzF/rzPSmv7QjJ90vRpN4U+zoUjwQ==}
'@typescript-eslint/type-utils@8.57.1':
resolution: {integrity: sha512-+Bwwm0ScukFdyoJsh2u6pp4S9ktegF98pYUU0hkphOOqdMB+1sNQhIz8y5E9+4pOioZijrkfNO/HUJVAFFfPKA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.0.0'
'@typescript-eslint/types@8.57.0':
resolution: {integrity: sha512-dTLI8PEXhjUC7B9Kre+u0XznO696BhXcTlOn0/6kf1fHaQW8+VjJAVHJ3eTI14ZapTxdkOmc80HblPQLaEeJdg==}
'@typescript-eslint/types@8.57.1':
resolution: {integrity: sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/typescript-estree@8.57.0':
resolution: {integrity: sha512-m7faHcyVg0BT3VdYTlX8GdJEM7COexXxS6KqGopxdtkQRvBanK377QDHr4W/vIPAR+ah9+B/RclSW5ldVniO1Q==}
'@typescript-eslint/typescript-estree@8.57.1':
resolution: {integrity: sha512-ybe2hS9G6pXpqGtPli9Gx9quNV0TWLOmh58ADlmZe9DguLq0tiAKVjirSbtM1szG6+QH6rVXyU6GTLQbWnMY+g==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <6.0.0'
'@typescript-eslint/utils@8.57.0':
resolution: {integrity: sha512-5iIHvpD3CZe06riAsbNxxreP+MuYgVUsV0n4bwLH//VJmgtt54sQeY2GszntJ4BjYCpMzrfVh2SBnUQTtys2lQ==}
'@typescript-eslint/utils@8.57.1':
resolution: {integrity: sha512-XUNSJ/lEVFttPMMoDVA2r2bwrl8/oPx8cURtczkSEswY5T3AeLmCy+EKWQNdL4u0MmAHOjcWrqJp2cdvgjn8dQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.0.0'
'@typescript-eslint/visitor-keys@8.57.0':
resolution: {integrity: sha512-zm6xx8UT/Xy2oSr2ZXD0pZo7Jx2XsCoID2IUh9YSTFRu7z+WdwYTRk6LhUftm1crwqbuoF6I8zAFeCMw0YjwDg==}
'@typescript-eslint/visitor-keys@8.57.1':
resolution: {integrity: sha512-YWnmJkXbofiz9KbnbbwuA2rpGkFPLbAIetcCNO6mJ8gdhdZ/v7WDXsoGFAJuM6ikUFKTlSQnjWnVO4ux+UzS6A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@umami/node@0.4.0':
@@ -5317,7 +5317,7 @@ packages:
resolution: {integrity: sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw==}
engines: {node: ^20.19.0 || >=22.12.0}
peerDependencies:
vite: '>=8.0.0'
vite: '>=8.0.1'
'@vitest/coverage-v8@4.1.0':
resolution: {integrity: sha512-nDWulKeik2bL2Va/Wl4x7DLuTKAXa906iRFooIRPR+huHkcvp9QDkPQ2RJdmjOFrqOqvNfoSQLF68deE3xC3CQ==}
@@ -7513,8 +7513,8 @@ packages:
invariant@2.2.4:
resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==}
ioredis@5.10.0:
resolution: {integrity: sha512-HVBe9OFuqs+Z6n64q09PQvP1/R4Bm+30PAyyD4wIEqssh3v9L21QjCVk4kRLucMBcDokJTcLjsGeVRlq/nH6DA==}
ioredis@5.10.1:
resolution: {integrity: sha512-HuEDBTI70aYdx1v6U97SbNx9F1+svQKBDo30o0b9fw055LMepzpOOd0Ccg9Q6tbqmBSJaMuY0fB7yw9/vjBYCA==}
engines: {node: '>=12.22.0'}
ip-address@9.0.5:
@@ -10301,8 +10301,8 @@ packages:
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
turbo@2.8.19:
resolution: {integrity: sha512-9NTKvQZ/02XnJCSU4mF5gvAPK+nuLbvCtft/NE8dJeOwaup0bJ14rYx7TxmSXp8JJuAN8nAjqfXWFsWwoQSFHg==}
turbo@2.8.20:
resolution: {integrity: sha512-Rb4qk5YT8RUwwdXtkLpkVhNEe/lor6+WV7S5tTlLpxSz6MjV5Qi8jGNn4gS6NAvrYGA/rNrE6YUQM85sCZUDbQ==}
hasBin: true
tweetnacl@0.14.5:
@@ -10374,8 +10374,8 @@ packages:
types-ramda@0.30.1:
resolution: {integrity: sha512-1HTsf5/QVRmLzcGfldPFvkVsAdi1db1BBKzi7iW3KBUlOICg/nKnFS+jGqDJS3YD8VsWbAh7JiHeBvbsw8RPxA==}
typescript-eslint@8.57.0:
resolution: {integrity: sha512-W8GcigEMEeB07xEZol8oJ26rigm3+bfPHxHvwbYUlu1fUDsGuQ7Hiskx5xGW/xM4USc9Ephe3jtv7ZYPQntHeA==}
typescript-eslint@8.57.1:
resolution: {integrity: sha512-fLvZWf+cAGw3tqMCYzGIU6yR8K+Y9NT2z23RwOjlNFF2HwSB3KhdEFI5lSBv8tNmFkkBShSjsCjzx1vahZfISA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
@@ -10428,14 +10428,14 @@ packages:
resolution: {integrity: sha512-y+8YjDFzWdQlSE9N5nzKMT3g4a5UBX1HKowfdXh0uvAnTaqqwqB92Jt4UXBAeKekDs5IaDKyJFR4X1gYVCgXcw==}
engines: {node: '>=20.18.1'}
undici@7.19.2:
resolution: {integrity: sha512-4VQSpGEGsWzk0VYxyB/wVX/Q7qf9t5znLRgs0dzszr9w9Fej/8RVNQ+S20vdXSAyra/bJ7ZQfGv6ZMj7UEbzSg==}
engines: {node: '>=20.18.1'}
undici@7.21.0:
resolution: {integrity: sha512-Hn2tCQpoDt1wv23a68Ctc8Cr/BHpUSfaPYrkajTXOS9IKpxVRx/X5m1K2YkbK2ipgZgxXSgsUinl3x+2YdSSfg==}
engines: {node: '>=20.18.1'}
undici@7.24.0:
resolution: {integrity: sha512-jxytwMHhsbdpBXxLAcuu0fzlQeXCNnWdDyRHpvWsUl8vd98UwYdl9YTyn8/HcpcJPC3pwUveefsa3zTxyD/ERg==}
engines: {node: '>=20.18.1'}
undici@7.24.4:
resolution: {integrity: sha512-BM/JzwwaRXxrLdElV2Uo6cTLEjhSb3WXboncJamZ15NgUURmvlXvxa6xkwIOILIjPNo9i8ku136ZvWV0Uly8+w==}
engines: {node: '>=20.18.1'}
@@ -10643,7 +10643,7 @@ packages:
vite-tsconfig-paths@6.1.1:
resolution: {integrity: sha512-2cihq7zliibCCZ8P9cKJrQBkfgdvcFkOOc3Y02o3GWUDLgqjWsZudaoiuOwO/gzTzy17cS5F7ZPo4bsnS4DGkg==}
peerDependencies:
vite: '>=8.0.0'
vite: '>=8.0.1'
vite@7.1.12:
resolution: {integrity: sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==}
@@ -12042,7 +12042,7 @@ snapshots:
'@img/sharp-win32-x64@0.34.5':
optional: true
'@immich/sdk@2.5.6':
'@immich/sdk@2.6.1':
dependencies:
'@oazapfts/runtime': 1.2.0
@@ -13781,10 +13781,10 @@ snapshots:
'@tsconfig/svelte@1.0.13': {}
'@turbo/darwin-64@2.8.19':
'@turbo/darwin-64@2.8.20':
optional: true
'@turbo/darwin-arm64@2.8.19':
'@turbo/darwin-arm64@2.8.20':
optional: true
'@turbo/gen@2.8.20(@types/node@24.12.0)':
@@ -13794,16 +13794,16 @@ snapshots:
transitivePeerDependencies:
- '@types/node'
'@turbo/linux-64@2.8.19':
'@turbo/linux-64@2.8.20':
optional: true
'@turbo/linux-arm64@2.8.19':
'@turbo/linux-arm64@2.8.20':
optional: true
'@turbo/windows-64@2.8.19':
'@turbo/windows-64@2.8.20':
optional: true
'@turbo/windows-arm64@2.8.19':
'@turbo/windows-arm64@2.8.20':
optional: true
'@types/adm-zip@0.5.8':
@@ -14067,14 +14067,14 @@ snapshots:
dependencies:
'@types/node': 24.12.0
'@typescript-eslint/eslint-plugin@8.57.0(@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)':
'@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)':
dependencies:
'@eslint-community/regexpp': 4.12.2
'@typescript-eslint/parser': 8.57.0(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/scope-manager': 8.57.0
'@typescript-eslint/type-utils': 8.57.0(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/utils': 8.57.0(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/visitor-keys': 8.57.0
'@typescript-eslint/parser': 8.57.1(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/scope-manager': 8.57.1
'@typescript-eslint/type-utils': 8.57.1(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/utils': 8.57.1(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/visitor-keys': 8.57.1
eslint: 9.39.4
ignore: 7.0.5
natural-compare: 1.4.0
@@ -14083,41 +14083,41 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@5.9.3)':
'@typescript-eslint/parser@8.57.1(eslint@9.39.4)(typescript@5.9.3)':
dependencies:
'@typescript-eslint/scope-manager': 8.57.0
'@typescript-eslint/types': 8.57.0
'@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3)
'@typescript-eslint/visitor-keys': 8.57.0
'@typescript-eslint/scope-manager': 8.57.1
'@typescript-eslint/types': 8.57.1
'@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3)
'@typescript-eslint/visitor-keys': 8.57.1
debug: 4.4.3
eslint: 9.39.4
typescript: 5.9.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/project-service@8.57.0(typescript@5.9.3)':
'@typescript-eslint/project-service@8.57.1(typescript@5.9.3)':
dependencies:
'@typescript-eslint/tsconfig-utils': 8.57.0(typescript@5.9.3)
'@typescript-eslint/types': 8.57.0
'@typescript-eslint/tsconfig-utils': 8.57.1(typescript@5.9.3)
'@typescript-eslint/types': 8.57.1
debug: 4.4.3
typescript: 5.9.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/scope-manager@8.57.0':
'@typescript-eslint/scope-manager@8.57.1':
dependencies:
'@typescript-eslint/types': 8.57.0
'@typescript-eslint/visitor-keys': 8.57.0
'@typescript-eslint/types': 8.57.1
'@typescript-eslint/visitor-keys': 8.57.1
'@typescript-eslint/tsconfig-utils@8.57.0(typescript@5.9.3)':
'@typescript-eslint/tsconfig-utils@8.57.1(typescript@5.9.3)':
dependencies:
typescript: 5.9.3
'@typescript-eslint/type-utils@8.57.0(eslint@9.39.4)(typescript@5.9.3)':
'@typescript-eslint/type-utils@8.57.1(eslint@9.39.4)(typescript@5.9.3)':
dependencies:
'@typescript-eslint/types': 8.57.0
'@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3)
'@typescript-eslint/utils': 8.57.0(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/types': 8.57.1
'@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3)
'@typescript-eslint/utils': 8.57.1(eslint@9.39.4)(typescript@5.9.3)
debug: 4.4.3
eslint: 9.39.4
ts-api-utils: 2.4.0(typescript@5.9.3)
@@ -14125,14 +14125,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/types@8.57.0': {}
'@typescript-eslint/types@8.57.1': {}
'@typescript-eslint/typescript-estree@8.57.0(typescript@5.9.3)':
'@typescript-eslint/typescript-estree@8.57.1(typescript@5.9.3)':
dependencies:
'@typescript-eslint/project-service': 8.57.0(typescript@5.9.3)
'@typescript-eslint/tsconfig-utils': 8.57.0(typescript@5.9.3)
'@typescript-eslint/types': 8.57.0
'@typescript-eslint/visitor-keys': 8.57.0
'@typescript-eslint/project-service': 8.57.1(typescript@5.9.3)
'@typescript-eslint/tsconfig-utils': 8.57.1(typescript@5.9.3)
'@typescript-eslint/types': 8.57.1
'@typescript-eslint/visitor-keys': 8.57.1
debug: 4.4.3
minimatch: 10.2.2
semver: 7.7.4
@@ -14142,20 +14142,20 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@8.57.0(eslint@9.39.4)(typescript@5.9.3)':
'@typescript-eslint/utils@8.57.1(eslint@9.39.4)(typescript@5.9.3)':
dependencies:
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4)
'@typescript-eslint/scope-manager': 8.57.0
'@typescript-eslint/types': 8.57.0
'@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3)
'@typescript-eslint/scope-manager': 8.57.1
'@typescript-eslint/types': 8.57.1
'@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3)
eslint: 9.39.4
typescript: 5.9.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/visitor-keys@8.57.0':
'@typescript-eslint/visitor-keys@8.57.1':
dependencies:
'@typescript-eslint/types': 8.57.0
'@typescript-eslint/types': 8.57.1
eslint-visitor-keys: 5.0.0
'@umami/node@0.4.0': {}
@@ -15838,11 +15838,11 @@ snapshots:
dependencies:
eslint: 9.39.4
eslint-config-turbo@2.8.20(eslint@9.39.4)(turbo@2.8.19):
eslint-config-turbo@2.8.20(eslint@9.39.4)(turbo@2.8.20):
dependencies:
eslint: 9.39.4
eslint-plugin-turbo: 2.8.20(eslint@9.39.4)(turbo@2.8.19)
turbo: 2.8.19
eslint-plugin-turbo: 2.8.20(eslint@9.39.4)(turbo@2.8.20)
turbo: 2.8.20
eslint-import-resolver-node@0.3.9:
dependencies:
@@ -15852,17 +15852,17 @@ snapshots:
transitivePeerDependencies:
- supports-color
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.4):
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.57.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.4):
dependencies:
debug: 3.2.7
optionalDependencies:
'@typescript-eslint/parser': 8.57.0(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/parser': 8.57.1(eslint@9.39.4)(typescript@5.9.3)
eslint: 9.39.4
eslint-import-resolver-node: 0.3.9
transitivePeerDependencies:
- supports-color
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4):
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.57.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4):
dependencies:
'@rtsao/scc': 1.1.0
array-includes: 3.1.9
@@ -15873,7 +15873,7 @@ snapshots:
doctrine: 2.1.0
eslint: 9.39.4
eslint-import-resolver-node: 0.3.9
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.4)
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.57.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.4)
hasown: 2.0.2
is-core-module: 2.16.1
is-glob: 4.0.3
@@ -15885,7 +15885,7 @@ snapshots:
string.prototype.trimend: 1.0.9
tsconfig-paths: 3.15.0
optionalDependencies:
'@typescript-eslint/parser': 8.57.0(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/parser': 8.57.1(eslint@9.39.4)(typescript@5.9.3)
transitivePeerDependencies:
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
@@ -15942,11 +15942,11 @@ snapshots:
string.prototype.matchall: 4.0.12
string.prototype.repeat: 1.0.0
eslint-plugin-turbo@2.8.20(eslint@9.39.4)(turbo@2.8.19):
eslint-plugin-turbo@2.8.20(eslint@9.39.4)(turbo@2.8.20):
dependencies:
dotenv: 16.0.3
eslint: 9.39.4
turbo: 2.8.19
turbo: 2.8.20
eslint-scope@5.1.1:
dependencies:
@@ -16716,7 +16716,7 @@ snapshots:
dependencies:
loose-envify: 1.4.0
ioredis@5.10.0:
ioredis@5.10.1:
dependencies:
'@ioredis/commands': 1.5.1
cluster-key-slot: 1.1.2
@@ -18492,7 +18492,7 @@ snapshots:
proxmox-api@1.1.1:
dependencies:
undici: 7.19.2
undici: 7.24.0
proxy-from-env@1.1.0: {}
@@ -19929,14 +19929,14 @@ snapshots:
tunnel@0.0.6: {}
turbo@2.8.19:
turbo@2.8.20:
optionalDependencies:
'@turbo/darwin-64': 2.8.19
'@turbo/darwin-arm64': 2.8.19
'@turbo/linux-64': 2.8.19
'@turbo/linux-arm64': 2.8.19
'@turbo/windows-64': 2.8.19
'@turbo/windows-arm64': 2.8.19
'@turbo/darwin-64': 2.8.20
'@turbo/darwin-arm64': 2.8.20
'@turbo/linux-64': 2.8.20
'@turbo/linux-arm64': 2.8.20
'@turbo/windows-64': 2.8.20
'@turbo/windows-arm64': 2.8.20
tweetnacl@0.14.5: {}
@@ -20034,12 +20034,12 @@ snapshots:
dependencies:
ts-toolbelt: 9.6.0
typescript-eslint@8.57.0(eslint@9.39.4)(typescript@5.9.3):
typescript-eslint@8.57.1(eslint@9.39.4)(typescript@5.9.3):
dependencies:
'@typescript-eslint/eslint-plugin': 8.57.0(@typescript-eslint/parser@8.57.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/parser': 8.57.0(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/typescript-estree': 8.57.0(typescript@5.9.3)
'@typescript-eslint/utils': 8.57.0(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/eslint-plugin': 8.57.1(@typescript-eslint/parser@8.57.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/parser': 8.57.1(eslint@9.39.4)(typescript@5.9.3)
'@typescript-eslint/typescript-estree': 8.57.1(typescript@5.9.3)
'@typescript-eslint/utils': 8.57.1(eslint@9.39.4)(typescript@5.9.3)
eslint: 9.39.4
typescript: 5.9.3
transitivePeerDependencies:
@@ -20082,10 +20082,10 @@ snapshots:
undici@7.18.2: {}
undici@7.19.2: {}
undici@7.21.0: {}
undici@7.24.0: {}
undici@7.24.4: {}
unicode-emoji-modifier-base@1.0.0: {}
+32
View File
@@ -0,0 +1,32 @@
const http = require('http');
function triggerJobs() {
const options = {
hostname: 'localhost',
port: 3000,
path: '/api/internal/trigger-jobs',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-internal-request': 'true'
}
};
const req = http.request(options, (res) => {
if (res.statusCode !== 200) {
console.error(`Failed to trigger jobs: ${res.statusCode}`);
}
});
req.on('error', (err) => {
console.error('Error triggering jobs:', err);
});
req.end();
}
// Trigger jobs every second
setInterval(triggerJobs, 1000);
// Initial trigger
triggerJobs();
+8 -1
View File
@@ -54,10 +54,17 @@ WSS_PID=$!
node apps/nextjs/server.js &
NEXTJS_PID=$!
# Wait a bit for NextJS to start
sleep 5
# Start job scheduler
node scripts/job-scheduler.js &
SCHEDULER_PID=$!
# Function to handle SIGTERM and shut down services
terminate() {
echo "Received SIGTERM. Shutting down..."
kill -TERM $NGINX_PID $TASKS_PID $WSS_PID $NEXTJS_PID 2>/dev/null
kill -TERM $NGINX_PID $SCHEDULER_PID $WSS_PID $NEXTJS_PID 2>/dev/null
wait
# kill redis-server last because of logging of other services and only if $REDIS_PID is set
if [ -n "$REDIS_PID" ]; then
+2 -2
View File
@@ -19,12 +19,12 @@
"dependencies": {
"@next/eslint-plugin-next": "16.2.0",
"eslint-config-prettier": "^10.1.8",
"eslint-config-turbo": "^2.8.18",
"eslint-config-turbo": "^2.8.20",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^6.1.1",
"typescript-eslint": "^8.57.0"
"typescript-eslint": "^8.57.1"
},
"devDependencies": {
"@homarr/prettier-config": "workspace:^0.1.0",