()
| 88 | } |
| 89 | |
| 90 | async function readRawUserConfig(): Promise<any> { |
| 91 | try { |
| 92 | const raw = await fs.readFile(QODEX_CONFIG_FILE, 'utf-8'); |
| 93 | return (yaml.load(raw) as any) ?? {}; |
| 94 | } catch (e: any) { |
| 95 | if (e?.code === 'ENOENT') return {}; |
| 96 | throw e; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | async function writeRawUserConfig(obj: any): Promise<void> { |
| 101 | const text = yaml.dump(obj, { indent: 2, lineWidth: 100 }); |
no test coverage detected