()
| 91 | } |
| 92 | |
| 93 | function readEnvSettings() { |
| 94 | if (!fs.existsSync(ENV_PATH)) return {}; |
| 95 | const raw = fs.readFileSync(ENV_PATH, "utf8"); |
| 96 | const { map } = parseEnvLines(raw); |
| 97 | const settings = {}; |
| 98 | for (const key of SETTINGS_KEYS) { |
| 99 | settings[key] = map.get(key) ?? ""; |
| 100 | } |
| 101 | return settings; |
| 102 | } |
| 103 | |
| 104 | function writeEnvSettings(partial) { |
| 105 | const safePartial = partial || {}; |
no test coverage detected