MCPcopy Create free account
hub / github.com/anomalyco/opencode / makeRoutes

Function makeRoutes

packages/server/src/routes.ts:51–63  ·  view source on GitHub ↗
(auth: Layer.Layer<ServerAuth.Config, AuthError, AuthServices>)

Source from the content-addressed store, hash-verified

49}
50
51function makeRoutes<AuthError, AuthServices>(auth: Layer.Layer<ServerAuth.Config, AuthError, AuthServices>) {
52 const serviceLayer = AppNodeBuilder.build(applicationServices, [[SessionExecution.node, SessionExecutionLocal.node]])
53
54 return HttpApiBuilder.layer(Api, { openapiPath: "/openapi.json" }).pipe(
55 Layer.provide(handlers),
56 Layer.provide(sessionLocationLayer),
57 Layer.provide(locationLayer),
58 Layer.provide(authorizationLayer),
59 Layer.provide(schemaErrorLayer),
60 Layer.provide(auth),
61 Layer.provide(serviceLayer),
62 )
63}
64
65export const routes = createRoutes()
66

Callers 2

createRoutesFunction · 0.85
createEmbeddedRoutesFunction · 0.85

Calls 1

layerMethod · 0.45

Tested by

no test coverage detected