()
| 61 | const CONFIG_PATH = path.join(os.homedir(), '.valdi-inspect.json'); |
| 62 | |
| 63 | export function loadInspectConfig(): InspectConfig { |
| 64 | try { |
| 65 | return JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf8')) as InspectConfig; |
| 66 | } catch { |
| 67 | return {}; |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | export function saveInspectConfig(config: InspectConfig): void { |
| 72 | fs.writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2), 'utf8'); |
no test coverage detected