Architecture (docs/ARCHITECTURE.md): - Framework (worker host + page UI) rewritten in TypeScript under src/, compiled per-file to peris/core + peris/ui (tsc, no bundler; ESM layout unchanged so the drop-into-www deployment model still works) - Monolithic app.js split into 7 UI modules: app orchestrator, worker-client (sole Worker owner), terminal, chart, debug-panels, peris-panel, schema-driven config-editor; device plugins stay plain JS (drop-in model) with runtime meta validation in the registry - peris-specific CSS extracted to peris/peris.css; upstream style block stays verbatim in the HTML for easy re-diff - chips/MMIO tables single-sourced in TS data modules Type contracts (src/core/types.ts): DeviceMeta/DeviceLike/DeviceCtx/ PinState/PerisConfig + normaliseConfig + validateDeviceModule, shipped as .d.ts for plugin authors Tests: - tests/unit (node:test, zero deps): sigbus bit dispatch, chips/mmio tables, config normalisation, module validation, device electrical semantics (button active-low levels, LED invert, toggle persistence) - integration smoke + M0 probe unchanged in role, wired into npm scripts Bug found & fixed by the refactor: throttled flushStates silently dropped the last dirty device state when changes stopped inside the 33 ms window - now schedules a trailing flush so the page always converges npm run build/check/test/serve/sync (typescript via npmmirror)
27 lines
632 B
JSON
27 lines
632 B
JSON
{
|
|
"name": "esp-emu-peris",
|
|
"lockfileVersion": 3,
|
|
"requires": true,
|
|
"packages": {
|
|
"": {
|
|
"devDependencies": {
|
|
"typescript": "5.9"
|
|
}
|
|
},
|
|
"node_modules/typescript": {
|
|
"version": "5.9.3",
|
|
"resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.9.3.tgz",
|
|
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
|
"dev": true,
|
|
"license": "Apache-2.0",
|
|
"bin": {
|
|
"tsc": "bin/tsc",
|
|
"tsserver": "bin/tsserver"
|
|
},
|
|
"engines": {
|
|
"node": ">=14.17"
|
|
}
|
|
}
|
|
}
|
|
}
|