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

Function makeFileConfigSink

packages/core/config/src/sink.ts:56–72  ·  view source on GitHub ↗
(options: ConfigFileSinkOptions)

Source from the content-addressed store, hash-verified

54};
55
56export const makeFileConfigSink = (options: ConfigFileSinkOptions): ConfigFileSink => {
57 const { path, fsLayer, onError = defaultOnError } = options;
58
59 return {
60 upsertSource: (source) =>
61 addSourceToConfig(path, source).pipe(
62 Effect.provide(fsLayer),
63 Effect.catch((err: unknown) => Effect.sync(() => onError("upsert", err))),
64 ),
65
66 removeSource: (namespace) =>
67 removeSourceFromConfig(path, namespace).pipe(
68 Effect.provide(fsLayer),
69 Effect.catch((err: unknown) => Effect.sync(() => onError("remove", err))),
70 ),
71 };
72};

Callers

nothing calls this directly

Calls 4

addSourceToConfigFunction · 0.90
removeSourceFromConfigFunction · 0.90
syncMethod · 0.80
onErrorFunction · 0.50

Tested by

no test coverage detected