MCPcopy
hub / github.com/anomalyco/opencode / withInstanceDir

Function withInstanceDir

packages/opencode/test/config/config.test.ts:159–165  ·  view source on GitHub ↗
(dir: string, effect: Effect.Effect<A, E, R>)

Source from the content-addressed store, hash-verified

157 FSUtil.use.writeWithDirs(path.join(dir, name), JSON.stringify(config))
158
159const withInstanceDir = <A, E, R>(dir: string, effect: Effect.Effect<A, E, R>) =>
160 effect.pipe(
161 Effect.provideService(TestInstance, { directory: dir }),
162 provideInstanceEffect(dir),
163 Effect.provide(testInstanceStoreLayer),
164 Effect.provide(LayerNode.compile(CrossSpawnSpawner.node)),
165 )
166
167const withGlobalConfigDir = <A, E, R>(dir: string, effect: Effect.Effect<A, E, R>) =>
168 Effect.acquireUseRelease(

Callers 1

withConfigTreeFunction · 0.85

Calls 1

provideInstanceEffectFunction · 0.90

Tested by

no test coverage detected