17 lines
771 B
JavaScript
17 lines
771 B
JavaScript
#!/usr/bin/env node
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { loadMvpGateSummary } from "../internal/mvp-gate/summary.mjs";
|
|
|
|
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
const outputPath = path.join(repoRoot, "web/hwlab-cloud-web/gate-summary.mjs");
|
|
const summary = loadMvpGateSummary(repoRoot);
|
|
const body = `// Generated from reports/dev-gate/dev-mvp-gate-report.json and fixtures/mvp/m5-e2e/dry-run-plan.json.
|
|
// Run node scripts/export-web-gate-summary.mjs after changing those fixtures.
|
|
export const gateSummary = ${JSON.stringify(summary, null, 2)};
|
|
`;
|
|
|
|
fs.writeFileSync(outputPath, body);
|
|
process.stdout.write(`wrote ${path.relative(repoRoot, outputPath)}\n`);
|