()
| 106 | let _state = structuredClone(DEFAULTS); |
| 107 | |
| 108 | function load() { |
| 109 | if (!existsSync(FILE)) return; |
| 110 | try { |
| 111 | const raw = JSON.parse(readFileSync(FILE, 'utf-8')); |
| 112 | _state = deepMerge(DEFAULTS, raw); |
| 113 | } catch (e) { |
| 114 | log.warn(`runtime-config: failed to load ${FILE}: ${e.message}`); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | function persist() { |
| 119 | try { |
no test coverage detected