mohan-bee/mini-mp3-player

Portable, battery-powered MP3 player hardware with USB charging, microSD storage, an MCU, VS10xx audio decoder, headphone output, status controls, and regulated power rails.

Version
1.2.0
License
unset
Stars
0

scripts/check-final.mjs

import fs from 'node:fs'
import assert from 'node:assert/strict'
import { runAllChecks } from '@tscircuit/checks'

const circuit = JSON.parse(fs.readFileSync('dist/index/circuit.json', 'utf8'))
const findings = await runAllChecks(circuit.filter(e => !e.type.endsWith('_error') && !e.type.endsWith('_warning')))
const errors = findings.filter(e => e.type.endsWith('_error'))
const warnings = findings.filter(e => e.type.endsWith('_warning'))
fs.writeFileSync('validation/final-drc.json', JSON.stringify({ errors, warnings }, null, 2) + '\n')
console.log(`Independent DRC: ${errors.length} errors, ${warnings.length} warnings`)
assert.equal(errors.length, 0, 'Resolve physical DRC findings before release')