MCPcopy Create free account
hub / github.com/thesysdev/openui / writeState

Function writeState

packages/openui-cli/src/lib/telemetry.ts:41–48  ·  view source on GitHub ↗
(file: string, s: Stored)

Source from the content-addressed store, hash-verified

39 };
40}
41function writeState(file: string, s: Stored) {
42 try {
43 fs.mkdirSync(path.dirname(file), { recursive: true });
44 fs.writeFileSync(file, JSON.stringify(s));
45 } catch {
46 /* read-only fs / CI: best-effort */
47 }
48}
49
50/** Thrown by command funnels so the index wrapper can attribute the failure stage + drain once. */
51export class CreateError extends Error {

Callers 1

loadOrCreateStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected