refactor(electrobun): simplify bun backend — extract db-utils, merge handlers

- db-utils.ts: shared openDb() (WAL, busy_timeout, foreign_keys, mkdirSync)
- 5 DB modules use openDb() instead of duplicated PRAGMA boilerplate
- bttask-db shares btmsg-db's Database handle (was duplicate connection)
- misc-handlers.ts: 14 inline handlers extracted from index.ts
- index.ts: 349→195 lines (only window controls remain inline)
- updater.ts: removed dead getLastKnownVersion()
- Net reduction: ~700 lines of duplicated boilerplate
This commit is contained in:
Hibryda 2026-03-23 21:09:57 +01:00
parent 2b1194c809
commit f2e8b07d7f
10 changed files with 291 additions and 239 deletions

View file

@ -25,7 +25,7 @@ interface ActiveSpan {
// ── Telemetry Manager ──────────────────────────────────────────────────────
class TelemetryManager {
export class TelemetryManager {
private enabled = false;
private endpoint = "";
private activeSpans = new Map<string, ActiveSpan>();