(partial: Partial<UserConfig>)
| 57 | * Merges with existing config so partial updates work. |
| 58 | */ |
| 59 | export async function saveConfig(partial: Partial<UserConfig>): Promise<void> { |
| 60 | const dir = await getDevCtxDir(); |
| 61 | const configPath = path.join(dir, "config.json"); |
| 62 | |
| 63 | const existing = await loadConfig(); |
| 64 | const merged = { ...existing, ...partial }; |
| 65 | fs.writeFileSync(configPath, JSON.stringify(merged, null, 2)); |
| 66 | } |
no test coverage detected