Add backup/update schedule types, copy buttons, cron next-run estimate; update dependencies
- New "backup" and "update" schedule types for manually tracked tasks, plumbed through the form, filters, group labels, and API validation. - Copy buttons next to the agent token and install/uninstall commands on the Servers page, so they don't need to be selected by hand. - Cron jobs now show an estimated "next run" (via cron-parser), computed client-side and clearly marked with "~" plus a tooltip, since the agent has no way to compute this for cron (unlike systemd timers, which report a real value from systemctl). - Dependency updates: fixes a high-severity SQL injection advisory in drizzle-orm (0.38.4 -> 0.45.2, plus drizzle-kit 0.31.10), a qs vulnerability pinned past body-parser's own range via an npm "overrides" entry, a leftover vulnerable esbuild pulled in transitively by drizzle-kit (also via override), and cron-parser 4 -> 5 (v4 is unmaintained; updated its call site for the new CronExpressionParser API). `npm audit` is now clean. Re-verified the DB layer end-to-end (migrations, CRUD, agent sync, stale-marking) and the cron estimate against the new cron-parser API after the upgrade.
This commit is contained in:
1 parent
329dcab936
commit
0f961e7377
15 files changed
+541
-1819
No files matched your search
+2
-2
@@ -12,7 +12,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@libsql/client": "^0.14.0",
|
||||
"drizzle-orm": "^0.38.4",
|
||||
"drizzle-orm": "^0.45.2",
|
||||
"express": "^4.21.2",
|
||||
"express-session": "^1.18.1",
|
||||
"openid-client": "^6.1.7",
|
||||
@@ -24,7 +24,7 @@
|
||||
"@types/express-session": "^1.18.1",
|
||||
"@types/node": "^22.10.5",
|
||||
"@types/session-file-store": "^1.2.5",
|
||||
"drizzle-kit": "^0.30.2",
|
||||
"drizzle-kit": "^0.31.10",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export const scheduledTasks = sqliteTable("scheduled_tasks", {
|
||||
serverId: integer("server_id")
|
||||
.notNull()
|
||||
.references(() => servers.id, { onDelete: "cascade" }),
|
||||
scheduleType: text("schedule_type").notNull(), // 'cron' | 'systemd_timer' | 'docker' | 'manual'
|
||||
scheduleType: text("schedule_type").notNull(), // 'cron' | 'systemd_timer' | 'docker' | 'backup' | 'update' | 'manual'
|
||||
origin: text("origin").notNull().default("agent"), // 'agent' | 'manual' — manual rows are never touched by agent sync
|
||||
name: text("name").notNull(),
|
||||
command: text("command"),
|
||||
|
||||
@@ -58,7 +58,7 @@ tasksRouter.get("/", async (req, res) => {
|
||||
|
||||
const manualTaskSchema = z.object({
|
||||
serverId: z.number().int(),
|
||||
scheduleType: z.enum(["cron", "systemd_timer", "docker", "manual"]),
|
||||
scheduleType: z.enum(["cron", "systemd_timer", "docker", "backup", "update", "manual"]),
|
||||
name: z.string().min(1).max(200),
|
||||
command: z.string().max(1000).optional(),
|
||||
scheduleExpression: z.string().max(200).optional(),
|
||||
|
||||
Reference in new issue
Block a user