drift update
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user