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

Function readCliServerConnectionStore

apps/cli/src/server-profile.ts:124–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 `${JSON.stringify(store, null, 2)}\n`;
123
124export const readCliServerConnectionStore = (): Effect.Effect<
125 CliServerConnectionStore,
126 never,
127 FileSystem.FileSystem | Path.Path
128> =>
129 Effect.gen(function* () {
130 const fs = yield* FileSystem.FileSystem;
131 const path = yield* Path.Path;
132 const raw = yield* fs
133 .readFileString(serverConnectionStorePath(path))
134 .pipe(Effect.catchCause(() => Effect.succeed(null)));
135 if (raw === null) return emptyCliServerConnectionStore;
136 return parseCliServerConnectionStore(raw);
137 });
138
139export const writeCliServerConnectionStore = (
140 store: CliServerConnectionStore,

Calls 2

Tested by

no test coverage detected