MCPcopy Create free account
hub / github.com/effect-app/libs / middleware

Class middleware

packages/infra/test/controller.test.ts:143–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141] as const
142
143class middleware extends MiddlewareMaker
144 .Tag<middleware>()("middleware", RequestContextMap)
145 .middleware(
146 RequireRoles,
147 Test
148 )
149 // AllowAnonymous provided after RequireRoles so that RequireRoles can access what AllowAnonymous provides
150 .middleware(AllowAnonymous)
151 .middleware(MyContextProvider)
152 .middleware(...genericMiddlewares)
153{
154 static Default = this.layer.pipe(Layer.provide([...MiddlewaresLive]))
155 // static override [Unify.unifySymbol]?: TagUnify<typeof middleware> // why we need this?
156}
157
158const middlewareBis = MiddlewareMaker
159 .Tag()("middleware", RequestContextMap)

Callers 1

MiddlewareMaker.tsFile · 0.50

Calls 3

middlewareMethod · 0.65
pipeMethod · 0.65
provideMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…