drift update

This commit is contained in:
2026-09-12 23:15:14 -04:00
parent bb1e5c6a95
commit f10f0cefef
4 changed files with 437 additions and 39 deletions
+11 -2
View File
@@ -5,10 +5,19 @@ import { kick } from '$lib/server/pipeline/worker.js';
// GET returns the current drift plan for the whole fleet without touching disk.
export async function GET() {
const entries = await scanFleetDrift();
const byServer = new Map<string, Array<{ relPath: string; size: number; sha256: string; kind: string }>>();
const byServer = new Map<
string,
Array<{ relPath: string; size: number; sha256: string; kind: string; driftKind: string }>
>();
for (const e of entries) {
const arr = byServer.get(e.server) ?? [];
arr.push({ relPath: e.relPath, size: e.size, sha256: e.sha256, kind: e.kind });
arr.push({
relPath: e.relPath,
size: e.size,
sha256: e.sha256,
kind: e.kind,
driftKind: e.driftKind
});
byServer.set(e.server, arr);
}
return json({