routup 5.0.0-beta.1 → 5.0.0-beta.3
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 +12 -30
- package/dist/bun.d.mts +2 -2
- package/dist/bun.mjs +2 -2
- package/dist/cloudflare.d.mts +2 -2
- package/dist/cloudflare.mjs +2 -2
- package/dist/deno.d.mts +2 -2
- package/dist/deno.mjs +2 -2
- package/dist/generic.d.mts +2 -2
- package/dist/generic.mjs +2 -2
- package/dist/{index-DN3wy86V.d.mts → index-DCtnUoGL.d.mts} +219 -156
- package/dist/node.d.mts +2 -2
- package/dist/node.mjs +2 -2
- package/dist/service-worker.d.mts +2 -2
- package/dist/service-worker.mjs +2 -2
- package/dist/{src-CpLmo5Po.mjs → src-Tr9cHQaV.mjs} +549 -512
- package/dist/src-Tr9cHQaV.mjs.map +1 -0
- package/package.json +10 -15
- package/dist/bun.cjs +0 -69
- package/dist/bun.cjs.map +0 -1
- package/dist/bun.d.cts +0 -8
- package/dist/cloudflare.cjs +0 -69
- package/dist/cloudflare.cjs.map +0 -1
- package/dist/cloudflare.d.cts +0 -8
- package/dist/deno.cjs +0 -69
- package/dist/deno.cjs.map +0 -1
- package/dist/deno.d.cts +0 -8
- package/dist/generic.cjs +0 -69
- package/dist/generic.cjs.map +0 -1
- package/dist/generic.d.cts +0 -8
- package/dist/index-Dm50O_sj.d.cts +0 -841
- package/dist/node.cjs +0 -73
- package/dist/node.cjs.map +0 -1
- package/dist/node.d.cts +0 -11
- package/dist/service-worker.cjs +0 -69
- package/dist/service-worker.cjs.map +0 -1
- package/dist/service-worker.d.cts +0 -10
- package/dist/src-CpLmo5Po.mjs.map +0 -1
- package/dist/src-D_4IPMmD.cjs +0 -1960
- package/dist/src-D_4IPMmD.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -113,9 +113,8 @@ router.use(defineCoreHandler(async (event) => {
|
|
|
113
113
|
|
|
114
114
|
### Runtimes
|
|
115
115
|
|
|
116
|
-
Routup runs on
|
|
116
|
+
Routup runs on Node.js, Bun, Deno, and Cloudflare Workers. In most cases, import from `routup`:
|
|
117
117
|
|
|
118
|
-
**Node.js**
|
|
119
118
|
```typescript
|
|
120
119
|
import { Router, defineCoreHandler, serve } from 'routup';
|
|
121
120
|
|
|
@@ -124,33 +123,7 @@ router.get('/', defineCoreHandler(() => 'Hello, World!'));
|
|
|
124
123
|
serve(router, { port: 3000 });
|
|
125
124
|
```
|
|
126
125
|
|
|
127
|
-
|
|
128
|
-
```typescript
|
|
129
|
-
import { Router, defineCoreHandler, serve } from 'routup/bun';
|
|
130
|
-
|
|
131
|
-
const router = new Router();
|
|
132
|
-
router.get('/', defineCoreHandler(() => 'Hello, World!'));
|
|
133
|
-
serve(router, { port: 3000 });
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**Deno**
|
|
137
|
-
```typescript
|
|
138
|
-
import { Router, defineCoreHandler, serve } from 'routup/deno';
|
|
139
|
-
|
|
140
|
-
const router = new Router();
|
|
141
|
-
router.get('/', defineCoreHandler(() => 'Hello, World!'));
|
|
142
|
-
serve(router, { port: 3000 });
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Cloudflare Workers**
|
|
146
|
-
```typescript
|
|
147
|
-
import { Router, defineCoreHandler } from 'routup/cloudflare';
|
|
148
|
-
|
|
149
|
-
const router = new Router();
|
|
150
|
-
router.get('/', defineCoreHandler(() => 'Hello, World!'));
|
|
151
|
-
|
|
152
|
-
export default { fetch: (request) => router.fetch(request) };
|
|
153
|
-
```
|
|
126
|
+
For runtime-specific APIs (e.g. `toNodeHandler`), use the corresponding entrypoint like `routup/node`.
|
|
154
127
|
|
|
155
128
|
## Plugins
|
|
156
129
|
|
|
@@ -171,7 +144,16 @@ Routup is minimalistic by design. [Plugins](https://github.com/routup/plugins) e
|
|
|
171
144
|
|
|
172
145
|
## Benchmarks
|
|
173
146
|
|
|
174
|
-
> **Note:** These benchmarks were recorded with routup v4 (Node.js 18, Sep 2023).
|
|
147
|
+
> **Note:** These benchmarks were recorded with routup v4 (Node.js 18, Sep 2023). Updated v5 benchmarks will follow.
|
|
148
|
+
|
|
149
|
+
| Package | Requests/s | Latency (ms) | Throughput/MB |
|
|
150
|
+
|:-----------|:-----------:|-------------:|--------------:|
|
|
151
|
+
| http | 61062 | 15.87 | 10.89 |
|
|
152
|
+
| fastify | 59679 | 16.26 | 10.70 |
|
|
153
|
+
| koa | 45763 | 21.35 | 8.16 |
|
|
154
|
+
| **routup** | 44588 | 21.91 | 9.02 |
|
|
155
|
+
| hapi | 41374 | 23.67 | 7.38 |
|
|
156
|
+
| express | 13376 | 74.18 | 2.39 |
|
|
175
157
|
|
|
176
158
|
To run benchmarks yourself, see the [benchmarks](https://github.com/routup/benchmarks) repository.
|
|
177
159
|
|
package/dist/bun.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as isPlugin, A as sendCreated, At as IDispatcher, B as EventStreamListener, Bt as HeaderName, C as sendStream, Ct as HandlerSymbol, D as SendFileOptions, Dt as Path, E as SendFileContentOptions, Et as PathMatcher, F as appendResponseHeaderDirective, Ft as NextFn, G as createError, H as ResponseCacheHeadersOptions, I as serializeEventStreamMessage, It as RoutupRequest, J as IRouter, K as Router, L as EventStreamHandle, Lt as RoutupResponse, M as setResponseHeaderContentType, Mt as RoutupEvent, N as setResponseHeaderAttachment, Nt as RoutupEventCreateContext, O as SendFileStats, Ot as PathMatcherExecResult, P as appendResponseHeader, Pt as IRoutupEvent, Q as RouterPipelineContext, R as EventStreamOptions, Rt as HTTPErrorInput, S as setResponseContentTypeByFileName, St as HandlerBaseOptions, T as sendFormat, Tt as isPath, U as setResponseCacheHeaders, V as EventStreamMessage, Vt as MethodName, W as isError, X as RouterOptionsInput, Y as RouterOptions, Z as RouterPathNode, _ as getRequestAcceptableContentTypes, _t as Handler, a as RequestIpOptions, at as isWebHandler, b as readBody, bt as ErrorHandler, c as getRequestHostName, ct as WebHandler, d as getRequestAcceptableLanguages, dt as fromNodeMiddleware, et as Plugin, f as getRequestAcceptableEncoding, ft as NodeHandler, g as getRequestAcceptableContentType, gt as CoreHandlerOptions, h as getRequestAcceptableCharsets, ht as CoreHandler, i as useRequestNegotiator, it as isHandlerOptions, j as sendAccepted, jt as IDispatcherEvent, k as sendFile, kt as PathMatcherOptions, l as matchRequestContentType, lt as WebHandlerProvider, m as getRequestAcceptableCharset, mt as defineCoreHandler, n as RequestProtocolOptions, nt as PluginInstallFn, o as getRequestIP, ot as isWebHandlerProvider, p as getRequestAcceptableEncodings, pt as NodeMiddleware, q as DispatcherEvent, r as getRequestProtocol, rt as isHandler, s as RequestHostNameOptions, st as fromWebHandler, t as normalizeRouterOptions, tt as PluginInstallContext, u as getRequestAcceptableLanguage, ut as fromNodeHandler, v as getRequestHeader, vt as HandlerOptions, w as sendRedirect, wt as HandlerType, x as toResponse, xt as ErrorHandlerOptions, y as isRequestCacheable, yt as defineErrorHandler, z as createEventStream, zt as RoutupError } from "./index-DCtnUoGL.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/bun.d.ts
|
|
5
5
|
declare function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { CoreHandler, CoreHandlerOptions, ErrorHandler, ErrorHandlerOptions, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IRouter, IRoutupEvent, MethodName, NodeHandler, NodeMiddleware, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginInstallContext, PluginInstallFn, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Router, RouterPipelineContext, RoutupError, RoutupEvent, RoutupRequest, RoutupResponse, SendFileContentOptions, SendFileOptions, SendFileStats, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable,
|
|
7
|
+
export { CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IDispatcherEvent, IRouter, IRoutupEvent, MethodName, NextFn, NodeHandler, NodeMiddleware, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginInstallContext, PluginInstallFn, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Router, RouterOptions, RouterOptionsInput, RouterPathNode, RouterPipelineContext, RoutupError, RoutupEvent, RoutupEventCreateContext, RoutupRequest, RoutupResponse, SendFileContentOptions, SendFileOptions, SendFileStats, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchRequestContentType, normalizeRouterOptions, readBody, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, toResponse, useRequestNegotiator };
|
|
8
8
|
//# sourceMappingURL=bun.d.mts.map
|
package/dist/bun.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as setResponseCacheHeaders, A as createError, B as getRequestHeader, C as defineErrorHandler, D as PathMatcher, E as isPath, F as sendRedirect, G as setResponseHeaderContentType, H as sendCreated, I as sendFormat, J as appendResponseHeader, K as setResponseHeaderAttachment, L as getRequestAcceptableContentType, M as DispatcherEvent, N as RoutupEvent, O as HandlerSymbol, P as sendStream, Q as RoutupError, R as getRequestAcceptableContentTypes, S as fromNodeMiddleware, T as Handler, U as sendAccepted, V as sendFile, W as toResponse, X as createEventStream, Y as appendResponseHeaderDirective, Z as serializeEventStreamMessage, _ as isHandlerOptions, a as getRequestIP, b as isWebHandlerProvider, c as getRequestAcceptableLanguage, d as getRequestAcceptableEncodings, et as HeaderName, f as getRequestAcceptableCharset, g as isHandler, h as readBody, i as getRequestProtocol, j as isError, k as HandlerType, l as getRequestAcceptableLanguages, m as isRequestCacheable, n as normalizeRouterOptions, o as getRequestHostName, p as getRequestAcceptableCharsets, q as setResponseContentTypeByFileName, r as isPlugin, s as matchRequestContentType, t as Router, tt as MethodName, u as getRequestAcceptableEncoding, v as fromWebHandler, w as defineCoreHandler, x as fromNodeHandler, y as isWebHandler, z as useRequestNegotiator } from "./src-Tr9cHQaV.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/bun";
|
|
3
3
|
//#region src/_entries/bun.ts
|
|
4
4
|
function serve(router, options) {
|
|
@@ -8,6 +8,6 @@ function serve(router, options) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, Router, RoutupError, RoutupEvent, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable,
|
|
11
|
+
export { DispatcherEvent, Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, Router, RoutupError, RoutupEvent, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchRequestContentType, normalizeRouterOptions, readBody, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, toResponse, useRequestNegotiator };
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=bun.mjs.map
|
package/dist/cloudflare.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as isPlugin, A as sendCreated, At as IDispatcher, B as EventStreamListener, Bt as HeaderName, C as sendStream, Ct as HandlerSymbol, D as SendFileOptions, Dt as Path, E as SendFileContentOptions, Et as PathMatcher, F as appendResponseHeaderDirective, Ft as NextFn, G as createError, H as ResponseCacheHeadersOptions, I as serializeEventStreamMessage, It as RoutupRequest, J as IRouter, K as Router, L as EventStreamHandle, Lt as RoutupResponse, M as setResponseHeaderContentType, Mt as RoutupEvent, N as setResponseHeaderAttachment, Nt as RoutupEventCreateContext, O as SendFileStats, Ot as PathMatcherExecResult, P as appendResponseHeader, Pt as IRoutupEvent, Q as RouterPipelineContext, R as EventStreamOptions, Rt as HTTPErrorInput, S as setResponseContentTypeByFileName, St as HandlerBaseOptions, T as sendFormat, Tt as isPath, U as setResponseCacheHeaders, V as EventStreamMessage, Vt as MethodName, W as isError, X as RouterOptionsInput, Y as RouterOptions, Z as RouterPathNode, _ as getRequestAcceptableContentTypes, _t as Handler, a as RequestIpOptions, at as isWebHandler, b as readBody, bt as ErrorHandler, c as getRequestHostName, ct as WebHandler, d as getRequestAcceptableLanguages, dt as fromNodeMiddleware, et as Plugin, f as getRequestAcceptableEncoding, ft as NodeHandler, g as getRequestAcceptableContentType, gt as CoreHandlerOptions, h as getRequestAcceptableCharsets, ht as CoreHandler, i as useRequestNegotiator, it as isHandlerOptions, j as sendAccepted, jt as IDispatcherEvent, k as sendFile, kt as PathMatcherOptions, l as matchRequestContentType, lt as WebHandlerProvider, m as getRequestAcceptableCharset, mt as defineCoreHandler, n as RequestProtocolOptions, nt as PluginInstallFn, o as getRequestIP, ot as isWebHandlerProvider, p as getRequestAcceptableEncodings, pt as NodeMiddleware, q as DispatcherEvent, r as getRequestProtocol, rt as isHandler, s as RequestHostNameOptions, st as fromWebHandler, t as normalizeRouterOptions, tt as PluginInstallContext, u as getRequestAcceptableLanguage, ut as fromNodeHandler, v as getRequestHeader, vt as HandlerOptions, w as sendRedirect, wt as HandlerType, x as toResponse, xt as ErrorHandlerOptions, y as isRequestCacheable, yt as defineErrorHandler, z as createEventStream, zt as RoutupError } from "./index-DCtnUoGL.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/cloudflare.d.ts
|
|
5
5
|
declare function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { CoreHandler, CoreHandlerOptions, ErrorHandler, ErrorHandlerOptions, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IRouter, IRoutupEvent, MethodName, NodeHandler, NodeMiddleware, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginInstallContext, PluginInstallFn, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Router, RouterPipelineContext, RoutupError, RoutupEvent, RoutupRequest, RoutupResponse, SendFileContentOptions, SendFileOptions, SendFileStats, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable,
|
|
7
|
+
export { CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IDispatcherEvent, IRouter, IRoutupEvent, MethodName, NextFn, NodeHandler, NodeMiddleware, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginInstallContext, PluginInstallFn, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Router, RouterOptions, RouterOptionsInput, RouterPathNode, RouterPipelineContext, RoutupError, RoutupEvent, RoutupEventCreateContext, RoutupRequest, RoutupResponse, SendFileContentOptions, SendFileOptions, SendFileStats, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchRequestContentType, normalizeRouterOptions, readBody, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, toResponse, useRequestNegotiator };
|
|
8
8
|
//# sourceMappingURL=cloudflare.d.mts.map
|
package/dist/cloudflare.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as setResponseCacheHeaders, A as createError, B as getRequestHeader, C as defineErrorHandler, D as PathMatcher, E as isPath, F as sendRedirect, G as setResponseHeaderContentType, H as sendCreated, I as sendFormat, J as appendResponseHeader, K as setResponseHeaderAttachment, L as getRequestAcceptableContentType, M as DispatcherEvent, N as RoutupEvent, O as HandlerSymbol, P as sendStream, Q as RoutupError, R as getRequestAcceptableContentTypes, S as fromNodeMiddleware, T as Handler, U as sendAccepted, V as sendFile, W as toResponse, X as createEventStream, Y as appendResponseHeaderDirective, Z as serializeEventStreamMessage, _ as isHandlerOptions, a as getRequestIP, b as isWebHandlerProvider, c as getRequestAcceptableLanguage, d as getRequestAcceptableEncodings, et as HeaderName, f as getRequestAcceptableCharset, g as isHandler, h as readBody, i as getRequestProtocol, j as isError, k as HandlerType, l as getRequestAcceptableLanguages, m as isRequestCacheable, n as normalizeRouterOptions, o as getRequestHostName, p as getRequestAcceptableCharsets, q as setResponseContentTypeByFileName, r as isPlugin, s as matchRequestContentType, t as Router, tt as MethodName, u as getRequestAcceptableEncoding, v as fromWebHandler, w as defineCoreHandler, x as fromNodeHandler, y as isWebHandler, z as useRequestNegotiator } from "./src-Tr9cHQaV.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/cloudflare";
|
|
3
3
|
//#region src/_entries/cloudflare.ts
|
|
4
4
|
function serve(router, options) {
|
|
@@ -8,6 +8,6 @@ function serve(router, options) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, Router, RoutupError, RoutupEvent, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable,
|
|
11
|
+
export { DispatcherEvent, Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, Router, RoutupError, RoutupEvent, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchRequestContentType, normalizeRouterOptions, readBody, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, toResponse, useRequestNegotiator };
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=cloudflare.mjs.map
|
package/dist/deno.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as isPlugin, A as sendCreated, At as IDispatcher, B as EventStreamListener, Bt as HeaderName, C as sendStream, Ct as HandlerSymbol, D as SendFileOptions, Dt as Path, E as SendFileContentOptions, Et as PathMatcher, F as appendResponseHeaderDirective, Ft as NextFn, G as createError, H as ResponseCacheHeadersOptions, I as serializeEventStreamMessage, It as RoutupRequest, J as IRouter, K as Router, L as EventStreamHandle, Lt as RoutupResponse, M as setResponseHeaderContentType, Mt as RoutupEvent, N as setResponseHeaderAttachment, Nt as RoutupEventCreateContext, O as SendFileStats, Ot as PathMatcherExecResult, P as appendResponseHeader, Pt as IRoutupEvent, Q as RouterPipelineContext, R as EventStreamOptions, Rt as HTTPErrorInput, S as setResponseContentTypeByFileName, St as HandlerBaseOptions, T as sendFormat, Tt as isPath, U as setResponseCacheHeaders, V as EventStreamMessage, Vt as MethodName, W as isError, X as RouterOptionsInput, Y as RouterOptions, Z as RouterPathNode, _ as getRequestAcceptableContentTypes, _t as Handler, a as RequestIpOptions, at as isWebHandler, b as readBody, bt as ErrorHandler, c as getRequestHostName, ct as WebHandler, d as getRequestAcceptableLanguages, dt as fromNodeMiddleware, et as Plugin, f as getRequestAcceptableEncoding, ft as NodeHandler, g as getRequestAcceptableContentType, gt as CoreHandlerOptions, h as getRequestAcceptableCharsets, ht as CoreHandler, i as useRequestNegotiator, it as isHandlerOptions, j as sendAccepted, jt as IDispatcherEvent, k as sendFile, kt as PathMatcherOptions, l as matchRequestContentType, lt as WebHandlerProvider, m as getRequestAcceptableCharset, mt as defineCoreHandler, n as RequestProtocolOptions, nt as PluginInstallFn, o as getRequestIP, ot as isWebHandlerProvider, p as getRequestAcceptableEncodings, pt as NodeMiddleware, q as DispatcherEvent, r as getRequestProtocol, rt as isHandler, s as RequestHostNameOptions, st as fromWebHandler, t as normalizeRouterOptions, tt as PluginInstallContext, u as getRequestAcceptableLanguage, ut as fromNodeHandler, v as getRequestHeader, vt as HandlerOptions, w as sendRedirect, wt as HandlerType, x as toResponse, xt as ErrorHandlerOptions, y as isRequestCacheable, yt as defineErrorHandler, z as createEventStream, zt as RoutupError } from "./index-DCtnUoGL.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/deno.d.ts
|
|
5
5
|
declare function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { CoreHandler, CoreHandlerOptions, ErrorHandler, ErrorHandlerOptions, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IRouter, IRoutupEvent, MethodName, NodeHandler, NodeMiddleware, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginInstallContext, PluginInstallFn, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Router, RouterPipelineContext, RoutupError, RoutupEvent, RoutupRequest, RoutupResponse, SendFileContentOptions, SendFileOptions, SendFileStats, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable,
|
|
7
|
+
export { CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IDispatcherEvent, IRouter, IRoutupEvent, MethodName, NextFn, NodeHandler, NodeMiddleware, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginInstallContext, PluginInstallFn, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Router, RouterOptions, RouterOptionsInput, RouterPathNode, RouterPipelineContext, RoutupError, RoutupEvent, RoutupEventCreateContext, RoutupRequest, RoutupResponse, SendFileContentOptions, SendFileOptions, SendFileStats, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchRequestContentType, normalizeRouterOptions, readBody, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, toResponse, useRequestNegotiator };
|
|
8
8
|
//# sourceMappingURL=deno.d.mts.map
|
package/dist/deno.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as setResponseCacheHeaders, A as createError, B as getRequestHeader, C as defineErrorHandler, D as PathMatcher, E as isPath, F as sendRedirect, G as setResponseHeaderContentType, H as sendCreated, I as sendFormat, J as appendResponseHeader, K as setResponseHeaderAttachment, L as getRequestAcceptableContentType, M as DispatcherEvent, N as RoutupEvent, O as HandlerSymbol, P as sendStream, Q as RoutupError, R as getRequestAcceptableContentTypes, S as fromNodeMiddleware, T as Handler, U as sendAccepted, V as sendFile, W as toResponse, X as createEventStream, Y as appendResponseHeaderDirective, Z as serializeEventStreamMessage, _ as isHandlerOptions, a as getRequestIP, b as isWebHandlerProvider, c as getRequestAcceptableLanguage, d as getRequestAcceptableEncodings, et as HeaderName, f as getRequestAcceptableCharset, g as isHandler, h as readBody, i as getRequestProtocol, j as isError, k as HandlerType, l as getRequestAcceptableLanguages, m as isRequestCacheable, n as normalizeRouterOptions, o as getRequestHostName, p as getRequestAcceptableCharsets, q as setResponseContentTypeByFileName, r as isPlugin, s as matchRequestContentType, t as Router, tt as MethodName, u as getRequestAcceptableEncoding, v as fromWebHandler, w as defineCoreHandler, x as fromNodeHandler, y as isWebHandler, z as useRequestNegotiator } from "./src-Tr9cHQaV.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/deno";
|
|
3
3
|
//#region src/_entries/deno.ts
|
|
4
4
|
function serve(router, options) {
|
|
@@ -8,6 +8,6 @@ function serve(router, options) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, Router, RoutupError, RoutupEvent, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable,
|
|
11
|
+
export { DispatcherEvent, Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, Router, RoutupError, RoutupEvent, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchRequestContentType, normalizeRouterOptions, readBody, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, toResponse, useRequestNegotiator };
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=deno.mjs.map
|
package/dist/generic.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as isPlugin, A as sendCreated, At as IDispatcher, B as EventStreamListener, Bt as HeaderName, C as sendStream, Ct as HandlerSymbol, D as SendFileOptions, Dt as Path, E as SendFileContentOptions, Et as PathMatcher, F as appendResponseHeaderDirective, Ft as NextFn, G as createError, H as ResponseCacheHeadersOptions, I as serializeEventStreamMessage, It as RoutupRequest, J as IRouter, K as Router, L as EventStreamHandle, Lt as RoutupResponse, M as setResponseHeaderContentType, Mt as RoutupEvent, N as setResponseHeaderAttachment, Nt as RoutupEventCreateContext, O as SendFileStats, Ot as PathMatcherExecResult, P as appendResponseHeader, Pt as IRoutupEvent, Q as RouterPipelineContext, R as EventStreamOptions, Rt as HTTPErrorInput, S as setResponseContentTypeByFileName, St as HandlerBaseOptions, T as sendFormat, Tt as isPath, U as setResponseCacheHeaders, V as EventStreamMessage, Vt as MethodName, W as isError, X as RouterOptionsInput, Y as RouterOptions, Z as RouterPathNode, _ as getRequestAcceptableContentTypes, _t as Handler, a as RequestIpOptions, at as isWebHandler, b as readBody, bt as ErrorHandler, c as getRequestHostName, ct as WebHandler, d as getRequestAcceptableLanguages, dt as fromNodeMiddleware, et as Plugin, f as getRequestAcceptableEncoding, ft as NodeHandler, g as getRequestAcceptableContentType, gt as CoreHandlerOptions, h as getRequestAcceptableCharsets, ht as CoreHandler, i as useRequestNegotiator, it as isHandlerOptions, j as sendAccepted, jt as IDispatcherEvent, k as sendFile, kt as PathMatcherOptions, l as matchRequestContentType, lt as WebHandlerProvider, m as getRequestAcceptableCharset, mt as defineCoreHandler, n as RequestProtocolOptions, nt as PluginInstallFn, o as getRequestIP, ot as isWebHandlerProvider, p as getRequestAcceptableEncodings, pt as NodeMiddleware, q as DispatcherEvent, r as getRequestProtocol, rt as isHandler, s as RequestHostNameOptions, st as fromWebHandler, t as normalizeRouterOptions, tt as PluginInstallContext, u as getRequestAcceptableLanguage, ut as fromNodeHandler, v as getRequestHeader, vt as HandlerOptions, w as sendRedirect, wt as HandlerType, x as toResponse, xt as ErrorHandlerOptions, y as isRequestCacheable, yt as defineErrorHandler, z as createEventStream, zt as RoutupError } from "./index-DCtnUoGL.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/generic.d.ts
|
|
5
5
|
declare function serve(router: Router, options?: Omit<ServerOptions, 'fetch'>): Server;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { CoreHandler, CoreHandlerOptions, ErrorHandler, ErrorHandlerOptions, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IRouter, IRoutupEvent, MethodName, NodeHandler, NodeMiddleware, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginInstallContext, PluginInstallFn, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Router, RouterPipelineContext, RoutupError, RoutupEvent, RoutupRequest, RoutupResponse, SendFileContentOptions, SendFileOptions, SendFileStats, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable,
|
|
7
|
+
export { CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IDispatcherEvent, IRouter, IRoutupEvent, MethodName, NextFn, NodeHandler, NodeMiddleware, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginInstallContext, PluginInstallFn, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Router, RouterOptions, RouterOptionsInput, RouterPathNode, RouterPipelineContext, RoutupError, RoutupEvent, RoutupEventCreateContext, RoutupRequest, RoutupResponse, SendFileContentOptions, SendFileOptions, SendFileStats, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchRequestContentType, normalizeRouterOptions, readBody, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, toResponse, useRequestNegotiator };
|
|
8
8
|
//# sourceMappingURL=generic.d.mts.map
|
package/dist/generic.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as setResponseCacheHeaders, A as createError, B as getRequestHeader, C as defineErrorHandler, D as PathMatcher, E as isPath, F as sendRedirect, G as setResponseHeaderContentType, H as sendCreated, I as sendFormat, J as appendResponseHeader, K as setResponseHeaderAttachment, L as getRequestAcceptableContentType, M as DispatcherEvent, N as RoutupEvent, O as HandlerSymbol, P as sendStream, Q as RoutupError, R as getRequestAcceptableContentTypes, S as fromNodeMiddleware, T as Handler, U as sendAccepted, V as sendFile, W as toResponse, X as createEventStream, Y as appendResponseHeaderDirective, Z as serializeEventStreamMessage, _ as isHandlerOptions, a as getRequestIP, b as isWebHandlerProvider, c as getRequestAcceptableLanguage, d as getRequestAcceptableEncodings, et as HeaderName, f as getRequestAcceptableCharset, g as isHandler, h as readBody, i as getRequestProtocol, j as isError, k as HandlerType, l as getRequestAcceptableLanguages, m as isRequestCacheable, n as normalizeRouterOptions, o as getRequestHostName, p as getRequestAcceptableCharsets, q as setResponseContentTypeByFileName, r as isPlugin, s as matchRequestContentType, t as Router, tt as MethodName, u as getRequestAcceptableEncoding, v as fromWebHandler, w as defineCoreHandler, x as fromNodeHandler, y as isWebHandler, z as useRequestNegotiator } from "./src-Tr9cHQaV.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/generic";
|
|
3
3
|
//#region src/_entries/generic.ts
|
|
4
4
|
function serve(router, options) {
|
|
@@ -8,6 +8,6 @@ function serve(router, options) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, Router, RoutupError, RoutupEvent, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable,
|
|
11
|
+
export { DispatcherEvent, Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, Router, RoutupError, RoutupEvent, appendResponseHeader, appendResponseHeaderDirective, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchRequestContentType, normalizeRouterOptions, readBody, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, toResponse, useRequestNegotiator };
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=generic.mjs.map
|