(options: ConfigFileSinkOptions)
| 54 | }; |
| 55 | |
| 56 | export 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 | }; |
nothing calls this directly
no test coverage detected