Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
Stale Issues / stale (push) Has been cancelled
Push Crowdin Translations / update-crowdin (push) Has been cancelled
Fetch Crowdin Translations / update-crowdin (push) Has been cancelled
3 lines
878 B
JavaScript
3 lines
878 B
JavaScript
// SPDX-License-Identifier: LGPL-2.1-or-later
|
|
const fs=require("fs"),path=require("path"),{pathToFileURL}=require("url");const build=path.resolve(process.argv[2]||"build-web/configure/bin");async function main(){globalThis.__dirname=`${build}${path.sep}`;globalThis.require=require;const m=await import(pathToFileURL(path.join(build,"FreeCADWebSketcherProbe.js")));const p=await m.default({wasmBinary:fs.readFileSync(path.join(build,"FreeCADWebSketcherProbe.wasm"))});const c=(n,t="number")=>p.ccall(n,t);const run=c("fc_web_sketcher_python_api_probe"),result={run,error:c("fc_web_sketcher_last_error","string"),apiCount:c("fc_web_sketcher_python_api_count")};if(run!==1||result.error!==""||result.apiCount!==6)throw Error(JSON.stringify(result));console.log(JSON.stringify({result:"pass",action:"python-api",...result}))}main().catch(e=>{console.error(e);process.exitCode=1});
|