// Writes the fixture report site's view JSON under public/ (see fixture.ts). // Run after changing the fixture report or the view builder: // // pnpm --filter export exec tsx fixtures/report-site/write.ts // // The stills (public/reports/demo-factcheck/stills/*.png), the post's shot and // the two evidence clips (public/media/: a few seconds of lavfi test pattern // and tone, H.264/AAC) are committed files, not generated here. import fs from "node:fs"; import path from "node:path"; import { buildFixtureFiles, fixtureFilePath, serializeFixture } from "./fixture"; for (const [urlPath, value] of Object.entries(buildFixtureFiles())) { const file = fixtureFilePath(urlPath); fs.mkdirSync(path.dirname(file), { recursive: true }); fs.writeFileSync(file, serializeFixture(value)); console.log(urlPath); }