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 upsertIntegration: (integration) =>
61 addIntegrationToConfig(path, integration).pipe(
62 Effect.provide(fsLayer),
63 Effect.catch((err: unknown) => Effect.sync(() => onError("upsert", err))),
64 ),
65
66 removeIntegration: (namespace) =>
67 removeIntegrationFromConfig(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

addIntegrationToConfigFunction · 0.90
syncMethod · 0.65
onErrorFunction · 0.50

Tested by

no test coverage detected