()
| 13 | } |
| 14 | |
| 15 | function readState(): UpdateState | null { |
| 16 | try { |
| 17 | const raw = readFileSync(STATE_FILE(), 'utf-8'); |
| 18 | return JSON.parse(raw) as UpdateState; |
| 19 | } catch { |
| 20 | return null; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | function writeState(state: UpdateState): void { |
| 25 | try { |
no test coverage detected