(id: string)
| 135 | } |
| 136 | |
| 137 | async function readLegacyUpdate(id: string): Promise<Uint8Array | null> { |
| 138 | const filePath = legacyDocPath(id) |
| 139 | if (!filePath || filePath === docPath(id)) return null |
| 140 | try { |
| 141 | const data = new Uint8Array(await fs.readFile(filePath)) |
| 142 | return isExpectedTaskDoc(id, data) ? data : null |
| 143 | } catch (error) { |
| 144 | if ((error as NodeJS.ErrnoException).code === "ENOENT") return null |
| 145 | throw error |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | async function readUpdate(id: string): Promise<Uint8Array | null> { |
| 150 | try { |
no test coverage detected