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

Function readCliServerConnectionStore

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

Source from the content-addressed store, hash-verified

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

Calls 2

Tested by

no test coverage detected