routup 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -15
- package/dist/bun.d.mts +1 -1
- package/dist/bun.mjs +1 -1
- package/dist/bun.mjs.map +1 -1
- package/dist/cloudflare.d.mts +1 -1
- package/dist/cloudflare.mjs +1 -1
- package/dist/cloudflare.mjs.map +1 -1
- package/dist/deno.d.mts +1 -1
- package/dist/deno.mjs +1 -1
- package/dist/deno.mjs.map +1 -1
- package/dist/generic.d.mts +1 -1
- package/dist/generic.mjs +1 -1
- package/dist/generic.mjs.map +1 -1
- package/dist/{index-BFl_WPX9.d.mts → index-DdsCL8RI.d.mts} +48 -20
- package/dist/node.d.mts +1 -1
- package/dist/node.mjs +1 -1
- package/dist/node.mjs.map +1 -1
- package/dist/service-worker.d.mts +1 -1
- package/dist/service-worker.mjs +1 -1
- package/dist/service-worker.mjs.map +1 -1
- package/dist/{src-BYuhKm-d.mjs → src-DX0rndew.mjs} +106 -40
- package/dist/src-DX0rndew.mjs.map +1 -0
- package/package.json +8 -7
- package/dist/src-BYuhKm-d.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
[](https://routup.dev)
|
|
4
4
|
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
# Routup 🧙
|
|
8
8
|
|
|
9
9
|
[](https://badge.fury.io/js/routup)
|
|
10
|
-
[](https://github.com/routup/routup/actions/workflows/main.yml)
|
|
11
|
+
[](https://codecov.io/gh/routup/routup)
|
|
12
|
+
[](https://snyk.io/test/github/routup/routup)
|
|
13
13
|
[](https://conventionalcommits.org)
|
|
14
14
|
|
|
15
15
|
**Routup** is a minimalistic, runtime-agnostic HTTP routing framework for Node.js, Bun, Deno, and Cloudflare Workers.
|
|
@@ -21,7 +21,9 @@ Handlers return values directly — routup converts them to Web `Response` objec
|
|
|
21
21
|
- [Features](#features)
|
|
22
22
|
- [Documentation](#documentation)
|
|
23
23
|
- [Usage](#usage)
|
|
24
|
+
- [Templates](#templates)
|
|
24
25
|
- [Plugins](#plugins)
|
|
26
|
+
- [Comparison](#comparison)
|
|
25
27
|
- [Contributing](#contributing)
|
|
26
28
|
- [License](#license)
|
|
27
29
|
|
|
@@ -34,6 +36,7 @@ npm install routup --save
|
|
|
34
36
|
## Features
|
|
35
37
|
|
|
36
38
|
- 🚀 **Runtime agnostic** — Node.js, Bun, Deno, Cloudflare Workers
|
|
39
|
+
- 🌐 **Web-standard APIs** — built on `Request` / `Response` for portability
|
|
37
40
|
- 📝 **Return-based handlers** — return strings, objects, streams, or `Response` directly
|
|
38
41
|
- ✨ **Async middleware** — onion model with `event.next()`
|
|
39
42
|
- 📌 **Lifecycle hooks** — `request`, `response`, `error` for cross-cutting concerns
|
|
@@ -125,6 +128,20 @@ serve(router, { port: 3000 });
|
|
|
125
128
|
|
|
126
129
|
For runtime-specific APIs (e.g. `toNodeHandler`), use the corresponding entrypoint like `routup/node`.
|
|
127
130
|
|
|
131
|
+
## Templates
|
|
132
|
+
|
|
133
|
+
Scaffold a new project from any starter in [`routup/templates`](https://github.com/routup/templates) with [`degit`](https://github.com/Rich-Harris/degit):
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npx degit routup/templates/node-api my-app
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
| Template | Runtime | Highlights |
|
|
140
|
+
|----------|---------|------------|
|
|
141
|
+
| [node-api](https://github.com/routup/templates/tree/master/node-api) | Node.js >=22 | JSON API with `@routup/body` |
|
|
142
|
+
| [cloudflare-worker](https://github.com/routup/templates/tree/master/cloudflare-worker) | Cloudflare Workers | Configured with `wrangler` |
|
|
143
|
+
| [bun-decorators](https://github.com/routup/templates/tree/master/bun-decorators) | Bun | Class-based routing via `@routup/decorators` |
|
|
144
|
+
|
|
128
145
|
## Plugins
|
|
129
146
|
|
|
130
147
|
Routup is minimalistic by design. [Plugins](https://github.com/routup/plugins) extend the framework with additional functionality.
|
|
@@ -135,27 +152,48 @@ Routup is minimalistic by design. [Plugins](https://github.com/routup/plugins) e
|
|
|
135
152
|
| [basic](https://github.com/routup/plugins/tree/master/packages/basic) | Bundle of body, cookie, and query plugins |
|
|
136
153
|
| [body](https://github.com/routup/plugins/tree/master/packages/body) | Read and parse the request body |
|
|
137
154
|
| [cookie](https://github.com/routup/plugins/tree/master/packages/cookie) | Read and parse request cookies |
|
|
155
|
+
| [cors](https://github.com/routup/plugins/tree/master/packages/cors) | Cross-Origin Resource Sharing (CORS) middleware |
|
|
138
156
|
| [decorators](https://github.com/routup/plugins/tree/master/packages/decorators) | Class, method, and parameter decorators |
|
|
157
|
+
| [i18n](https://github.com/routup/plugins/tree/master/packages/i18n) | Translation and internationalization |
|
|
158
|
+
| [logger](https://github.com/routup/plugins/tree/master/packages/logger) | HTTP request logger with morgan-compatible tokens and presets |
|
|
139
159
|
| [prometheus](https://github.com/routup/plugins/tree/master/packages/prometheus) | Collect and serve Prometheus metrics |
|
|
140
160
|
| [query](https://github.com/routup/plugins/tree/master/packages/query) | Parse URL query strings |
|
|
141
161
|
| [rate-limit](https://github.com/routup/plugins/tree/master/packages/rate-limit) | Rate limit incoming requests |
|
|
142
162
|
| [rate-limit-redis](https://github.com/routup/plugins/tree/master/packages/rate-limit-redis) | Redis adapter for rate-limit |
|
|
143
|
-
| [swagger](https://github.com/routup/plugins/tree/master/packages/swagger) |
|
|
163
|
+
| [swagger-ui](https://github.com/routup/plugins/tree/master/packages/swagger-ui) | Mount swagger-ui-dist on any path |
|
|
164
|
+
|
|
165
|
+
## Comparison
|
|
166
|
+
|
|
167
|
+
How routup stacks up against other popular Node.js routing frameworks. This is a best-effort summary; check each project's docs for the full picture.
|
|
168
|
+
|
|
169
|
+
| | routup | [Hono](https://hono.dev) | [Express](https://expressjs.com) | [Fastify](https://fastify.dev) |
|
|
170
|
+
|---------------------------------------|-------------------|--------------------------|----------------------------------|--------------------------------|
|
|
171
|
+
| **Runtimes** | Node, Bun, Deno, Cloudflare, Service Worker | Node, Bun, Deno, Cloudflare, Lambda, Vercel | Node | Node |
|
|
172
|
+
| **Web-standard `Request` / `Response`** | ✅ | ✅ | ❌ | ❌ |
|
|
173
|
+
| **Return-based handlers** | ✅ | ✅ | ❌ | ❌ |
|
|
174
|
+
| **TypeScript-first** | ✅ | ✅ | community types | ✅ |
|
|
175
|
+
| **Tree-shakeable helpers** | ✅ | ✅ | ❌ | ❌ |
|
|
176
|
+
| **Onion middleware (`next()`)** | ✅ | ✅ | linear `next()` | lifecycle hooks |
|
|
177
|
+
| **Class-based routes (decorators)** | ✅ via plugin | ❌ | ❌ | ❌ |
|
|
178
|
+
| **Express middleware bridge** | ✅ `fromNodeHandler` | ❌ | n/a | limited |
|
|
179
|
+
| **Per-handler timeout + `AbortSignal`** | ✅ | ❌ | ❌ | server-level |
|
|
180
|
+
| **Schema validation built-in** | ❌ | ❌ | ❌ | ✅ |
|
|
144
181
|
|
|
145
182
|
## Benchmarks
|
|
146
183
|
|
|
147
|
-
|
|
184
|
+
Recorded with routup v5.1 on Node.js 24, May 2026. `autocannon -c 100 -d 40 -p 10` (40s warm-up, 40s measure).
|
|
148
185
|
|
|
149
|
-
| Package | Requests/s
|
|
150
|
-
|
|
151
|
-
| http |
|
|
152
|
-
| fastify |
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
| hapi |
|
|
156
|
-
| express |
|
|
186
|
+
| Package | Requests/s | Latency (ms) | Throughput/MB |
|
|
187
|
+
|:-----------|:----------:|-------------:|--------------:|
|
|
188
|
+
| http | 167021 | 5.47 | 29.79 |
|
|
189
|
+
| fastify | 152567 | 6.02 | 27.35 |
|
|
190
|
+
| hono | 137181 | 6.81 | 22.50 |
|
|
191
|
+
| koa | 136575 | 6.79 | 24.36 |
|
|
192
|
+
| hapi | 118206 | 7.99 | 21.08 |
|
|
193
|
+
| express | 104533 | 9.06 | 18.64 |
|
|
194
|
+
| **routup** | 95979 | 9.93 | 18.67 |
|
|
157
195
|
|
|
158
|
-
To run
|
|
196
|
+
Routup currently trails on raw req/s for the trivial `GET /` case — the focus of v5 has been runtime portability and ergonomics rather than micro-optimization. Throughput is competitive with express. To re-run the suite yourself, see the [benchmarks](https://github.com/routup/benchmarks) repository.
|
|
159
197
|
|
|
160
198
|
## Contributing
|
|
161
199
|
|
package/dist/bun.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-
|
|
1
|
+
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-DdsCL8RI.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/bun.d.ts
|
package/dist/bun.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-
|
|
1
|
+
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-DX0rndew.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/bun";
|
|
3
3
|
//#region src/_entries/bun.ts
|
|
4
4
|
function serve(router, options) {
|
package/dist/bun.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun.mjs","names":["srvxServe"],"sources":["../src/_entries/bun.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/bun';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;
|
|
1
|
+
{"version":3,"file":"bun.mjs","names":["srvxServe"],"sources":["../src/_entries/bun.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/bun';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;CAClF,OAAOA,QAAU;EAAE,OAAO,OAAO,MAAM,KAAK,OAAO;EAAE,GAAG;EAAS,CAAC"}
|
package/dist/cloudflare.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-
|
|
1
|
+
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-DdsCL8RI.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/cloudflare.d.ts
|
package/dist/cloudflare.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-
|
|
1
|
+
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-DX0rndew.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/cloudflare";
|
|
3
3
|
//#region src/_entries/cloudflare.ts
|
|
4
4
|
function serve(router, options) {
|
package/dist/cloudflare.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudflare.mjs","names":["srvxServe"],"sources":["../src/_entries/cloudflare.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/cloudflare';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;
|
|
1
|
+
{"version":3,"file":"cloudflare.mjs","names":["srvxServe"],"sources":["../src/_entries/cloudflare.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/cloudflare';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;CAClF,OAAOA,QAAU;EAAE,OAAO,OAAO,MAAM,KAAK,OAAO;EAAE,GAAG;EAAS,CAAC"}
|
package/dist/deno.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-
|
|
1
|
+
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-DdsCL8RI.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/deno.d.ts
|
package/dist/deno.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-
|
|
1
|
+
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-DX0rndew.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/deno";
|
|
3
3
|
//#region src/_entries/deno.ts
|
|
4
4
|
function serve(router, options) {
|
package/dist/deno.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deno.mjs","names":["srvxServe"],"sources":["../src/_entries/deno.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/deno';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;
|
|
1
|
+
{"version":3,"file":"deno.mjs","names":["srvxServe"],"sources":["../src/_entries/deno.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/deno';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;CAClF,OAAOA,QAAU;EAAE,OAAO,OAAO,MAAM,KAAK,OAAO;EAAE,GAAG;EAAS,CAAC"}
|
package/dist/generic.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-
|
|
1
|
+
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-DdsCL8RI.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/generic.d.ts
|
package/dist/generic.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-
|
|
1
|
+
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-DX0rndew.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/generic";
|
|
3
3
|
//#region src/_entries/generic.ts
|
|
4
4
|
function serve(router, options) {
|
package/dist/generic.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.mjs","names":["srvxServe"],"sources":["../src/_entries/generic.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/generic';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;
|
|
1
|
+
{"version":3,"file":"generic.mjs","names":["srvxServe"],"sources":["../src/_entries/generic.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/generic';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;CAClF,OAAOA,QAAU;EAAE,OAAO,OAAO,MAAM,KAAK,OAAO;EAAE,GAAG;EAAS,CAAC"}
|
|
@@ -53,7 +53,6 @@ type HeaderName = typeof HeaderName[keyof typeof HeaderName];
|
|
|
53
53
|
//#region src/error/module.d.ts
|
|
54
54
|
declare const ErrorSymbol: unique symbol;
|
|
55
55
|
declare class RoutupError extends HTTPError {
|
|
56
|
-
readonly '@instanceof': symbol;
|
|
57
56
|
constructor(input?: HTTPErrorInput$1);
|
|
58
57
|
}
|
|
59
58
|
//#endregion
|
|
@@ -291,21 +290,13 @@ type HookErrorListener = (event: IDispatcherEvent) => Promise<unknown> | unknown
|
|
|
291
290
|
type HookDefaultListener = (event: IDispatcherEvent) => Promise<unknown> | unknown;
|
|
292
291
|
type HookListener = HookErrorListener | HookDefaultListener;
|
|
293
292
|
type HookUnsubscribeFn = () => void;
|
|
294
|
-
|
|
295
|
-
//#region src/hook/module.d.ts
|
|
296
|
-
type HookEntry = {
|
|
297
|
-
fn: HookListener;
|
|
298
|
-
priority: number;
|
|
299
|
-
};
|
|
300
|
-
declare class HookManager {
|
|
301
|
-
protected items: Record<string, HookEntry[]>;
|
|
302
|
-
constructor();
|
|
293
|
+
interface IHooks {
|
|
303
294
|
addListener(name: HookName, fn: HookListener, priority?: number): HookUnsubscribeFn;
|
|
304
295
|
removeListener(name: HookName): void;
|
|
305
296
|
removeListener(name: HookName, fn: HookListener): void;
|
|
297
|
+
removeListener(name: HookName, fn?: HookListener): void;
|
|
298
|
+
clone(): IHooks;
|
|
306
299
|
trigger(name: HookName, event: IDispatcherEvent): Promise<void>;
|
|
307
|
-
private triggerListener;
|
|
308
|
-
private isErrorListenerHook;
|
|
309
300
|
}
|
|
310
301
|
//#endregion
|
|
311
302
|
//#region src/path/type.d.ts
|
|
@@ -385,9 +376,8 @@ type HandlerOptions = CoreHandlerOptions | ErrorHandlerOptions;
|
|
|
385
376
|
//#endregion
|
|
386
377
|
//#region src/handler/module.d.ts
|
|
387
378
|
declare class Handler implements IDispatcher {
|
|
388
|
-
readonly '@instanceof': symbol;
|
|
389
379
|
protected config: HandlerOptions;
|
|
390
|
-
protected
|
|
380
|
+
protected hooks: IHooks;
|
|
391
381
|
protected pathMatcher: PathMatcher | undefined;
|
|
392
382
|
readonly method: MethodName | undefined;
|
|
393
383
|
constructor(handler: HandlerOptions);
|
|
@@ -672,6 +662,8 @@ type RouterOptions = {
|
|
|
672
662
|
type RouterOptionsInput = Omit<Partial<RouterOptions>, 'etag' | 'trustProxy'> & {
|
|
673
663
|
etag?: EtagInput;
|
|
674
664
|
trustProxy?: TrustProxyInput;
|
|
665
|
+
hooks?: IHooks;
|
|
666
|
+
plugins?: Map<string, string | undefined>;
|
|
675
667
|
};
|
|
676
668
|
type RouterPathNode = {
|
|
677
669
|
readonly name?: string;
|
|
@@ -680,6 +672,11 @@ type RouterPathNode = {
|
|
|
680
672
|
type StackRouterEntry = {
|
|
681
673
|
type: typeof RouterStackEntryType.ROUTER;
|
|
682
674
|
data: IRouter;
|
|
675
|
+
/**
|
|
676
|
+
* Original mount path the entry was registered with, retained so
|
|
677
|
+
* `Router.clone()` can re-register the entry via the public API.
|
|
678
|
+
*/
|
|
679
|
+
path?: Path;
|
|
683
680
|
/**
|
|
684
681
|
* Mount-specific path matcher.
|
|
685
682
|
*
|
|
@@ -691,6 +688,11 @@ type StackRouterEntry = {
|
|
|
691
688
|
type StackHandlerEntry = {
|
|
692
689
|
type: typeof RouterStackEntryType.HANDLER;
|
|
693
690
|
data: Handler;
|
|
691
|
+
/**
|
|
692
|
+
* Original mount path the entry was registered with, retained so
|
|
693
|
+
* `Router.clone()` can re-register the entry via the public API.
|
|
694
|
+
*/
|
|
695
|
+
path?: Path;
|
|
694
696
|
/**
|
|
695
697
|
* Mount-specific path matcher.
|
|
696
698
|
*
|
|
@@ -729,6 +731,16 @@ interface IRouter extends IDispatcher {
|
|
|
729
731
|
* Test if a path matches this router's mount path.
|
|
730
732
|
*/
|
|
731
733
|
matchPath(path: string): boolean;
|
|
734
|
+
/**
|
|
735
|
+
* Return a new router that mirrors this one but owns independent
|
|
736
|
+
* mountable state — fresh stack of shallow-copied entries (handlers and
|
|
737
|
+
* child routers shared by reference), fresh `Hooks` seeded with the
|
|
738
|
+
* current listeners, shallow copy of options, and a fresh plugins map.
|
|
739
|
+
*
|
|
740
|
+
* Intended for mounting the same logical router under multiple paths
|
|
741
|
+
* without sharing mutable state across mount points.
|
|
742
|
+
*/
|
|
743
|
+
clone(): IRouter;
|
|
732
744
|
/**
|
|
733
745
|
* Check if a plugin with the given name is installed on this router.
|
|
734
746
|
*/
|
|
@@ -831,7 +843,6 @@ declare class DispatcherEvent implements IDispatcherEvent {
|
|
|
831
843
|
//#endregion
|
|
832
844
|
//#region src/router/module.d.ts
|
|
833
845
|
declare class Router implements IRouter {
|
|
834
|
-
readonly '@instanceof': symbol;
|
|
835
846
|
/**
|
|
836
847
|
* A label for the router instance.
|
|
837
848
|
*/
|
|
@@ -851,11 +862,11 @@ declare class Router implements IRouter {
|
|
|
851
862
|
*/
|
|
852
863
|
protected pathMatcher: PathMatcher | undefined;
|
|
853
864
|
/**
|
|
854
|
-
*
|
|
865
|
+
* Lifecycle hook registry.
|
|
855
866
|
*
|
|
856
867
|
* @protected
|
|
857
868
|
*/
|
|
858
|
-
protected
|
|
869
|
+
protected hooks: IHooks;
|
|
859
870
|
/**
|
|
860
871
|
* Normalized options for this router instance.
|
|
861
872
|
*/
|
|
@@ -897,10 +908,10 @@ declare class Router implements IRouter {
|
|
|
897
908
|
options(...handlers: (Handler | HandlerOptions)[]): this;
|
|
898
909
|
options(path: Path, ...handlers: (Handler | HandlerOptions)[]): this;
|
|
899
910
|
protected useForMethod(method: MethodName, ...input: (Path | Handler | HandlerOptions)[]): void;
|
|
900
|
-
use(router:
|
|
911
|
+
use(router: IRouter): this;
|
|
901
912
|
use(handler: Handler | HandlerOptions): this;
|
|
902
913
|
use(plugin: Plugin): this;
|
|
903
|
-
use(path: Path, router:
|
|
914
|
+
use(path: Path, router: IRouter): this;
|
|
904
915
|
use(path: Path, handler: Handler | HandlerOptions): this;
|
|
905
916
|
use(path: Path, plugin: Plugin): this;
|
|
906
917
|
/**
|
|
@@ -913,6 +924,23 @@ declare class Router implements IRouter {
|
|
|
913
924
|
*/
|
|
914
925
|
getPluginVersion(name: string): string | undefined;
|
|
915
926
|
protected install(plugin: Plugin, context?: PluginInstallContext): this;
|
|
927
|
+
/**
|
|
928
|
+
* Return a new `Router` that mirrors this one but owns independent
|
|
929
|
+
* mountable state.
|
|
930
|
+
*
|
|
931
|
+
* The new router has:
|
|
932
|
+
* - a fresh `stack` array of shallow-copied entries (handlers and child
|
|
933
|
+
* routers are shared by reference; only the wrapping entries are new)
|
|
934
|
+
* - the same `pathMatcher` reference (it is stateless)
|
|
935
|
+
* - a fresh `Hooks` instance seeded with the current listeners
|
|
936
|
+
* - a shallow copy of `_options`
|
|
937
|
+
* - a fresh `plugins` map with the same entries
|
|
938
|
+
*
|
|
939
|
+
* Use this when the same logical router needs to be mounted under
|
|
940
|
+
* multiple paths — each mount can receive its own clone so subsequent
|
|
941
|
+
* mutations on one mount do not bleed into the others.
|
|
942
|
+
*/
|
|
943
|
+
clone(): IRouter;
|
|
916
944
|
/**
|
|
917
945
|
* Add a hook listener.
|
|
918
946
|
*
|
|
@@ -1128,4 +1156,4 @@ declare function getRequestProtocol(event: IRoutupEvent, options?: RequestProtoc
|
|
|
1128
1156
|
declare function normalizeRouterOptions(input: RouterOptionsInput): Partial<RouterOptions>;
|
|
1129
1157
|
//#endregion
|
|
1130
1158
|
export { RouterPathNode as $, RoutupError as $t, sendFile as A, Handler as At, EventStreamOptions as B, Path as Bt, sendRedirect as C, fromNodeHandler as Ct, SendFileDisposition as D, defineCoreHandler as Dt, SendFileContentOptions as E, NodeMiddleware as Et, setResponseHeaderInline as F, HandlerBaseOptions as Ft, setResponseCacheHeaders as G, RoutupEvent as Gt, EventStreamListener as H, PathMatcherOptions as Ht, appendResponseHeader as I, HandlerSymbol as It, Router as J, NextFn as Jt, isError as K, RoutupEventCreateContext as Kt, appendResponseHeaderDirective as L, HandlerType as Lt, sendAccepted as M, defineErrorHandler as Mt, setResponseHeaderContentType as N, ErrorHandler as Nt, SendFileOptions as O, CoreHandler as Ot, setResponseHeaderAttachment as P, ErrorHandlerOptions as Pt, RouterOptionsInput as Q, HTTPErrorInput$1 as Qt, serializeEventStreamMessage as R, isPath as Rt, sendStream as S, WebHandlerProvider as St, SendFileContent as T, NodeHandler as Tt, EventStreamMessage as U, IDispatcher as Ut, createEventStream as V, PathMatcherExecResult as Vt, ResponseCacheHeadersOptions as W, IDispatcherEvent as Wt, IRouter as X, RoutupResponse as Xt, DispatcherEvent as Y, RoutupRequest as Yt, RouterOptions as Z, ErrorSymbol as Zt, getRequestAcceptableContentTypes as _, isHandlerOptions as _t, RequestIpOptions as a, Plugin as at, toResponse as b, fromWebHandler as bt, getRequestHostName as c, PluginNotInstalledError as ct, getRequestAcceptableLanguages as d, isPluginError as dt, HeaderName as en, RouterPipelineContext as et, getRequestAcceptableEncoding as f, PluginError as ft, getRequestAcceptableContentType as g, isHandler as gt, getRequestAcceptableCharsets as h, matchHandlerMethod as ht, useRequestNegotiator as i, isPlugin as it, sendCreated as j, HandlerOptions as jt, SendFileStats as k, CoreHandlerOptions as kt, matchRequestContentType as l, PluginInstallError as lt, getRequestAcceptableCharset as m, buildHandlerPathMatcher as mt, RequestProtocolOptions as n, StackHandlerEntry as nt, getRequestIP as o, PluginInstallContext as ot, getRequestAcceptableEncodings as p, PluginErrorCode as pt, createError as q, IRoutupEvent as qt, getRequestProtocol as r, StackRouterEntry as rt, RequestHostNameOptions as s, PluginInstallFn as st, normalizeRouterOptions as t, MethodName as tn, StackEntry as tt, getRequestAcceptableLanguage as u, PluginAlreadyInstalledError as ut, getRequestHeader as v, isWebHandler as vt, sendFormat as w, fromNodeMiddleware as wt, setResponseContentTypeByFileName as x, WebHandler as xt, isRequestCacheable as y, isWebHandlerProvider as yt, EventStreamHandle as z, PathMatcher as zt };
|
|
1131
|
-
//# sourceMappingURL=index-
|
|
1159
|
+
//# sourceMappingURL=index-DdsCL8RI.d.mts.map
|
package/dist/node.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-
|
|
1
|
+
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-DdsCL8RI.mjs";
|
|
2
2
|
import * as _$srvx_node0 from "srvx/node";
|
|
3
3
|
import * as _$srvx from "srvx";
|
|
4
4
|
import { Server, ServerOptions } from "srvx";
|
package/dist/node.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-
|
|
1
|
+
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-DX0rndew.mjs";
|
|
2
2
|
import { serve as serve$1, toNodeHandler as toNodeHandler$1 } from "srvx/node";
|
|
3
3
|
//#region src/_entries/node.ts
|
|
4
4
|
function serve(router, options) {
|
package/dist/node.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.mjs","names":["srvxServe","srvxToNodeHandler"],"sources":["../src/_entries/node.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe, toNodeHandler as srvxToNodeHandler } from 'srvx/node';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n\nexport function toNodeHandler(router: Router) {\n return srvxToNodeHandler(router.fetch.bind(router));\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;
|
|
1
|
+
{"version":3,"file":"node.mjs","names":["srvxServe","srvxToNodeHandler"],"sources":["../src/_entries/node.ts"],"sourcesContent":["import type { Server, ServerOptions } from 'srvx';\nimport { serve as srvxServe, toNodeHandler as srvxToNodeHandler } from 'srvx/node';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n\nexport function toNodeHandler(router: Router) {\n return srvxToNodeHandler(router.fetch.bind(router));\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAgD;CAClF,OAAOA,QAAU;EAAE,OAAO,OAAO,MAAM,KAAK,OAAO;EAAE,GAAG;EAAS,CAAC;;AAGtE,SAAgB,cAAc,QAAgB;CAC1C,OAAOC,gBAAkB,OAAO,MAAM,KAAK,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-
|
|
1
|
+
import { $ as RouterPathNode, $t as RoutupError, A as sendFile, At as Handler, B as EventStreamOptions, Bt as Path, C as sendRedirect, Ct as fromNodeHandler, D as SendFileDisposition, Dt as defineCoreHandler, E as SendFileContentOptions, Et as NodeMiddleware, F as setResponseHeaderInline, Ft as HandlerBaseOptions, G as setResponseCacheHeaders, Gt as RoutupEvent, H as EventStreamListener, Ht as PathMatcherOptions, I as appendResponseHeader, It as HandlerSymbol, J as Router, Jt as NextFn, K as isError, Kt as RoutupEventCreateContext, L as appendResponseHeaderDirective, Lt as HandlerType, M as sendAccepted, Mt as defineErrorHandler, N as setResponseHeaderContentType, Nt as ErrorHandler, O as SendFileOptions, Ot as CoreHandler, P as setResponseHeaderAttachment, Pt as ErrorHandlerOptions, Q as RouterOptionsInput, Qt as HTTPErrorInput, R as serializeEventStreamMessage, Rt as isPath, S as sendStream, St as WebHandlerProvider, T as SendFileContent, Tt as NodeHandler, U as EventStreamMessage, Ut as IDispatcher, V as createEventStream, Vt as PathMatcherExecResult, W as ResponseCacheHeadersOptions, Wt as IDispatcherEvent, X as IRouter, Xt as RoutupResponse, Y as DispatcherEvent, Yt as RoutupRequest, Z as RouterOptions, Zt as ErrorSymbol, _ as getRequestAcceptableContentTypes, _t as isHandlerOptions, a as RequestIpOptions, at as Plugin, b as toResponse, bt as fromWebHandler, c as getRequestHostName, ct as PluginNotInstalledError, d as getRequestAcceptableLanguages, dt as isPluginError, en as HeaderName, et as RouterPipelineContext, f as getRequestAcceptableEncoding, ft as PluginError, g as getRequestAcceptableContentType, gt as isHandler, h as getRequestAcceptableCharsets, ht as matchHandlerMethod, i as useRequestNegotiator, it as isPlugin, j as sendCreated, jt as HandlerOptions, k as SendFileStats, kt as CoreHandlerOptions, l as matchRequestContentType, lt as PluginInstallError, m as getRequestAcceptableCharset, mt as buildHandlerPathMatcher, n as RequestProtocolOptions, nt as StackHandlerEntry, o as getRequestIP, ot as PluginInstallContext, p as getRequestAcceptableEncodings, pt as PluginErrorCode, q as createError, qt as IRoutupEvent, r as getRequestProtocol, rt as StackRouterEntry, s as RequestHostNameOptions, st as PluginInstallFn, t as normalizeRouterOptions, tn as MethodName, tt as StackEntry, u as getRequestAcceptableLanguage, ut as PluginAlreadyInstalledError, v as getRequestHeader, vt as isWebHandler, w as sendFormat, wt as fromNodeMiddleware, x as setResponseContentTypeByFileName, xt as WebHandler, y as isRequestCacheable, yt as isWebHandlerProvider, z as EventStreamHandle, zt as PathMatcher } from "./index-DdsCL8RI.mjs";
|
|
2
2
|
import * as _$srvx from "srvx";
|
|
3
3
|
import { ServerOptions } from "srvx";
|
|
4
4
|
import * as _$srvx_service_worker0 from "srvx/service-worker";
|
package/dist/service-worker.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-
|
|
1
|
+
import { $ as setResponseHeaderAttachment, A as Handler, B as sendRedirect, C as fromWebHandler, D as fromNodeMiddleware, E as fromNodeHandler, F as HandlerSymbol, G as getRequestHeader, H as getRequestAcceptableContentType, I as HandlerType, J as sendAccepted, K as sendFile, L as DispatcherEvent, M as matchHandlerMethod, N as isPath, O as defineErrorHandler, P as PathMatcher, Q as setResponseHeaderContentType, R as RoutupEvent, S as isHandlerOptions, T as isWebHandlerProvider, U as getRequestAcceptableContentTypes, V as sendFormat, W as useRequestNegotiator, X as createError, Y as toResponse, Z as isError, _ as getRequestAcceptableEncodings, a as PluginInstallError, at as serializeEventStreamMessage, b as isRequestCacheable, c as isPluginError, ct as setResponseCacheHeaders, d as getRequestIP, et as setResponseHeaderInline, f as getRequestHostName, g as getRequestAcceptableEncoding, h as getRequestAcceptableLanguages, i as PluginNotInstalledError, it as createEventStream, j as buildHandlerPathMatcher, k as defineCoreHandler, l as PluginErrorCode, lt as HeaderName, m as getRequestAcceptableLanguage, n as normalizeRouterOptions, nt as appendResponseHeader, o as PluginAlreadyInstalledError, ot as ErrorSymbol, p as matchRequestContentType, q as sendCreated, r as isPlugin, rt as appendResponseHeaderDirective, s as PluginError, st as RoutupError, t as Router, tt as setResponseContentTypeByFileName, u as getRequestProtocol, ut as MethodName, v as getRequestAcceptableCharset, w as isWebHandler, x as isHandler, y as getRequestAcceptableCharsets, z as sendStream } from "./src-DX0rndew.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/service-worker";
|
|
3
3
|
//#region src/_entries/service-worker.ts
|
|
4
4
|
function serve(router, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-worker.mjs","names":["srvxServe"],"sources":["../src/_entries/service-worker.ts"],"sourcesContent":["import type { ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/service-worker';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>) {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAwC;
|
|
1
|
+
{"version":3,"file":"service-worker.mjs","names":["srvxServe"],"sources":["../src/_entries/service-worker.ts"],"sourcesContent":["import type { ServerOptions } from 'srvx';\nimport { serve as srvxServe } from 'srvx/service-worker';\nimport type { Router } from '../router/module.ts';\n\nexport * from '../index.ts';\n\nexport function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>) {\n return srvxServe({ fetch: router.fetch.bind(router), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,QAAgB,SAAwC;CAC1E,OAAOA,QAAU;EAAE,OAAO,OAAO,MAAM,KAAK,OAAO;EAAE,GAAG;EAAS,CAAC"}
|