imrishabh18/nema-23-stepper-controller
A 57 mm four-layer RP2040 NEMA23 stepper-controller PCB with USB‑C/USB‑PD power input, protected motor rail, DRV8452 dual-winding driver, bidirectional current sensing, temperature/enable interlock, optional magnetic encoder, RGB LED and buzzer status indicators, and motor/test connectors.
- Version
- 1.2.3
- License
- unset
- Stars
- 0
scripts/check-schematic.mjs
import {spawnSync} from 'node:child_process'
import {writeFileSync,mkdirSync} from 'node:fs'
// The CLI can exit zero while reporting placement issues, so inspect its report.
const result=spawnSync('./node_modules/.bin/tsci',['check','schematic-placement',process.argv[2]??'index.circuit.tsx'],{encoding:'utf8',maxBuffer:4*1024*1024})
process.stdout.write(result.stdout??'')
process.stderr.write(result.stderr??'')
if(result.error)throw result.error
if(result.status!==0)throw new Error('Schematic placement analysis failed')
const actionable=[]
for(const block of (result.stdout??'').matchAll(/<SchematicPlacementIssues>([\s\S]*?)<\/SchematicPlacementIssues>/g)){
if(block[1].trim())actionable.push(block[1].trim())
}
mkdirSync('checks',{recursive:true})
writeFileSync('checks/schematic-placement.json',JSON.stringify({actionable,reviewedAdvisories:[]},null,2)+'\n')
if(actionable.length)throw new Error('Actionable schematic placement issues remain')
console.log('PASS: zero schematic placement issues; no waived findings.')