/** * A JSON file another process may be reading at the same moment. * * Written to a sibling temp file and renamed into place, so a reader sees either the previous * document or the whole new one — never a truncated half. `rename` is atomic on every platform the * CLI runs on; `writeFileSync` straight onto the final name is not, and a reader that races it * parses `{"version":` and gives up. The same shape `config/credentials.ts` uses, minus the 0600 * modes that only a credentials file needs. */ export declare function writeJsonAtomic(file: string, value: unknown): void; /** * The parsed document, or null when there is none to trust. * * Missing, unreadable and malformed all collapse to null on purpose: every caller's next move is * the same — start from empty and write a fresh one — and a corrupt record must not wedge the * command that would otherwise replace it. */ export declare function readJsonFile(file: string): unknown | null;