MCPcopy Index your code
hub / github.com/anomalyco/opencode / provide

Function provide

packages/core/test/file-mutation.test.ts:16–27  ·  view source on GitHub ↗
(directory: string, filesystemLayer = LayerNode.compile(FSUtil.node))

Source from the content-addressed store, hash-verified

14import { it } from "./lib/effect"
15
16function provide(directory: string, filesystemLayer = LayerNode.compile(FSUtil.node)) {
17 const activeLocation = Layer.succeed(
18 Location.Service,
19 Location.Service.of(location({ directory: AbsolutePath.make(directory) })),
20 )
21 return Effect.provide(
22 AppNodeBuilder.build(LayerNode.group([LocationMutation.node, FileMutation.node]), [
23 [Location.node, activeLocation],
24 [FSUtil.node, filesystemLayer],
25 ]),
26 )
27}
28
29function withTmp<A, E, R>(f: (directory: string) => Effect.Effect<A, E, R>) {
30 return Effect.acquireRelease(

Callers 1

Calls 2

locationFunction · 0.90
makeMethod · 0.45

Tested by

no test coverage detected