imrishabh18/nema-23-stepper-controller

A curved NEMA23 rear-mount PCB combining an RP2040 controller, USB-C/USB-PD power input and protection, DRV8452 dual-winding stepper driver, current sensing, thermal interlock, status RGB LED, buzzer, and optional I²C encoder interface.

Version
1.3.3
License
unset
Stars
1

scripts/verify-toolchain.mjs

import {fileURLToPath} from 'node:url'
import {readFileSync,existsSync} from 'node:fs'
import {dirname,join} from 'node:path'
import assert from 'node:assert/strict'

function installed(name,from=import.meta.url){
  const entry=fileURLToPath(import.meta.resolve(name,from))
  let dir=dirname(entry)
  while(!existsSync(join(dir,'package.json')))dir=dirname(dir)
  return {entry,...JSON.parse(readFileSync(join(dir,'package.json'),'utf8'))}
}
const ts=installed('tscircuit')
const core=installed('@tscircuit/core',new URL('file://'+ts.entry).href)
const router=installed('@tscircuit/capacity-autorouter',new URL('file://'+core.entry).href)
assert.equal(ts.version,'0.0.2748')
assert.equal(core.version,'0.0.2097')
// Core now bundles the solver. A separately hoisted solver is not what runs.
const bundledSolver='https://jscdn.tscircuit.com/@tscircuit/schematic-trace-solver/0.0.228.tgz'
assert.equal(core.devDependencies['@tscircuit/schematic-trace-solver'],bundledSolver)
assert.ok(readFileSync(core.entry,'utf8').includes(bundledSolver))
assert.equal(router.version,'0.0.958')
const cli=installed('@tscircuit/cli')
const easyeda=installed('easyeda')
assert.equal(cli.version,'0.1.2253')
assert.equal(easyeda.version,'0.0.371')
for(const p of [ts,cli,easyeda,core,router])console.log(`${p.name}: ${p.version}\n  ${p.entry}`)
console.log('Bundled schematic solver: 0.0.228')
console.log('PASS: current tscircuit, CLI, converter, core, schematic solver and autorouter resolve correctly.')