( app: App, options?: CompressionOptions, context?: Context.Context<HttpPlatform.HttpPlatform> )
| 56 | }) |
| 57 | |
| 58 | const makeHandler = ( |
| 59 | app: App, |
| 60 | options?: CompressionOptions, |
| 61 | context?: Context.Context<HttpPlatform.HttpPlatform> |
| 62 | ) => { |
| 63 | const self = app as Effect.Effect<HttpServerResponse.HttpServerResponse, any, HttpServerRequest | Scope.Scope> |
| 64 | const middleware = HttpMiddleware.compression(options) |
| 65 | if (context !== undefined) { |
| 66 | return HttpEffect.toWebHandlerWith<HttpPlatform.HttpPlatform, HttpServerRequest | Scope.Scope>(context)( |
| 67 | self, |
| 68 | middleware |
| 69 | ) |
| 70 | } |
| 71 | const { dispose, handler } = HttpEffect.toWebHandlerLayer(self, HttpServer.layerServices, { middleware }) |
| 72 | disposers.push(dispose) |
| 73 | return handler |
| 74 | } |
| 75 | |
| 76 | const disposers: Array<() => Promise<void>> = [] |
| 77 |
no test coverage detected