seveibar/pedometer

This hardware setup integrates a Type-C connector, battery, display, and RF antenna connected through a microcontroller, USB interface, charging and fuel gauge ICs, along with associated passive components, enabling power management, data communication, and signal processing.

Version
0.4.4
License
unset
Stars
1

scripts/clear-routing-cache.mjs

// The current core route-cache key omits the selected pipeline. Prevent an
// old pipeline's geometry from masquerading as a successful Pipeline 9 run.
import fs from 'node:fs'
const dir='.tscircuit/cache'
let removed=0
for(const name of fs.existsSync(dir)?fs.readdirSync(dir):[]){
 if(!name.endsWith('.json'))continue
 const path=`${dir}/${name}`
 try{
  const value=JSON.parse(fs.readFileSync(path,'utf8'))
  if(value&&Array.isArray(value.connections)&&Array.isArray(value.traces)&&value.bounds){fs.unlinkSync(path);removed++}
 }catch{}
}
console.log(`Cleared ${removed} generated routing-cache entries; supplier caches retained.`)