(key: string, value: string)
| 63 | } |
| 64 | |
| 65 | static set(key: string, value: string): void { |
| 66 | this.init(); |
| 67 | if (!this.db) { |
| 68 | console.error("[convert] DB not initialized, cannot set config."); |
| 69 | return; |
| 70 | } |
| 71 | try { |
| 72 | this.db.prepare(`INSERT OR REPLACE INTO config (key, value) VALUES (?, ?)`).run(key, value); |
| 73 | } catch (error) { |
| 74 | console.error("[convert] Failed to save config:", error); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | static cleanup(): void { |
| 79 | if (this.db) { |
no test coverage detected