remove hazardous legacy scripts and gate repository writes

This commit is contained in:
2026-08-09 14:24:35 +05:30
parent 09ebd44b6c
commit 905cbce0c1
15 changed files with 31 additions and 917 deletions
+9 -6
View File
@@ -9,6 +9,7 @@ import { secureJsonStringify } from "../packages/security/src/serialization.ts";
import { parse } from "../packages/syntax/src/index.ts";
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
const writeReport = process.argv.includes("--write");
const frameworkVersion = JSON.parse(readFileSync(join(root, "package.json"), "utf8")).version;
const componentSource = readFileSync(
join(root, "packages", "ui", "components", "button.wrn"),
@@ -60,12 +61,14 @@ const report = {
environment: { runtime: process.version, platform: process.platform, arch: process.arch },
benchmarks: benchmarks.map(({ result, budget }) => ({ result, budget })),
};
const reportDir = join(root, ".wrnexus", "reports");
mkdirSync(reportDir, { recursive: true });
writeFileSync(
join(reportDir, `benchmark-${frameworkVersion}.json`),
`${JSON.stringify(report, null, 2)}\n`,
);
if (writeReport) {
const reportDir = join(root, ".wrnexus", "reports");
mkdirSync(reportDir, { recursive: true });
writeFileSync(
join(reportDir, `benchmark-${frameworkVersion}.json`),
`${JSON.stringify(report, null, 2)}\n`,
);
}
console.log(
JSON.stringify(
report.benchmarks.map(({ result }) => ({