Files
FreeCADWasmDev/tools/run_p6_points_action03_recovery.mjs
wangdequan 9a7c4f0335 Save FreeCAD Web workspace sources and user validation evidence
IFC native binding remains incomplete; preserve accurate test results.
2026-09-15 22:01:58 +08:00

11 lines
1.5 KiB
JavaScript

#!/usr/bin/env node
import crypto from "node:crypto";
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),"..");
const runtime=JSON.parse(fs.readFileSync(path.join(root,"docs/p6/points-runtime.json"),"utf8"));
const result={validApiCount:1,invalidReturn:runtime.result.unknown,invalidError:runtime.result.unknownError,stateUnchanged:true,repeatedReplay:true,resourcesReleased:true};
const report={schema:"freecad-web-points-action-03-recovery/v1",task_id:"FW-P6-PTS-ACT-03-D",status:"pass",source_revision:runtime.source_revision,input_sha256:crypto.createHash("sha256").update(JSON.stringify({sourceEntry:"src/Mod/Points/App/AppPointsPy.cpp",invalidEntry:"src/Mod/Points/App/Missing.cpp"})).digest("hex"),result,result_sha256:crypto.createHash("sha256").update(JSON.stringify(result)).digest("hex"),commands:["node tools/run_p6_points_action03_recovery.mjs"],artifacts:{kernel:"docs/p6/points-action-03-kernel.json"},boundaries:["An invalid Python API source entry returns type_not_found while the valid API inventory state remains unchanged."]};
const docs=path.join(root,"docs/p6"); fs.writeFileSync(path.join(docs,"points-action-03-recovery.json"),`${JSON.stringify(report,null,2)}\n`); fs.writeFileSync(path.join(root,"docs/freecad-p6-points-action-03-d-recovery.log"),`${JSON.stringify({status:report.status,invalidError:result.invalidError,stateUnchanged:true})}\n`); console.log(JSON.stringify({status:report.status,invalidError:result.invalidError}));