Use JSON + a typed wrapper instead of TS codegen (#1025)

Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
William Woodruff authored and GitHub committed 2026-08-19 17:54:07 -04:00
1 parent 5ec49509d7
commit 7211c71869
10 files changed
+5211 -10346

No files matched your search

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -19,16 +19,7 @@ export async function updateChecksums(
deduplicatedEntries.set(entry.key, entry.checksum);
}
const body = [...deduplicatedEntries.entries()]
.map(([key, checksum]) => ` "${key}":\n "${checksum}"`)
.join(",\n");
const content =
"// AUTOGENERATED_DO_NOT_EDIT\n" +
"export const KNOWN_CHECKSUMS: { [key: string]: string } = {\n" +
body +
(body === "" ? "" : ",\n") +
"};\n";
const content = `${JSON.stringify(Object.fromEntries(deduplicatedEntries), null, 2)}\n`;
await fs.writeFile(filePath, content);
}