chore: copy report script

This commit is contained in:
2026-09-04 18:06:37 +05:00
parent a643e6e4a3
commit bf24b73276
2 changed files with 19 additions and 0 deletions
+1
View File
@@ -12,6 +12,7 @@
"deploy-frontend": "vercel --cwd apps/frontend --prod --yes", "deploy-frontend": "vercel --cwd apps/frontend --prod --yes",
"eval:run": "pnpm --dir apps/eval run run", "eval:run": "pnpm --dir apps/eval run run",
"eval:review": "pnpm --dir apps/eval run review", "eval:review": "pnpm --dir apps/eval run review",
"eval:sync": "node scripts/sync-report.mjs",
"eval:typecheck": "pnpm --dir apps/eval run typecheck" "eval:typecheck": "pnpm --dir apps/eval run typecheck"
}, },
"license": "ISC", "license": "ISC",
+18
View File
@@ -0,0 +1,18 @@
import { copyFileSync, existsSync, mkdirSync } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const src = path.join(root, 'apps', 'eval', 'out', 'report.json');
const destDir = path.join(root, 'apps', 'web', 'static');
const dest = path.join(destDir, 'report.json');
if (!existsSync(src)) {
console.error(`[sync-report] Not found: ${src}`);
console.error('Run the eval first (pnpm eval:run / eval:review) to produce an out/report.json.');
process.exit(1);
}
mkdirSync(destDir, { recursive: true });
copyFileSync(src, dest);
console.log(`[sync-report] ${path.relative(root, src)} -> ${path.relative(root, dest)}`);