feat: list every wanted file with its upload

The wanted page lists every file the gaps report lacks, hashless ones included and marked, by system and most useful first, each with its own upload button to the folder validate_pr.placement() gives. Steps from a file in hand to its merge, copy without personal pronouns, list address versioned against stale caches.
This commit is contained in:
Abdessamad Derraz committed 2026-11-13 17:38:34 +01:00
1 parent aada55e656
commit 3fd61df038
9 files changed
+672 -84

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
// Read at build time by WantedFiles.astro and WantedList.astro: the first
// characters of the sha1 of public/data/wanted.json, added to its address.
// A browser that kept an older list in its cache asks for the new one: the
// two components read the list's current shape, and an older list broke
// them.
import { createHash } from 'node:crypto';
import { existsSync, readFileSync } from 'node:fs';
import { join } from 'node:path';
// npm runs the build from website/, the project root.
const LIST = join(process.cwd(), 'public', 'data', 'wanted.json');
export const wantedVersion = (): string =>
existsSync(LIST) ? createHash('sha1').update(readFileSync(LIST)).digest('hex').slice(0, 12) : '';