(id: string, data: Uint8Array)
| 99 | } |
| 100 | |
| 101 | function isExpectedTaskDoc(id: string, data: Uint8Array): boolean { |
| 102 | const expected = expectedTaskMetaId(id) |
| 103 | if (!expected) return true |
| 104 | try { |
| 105 | return readTaskMetaId(data) === expected |
| 106 | } catch { |
| 107 | return false |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | async function writeMigratedDoc(filePath: string, data: Uint8Array): Promise<void> { |
| 112 | await ensureStorageDir() |
no test coverage detected