(path: string, value: unknown, secrets: string[] = [])
| 79 | } |
| 80 | |
| 81 | export async function save(path: string, value: unknown, secrets: string[] = []): Promise<void> { |
| 82 | await mkdir(dirname(path), { recursive: true, mode: 0o700 }); |
| 83 | const temporary = `${path}.tmp`; |
| 84 | await writeFile(temporary, redact(JSON.stringify(value, null, 2) + "\n", secrets), { mode: 0o600 }); |
| 85 | await rename(temporary, path); |
| 86 | } |
no test coverage detected