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

Function providerAuthLayer

packages/opencode/test/plugin/auth-override.test.ts:19–38  ·  view source on GitHub ↗
(directory: string, plugins: string[])

Source from the content-addressed store, hash-verified

17const it = testEffect(LayerNode.compile(LayerNode.group([CrossSpawnSpawner.node, FSUtil.node])))
18
19function providerAuthLayer(directory: string, plugins: string[]) {
20 return LayerNode.compile(ProviderAuth.node, [
21 [
22 Config.node,
23 TestConfig.layer({
24 get: () =>
25 Effect.succeed({
26 plugin: plugins,
27 plugin_origins: plugins.map((plugin) => ({
28 spec: plugin,
29 source: path.join(directory, "opencode.json"),
30 scope: "local" as const,
31 })),
32 }),
33 directories: () => Effect.succeed([directory]),
34 }),
35 ],
36 [RuntimeFlags.node, RuntimeFlags.layer()],
37 ])
38}
39
40describe("plugin.auth-override", () => {
41 it.instance(

Callers 1

Calls 1

layerMethod · 0.45

Tested by

no test coverage detected