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

Class AppMiddleware

packages/infra/test/rpc-context-map-streaming.test.ts:62–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60// ---------------------------------------------------------------------------
61
62class AppMiddleware extends MiddlewareMaker
63 .Tag<AppMiddleware>()("AppMiddleware", RequestContextMap)
64 .middleware(RequireRoles, Test)
65 .middleware(AllowAnonymous)
66 .middleware(SomeElseMiddleware)
67 .middleware(...DefaultGenericMiddlewares)
68{
69 static Default = this.layer.pipe(
70 Layer.provide(
71 [
72 RequireRolesLive.pipe(Layer.provide(SomeService.Default)),
73 AllowAnonymousLive,
74 TestLive,
75 SomeElseMiddlewareLive,
76 DefaultGenericMiddlewaresLive
77 ] as const
78 )
79 )
80}
81
82const { Router, matchAll } = makeRouter(AppMiddleware.Default)
83

Callers

nothing calls this directly

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…