()
| 170 | } |
| 171 | |
| 172 | function readPiSettings(): PiSettingsLike | null { |
| 173 | const settingsPath = getPiUserExtensionsPath(); |
| 174 | if (!existsSync(settingsPath)) return null; |
| 175 | try { |
| 176 | const raw = readFileSync(settingsPath, "utf-8"); |
| 177 | const parsed = parseJsonc(raw) as PiSettingsLike | null; |
| 178 | return parsed; |
| 179 | } catch { |
| 180 | return null; |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | function writePiSettings(settings: PiSettingsLike): void { |
| 185 | const settingsPath = getPiUserExtensionsPath(); |
no test coverage detected