()
| 204 | |
| 205 | return { |
| 206 | async listDocuments() { |
| 207 | try { |
| 208 | const files = await fs.readdir(rootDir) |
| 209 | return files.filter((file) => !file.includes(".tmp.")).map((file) => unsanitizeId(file)) |
| 210 | } catch (error) { |
| 211 | if ((error as NodeJS.ErrnoException).code === "ENOENT") return [] |
| 212 | throw error |
| 213 | } |
| 214 | }, |
| 215 | readDocumentUpdate: readUpdate, |
| 216 | saveDocumentUpdate: saveUpdate, |
| 217 | async deleteDocument(id) { |
nothing calls this directly
no test coverage detected