(config: HyperframesConfig)
| 124 | * Persist config to disk. Updates the in-memory cache. |
| 125 | */ |
| 126 | export function writeConfig(config: HyperframesConfig): void { |
| 127 | try { |
| 128 | mkdirSync(CONFIG_DIR, { recursive: true, mode: 0o700 }); |
| 129 | writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2) + "\n", { mode: 0o600 }); |
| 130 | cachedConfig = { ...config }; |
| 131 | } catch { |
| 132 | // Non-fatal — telemetry should never break the CLI |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Increment the command counter and persist. |
no outgoing calls
no test coverage detected