No description
Remove the shared-mutable-state dance where each db library was run in the handler context via `context.sql = x; run; module.exports = null`. Split into three single-purpose functions: - makeConsole(structureId, routeId) — the logs-table-backed console - runLibrary(sql, source, console) — eval one library in its own context - makeLibs(structureId, console) — the require() targets map Libraries are still evaluated eagerly per request (no laziness), and still see `sql` and `console`, so behavior is preserved. Verified the prime db library's top-level console.log still fires on a live request. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| migrations | ||
| public | ||
| views | ||
| .gitignore | ||
| CLAUDE.md | ||
| db.js | ||
| index.js | ||
| out.mp3 | ||
| package-lock.json | ||
| package.json | ||