routup 5.2.0 → 6.0.0-beta.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 +68 -47
- package/dist/bun.d.mts +3 -3
- package/dist/bun.mjs +4 -4
- package/dist/bun.mjs.map +1 -1
- package/dist/cloudflare.d.mts +3 -3
- package/dist/cloudflare.mjs +4 -4
- package/dist/cloudflare.mjs.map +1 -1
- package/dist/deno.d.mts +3 -3
- package/dist/deno.mjs +4 -4
- package/dist/deno.mjs.map +1 -1
- package/dist/generic.d.mts +3 -3
- package/dist/generic.mjs +4 -4
- package/dist/generic.mjs.map +1 -1
- package/dist/index-kxLRw2Wc.d.mts +1950 -0
- package/dist/node.d.mts +4 -4
- package/dist/node.mjs +6 -6
- package/dist/node.mjs.map +1 -1
- package/dist/service-worker.d.mts +3 -3
- package/dist/service-worker.mjs +4 -4
- package/dist/service-worker.mjs.map +1 -1
- package/dist/{src-DX0rndew.mjs → src-gmPicCWT.mjs} +1507 -468
- package/dist/src-gmPicCWT.mjs.map +1 -0
- package/package.json +6 -4
- package/dist/index-DdsCL8RI.d.mts +0 -1159
- package/dist/src-DX0rndew.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
[](https://snyk.io/test/github/routup/routup)
|
|
13
13
|
[](https://conventionalcommits.org)
|
|
14
14
|
|
|
15
|
-
**Routup** is a minimalistic, runtime-agnostic HTTP routing framework for Node.js, Bun, Deno, and
|
|
16
|
-
Handlers return values directly — routup converts them to Web `Response` objects automatically
|
|
15
|
+
**Routup** is a minimalistic, runtime-agnostic HTTP routing framework for Node.js, Bun, Deno, Cloudflare Workers, and Service Workers.
|
|
16
|
+
Handlers return values directly — routup converts them to Web `Response` objects automatically, with built-in support for ETags, content negotiation, per-handler timeouts, and cooperative cancellation via `AbortSignal`.
|
|
17
17
|
|
|
18
18
|
**Table of Contents**
|
|
19
19
|
|
|
@@ -35,14 +35,21 @@ npm install routup --save
|
|
|
35
35
|
|
|
36
36
|
## Features
|
|
37
37
|
|
|
38
|
-
- 🚀 **Runtime agnostic** — Node.js, Bun, Deno, Cloudflare Workers
|
|
38
|
+
- 🚀 **Runtime agnostic** — Node.js, Bun, Deno, Cloudflare Workers, Service Workers
|
|
39
39
|
- 🌐 **Web-standard APIs** — built on `Request` / `Response` for portability
|
|
40
|
-
- 📝 **Return-based handlers** — return strings, objects, streams, or `Response` directly
|
|
40
|
+
- 📝 **Return-based handlers** — return strings, objects, streams, `Blob`s, or `Response` directly
|
|
41
41
|
- ✨ **Async middleware** — onion model with `event.next()`
|
|
42
42
|
- 📌 **Lifecycle hooks** — `request`, `response`, `error` for cross-cutting concerns
|
|
43
|
+
- 🧭 **Pluggable router & cache** — `LinearRouter` (default), `TrieRouter`, or `SmartRouter` (auto-selects); opt-in LRU lookup cache
|
|
44
|
+
- ⏱️ **Per-handler timeouts** — bounded execution with `AbortSignal` cooperative cancellation
|
|
45
|
+
- 🏷️ **Automatic ETag & 304** — strong/weak ETags out of the box, configurable per app or disabled entirely
|
|
46
|
+
- 🤝 **Content negotiation** — accept, accept-language, accept-encoding, accept-charset helpers
|
|
47
|
+
- 📡 **Streaming & SSE** — `ReadableStream` responses and `createEventStream()` for server-sent events
|
|
48
|
+
- 📂 **Static file serving** — `sendFile()` with ETag, range, and MIME detection
|
|
43
49
|
- 🔌 **Plugin system** — extend with reusable, installable plugins
|
|
50
|
+
- 🌉 **Express middleware bridge** — wrap legacy `(req, res, next)` handlers via `fromNodeHandler()`
|
|
44
51
|
- 🧰 **Tree-shakeable helpers** — import only what you use
|
|
45
|
-
- 📁 **Nestable
|
|
52
|
+
- 📁 **Nestable apps** — modular route composition with mount paths
|
|
46
53
|
- 👕 **TypeScript first** — fully typed API with generics
|
|
47
54
|
- 🤏 **Minimal footprint** — small core, no bloat
|
|
48
55
|
|
|
@@ -59,37 +66,37 @@ Handlers receive an event and return a value. Routup converts the return value t
|
|
|
59
66
|
**Shorthand**
|
|
60
67
|
|
|
61
68
|
```typescript
|
|
62
|
-
import {
|
|
69
|
+
import { App, defineCoreHandler, defineErrorHandler, serve } from 'routup';
|
|
63
70
|
|
|
64
|
-
const
|
|
71
|
+
const app = new App();
|
|
65
72
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
app.get('/', defineCoreHandler(() => 'Hello, World!'));
|
|
74
|
+
app.get('/greet/:name', defineCoreHandler((event) => `Hello, ${event.params.name}!`));
|
|
75
|
+
app.use(defineErrorHandler((error) => ({ error: error.message })));
|
|
69
76
|
|
|
70
|
-
serve(
|
|
77
|
+
serve(app, { port: 3000 });
|
|
71
78
|
```
|
|
72
79
|
|
|
73
80
|
**Verbose**
|
|
74
81
|
|
|
75
82
|
```typescript
|
|
76
|
-
import {
|
|
83
|
+
import { App, defineCoreHandler, serve } from 'routup';
|
|
77
84
|
|
|
78
|
-
const
|
|
85
|
+
const app = new App();
|
|
79
86
|
|
|
80
|
-
|
|
87
|
+
app.use(defineCoreHandler({
|
|
81
88
|
path: '/',
|
|
82
89
|
method: 'GET',
|
|
83
90
|
fn: () => 'Hello, World!',
|
|
84
91
|
}));
|
|
85
92
|
|
|
86
|
-
|
|
93
|
+
app.use(defineCoreHandler({
|
|
87
94
|
path: '/greet/:name',
|
|
88
95
|
method: 'GET',
|
|
89
96
|
fn: (event) => `Hello, ${event.params.name}!`,
|
|
90
97
|
}));
|
|
91
98
|
|
|
92
|
-
serve(
|
|
99
|
+
serve(app, { port: 3000 });
|
|
93
100
|
```
|
|
94
101
|
|
|
95
102
|
### Return Values
|
|
@@ -108,22 +115,50 @@ serve(router, { port: 3000 });
|
|
|
108
115
|
Middleware calls `event.next()` to continue the pipeline:
|
|
109
116
|
|
|
110
117
|
```typescript
|
|
111
|
-
|
|
118
|
+
app.use(defineCoreHandler(async (event) => {
|
|
112
119
|
console.log(`${event.method} ${event.path}`);
|
|
113
120
|
return event.next();
|
|
114
121
|
}));
|
|
115
122
|
```
|
|
116
123
|
|
|
124
|
+
### Pluggable router and cache
|
|
125
|
+
|
|
126
|
+
The route table is pluggable via the `router` option. The default `LinearRouter` is best for small apps; swap to `TrieRouter` for radix-trie matching on apps with many routes, or `SmartRouter` to auto-select between the two based on the registered route shape at first lookup. Each router accepts an optional `cache` for memoizing lookups — opt-in via `LruCache` (or any `ICache` implementation); pass `null` to disable.
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
import { App, TrieRouter, LruCache, defineCoreHandler } from 'routup';
|
|
130
|
+
|
|
131
|
+
const app = new App({
|
|
132
|
+
router: new TrieRouter({ cache: new LruCache() }), // omit `cache` for no memoization
|
|
133
|
+
});
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Timeouts and cancellation
|
|
137
|
+
|
|
138
|
+
Configure a global timeout for the whole pipeline, a default per-handler timeout, or both. When a deadline fires, `event.signal` is aborted so handlers can cooperatively cancel signal-aware work; if nothing recovers in time, routup returns `408 Request Timeout`.
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
const app = new App({
|
|
142
|
+
timeout: 30_000, // entire request
|
|
143
|
+
handlerTimeout: 5_000, // default per handler; handlers can narrow further
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
app.get('/fetch', defineCoreHandler(async (event) => {
|
|
147
|
+
const res = await fetch('https://api.example.com', { signal: event.signal });
|
|
148
|
+
return res.json();
|
|
149
|
+
}));
|
|
150
|
+
```
|
|
151
|
+
|
|
117
152
|
### Runtimes
|
|
118
153
|
|
|
119
154
|
Routup runs on Node.js, Bun, Deno, and Cloudflare Workers. In most cases, import from `routup`:
|
|
120
155
|
|
|
121
156
|
```typescript
|
|
122
|
-
import {
|
|
157
|
+
import { App, defineCoreHandler, serve } from 'routup';
|
|
123
158
|
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
serve(
|
|
159
|
+
const app = new App();
|
|
160
|
+
app.get('/', defineCoreHandler(() => 'Hello, World!'));
|
|
161
|
+
serve(app, { port: 3000 });
|
|
127
162
|
```
|
|
128
163
|
|
|
129
164
|
For runtime-specific APIs (e.g. `toNodeHandler`), use the corresponding entrypoint like `routup/node`.
|
|
@@ -166,34 +201,20 @@ Routup is minimalistic by design. [Plugins](https://github.com/routup/plugins) e
|
|
|
166
201
|
|
|
167
202
|
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
203
|
|
|
169
|
-
|
|
|
170
|
-
|
|
171
|
-
| **Runtimes**
|
|
204
|
+
| | routup | [Hono](https://hono.dev) | [Express](https://expressjs.com) | [Fastify](https://fastify.dev) |
|
|
205
|
+
|-----------------------------------------|-------------------|--------------------------|----------------------------------|--------------------------------|
|
|
206
|
+
| **Runtimes** | Node, Bun, Deno, Cloudflare, Service Worker | Node, Bun, Deno, Cloudflare, Lambda, Vercel | Node | Node |
|
|
172
207
|
| **Web-standard `Request` / `Response`** | ✅ | ✅ | ❌ | ❌ |
|
|
173
|
-
| **Return-based handlers**
|
|
174
|
-
| **TypeScript-first**
|
|
175
|
-
| **Tree-shakeable helpers**
|
|
176
|
-
| **Onion middleware (`next()`)**
|
|
177
|
-
| **
|
|
178
|
-
| **
|
|
208
|
+
| **Return-based handlers** | ✅ | ✅ | ❌ | ❌ |
|
|
209
|
+
| **TypeScript-first** | ✅ | ✅ | community types | ✅ |
|
|
210
|
+
| **Tree-shakeable helpers** | ✅ | ✅ | ❌ | ❌ |
|
|
211
|
+
| **Onion middleware (`next()`)** | ✅ | ✅ | linear `next()` | lifecycle hooks |
|
|
212
|
+
| **Pluggable router (linear / trie)** | ✅ linear, trie, or auto-select | trie only | linear only | radix only |
|
|
213
|
+
| **Built-in ETag + 304** | ✅ | ❌ | via plugin | via plugin |
|
|
179
214
|
| **Per-handler timeout + `AbortSignal`** | ✅ | ❌ | ❌ | server-level |
|
|
180
|
-
| **
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
Recorded with routup v5.1 on Node.js 24, May 2026. `autocannon -c 100 -d 40 -p 10` (40s warm-up, 40s measure).
|
|
185
|
-
|
|
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 |
|
|
195
|
-
|
|
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.
|
|
215
|
+
| **Class-based routes (decorators)** | ✅ via plugin | ❌ | ❌ | ❌ |
|
|
216
|
+
| **Express middleware bridge** | ✅ `fromNodeHandler` | ❌ | n/a | limited |
|
|
217
|
+
| **Schema validation built-in** | ❌ | ❌ | ❌ | ✅ |
|
|
197
218
|
|
|
198
219
|
## Contributing
|
|
199
220
|
|
package/dist/bun.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as createError, $t as HandlerSymbol, A as sendFormat, At as isWebHandlerProvider, B as setResponseHeaderAttachment, Bt as CoreHandlerOptions, C as getRequestAcceptableContentTypes, Ct as isPluginError, D as setResponseContentTypeByFileName, Dt as isHandler, E as toResponse, Et as matchHandlerMethod, F as SendFileStats, Ft as fromNodeMiddleware, G as EventStreamHandle, Gt as ErrorHandlerOptions, H as appendResponseHeader, Ht as HandlerOptions, I as sendFile, It as NodeHandler, J as EventStreamListener, Jt as PathMatcher, K as EventStreamOptions, Kt as HandlerBaseOptions, L as sendCreated, Lt as NodeMiddleware, M as SendFileContentOptions, Mt as WebHandler, N as SendFileDisposition, Nt as WebHandlerProvider, O as sendStream, Ot as isHandlerOptions, P as SendFileOptions, Pt as fromNodeHandler, Q as isError, Qt as PathMatcherOptions, R as sendAccepted, Rt as defineCoreHandler, S as getRequestAcceptableContentType, St as PluginAlreadyInstalledError, T as isRequestCacheable, Tt as PluginErrorCode, U as appendResponseHeaderDirective, Ut as defineErrorHandler, V as setResponseHeaderInline, Vt as Handler, W as serializeEventStreamMessage, Wt as ErrorHandler, X as ResponseCacheHeadersOptions, Xt as Path, Y as EventStreamMessage, Yt as IPathMatcher, Z as setResponseCacheHeaders, Zt as PathMatcherExecResult, _ as getRequestAcceptableLanguages, _t as Plugin, a as SmartRouter, an as AppEventCreateContext, at as HandlerRouteEntry, b as getRequestAcceptableCharset, bt as PluginNotInstalledError, c as RequestProtocolOptions, cn as IAppEvent, ct as BaseRouterOptions, d as RequestIpOptions, dn as MethodName, dt as Route, en as HandlerType, et as AppContext, f as getRequestIP, fn as MethodNameLike, ft as RouteMatch, g as getRequestAcceptableLanguage, gt as isPlugin, h as matchRequestContentType, hn as HTTPErrorInput, ht as ICache, i as TrieRouter, in as AppEvent, it as AppRouteEntry, j as SendFileContent, jt as fromWebHandler, k as sendRedirect, kt as isWebHandler, l as getRequestProtocol, ln as NextFn, lt as IRouter, m as getRequestHostName, mn as ErrorSymbol, mt as LruCacheOptions, n as App, nn as IDispatcher, nt as AppOptionsInput, o as SmartRouterOptions, on as AppRequest, ot as IApp, p as RequestHostNameOptions, pn as AppError, pt as LruCache, q as createEventStream, qt as isPath, r as buildRoutePathMatcher, rn as IDispatcherEvent, rt as AppPipelineContext, s as LinearRouter, sn as AppResponse, st as RouteEntry, t as normalizeAppOptions, tn as DispatcherEvent, tt as AppOptions, u as useRequestNegotiator, un as HeaderName, ut as ObjectLiteral, v as getRequestAcceptableEncoding, vt as PluginInstallContext, w as getRequestHeader, wt as PluginError, x as getRequestAcceptableCharsets, xt as PluginInstallError, y as getRequestAcceptableEncodings, yt as PluginInstallFn, z as setResponseHeaderContentType, zt as CoreHandler } from "./index-kxLRw2Wc.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/bun.d.ts
|
|
5
|
-
declare function serve(
|
|
5
|
+
declare function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): Server;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IDispatcherEvent, IRouter,
|
|
7
|
+
export { App, AppContext, AppError, AppEvent, AppEventCreateContext, AppOptions, AppOptionsInput, AppPipelineContext, AppRequest, AppResponse, AppRouteEntry, BaseRouterOptions, CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerRouteEntry, HandlerSymbol, HandlerType, HeaderName, IApp, IAppEvent, ICache, IDispatcher, IDispatcherEvent, IPathMatcher, IRouter, LinearRouter, LruCache, LruCacheOptions, MethodName, MethodNameLike, NextFn, NodeHandler, NodeMiddleware, ObjectLiteral, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallContext, PluginInstallError, PluginInstallFn, PluginNotInstalledError, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Route, RouteEntry, RouteMatch, SendFileContent, SendFileContentOptions, SendFileDisposition, SendFileOptions, SendFileStats, SmartRouter, SmartRouterOptions, TrieRouter, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, buildRoutePathMatcher, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isPluginError, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchHandlerMethod, matchRequestContentType, normalizeAppOptions, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, setResponseHeaderInline, toResponse, useRequestNegotiator };
|
|
8
8
|
//# sourceMappingURL=bun.d.mts.map
|
package/dist/bun.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as isError, A as fromWebHandler, B as DispatcherEvent, C as getRequestAcceptableEncodings, D as matchHandlerMethod, E as isRequestCacheable, F as defineErrorHandler, G as getRequestAcceptableContentTypes, H as sendRedirect, I as defineCoreHandler, J as sendFile, K as useRequestNegotiator, L as Handler, M as isWebHandlerProvider, N as fromNodeHandler, O as isHandler, P as fromNodeMiddleware, Q as createError, R as HandlerSymbol, S as getRequestAcceptableEncoding, T as getRequestAcceptableCharsets, U as sendFormat, V as sendStream, W as getRequestAcceptableContentType, X as sendAccepted, Y as sendCreated, Z as toResponse, _ as getRequestIP, a as LinearRouter, at as appendResponseHeaderDirective, b as getRequestAcceptableLanguage, c as PluginNotInstalledError, ct as AppError, d as PluginError, dt as AppEvent, et as setResponseHeaderContentType, f as isPluginError, ft as HeaderName, g as getRequestProtocol, h as PathMatcher, i as TrieRouter, it as appendResponseHeader, j as isWebHandler, k as isHandlerOptions, l as PluginInstallError, lt as ErrorSymbol, m as isPath, mt as LruCache, n as normalizeAppOptions, nt as setResponseHeaderInline, o as buildRoutePathMatcher, ot as createEventStream, p as PluginErrorCode, pt as MethodName, q as getRequestHeader, r as SmartRouter, rt as setResponseContentTypeByFileName, s as isPlugin, st as serializeEventStreamMessage, t as App, tt as setResponseHeaderAttachment, u as PluginAlreadyInstalledError, ut as setResponseCacheHeaders, v as getRequestHostName, w as getRequestAcceptableCharset, x as getRequestAcceptableLanguages, y as matchRequestContentType, z as HandlerType } from "./src-gmPicCWT.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/bun";
|
|
3
3
|
//#region src/_entries/bun.ts
|
|
4
|
-
function serve(
|
|
4
|
+
function serve(app, options) {
|
|
5
5
|
return serve$1({
|
|
6
|
-
fetch:
|
|
6
|
+
fetch: app.fetch.bind(app),
|
|
7
7
|
...options
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallError, PluginNotInstalledError,
|
|
11
|
+
export { App, AppError, AppEvent, DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, LinearRouter, LruCache, MethodName, PathMatcher, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallError, PluginNotInstalledError, SmartRouter, TrieRouter, appendResponseHeader, appendResponseHeaderDirective, buildRoutePathMatcher, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isPluginError, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchHandlerMethod, matchRequestContentType, normalizeAppOptions, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, setResponseHeaderInline, toResponse, useRequestNegotiator };
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=bun.mjs.map
|
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 {
|
|
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 { IApp } from '../app/types.ts';\n\nexport * from '../index.ts';\n\nexport function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: app.fetch.bind(app), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,KAAW,SAAgD;CAC7E,OAAOA,QAAU;EAAE,OAAO,IAAI,MAAM,KAAK,IAAI;EAAE,GAAG;EAAS,CAAC"}
|
package/dist/cloudflare.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as createError, $t as HandlerSymbol, A as sendFormat, At as isWebHandlerProvider, B as setResponseHeaderAttachment, Bt as CoreHandlerOptions, C as getRequestAcceptableContentTypes, Ct as isPluginError, D as setResponseContentTypeByFileName, Dt as isHandler, E as toResponse, Et as matchHandlerMethod, F as SendFileStats, Ft as fromNodeMiddleware, G as EventStreamHandle, Gt as ErrorHandlerOptions, H as appendResponseHeader, Ht as HandlerOptions, I as sendFile, It as NodeHandler, J as EventStreamListener, Jt as PathMatcher, K as EventStreamOptions, Kt as HandlerBaseOptions, L as sendCreated, Lt as NodeMiddleware, M as SendFileContentOptions, Mt as WebHandler, N as SendFileDisposition, Nt as WebHandlerProvider, O as sendStream, Ot as isHandlerOptions, P as SendFileOptions, Pt as fromNodeHandler, Q as isError, Qt as PathMatcherOptions, R as sendAccepted, Rt as defineCoreHandler, S as getRequestAcceptableContentType, St as PluginAlreadyInstalledError, T as isRequestCacheable, Tt as PluginErrorCode, U as appendResponseHeaderDirective, Ut as defineErrorHandler, V as setResponseHeaderInline, Vt as Handler, W as serializeEventStreamMessage, Wt as ErrorHandler, X as ResponseCacheHeadersOptions, Xt as Path, Y as EventStreamMessage, Yt as IPathMatcher, Z as setResponseCacheHeaders, Zt as PathMatcherExecResult, _ as getRequestAcceptableLanguages, _t as Plugin, a as SmartRouter, an as AppEventCreateContext, at as HandlerRouteEntry, b as getRequestAcceptableCharset, bt as PluginNotInstalledError, c as RequestProtocolOptions, cn as IAppEvent, ct as BaseRouterOptions, d as RequestIpOptions, dn as MethodName, dt as Route, en as HandlerType, et as AppContext, f as getRequestIP, fn as MethodNameLike, ft as RouteMatch, g as getRequestAcceptableLanguage, gt as isPlugin, h as matchRequestContentType, hn as HTTPErrorInput, ht as ICache, i as TrieRouter, in as AppEvent, it as AppRouteEntry, j as SendFileContent, jt as fromWebHandler, k as sendRedirect, kt as isWebHandler, l as getRequestProtocol, ln as NextFn, lt as IRouter, m as getRequestHostName, mn as ErrorSymbol, mt as LruCacheOptions, n as App, nn as IDispatcher, nt as AppOptionsInput, o as SmartRouterOptions, on as AppRequest, ot as IApp, p as RequestHostNameOptions, pn as AppError, pt as LruCache, q as createEventStream, qt as isPath, r as buildRoutePathMatcher, rn as IDispatcherEvent, rt as AppPipelineContext, s as LinearRouter, sn as AppResponse, st as RouteEntry, t as normalizeAppOptions, tn as DispatcherEvent, tt as AppOptions, u as useRequestNegotiator, un as HeaderName, ut as ObjectLiteral, v as getRequestAcceptableEncoding, vt as PluginInstallContext, w as getRequestHeader, wt as PluginError, x as getRequestAcceptableCharsets, xt as PluginInstallError, y as getRequestAcceptableEncodings, yt as PluginInstallFn, z as setResponseHeaderContentType, zt as CoreHandler } from "./index-kxLRw2Wc.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/cloudflare.d.ts
|
|
5
|
-
declare function serve(
|
|
5
|
+
declare function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): Server;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IDispatcherEvent, IRouter,
|
|
7
|
+
export { App, AppContext, AppError, AppEvent, AppEventCreateContext, AppOptions, AppOptionsInput, AppPipelineContext, AppRequest, AppResponse, AppRouteEntry, BaseRouterOptions, CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerRouteEntry, HandlerSymbol, HandlerType, HeaderName, IApp, IAppEvent, ICache, IDispatcher, IDispatcherEvent, IPathMatcher, IRouter, LinearRouter, LruCache, LruCacheOptions, MethodName, MethodNameLike, NextFn, NodeHandler, NodeMiddleware, ObjectLiteral, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallContext, PluginInstallError, PluginInstallFn, PluginNotInstalledError, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Route, RouteEntry, RouteMatch, SendFileContent, SendFileContentOptions, SendFileDisposition, SendFileOptions, SendFileStats, SmartRouter, SmartRouterOptions, TrieRouter, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, buildRoutePathMatcher, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isPluginError, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchHandlerMethod, matchRequestContentType, normalizeAppOptions, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, setResponseHeaderInline, toResponse, useRequestNegotiator };
|
|
8
8
|
//# sourceMappingURL=cloudflare.d.mts.map
|
package/dist/cloudflare.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as isError, A as fromWebHandler, B as DispatcherEvent, C as getRequestAcceptableEncodings, D as matchHandlerMethod, E as isRequestCacheable, F as defineErrorHandler, G as getRequestAcceptableContentTypes, H as sendRedirect, I as defineCoreHandler, J as sendFile, K as useRequestNegotiator, L as Handler, M as isWebHandlerProvider, N as fromNodeHandler, O as isHandler, P as fromNodeMiddleware, Q as createError, R as HandlerSymbol, S as getRequestAcceptableEncoding, T as getRequestAcceptableCharsets, U as sendFormat, V as sendStream, W as getRequestAcceptableContentType, X as sendAccepted, Y as sendCreated, Z as toResponse, _ as getRequestIP, a as LinearRouter, at as appendResponseHeaderDirective, b as getRequestAcceptableLanguage, c as PluginNotInstalledError, ct as AppError, d as PluginError, dt as AppEvent, et as setResponseHeaderContentType, f as isPluginError, ft as HeaderName, g as getRequestProtocol, h as PathMatcher, i as TrieRouter, it as appendResponseHeader, j as isWebHandler, k as isHandlerOptions, l as PluginInstallError, lt as ErrorSymbol, m as isPath, mt as LruCache, n as normalizeAppOptions, nt as setResponseHeaderInline, o as buildRoutePathMatcher, ot as createEventStream, p as PluginErrorCode, pt as MethodName, q as getRequestHeader, r as SmartRouter, rt as setResponseContentTypeByFileName, s as isPlugin, st as serializeEventStreamMessage, t as App, tt as setResponseHeaderAttachment, u as PluginAlreadyInstalledError, ut as setResponseCacheHeaders, v as getRequestHostName, w as getRequestAcceptableCharset, x as getRequestAcceptableLanguages, y as matchRequestContentType, z as HandlerType } from "./src-gmPicCWT.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/cloudflare";
|
|
3
3
|
//#region src/_entries/cloudflare.ts
|
|
4
|
-
function serve(
|
|
4
|
+
function serve(app, options) {
|
|
5
5
|
return serve$1({
|
|
6
|
-
fetch:
|
|
6
|
+
fetch: app.fetch.bind(app),
|
|
7
7
|
...options
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallError, PluginNotInstalledError,
|
|
11
|
+
export { App, AppError, AppEvent, DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, LinearRouter, LruCache, MethodName, PathMatcher, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallError, PluginNotInstalledError, SmartRouter, TrieRouter, appendResponseHeader, appendResponseHeaderDirective, buildRoutePathMatcher, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isPluginError, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchHandlerMethod, matchRequestContentType, normalizeAppOptions, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, setResponseHeaderInline, toResponse, useRequestNegotiator };
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=cloudflare.mjs.map
|
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 {
|
|
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 { IApp } from '../app';\n\nexport * from '../index.ts';\n\nexport function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: app.fetch.bind(app), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,KAAW,SAAgD;CAC7E,OAAOA,QAAU;EAAE,OAAO,IAAI,MAAM,KAAK,IAAI;EAAE,GAAG;EAAS,CAAC"}
|
package/dist/deno.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as createError, $t as HandlerSymbol, A as sendFormat, At as isWebHandlerProvider, B as setResponseHeaderAttachment, Bt as CoreHandlerOptions, C as getRequestAcceptableContentTypes, Ct as isPluginError, D as setResponseContentTypeByFileName, Dt as isHandler, E as toResponse, Et as matchHandlerMethod, F as SendFileStats, Ft as fromNodeMiddleware, G as EventStreamHandle, Gt as ErrorHandlerOptions, H as appendResponseHeader, Ht as HandlerOptions, I as sendFile, It as NodeHandler, J as EventStreamListener, Jt as PathMatcher, K as EventStreamOptions, Kt as HandlerBaseOptions, L as sendCreated, Lt as NodeMiddleware, M as SendFileContentOptions, Mt as WebHandler, N as SendFileDisposition, Nt as WebHandlerProvider, O as sendStream, Ot as isHandlerOptions, P as SendFileOptions, Pt as fromNodeHandler, Q as isError, Qt as PathMatcherOptions, R as sendAccepted, Rt as defineCoreHandler, S as getRequestAcceptableContentType, St as PluginAlreadyInstalledError, T as isRequestCacheable, Tt as PluginErrorCode, U as appendResponseHeaderDirective, Ut as defineErrorHandler, V as setResponseHeaderInline, Vt as Handler, W as serializeEventStreamMessage, Wt as ErrorHandler, X as ResponseCacheHeadersOptions, Xt as Path, Y as EventStreamMessage, Yt as IPathMatcher, Z as setResponseCacheHeaders, Zt as PathMatcherExecResult, _ as getRequestAcceptableLanguages, _t as Plugin, a as SmartRouter, an as AppEventCreateContext, at as HandlerRouteEntry, b as getRequestAcceptableCharset, bt as PluginNotInstalledError, c as RequestProtocolOptions, cn as IAppEvent, ct as BaseRouterOptions, d as RequestIpOptions, dn as MethodName, dt as Route, en as HandlerType, et as AppContext, f as getRequestIP, fn as MethodNameLike, ft as RouteMatch, g as getRequestAcceptableLanguage, gt as isPlugin, h as matchRequestContentType, hn as HTTPErrorInput, ht as ICache, i as TrieRouter, in as AppEvent, it as AppRouteEntry, j as SendFileContent, jt as fromWebHandler, k as sendRedirect, kt as isWebHandler, l as getRequestProtocol, ln as NextFn, lt as IRouter, m as getRequestHostName, mn as ErrorSymbol, mt as LruCacheOptions, n as App, nn as IDispatcher, nt as AppOptionsInput, o as SmartRouterOptions, on as AppRequest, ot as IApp, p as RequestHostNameOptions, pn as AppError, pt as LruCache, q as createEventStream, qt as isPath, r as buildRoutePathMatcher, rn as IDispatcherEvent, rt as AppPipelineContext, s as LinearRouter, sn as AppResponse, st as RouteEntry, t as normalizeAppOptions, tn as DispatcherEvent, tt as AppOptions, u as useRequestNegotiator, un as HeaderName, ut as ObjectLiteral, v as getRequestAcceptableEncoding, vt as PluginInstallContext, w as getRequestHeader, wt as PluginError, x as getRequestAcceptableCharsets, xt as PluginInstallError, y as getRequestAcceptableEncodings, yt as PluginInstallFn, z as setResponseHeaderContentType, zt as CoreHandler } from "./index-kxLRw2Wc.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/deno.d.ts
|
|
5
|
-
declare function serve(
|
|
5
|
+
declare function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): Server;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IDispatcherEvent, IRouter,
|
|
7
|
+
export { App, AppContext, AppError, AppEvent, AppEventCreateContext, AppOptions, AppOptionsInput, AppPipelineContext, AppRequest, AppResponse, AppRouteEntry, BaseRouterOptions, CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerRouteEntry, HandlerSymbol, HandlerType, HeaderName, IApp, IAppEvent, ICache, IDispatcher, IDispatcherEvent, IPathMatcher, IRouter, LinearRouter, LruCache, LruCacheOptions, MethodName, MethodNameLike, NextFn, NodeHandler, NodeMiddleware, ObjectLiteral, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallContext, PluginInstallError, PluginInstallFn, PluginNotInstalledError, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Route, RouteEntry, RouteMatch, SendFileContent, SendFileContentOptions, SendFileDisposition, SendFileOptions, SendFileStats, SmartRouter, SmartRouterOptions, TrieRouter, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, buildRoutePathMatcher, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isPluginError, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchHandlerMethod, matchRequestContentType, normalizeAppOptions, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, setResponseHeaderInline, toResponse, useRequestNegotiator };
|
|
8
8
|
//# sourceMappingURL=deno.d.mts.map
|
package/dist/deno.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as isError, A as fromWebHandler, B as DispatcherEvent, C as getRequestAcceptableEncodings, D as matchHandlerMethod, E as isRequestCacheable, F as defineErrorHandler, G as getRequestAcceptableContentTypes, H as sendRedirect, I as defineCoreHandler, J as sendFile, K as useRequestNegotiator, L as Handler, M as isWebHandlerProvider, N as fromNodeHandler, O as isHandler, P as fromNodeMiddleware, Q as createError, R as HandlerSymbol, S as getRequestAcceptableEncoding, T as getRequestAcceptableCharsets, U as sendFormat, V as sendStream, W as getRequestAcceptableContentType, X as sendAccepted, Y as sendCreated, Z as toResponse, _ as getRequestIP, a as LinearRouter, at as appendResponseHeaderDirective, b as getRequestAcceptableLanguage, c as PluginNotInstalledError, ct as AppError, d as PluginError, dt as AppEvent, et as setResponseHeaderContentType, f as isPluginError, ft as HeaderName, g as getRequestProtocol, h as PathMatcher, i as TrieRouter, it as appendResponseHeader, j as isWebHandler, k as isHandlerOptions, l as PluginInstallError, lt as ErrorSymbol, m as isPath, mt as LruCache, n as normalizeAppOptions, nt as setResponseHeaderInline, o as buildRoutePathMatcher, ot as createEventStream, p as PluginErrorCode, pt as MethodName, q as getRequestHeader, r as SmartRouter, rt as setResponseContentTypeByFileName, s as isPlugin, st as serializeEventStreamMessage, t as App, tt as setResponseHeaderAttachment, u as PluginAlreadyInstalledError, ut as setResponseCacheHeaders, v as getRequestHostName, w as getRequestAcceptableCharset, x as getRequestAcceptableLanguages, y as matchRequestContentType, z as HandlerType } from "./src-gmPicCWT.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/deno";
|
|
3
3
|
//#region src/_entries/deno.ts
|
|
4
|
-
function serve(
|
|
4
|
+
function serve(app, options) {
|
|
5
5
|
return serve$1({
|
|
6
|
-
fetch:
|
|
6
|
+
fetch: app.fetch.bind(app),
|
|
7
7
|
...options
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallError, PluginNotInstalledError,
|
|
11
|
+
export { App, AppError, AppEvent, DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, LinearRouter, LruCache, MethodName, PathMatcher, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallError, PluginNotInstalledError, SmartRouter, TrieRouter, appendResponseHeader, appendResponseHeaderDirective, buildRoutePathMatcher, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isPluginError, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchHandlerMethod, matchRequestContentType, normalizeAppOptions, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, setResponseHeaderInline, toResponse, useRequestNegotiator };
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=deno.mjs.map
|
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 {
|
|
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 { IApp } from '../app';\n\nexport * from '../index.ts';\n\nexport function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: app.fetch.bind(app), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,KAAW,SAAgD;CAC7E,OAAOA,QAAU;EAAE,OAAO,IAAI,MAAM,KAAK,IAAI;EAAE,GAAG;EAAS,CAAC"}
|
package/dist/generic.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as createError, $t as HandlerSymbol, A as sendFormat, At as isWebHandlerProvider, B as setResponseHeaderAttachment, Bt as CoreHandlerOptions, C as getRequestAcceptableContentTypes, Ct as isPluginError, D as setResponseContentTypeByFileName, Dt as isHandler, E as toResponse, Et as matchHandlerMethod, F as SendFileStats, Ft as fromNodeMiddleware, G as EventStreamHandle, Gt as ErrorHandlerOptions, H as appendResponseHeader, Ht as HandlerOptions, I as sendFile, It as NodeHandler, J as EventStreamListener, Jt as PathMatcher, K as EventStreamOptions, Kt as HandlerBaseOptions, L as sendCreated, Lt as NodeMiddleware, M as SendFileContentOptions, Mt as WebHandler, N as SendFileDisposition, Nt as WebHandlerProvider, O as sendStream, Ot as isHandlerOptions, P as SendFileOptions, Pt as fromNodeHandler, Q as isError, Qt as PathMatcherOptions, R as sendAccepted, Rt as defineCoreHandler, S as getRequestAcceptableContentType, St as PluginAlreadyInstalledError, T as isRequestCacheable, Tt as PluginErrorCode, U as appendResponseHeaderDirective, Ut as defineErrorHandler, V as setResponseHeaderInline, Vt as Handler, W as serializeEventStreamMessage, Wt as ErrorHandler, X as ResponseCacheHeadersOptions, Xt as Path, Y as EventStreamMessage, Yt as IPathMatcher, Z as setResponseCacheHeaders, Zt as PathMatcherExecResult, _ as getRequestAcceptableLanguages, _t as Plugin, a as SmartRouter, an as AppEventCreateContext, at as HandlerRouteEntry, b as getRequestAcceptableCharset, bt as PluginNotInstalledError, c as RequestProtocolOptions, cn as IAppEvent, ct as BaseRouterOptions, d as RequestIpOptions, dn as MethodName, dt as Route, en as HandlerType, et as AppContext, f as getRequestIP, fn as MethodNameLike, ft as RouteMatch, g as getRequestAcceptableLanguage, gt as isPlugin, h as matchRequestContentType, hn as HTTPErrorInput, ht as ICache, i as TrieRouter, in as AppEvent, it as AppRouteEntry, j as SendFileContent, jt as fromWebHandler, k as sendRedirect, kt as isWebHandler, l as getRequestProtocol, ln as NextFn, lt as IRouter, m as getRequestHostName, mn as ErrorSymbol, mt as LruCacheOptions, n as App, nn as IDispatcher, nt as AppOptionsInput, o as SmartRouterOptions, on as AppRequest, ot as IApp, p as RequestHostNameOptions, pn as AppError, pt as LruCache, q as createEventStream, qt as isPath, r as buildRoutePathMatcher, rn as IDispatcherEvent, rt as AppPipelineContext, s as LinearRouter, sn as AppResponse, st as RouteEntry, t as normalizeAppOptions, tn as DispatcherEvent, tt as AppOptions, u as useRequestNegotiator, un as HeaderName, ut as ObjectLiteral, v as getRequestAcceptableEncoding, vt as PluginInstallContext, w as getRequestHeader, wt as PluginError, x as getRequestAcceptableCharsets, xt as PluginInstallError, y as getRequestAcceptableEncodings, yt as PluginInstallFn, z as setResponseHeaderContentType, zt as CoreHandler } from "./index-kxLRw2Wc.mjs";
|
|
2
2
|
import { Server, ServerOptions } from "srvx";
|
|
3
3
|
|
|
4
4
|
//#region src/_entries/generic.d.ts
|
|
5
|
-
declare function serve(
|
|
5
|
+
declare function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): Server;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IDispatcher, IDispatcherEvent, IRouter,
|
|
7
|
+
export { App, AppContext, AppError, AppEvent, AppEventCreateContext, AppOptions, AppOptionsInput, AppPipelineContext, AppRequest, AppResponse, AppRouteEntry, BaseRouterOptions, CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerBaseOptions, HandlerOptions, HandlerRouteEntry, HandlerSymbol, HandlerType, HeaderName, IApp, IAppEvent, ICache, IDispatcher, IDispatcherEvent, IPathMatcher, IRouter, LinearRouter, LruCache, LruCacheOptions, MethodName, MethodNameLike, NextFn, NodeHandler, NodeMiddleware, ObjectLiteral, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallContext, PluginInstallError, PluginInstallFn, PluginNotInstalledError, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Route, RouteEntry, RouteMatch, SendFileContent, SendFileContentOptions, SendFileDisposition, SendFileOptions, SendFileStats, SmartRouter, SmartRouterOptions, TrieRouter, WebHandler, WebHandlerProvider, appendResponseHeader, appendResponseHeaderDirective, buildRoutePathMatcher, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isPluginError, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchHandlerMethod, matchRequestContentType, normalizeAppOptions, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, setResponseHeaderInline, toResponse, useRequestNegotiator };
|
|
8
8
|
//# sourceMappingURL=generic.d.mts.map
|
package/dist/generic.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as isError, A as fromWebHandler, B as DispatcherEvent, C as getRequestAcceptableEncodings, D as matchHandlerMethod, E as isRequestCacheable, F as defineErrorHandler, G as getRequestAcceptableContentTypes, H as sendRedirect, I as defineCoreHandler, J as sendFile, K as useRequestNegotiator, L as Handler, M as isWebHandlerProvider, N as fromNodeHandler, O as isHandler, P as fromNodeMiddleware, Q as createError, R as HandlerSymbol, S as getRequestAcceptableEncoding, T as getRequestAcceptableCharsets, U as sendFormat, V as sendStream, W as getRequestAcceptableContentType, X as sendAccepted, Y as sendCreated, Z as toResponse, _ as getRequestIP, a as LinearRouter, at as appendResponseHeaderDirective, b as getRequestAcceptableLanguage, c as PluginNotInstalledError, ct as AppError, d as PluginError, dt as AppEvent, et as setResponseHeaderContentType, f as isPluginError, ft as HeaderName, g as getRequestProtocol, h as PathMatcher, i as TrieRouter, it as appendResponseHeader, j as isWebHandler, k as isHandlerOptions, l as PluginInstallError, lt as ErrorSymbol, m as isPath, mt as LruCache, n as normalizeAppOptions, nt as setResponseHeaderInline, o as buildRoutePathMatcher, ot as createEventStream, p as PluginErrorCode, pt as MethodName, q as getRequestHeader, r as SmartRouter, rt as setResponseContentTypeByFileName, s as isPlugin, st as serializeEventStreamMessage, t as App, tt as setResponseHeaderAttachment, u as PluginAlreadyInstalledError, ut as setResponseCacheHeaders, v as getRequestHostName, w as getRequestAcceptableCharset, x as getRequestAcceptableLanguages, y as matchRequestContentType, z as HandlerType } from "./src-gmPicCWT.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/generic";
|
|
3
3
|
//#region src/_entries/generic.ts
|
|
4
|
-
function serve(
|
|
4
|
+
function serve(app, options) {
|
|
5
5
|
return serve$1({
|
|
6
|
-
fetch:
|
|
6
|
+
fetch: app.fetch.bind(app),
|
|
7
7
|
...options
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, MethodName, PathMatcher, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallError, PluginNotInstalledError,
|
|
11
|
+
export { App, AppError, AppEvent, DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, LinearRouter, LruCache, MethodName, PathMatcher, PluginAlreadyInstalledError, PluginError, PluginErrorCode, PluginInstallError, PluginNotInstalledError, SmartRouter, TrieRouter, appendResponseHeader, appendResponseHeaderDirective, buildRoutePathMatcher, createError, createEventStream, defineCoreHandler, defineErrorHandler, fromNodeHandler, fromNodeMiddleware, fromWebHandler, getRequestAcceptableCharset, getRequestAcceptableCharsets, getRequestAcceptableContentType, getRequestAcceptableContentTypes, getRequestAcceptableEncoding, getRequestAcceptableEncodings, getRequestAcceptableLanguage, getRequestAcceptableLanguages, getRequestHeader, getRequestHostName, getRequestIP, getRequestProtocol, isError, isHandler, isHandlerOptions, isPath, isPlugin, isPluginError, isRequestCacheable, isWebHandler, isWebHandlerProvider, matchHandlerMethod, matchRequestContentType, normalizeAppOptions, sendAccepted, sendCreated, sendFile, sendFormat, sendRedirect, sendStream, serializeEventStreamMessage, serve, setResponseCacheHeaders, setResponseContentTypeByFileName, setResponseHeaderAttachment, setResponseHeaderContentType, setResponseHeaderInline, toResponse, useRequestNegotiator };
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=generic.mjs.map
|
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 {
|
|
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 { IApp } from '../app';\n\nexport * from '../index.ts';\n\nexport function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): Server {\n return srvxServe({ fetch: app.fetch.bind(app), ...options });\n}\n"],"mappings":";;;AAMA,SAAgB,MAAM,KAAW,SAAgD;CAC7E,OAAOA,QAAU;EAAE,OAAO,IAAI,MAAM,KAAK,IAAI;EAAE,GAAG;EAAS,CAAC"}
|