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
2026-08-19 17:54:07 -04:00
committed by GitHub
parent 5ec49509d7
commit 7211c71869
10 changed files with 5211 additions and 10346 deletions
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);
}