MCPcopy
hub / github.com/coder/mux / write

Method write

src/node/services/bashMonitorWakeStore.ts:343–351  ·  view source on GitHub ↗
(record: BashMonitorWakeRecord)

Source from the content-addressed store, hash-verified

341 }
342
343 private async write(record: BashMonitorWakeRecord): Promise<void> {
344 const dir = this.dir(record.ownerWorkspaceId);
345 await fsPromises.mkdir(dir, { recursive: true });
346 await fsPromises.writeFile(
347 this.file(record.ownerWorkspaceId, record.id),
348 JSON.stringify(record, null, 2),
349 "utf-8"
350 );
351 }
352
353 private parse(raw: string): BashMonitorWakeRecord | null {
354 let json: unknown;

Callers 3

enqueueOrMergePendingMethod · 0.95
transitionSnapshotMethod · 0.95
transitionMethod · 0.95

Calls 3

dirMethod · 0.95
fileMethod · 0.95
writeFileMethod · 0.65

Tested by

no test coverage detected