MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / readLegacyUpdate

Function readLegacyUpdate

projects/openade-module/src/nodeYjsStorage.ts:137–147  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

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 {

Callers 1

readUpdateFunction · 0.85

Calls 4

legacyDocPathFunction · 0.85
docPathFunction · 0.85
readFileMethod · 0.80
isExpectedTaskDocFunction · 0.70

Tested by

no test coverage detected