MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / read

Function read

e2e/src/timeline.ts:25–29  ·  view source on GitHub ↗
(runDir: string)

Source from the content-addressed store, hash-verified

23const fileFor = (runDir: string) => join(runDir, "timeline.json");
24
25const read = (runDir: string): Timeline => {
26 const file = fileFor(runDir);
27 if (!existsSync(file)) return { anchors: {}, focus: [] };
28 return JSON.parse(readFileSync(file, "utf8")) as Timeline;
29};
30
31const write = (runDir: string, timeline: Timeline) =>
32 writeFileSync(fileFor(runDir), JSON.stringify(timeline, null, 1));

Callers 5

markRecordingStartFunction · 0.85
markFocusFunction · 0.85
markNavigationFunction · 0.85
readTimelineFunction · 0.85
enterFocusFunction · 0.85

Calls 1

fileForFunction · 0.70

Tested by

no test coverage detected