(state: InboxReadStateFile)
| 191 | } |
| 192 | |
| 193 | async function writeReadState(state: InboxReadStateFile): Promise<void> { |
| 194 | await mkdir(dirname(readStatePath), { recursive: true }) |
| 195 | const tmp = `${readStatePath}.tmp` |
| 196 | await writeFile(tmp, JSON.stringify(state, null, 2) + '\n', 'utf-8') |
| 197 | await rename(tmp, readStatePath) |
| 198 | } |
| 199 | |
| 200 | async function entryExists(id: string): Promise<boolean> { |
| 201 | let raw: string |
no outgoing calls
no test coverage detected