Files
KArtSell.Aegis/docs/Design/kbx-foundation-v60-status-canonical-contract-hardening/scripts/generate-navigation-manifest.mjs
T
kjh2064 3f293d8aa8
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s
V13-FE-006: consolidate approved UI and contract hardening
2026-08-13 02:41:00 +09:00

6 lines
586 B
JavaScript

import fs from 'node:fs'
import path from 'node:path'
const root=process.cwd();const source=path.join(root,'apps/web/src/shell/navigationCatalog.ts');const out=path.join(root,'generated/navigation-manifest.json');const text=fs.readFileSync(source,'utf8')
const items=[...text.matchAll(/\{\s*screenId:'([^']+)',\s*path:'([^']+)',\s*section:'([^']+)'[\s\S]*?order:(\d+)/g)].map(m=>({screenId:m[1],path:m[2],section:m[3],order:Number(m[4])}))
fs.writeFileSync(out,JSON.stringify(items,null,2)+'\n');console.log(`generated ${items.length} navigation entries -> ${path.relative(root,out)}`)