Write a settings.json file, preserving existing keys.
(filePath: string, data: Record<string, unknown>)
| 215 | |
| 216 | /** Write a settings.json file, preserving existing keys. */ |
| 217 | function writeFullSettings(filePath: string, data: Record<string, unknown>): void { |
| 218 | fs.mkdirSync(path.dirname(filePath), { recursive: true }) |
| 219 | fs.writeFileSync(filePath, JSON.stringify(data, null, "\t") + "\n", { mode: 0o600 }) |
| 220 | } |
| 221 | |
| 222 | /** Path to the settings file for a given scope. */ |
| 223 | function settingsPathForScope(cwd: string, scope: McpScope): string { |
no outgoing calls
no test coverage detected