Add LinuxCNC five-axis case catalog

This commit is contained in:
2026-09-22 07:36:23 +08:00
parent b15af28034
commit 23d07e72d1
7 changed files with 326 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
import { readFile } from "node:fs/promises";
import { resolve } from "node:path";
import { FIVE_AXIS_CASES } from "../web/workspace/five-axis-machine-catalog.mjs";
const root = resolve(new URL("..", import.meta.url).pathname);
const checks = [];
const errors = [];
for (const item of FIVE_AXIS_CASES) {
const paths = [...item.localCases, item.kinematicsSource];
for (const relative of paths) {
try {
const text = await readFile(resolve(root, relative), "utf8");
checks.push({ case: item.id, path: relative, bytes: Buffer.byteLength(text) });
} catch (error) {
errors.push({ case: item.id, path: relative, error: error instanceof Error ? error.message : String(error) });
}
}
}
const report = { report_id: "FIVE-AXIS-CATALOG-LOCAL-SOURCE", status: errors.length ? "failed" : "verified", caseCount: FIVE_AXIS_CASES.length, fileCount: checks.length, checks, errors };
console.log(JSON.stringify(report, null, 2));
if (errors.length) process.exitCode = 1;