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

Function configLayer

packages/opencode/test/config/config.test.ts:94–106  ·  view source on GitHub ↗
(
  options: {
    auth?: Layer.Layer<Auth.Service>
    account?: Layer.Layer<Account.Service>
    client?: HttpClient.HttpClient
  } = {},
)

Source from the content-addressed store, hash-verified

92}
93
94const configLayer = (
95 options: {
96 auth?: Layer.Layer<Auth.Service>
97 account?: Layer.Layer<Account.Service>
98 client?: HttpClient.HttpClient
99 } = {},
100) =>
101 LayerNode.compile(LayerNode.group([Config.node, FSUtil.node, Env.node, CrossSpawnSpawner.node]), [
102 [Auth.node, options.auth ?? AuthTest.empty],
103 [Account.node, options.account ?? AccountTest.empty],
104 [Npm.node, NpmTest.noop],
105 [httpClient, Layer.succeed(HttpClient.HttpClient, options.client ?? unexpectedHttp)],
106 ])
107
108const layer = configLayer()
109

Callers 2

config.test.tsFile · 0.85
configItFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected