routup 6.0.0-beta.1 → 6.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/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-B80OpXdo.d.mts → index-BeNEpRff.d.mts} +173 -126
- 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-DaK6SZc0.mjs → src-KLwWuArk.mjs} +149 -83
- package/dist/src-KLwWuArk.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/src-DaK6SZc0.mjs.map +0 -1
|
@@ -650,7 +650,6 @@ declare function matchHandlerMethod(handlerMethod: MethodName | undefined, reque
|
|
|
650
650
|
declare const PluginErrorCode: {
|
|
651
651
|
readonly PLUGIN: "PLUGIN";
|
|
652
652
|
readonly NOT_INSTALLED: "PLUGIN_NOT_INSTALLED";
|
|
653
|
-
readonly ALREADY_INSTALLED: "PLUGIN_ALREADY_INSTALLED";
|
|
654
653
|
readonly INSTALL: "PLUGIN_INSTALL";
|
|
655
654
|
};
|
|
656
655
|
type PluginErrorCode = typeof PluginErrorCode[keyof typeof PluginErrorCode];
|
|
@@ -663,12 +662,6 @@ declare class PluginError extends AppError {
|
|
|
663
662
|
//#region src/plugin/error/is.d.ts
|
|
664
663
|
declare function isPluginError(input: unknown): input is PluginError;
|
|
665
664
|
//#endregion
|
|
666
|
-
//#region src/plugin/error/sub/already-installed.d.ts
|
|
667
|
-
declare class PluginAlreadyInstalledError extends PluginError {
|
|
668
|
-
readonly pluginName: string;
|
|
669
|
-
constructor(pluginName: string);
|
|
670
|
-
}
|
|
671
|
-
//#endregion
|
|
672
665
|
//#region src/plugin/error/sub/install.d.ts
|
|
673
666
|
declare class PluginInstallError extends PluginError {
|
|
674
667
|
readonly pluginName: string;
|
|
@@ -693,6 +686,37 @@ type Plugin = {
|
|
|
693
686
|
* The version of the plugin (semver).
|
|
694
687
|
*/
|
|
695
688
|
version?: string;
|
|
689
|
+
/**
|
|
690
|
+
* Opt in to "install at most once per App, regardless of mount
|
|
691
|
+
* path". Use for cross-cutting plugins (CORS, body parsers, auth)
|
|
692
|
+
* where multiple instances would be a bug.
|
|
693
|
+
*
|
|
694
|
+
* Default `false` — by default `app.use(plugin)` is permissive and
|
|
695
|
+
* appends; the same plugin may even be mounted at the same path
|
|
696
|
+
* more than once (each install runs `install()` again and stacks).
|
|
697
|
+
*
|
|
698
|
+
* When `true`:
|
|
699
|
+
* - The install is a no-op if any prior mount of the same name
|
|
700
|
+
* exists. Routes from this attempt are not registered, and no
|
|
701
|
+
* error is thrown.
|
|
702
|
+
* - The first successful install with `singleton: true` records
|
|
703
|
+
* a sticky claim — every subsequent install of that name is
|
|
704
|
+
* silently skipped for the lifetime of the App.
|
|
705
|
+
* - The claim is *not* set retroactively. If the first install
|
|
706
|
+
* of the name had no flag, a later `singleton: true` install
|
|
707
|
+
* just no-ops without claiming.
|
|
708
|
+
*/
|
|
709
|
+
singleton?: boolean;
|
|
710
|
+
/**
|
|
711
|
+
* Opt in to "install at most once per `(name, mount path)` pair".
|
|
712
|
+
* Useful for idempotent installs at a specific prefix without
|
|
713
|
+
* locking the name globally.
|
|
714
|
+
*
|
|
715
|
+
* Default `false`. When `true`, a second install of the same
|
|
716
|
+
* plugin at the same canonical mount path is silently skipped;
|
|
717
|
+
* installs at other paths proceed normally.
|
|
718
|
+
*/
|
|
719
|
+
singletonByPath?: boolean;
|
|
696
720
|
/**
|
|
697
721
|
* The installation function called on registration.
|
|
698
722
|
*/
|
|
@@ -769,14 +793,6 @@ interface ICache<V> {
|
|
|
769
793
|
* cached against an earlier route set.
|
|
770
794
|
*/
|
|
771
795
|
clear(): void;
|
|
772
|
-
/**
|
|
773
|
-
* Return a fresh, **empty** cache of the same shape — same class
|
|
774
|
-
* for leaf implementations. Used by `IRouter.clone()` so the
|
|
775
|
-
* clone preserves the configured cache family (size, eviction
|
|
776
|
-
* policy, …) without inheriting the parent's cached values.
|
|
777
|
-
* Mirrors `IRouter.clone()`.
|
|
778
|
-
*/
|
|
779
|
-
clone(): ICache<V>;
|
|
780
796
|
}
|
|
781
797
|
//#endregion
|
|
782
798
|
//#region src/cache/lru.d.ts
|
|
@@ -798,14 +814,12 @@ type LruCacheOptions = {
|
|
|
798
814
|
* `BaseRouterOptions.cache` slot.
|
|
799
815
|
*/
|
|
800
816
|
declare class LruCache<V> implements ICache<V> {
|
|
801
|
-
protected options: LruCacheOptions;
|
|
802
817
|
protected inner: QuickLRU<string, V>;
|
|
803
818
|
constructor(options?: LruCacheOptions);
|
|
804
819
|
get(key: string): V | undefined;
|
|
805
820
|
set(key: string, value: V): void;
|
|
806
821
|
delete(key: string): void;
|
|
807
822
|
clear(): void;
|
|
808
|
-
clone(): ICache<V>;
|
|
809
823
|
}
|
|
810
824
|
//#endregion
|
|
811
825
|
//#region src/types.d.ts
|
|
@@ -863,8 +877,7 @@ type RouteMatch<T extends ObjectLiteral = ObjectLiteral> = {
|
|
|
863
877
|
route: Route<T>;
|
|
864
878
|
/**
|
|
865
879
|
* Registration index in the router. Used by the dispatch loop's
|
|
866
|
-
* `setNext` continuation ("resume from index + 1")
|
|
867
|
-
* `App.clone()` to re-register routes in their original order.
|
|
880
|
+
* `setNext` continuation ("resume from index + 1").
|
|
868
881
|
*/
|
|
869
882
|
index: number;
|
|
870
883
|
/**
|
|
@@ -949,15 +962,6 @@ interface IRouter<T extends ObjectLiteral = ObjectLiteral> {
|
|
|
949
962
|
* implementation.
|
|
950
963
|
*/
|
|
951
964
|
lookup(path: string, method?: MethodNameLike): readonly RouteMatch<T>[];
|
|
952
|
-
/**
|
|
953
|
-
* Return a fresh, **empty** router of the same shape — same class
|
|
954
|
-
* for leaf implementations; composable wrappers should recursively
|
|
955
|
-
* clone their inner router. Used by `App.install()` and
|
|
956
|
-
* `App.clone()` so plugin sub-apps and cloned apps preserve the
|
|
957
|
-
* active router family instead of silently downgrading to
|
|
958
|
-
* `LinearRouter`.
|
|
959
|
-
*/
|
|
960
|
-
clone(): IRouter<T>;
|
|
961
965
|
}
|
|
962
966
|
//#endregion
|
|
963
967
|
//#region src/app/types.d.ts
|
|
@@ -1044,11 +1048,11 @@ type AppOptionsInput = Omit<AppOptions, 'etag' | 'trustProxy'> & {
|
|
|
1044
1048
|
*
|
|
1045
1049
|
* Splits true runtime options (which propagate to mounted children
|
|
1046
1050
|
* via mount-time inheritance) from App-local identity (`name`,
|
|
1047
|
-
* `path`) and
|
|
1048
|
-
*
|
|
1049
|
-
*
|
|
1050
|
-
*
|
|
1051
|
-
*
|
|
1051
|
+
* `path`) and the `router` injectable. Keeping these separate
|
|
1052
|
+
* prevents identity from leaking across the mount boundary — e.g. a
|
|
1053
|
+
* parent's `path: '/api'` would otherwise propagate into a child
|
|
1054
|
+
* whose own `path` is unset and silently double-prefix on
|
|
1055
|
+
* registration.
|
|
1052
1056
|
*/
|
|
1053
1057
|
type AppContext = {
|
|
1054
1058
|
/**
|
|
@@ -1076,12 +1080,6 @@ type AppContext = {
|
|
|
1076
1080
|
* mount-time inheritance.
|
|
1077
1081
|
*/
|
|
1078
1082
|
options?: AppOptionsInput;
|
|
1079
|
-
/**
|
|
1080
|
-
* Map of installed plugin name → version. Defaults to an empty
|
|
1081
|
-
* map. Used by `clone()` to carry the installed-plugin registry
|
|
1082
|
-
* over so duplicate installs are still rejected on the copy.
|
|
1083
|
-
*/
|
|
1084
|
-
plugins?: Map<string, string | undefined>;
|
|
1085
1083
|
/**
|
|
1086
1084
|
* Pluggable router (route table). Defaults to `LinearRouter` —
|
|
1087
1085
|
* walks registered entries linearly per request. Swap in an
|
|
@@ -1089,48 +1087,6 @@ type AppContext = {
|
|
|
1089
1087
|
*/
|
|
1090
1088
|
router?: IRouter<Handler>;
|
|
1091
1089
|
};
|
|
1092
|
-
/**
|
|
1093
|
-
* Per-dispatch state threaded through the match loop. Used internally
|
|
1094
|
-
* by `App.dispatch` and the `setNext` continuation; not part of the
|
|
1095
|
-
* public surface.
|
|
1096
|
-
*/
|
|
1097
|
-
type AppPipelineContext = {
|
|
1098
|
-
/**
|
|
1099
|
-
* The dispatcher event being processed. Carries request, path,
|
|
1100
|
-
* params, and the response accumulator across pipeline steps.
|
|
1101
|
-
*/
|
|
1102
|
-
event: IDispatcherEvent;
|
|
1103
|
-
/**
|
|
1104
|
-
* `true` when this dispatch is the outermost App on the call
|
|
1105
|
-
* stack (the root). Used to gate root-only behaviour like
|
|
1106
|
-
* OPTIONS auto-Allow.
|
|
1107
|
-
*/
|
|
1108
|
-
isRoot: boolean;
|
|
1109
|
-
/**
|
|
1110
|
-
* Resolved matches for the current `event.path`, populated on
|
|
1111
|
-
* first lookup and threaded through `setNext` recursion so we
|
|
1112
|
-
* don't re-run `IRouter.lookup` per cycle. Refreshed when
|
|
1113
|
-
* `event.path` changes mid-walk.
|
|
1114
|
-
*/
|
|
1115
|
-
matches: readonly RouteMatch<Handler>[];
|
|
1116
|
-
/**
|
|
1117
|
-
* The `event.path` that was used to compute `matches`. Stored so
|
|
1118
|
-
* we can detect a mid-walk path mutation and refresh the cache.
|
|
1119
|
-
*/
|
|
1120
|
-
matchesPath: string;
|
|
1121
|
-
/**
|
|
1122
|
-
* Position within `matches` for the *next* handler the walk
|
|
1123
|
-
* should consider. The current handler's `setNext` continuation
|
|
1124
|
-
* captures this and resumes the walk on `event.next()`.
|
|
1125
|
-
*/
|
|
1126
|
-
matchIndex: number;
|
|
1127
|
-
/**
|
|
1128
|
-
* The Response produced by the pipeline. Set by handlers (via
|
|
1129
|
-
* `toResponse`) or by the OPTIONS auto-Allow path; returned from
|
|
1130
|
-
* `App.dispatch`.
|
|
1131
|
-
*/
|
|
1132
|
-
response?: Response;
|
|
1133
|
-
};
|
|
1134
1090
|
interface IApp extends IDispatcher {
|
|
1135
1091
|
/**
|
|
1136
1092
|
* Optional label for the router instance.
|
|
@@ -1141,16 +1097,6 @@ interface IApp extends IDispatcher {
|
|
|
1141
1097
|
* and returns a Response (with 404/500 fallbacks).
|
|
1142
1098
|
*/
|
|
1143
1099
|
fetch(request: AppRequest): Promise<Response>;
|
|
1144
|
-
/**
|
|
1145
|
-
* Return a new App that mirrors this one but owns independent
|
|
1146
|
-
* mountable state — fresh `IRouter` of the same family seeded
|
|
1147
|
-
* with this App's routes, shallow copy of options, and a fresh
|
|
1148
|
-
* plugins map carrying the same entries.
|
|
1149
|
-
*
|
|
1150
|
-
* Intended for mounting the same logical App under multiple
|
|
1151
|
-
* paths without sharing mutable state across mount points.
|
|
1152
|
-
*/
|
|
1153
|
-
clone(): IApp;
|
|
1154
1100
|
/**
|
|
1155
1101
|
* Swap the active `IRouter`. Every previously-registered route
|
|
1156
1102
|
* is replayed onto the new router so lookups stay correct. Any
|
|
@@ -1163,16 +1109,70 @@ interface IApp extends IDispatcher {
|
|
|
1163
1109
|
*/
|
|
1164
1110
|
setRouter(router: IRouter<Handler>): void;
|
|
1165
1111
|
/**
|
|
1166
|
-
*
|
|
1167
|
-
*
|
|
1168
|
-
*
|
|
1112
|
+
* Canonical route list registered on this App, in registration
|
|
1113
|
+
* order. Read by `app.use(child)` at mount time so the parent can
|
|
1114
|
+
* re-register each entry under the composed mount path.
|
|
1115
|
+
*
|
|
1116
|
+
* Returned as `readonly` — callers must not mutate; route
|
|
1117
|
+
* registration goes through `use` / `get` / `post` / etc.
|
|
1118
|
+
*/
|
|
1119
|
+
readonly routes: readonly Route<Handler>[];
|
|
1120
|
+
/**
|
|
1121
|
+
* Installed-plugin registry, keyed by plugin name → canonical
|
|
1122
|
+
* mount path (`'/'` for root installs) → installed version.
|
|
1123
|
+
*
|
|
1124
|
+
* Read by `app.use(child)` at mount time so the parent can merge
|
|
1125
|
+
* the child's per-path registry into its own under the composed
|
|
1126
|
+
* mount path. Returned as nested `ReadonlyMap` — callers must not
|
|
1127
|
+
* mutate; install through `app.use(plugin)`.
|
|
1128
|
+
*/
|
|
1129
|
+
readonly plugins: ReadonlyMap<string, ReadonlyMap<string, string | undefined>>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Names of plugins installed with `singleton: true`. Once a name
|
|
1132
|
+
* appears here it stays for the lifetime of the App: every
|
|
1133
|
+
* subsequent install of that name is a silent no-op. Read by
|
|
1134
|
+
* `app.use(child)` at mount time so a child's sticky claim
|
|
1135
|
+
* propagates to the parent (subject to `flatten()`'s
|
|
1136
|
+
* first-install-wins guard).
|
|
1137
|
+
*
|
|
1138
|
+
* Returned as `ReadonlySet` — callers must not mutate.
|
|
1139
|
+
*/
|
|
1140
|
+
readonly pluginSingletons: ReadonlySet<string>;
|
|
1141
|
+
/**
|
|
1142
|
+
* Check if a plugin with the given name is installed on this App
|
|
1143
|
+
* at *any* mount path. Plugins installed on a mounted child are
|
|
1144
|
+
* merged into the parent at mount time, so this reflects the
|
|
1145
|
+
* flattened view.
|
|
1169
1146
|
*/
|
|
1170
1147
|
hasPlugin(name: string): boolean;
|
|
1148
|
+
/**
|
|
1149
|
+
* Check if a plugin with the given name is installed at the given
|
|
1150
|
+
* install-time `path`. `path` is interpreted relative to this App
|
|
1151
|
+
* — the same way `app.use(path, plugin)` takes it. Omit `path` to
|
|
1152
|
+
* check the root install.
|
|
1153
|
+
*/
|
|
1154
|
+
hasPluginAt(name: string, path?: Path): boolean;
|
|
1171
1155
|
/**
|
|
1172
1156
|
* Get the version of an installed plugin by name, or `undefined`
|
|
1173
|
-
* if the plugin is not installed.
|
|
1157
|
+
* if the plugin is not installed. When the plugin is mounted at
|
|
1158
|
+
* several paths, returns the version of an arbitrary mount —
|
|
1159
|
+
* typical usage installs the same plugin object at every mount,
|
|
1160
|
+
* so the version is identical. Use `getPluginVersionAt` to read
|
|
1161
|
+
* the version of a specific mount.
|
|
1174
1162
|
*/
|
|
1175
1163
|
getPluginVersion(name: string): string | undefined;
|
|
1164
|
+
/**
|
|
1165
|
+
* Get the version of a plugin installed at the given install-time
|
|
1166
|
+
* `path`, or `undefined` when no install matches. `path` is
|
|
1167
|
+
* interpreted relative to this App; omit it to read the root
|
|
1168
|
+
* install.
|
|
1169
|
+
*/
|
|
1170
|
+
getPluginVersionAt(name: string, path?: Path): string | undefined;
|
|
1171
|
+
/**
|
|
1172
|
+
* List every canonical mount path the named plugin is installed
|
|
1173
|
+
* at. Returns an empty array when the plugin is not installed.
|
|
1174
|
+
*/
|
|
1175
|
+
getPluginMountPaths(name: string): readonly string[];
|
|
1176
1176
|
/**
|
|
1177
1177
|
* Register a handler, App, or plugin.
|
|
1178
1178
|
*
|
|
@@ -1425,7 +1425,6 @@ declare class LinearRouter<T extends ObjectLiteral = ObjectLiteral> implements I
|
|
|
1425
1425
|
constructor(options?: BaseRouterOptions<T>);
|
|
1426
1426
|
add(route: Route<T>): void;
|
|
1427
1427
|
lookup(path: string, _method?: MethodNameLike): readonly RouteMatch<T>[];
|
|
1428
|
-
clone(): IRouter<T>;
|
|
1429
1428
|
}
|
|
1430
1429
|
//#endregion
|
|
1431
1430
|
//#region src/router/smart/module.d.ts
|
|
@@ -1442,7 +1441,7 @@ type SmartRouterOptions<T extends ObjectLiteral = ObjectLiteral> = BaseRouterOpt
|
|
|
1442
1441
|
* buffer; on the first `lookup()` call, picks `LinearRouter` or
|
|
1443
1442
|
* `TrieRouter` based on the registered route count and replays the
|
|
1444
1443
|
* pending list onto the chosen inner router. Every subsequent call
|
|
1445
|
-
* — `add`, `lookup
|
|
1444
|
+
* — `add`, `lookup` — forwards to the inner.
|
|
1446
1445
|
*
|
|
1447
1446
|
* Use this when you don't want to commit to a router family up-front
|
|
1448
1447
|
* (e.g. a library that registers a variable number of routes
|
|
@@ -1466,7 +1465,6 @@ declare class SmartRouter<T extends ObjectLiteral = ObjectLiteral> implements IR
|
|
|
1466
1465
|
constructor(options?: SmartRouterOptions<T>);
|
|
1467
1466
|
add(route: Route<T>): void;
|
|
1468
1467
|
lookup(path: string, method?: string): readonly RouteMatch<T>[];
|
|
1469
|
-
clone(): IRouter<T>;
|
|
1470
1468
|
/**
|
|
1471
1469
|
* Pick the inner router based on the registered route count.
|
|
1472
1470
|
* `LinearRouter` for tiny tables, `TrieRouter` past the
|
|
@@ -1648,7 +1646,6 @@ declare class TrieRouter<T extends ObjectLiteral = ObjectLiteral> implements IRo
|
|
|
1648
1646
|
constructor(options?: BaseRouterOptions<T>);
|
|
1649
1647
|
add(route: Route<T>): void;
|
|
1650
1648
|
lookup(path: string, method?: MethodNameLike): readonly RouteMatch<T>[];
|
|
1651
|
-
clone(): IRouter<T>;
|
|
1652
1649
|
/**
|
|
1653
1650
|
* T1: returns the pre-computed candidate list when the request's
|
|
1654
1651
|
* static spine has no param sibling, no prefix routes, and no
|
|
@@ -1723,22 +1720,39 @@ declare class App implements IApp {
|
|
|
1723
1720
|
*/
|
|
1724
1721
|
protected _options: Readonly<AppOptions>;
|
|
1725
1722
|
/**
|
|
1726
|
-
* Registry of installed plugins
|
|
1723
|
+
* Registry of installed plugins on this App, keyed by plugin name
|
|
1724
|
+
* then by canonical mount key (the joined `this._path` +
|
|
1725
|
+
* install-time `path`, falling back to `'/'` for a root install).
|
|
1726
|
+
* Inner-map value is the plugin version (or `undefined`).
|
|
1727
|
+
*
|
|
1728
|
+
* Per-path keying lets `hasPluginAt` answer "is plugin X mounted at
|
|
1729
|
+
* /api?" precisely. By default `install()` is permissive and
|
|
1730
|
+
* appends — same `(name, key)` writes the latest version. Plugins
|
|
1731
|
+
* opt into deduplication via `singleton` (any-path) or
|
|
1732
|
+
* `singletonByPath` (same-path) flags.
|
|
1727
1733
|
*
|
|
1728
|
-
* Read by `
|
|
1729
|
-
*
|
|
1730
|
-
*
|
|
1731
|
-
* apps mounted into it.
|
|
1734
|
+
* Read by `flatten()` when merging a child's registry into this
|
|
1735
|
+
* one, so `parent.hasPlugin('foo')` reflects plugins installed on
|
|
1736
|
+
* mounted children too.
|
|
1732
1737
|
*
|
|
1733
1738
|
* @protected
|
|
1734
1739
|
*/
|
|
1735
|
-
protected _plugins: Map<string, string | undefined
|
|
1740
|
+
protected _plugins: Map<string, Map<string, string | undefined>>;
|
|
1741
|
+
/**
|
|
1742
|
+
* Names of plugins installed with `singleton: true`. Re-installing
|
|
1743
|
+
* any of these names — even at a different mount path — is a
|
|
1744
|
+
* silent no-op. The claim is sticky: once a name is in here, it
|
|
1745
|
+
* stays for the lifetime of the App. Propagated through
|
|
1746
|
+
* `flatten()` so a child's singleton claim survives the mount.
|
|
1747
|
+
*
|
|
1748
|
+
* @protected
|
|
1749
|
+
*/
|
|
1750
|
+
protected _pluginSingletons: Set<string>;
|
|
1736
1751
|
/**
|
|
1737
1752
|
* Every route registered on this App, in registration order.
|
|
1738
1753
|
*
|
|
1739
|
-
* Read by `use(otherApp)` to snapshot routes at flatten time
|
|
1740
|
-
*
|
|
1741
|
-
* after a flatten do not propagate.
|
|
1754
|
+
* Read by `use(otherApp)` to snapshot routes at flatten time.
|
|
1755
|
+
* Late mutations to `_routes` after a flatten do not propagate.
|
|
1742
1756
|
*/
|
|
1743
1757
|
protected _routes: Route<Handler>[];
|
|
1744
1758
|
constructor(input?: AppContext);
|
|
@@ -1749,16 +1763,30 @@ declare class App implements IApp {
|
|
|
1749
1763
|
*/
|
|
1750
1764
|
get routes(): readonly Route<Handler>[];
|
|
1751
1765
|
/**
|
|
1752
|
-
* Public read of the installed-plugin registry. Used by
|
|
1753
|
-
*
|
|
1754
|
-
*
|
|
1755
|
-
*
|
|
1766
|
+
* Public read of the installed-plugin registry. Used by `flatten()`
|
|
1767
|
+
* to merge a child's plugins into this App without reaching into
|
|
1768
|
+
* the child's protected fields.
|
|
1769
|
+
*
|
|
1770
|
+
* Outer key: plugin name. Inner key: canonical mount path (`'/'`
|
|
1771
|
+
* for root mounts). Inner value: installed version (or `undefined`).
|
|
1772
|
+
*
|
|
1773
|
+
* Returned as nested `ReadonlyMap` — callers must not mutate; go
|
|
1774
|
+
* through `app.use(plugin)` to install.
|
|
1756
1775
|
*/
|
|
1757
|
-
get plugins(): ReadonlyMap<string, string | undefined
|
|
1776
|
+
get plugins(): ReadonlyMap<string, ReadonlyMap<string, string | undefined>>;
|
|
1777
|
+
/**
|
|
1778
|
+
* Public read of the sticky singleton-claim set. Once a plugin
|
|
1779
|
+
* name is claimed singleton on an App, every subsequent install
|
|
1780
|
+
* of that name is a silent no-op. Used by `flatten()` to
|
|
1781
|
+
* propagate child claims forward at mount time.
|
|
1782
|
+
*
|
|
1783
|
+
* Returned as `ReadonlySet` — callers must not mutate.
|
|
1784
|
+
*/
|
|
1785
|
+
get pluginSingletons(): ReadonlySet<string>;
|
|
1758
1786
|
/**
|
|
1759
1787
|
* Register a route with the active router and record it on the
|
|
1760
|
-
* App so `
|
|
1761
|
-
*
|
|
1788
|
+
* App so `setRouter` / `use(child)` can read the canonical list
|
|
1789
|
+
* back.
|
|
1762
1790
|
*
|
|
1763
1791
|
* @protected
|
|
1764
1792
|
*/
|
|
@@ -1817,28 +1845,47 @@ declare class App implements IApp {
|
|
|
1817
1845
|
*
|
|
1818
1846
|
* @protected
|
|
1819
1847
|
*/
|
|
1820
|
-
protected flatten(child:
|
|
1848
|
+
protected flatten(child: IApp, path: Path | undefined): void;
|
|
1821
1849
|
/**
|
|
1822
|
-
* Check if a plugin with the given name is installed on this App
|
|
1850
|
+
* Check if a plugin with the given name is installed on this App at
|
|
1851
|
+
* *any* mount path.
|
|
1823
1852
|
*/
|
|
1824
1853
|
hasPlugin(name: string): boolean;
|
|
1854
|
+
/**
|
|
1855
|
+
* Check if a plugin with the given name is installed at the given
|
|
1856
|
+
* install-time `path`. `path` is interpreted the same way as the
|
|
1857
|
+
* argument to `app.use(path, plugin)` — relative to this App. Omit
|
|
1858
|
+
* `path` to check the root install.
|
|
1859
|
+
*/
|
|
1860
|
+
hasPluginAt(name: string, path?: Path): boolean;
|
|
1825
1861
|
/**
|
|
1826
1862
|
* Get the version of an installed plugin by name, or `undefined`
|
|
1827
|
-
*
|
|
1863
|
+
* when the plugin is not installed. When the plugin is mounted at
|
|
1864
|
+
* several paths, returns the version of an arbitrary mount —
|
|
1865
|
+
* typical usage installs the same plugin object at every mount, so
|
|
1866
|
+
* the version is identical. Use `getPluginVersionAt` to read the
|
|
1867
|
+
* version of a specific mount.
|
|
1828
1868
|
*/
|
|
1829
1869
|
getPluginVersion(name: string): string | undefined;
|
|
1830
|
-
protected install(plugin: Plugin, context?: PluginInstallContext): this;
|
|
1831
1870
|
/**
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1834
|
-
*
|
|
1835
|
-
*
|
|
1871
|
+
* Get the version of a plugin installed at the given install-time
|
|
1872
|
+
* `path`, or `undefined` when no install matches. `path` is
|
|
1873
|
+
* interpreted relative to this App (same convention as
|
|
1874
|
+
* `app.use(path, plugin)`); omit it to read the root install.
|
|
1836
1875
|
*/
|
|
1837
|
-
|
|
1876
|
+
getPluginVersionAt(name: string, path?: Path): string | undefined;
|
|
1877
|
+
/**
|
|
1878
|
+
* List every canonical mount path the named plugin is installed
|
|
1879
|
+
* at. Returns an empty array when the plugin is not installed.
|
|
1880
|
+
* Each path is the joined `app._path` + install-time path,
|
|
1881
|
+
* normalized to `'/'` for root mounts.
|
|
1882
|
+
*/
|
|
1883
|
+
getPluginMountPaths(name: string): readonly string[];
|
|
1884
|
+
protected install(plugin: Plugin, context?: PluginInstallContext): this;
|
|
1838
1885
|
}
|
|
1839
1886
|
//#endregion
|
|
1840
1887
|
//#region src/app/options.d.ts
|
|
1841
1888
|
declare function normalizeAppOptions(input: AppOptionsInput): AppOptions;
|
|
1842
1889
|
//#endregion
|
|
1843
|
-
export { AppOptions as $,
|
|
1844
|
-
//# sourceMappingURL=index-
|
|
1890
|
+
export { AppOptions as $, DispatcherEvent as $t, sendFormat as A, NodeMiddleware as At, setResponseHeaderAttachment as B, HandlerBaseOptions as Bt, getRequestAcceptableContentTypes as C, isWebHandlerProvider as Ct, setResponseContentTypeByFileName as D, fromNodeHandler as Dt, toResponse as E, WebHandlerProvider as Et, SendFileStats as F, HandlerOptions as Ft, EventStreamHandle as G, IPathMatcher as Gt, appendResponseHeader as H, HandlerErrorListener as Ht, sendFile as I, defineErrorHandler as It, EventStreamListener as J, PathMatcherOptions as Jt, EventStreamOptions as K, Path as Kt, sendCreated as L, ErrorHandler as Lt, SendFileContentOptions as M, CoreHandler as Mt, SendFileDisposition as N, CoreHandlerOptions as Nt, sendStream as O, fromNodeMiddleware as Ot, SendFileOptions as P, Handler as Pt, AppContext as Q, HandlerType as Qt, sendAccepted as R, ErrorHandlerOptions as Rt, getRequestAcceptableContentType as S, isWebHandler as St, isRequestCacheable as T, WebHandler as Tt, appendResponseHeaderDirective as U, isPath as Ut, setResponseHeaderInline as V, HandlerBeforeListener as Vt, serializeEventStreamMessage as W, PathMatcher as Wt, ResponseCacheHeadersOptions as X, createError as Xt, EventStreamMessage as Y, isError as Yt, setResponseCacheHeaders as Z, HandlerSymbol as Zt, getRequestAcceptableLanguages as _, PluginError as _t, SmartRouter as a, AppResponse as an, Route as at, getRequestAcceptableCharset as b, isHandler as bt, RequestProtocolOptions as c, HeaderName as cn, LruCacheOptions as ct, RequestIpOptions as d, AppError as dn, Plugin as dt, IDispatcher as en, AppOptionsInput as et, getRequestIP as f, ErrorSymbol as fn, PluginInstallContext as ft, getRequestAcceptableLanguage as g, isPluginError as gt, matchRequestContentType as h, PluginInstallError as ht, TrieRouter as i, AppRequest as in, ObjectLiteral as it, SendFileContent as j, defineCoreHandler as jt, sendRedirect as k, NodeHandler as kt, getRequestProtocol as l, MethodName as ln, ICache as lt, getRequestHostName as m, PluginNotInstalledError as mt, App as n, AppEvent as nn, BaseRouterOptions as nt, SmartRouterOptions as o, IAppEvent as on, RouteMatch as ot, RequestHostNameOptions as p, HTTPErrorInput$1 as pn, PluginInstallFn as pt, createEventStream as q, PathMatcherExecResult as qt, buildRoutePathMatcher as r, AppEventCreateContext as rn, IRouter as rt, LinearRouter as s, NextFn as sn, LruCache as st, normalizeAppOptions as t, IDispatcherEvent as tn, IApp as tt, useRequestNegotiator as u, MethodNameLike as un, isPlugin as ut, getRequestAcceptableEncoding as v, PluginErrorCode as vt, getRequestHeader as w, fromWebHandler as wt, getRequestAcceptableCharsets as x, isHandlerOptions as xt, getRequestAcceptableEncodings as y, matchHandlerMethod as yt, setResponseHeaderContentType as z, HandlerAfterListener as zt };
|
|
1891
|
+
//# sourceMappingURL=index-BeNEpRff.d.mts.map
|
package/dist/node.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AppOptions, $t as
|
|
1
|
+
import { $ as AppOptions, $t as DispatcherEvent, A as sendFormat, At as NodeMiddleware, B as setResponseHeaderAttachment, Bt as HandlerBaseOptions, C as getRequestAcceptableContentTypes, Ct as isWebHandlerProvider, D as setResponseContentTypeByFileName, Dt as fromNodeHandler, E as toResponse, Et as WebHandlerProvider, F as SendFileStats, Ft as HandlerOptions, G as EventStreamHandle, Gt as IPathMatcher, H as appendResponseHeader, Ht as HandlerErrorListener, I as sendFile, It as defineErrorHandler, J as EventStreamListener, Jt as PathMatcherOptions, K as EventStreamOptions, Kt as Path, L as sendCreated, Lt as ErrorHandler, M as SendFileContentOptions, Mt as CoreHandler, N as SendFileDisposition, Nt as CoreHandlerOptions, O as sendStream, Ot as fromNodeMiddleware, P as SendFileOptions, Pt as Handler, Q as AppContext, Qt as HandlerType, R as sendAccepted, Rt as ErrorHandlerOptions, S as getRequestAcceptableContentType, St as isWebHandler, T as isRequestCacheable, Tt as WebHandler, U as appendResponseHeaderDirective, Ut as isPath, V as setResponseHeaderInline, Vt as HandlerBeforeListener, W as serializeEventStreamMessage, Wt as PathMatcher, X as ResponseCacheHeadersOptions, Xt as createError, Y as EventStreamMessage, Yt as isError, Z as setResponseCacheHeaders, Zt as HandlerSymbol, _ as getRequestAcceptableLanguages, _t as PluginError, a as SmartRouter, an as AppResponse, at as Route, b as getRequestAcceptableCharset, bt as isHandler, c as RequestProtocolOptions, cn as HeaderName, ct as LruCacheOptions, d as RequestIpOptions, dn as AppError, dt as Plugin, en as IDispatcher, et as AppOptionsInput, f as getRequestIP, fn as ErrorSymbol, ft as PluginInstallContext, g as getRequestAcceptableLanguage, gt as isPluginError, h as matchRequestContentType, ht as PluginInstallError, i as TrieRouter, in as AppRequest, it as ObjectLiteral, j as SendFileContent, jt as defineCoreHandler, k as sendRedirect, kt as NodeHandler, l as getRequestProtocol, ln as MethodName, lt as ICache, m as getRequestHostName, mt as PluginNotInstalledError, n as App, nn as AppEvent, nt as BaseRouterOptions, o as SmartRouterOptions, on as IAppEvent, ot as RouteMatch, p as RequestHostNameOptions, pn as HTTPErrorInput, pt as PluginInstallFn, q as createEventStream, qt as PathMatcherExecResult, r as buildRoutePathMatcher, rn as AppEventCreateContext, rt as IRouter, s as LinearRouter, sn as NextFn, st as LruCache, t as normalizeAppOptions, tn as IDispatcherEvent, tt as IApp, u as useRequestNegotiator, un as MethodNameLike, ut as isPlugin, v as getRequestAcceptableEncoding, vt as PluginErrorCode, w as getRequestHeader, wt as fromWebHandler, x as getRequestAcceptableCharsets, xt as isHandlerOptions, y as getRequestAcceptableEncodings, yt as matchHandlerMethod, z as setResponseHeaderContentType, zt as HandlerAfterListener } from "./index-BeNEpRff.mjs";
|
|
2
2
|
import * as _$srvx_node0 from "srvx/node";
|
|
3
3
|
import * as _$srvx from "srvx";
|
|
4
4
|
import { Server, ServerOptions } from "srvx";
|
|
@@ -7,5 +7,5 @@ import { Server, ServerOptions } from "srvx";
|
|
|
7
7
|
declare function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): Server;
|
|
8
8
|
declare function toNodeHandler(app: IApp): _$srvx.NodeHttpHandler & _$srvx_node0.AdapterMeta;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { App, AppContext, AppError, AppEvent, AppEventCreateContext, AppOptions, AppOptionsInput,
|
|
10
|
+
export { App, AppContext, AppError, AppEvent, AppEventCreateContext, AppOptions, AppOptionsInput, AppRequest, AppResponse, BaseRouterOptions, CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerAfterListener, HandlerBaseOptions, HandlerBeforeListener, HandlerErrorListener, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IApp, IAppEvent, ICache, IDispatcher, IDispatcherEvent, IPathMatcher, IRouter, LinearRouter, LruCache, LruCacheOptions, MethodName, MethodNameLike, NextFn, NodeHandler, NodeMiddleware, ObjectLiteral, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginError, PluginErrorCode, PluginInstallContext, PluginInstallError, PluginInstallFn, PluginNotInstalledError, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Route, 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, toNodeHandler, toResponse, useRequestNegotiator };
|
|
11
11
|
//# sourceMappingURL=node.d.mts.map
|
package/dist/node.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as setResponseHeaderContentType, A as isWebHandler, B as sendStream, C as getRequestAcceptableCharset, D as isHandler, E as matchHandlerMethod, F as defineCoreHandler, G as useRequestNegotiator, H as sendFormat, I as Handler, J as sendCreated, K as getRequestHeader, L as HandlerSymbol, M as fromNodeHandler, N as fromNodeMiddleware, O as isHandlerOptions, P as defineErrorHandler, Q as isError, R as HandlerType, S as getRequestAcceptableEncodings, T as isRequestCacheable, U as getRequestAcceptableContentType, V as sendRedirect, W as getRequestAcceptableContentTypes, X as toResponse, Y as sendAccepted, Z as createError, _ as getRequestHostName, a as LinearRouter, at as createEventStream, b as getRequestAcceptableLanguages, c as PluginNotInstalledError, ct as ErrorSymbol, d as isPluginError, dt as HeaderName, et as setResponseHeaderAttachment, f as PluginErrorCode, ft as MethodName, g as getRequestIP, h as getRequestProtocol, i as TrieRouter, it as appendResponseHeaderDirective, j as isWebHandlerProvider, k as fromWebHandler, l as PluginInstallError, lt as setResponseCacheHeaders, m as PathMatcher, n as normalizeAppOptions, nt as setResponseContentTypeByFileName, o as buildRoutePathMatcher, ot as serializeEventStreamMessage, p as isPath, pt as LruCache, q as sendFile, r as SmartRouter, rt as appendResponseHeader, s as isPlugin, st as AppError, t as App, tt as setResponseHeaderInline, u as PluginError, ut as AppEvent, v as matchRequestContentType, w as getRequestAcceptableCharsets, x as getRequestAcceptableEncoding, y as getRequestAcceptableLanguage, z as DispatcherEvent } from "./src-KLwWuArk.mjs";
|
|
2
2
|
import { serve as serve$1, toNodeHandler as toNodeHandler$1 } from "srvx/node";
|
|
3
3
|
//#region src/_entries/node.ts
|
|
4
4
|
function serve(app, options) {
|
|
@@ -11,6 +11,6 @@ function toNodeHandler(app) {
|
|
|
11
11
|
return toNodeHandler$1(app.fetch.bind(app));
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
|
-
export { App, AppError, AppEvent, DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, LinearRouter, LruCache, MethodName, PathMatcher,
|
|
14
|
+
export { App, AppError, AppEvent, DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, LinearRouter, LruCache, MethodName, PathMatcher, 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, toNodeHandler, toResponse, useRequestNegotiator };
|
|
15
15
|
|
|
16
16
|
//# sourceMappingURL=node.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AppOptions, $t as
|
|
1
|
+
import { $ as AppOptions, $t as DispatcherEvent, A as sendFormat, At as NodeMiddleware, B as setResponseHeaderAttachment, Bt as HandlerBaseOptions, C as getRequestAcceptableContentTypes, Ct as isWebHandlerProvider, D as setResponseContentTypeByFileName, Dt as fromNodeHandler, E as toResponse, Et as WebHandlerProvider, F as SendFileStats, Ft as HandlerOptions, G as EventStreamHandle, Gt as IPathMatcher, H as appendResponseHeader, Ht as HandlerErrorListener, I as sendFile, It as defineErrorHandler, J as EventStreamListener, Jt as PathMatcherOptions, K as EventStreamOptions, Kt as Path, L as sendCreated, Lt as ErrorHandler, M as SendFileContentOptions, Mt as CoreHandler, N as SendFileDisposition, Nt as CoreHandlerOptions, O as sendStream, Ot as fromNodeMiddleware, P as SendFileOptions, Pt as Handler, Q as AppContext, Qt as HandlerType, R as sendAccepted, Rt as ErrorHandlerOptions, S as getRequestAcceptableContentType, St as isWebHandler, T as isRequestCacheable, Tt as WebHandler, U as appendResponseHeaderDirective, Ut as isPath, V as setResponseHeaderInline, Vt as HandlerBeforeListener, W as serializeEventStreamMessage, Wt as PathMatcher, X as ResponseCacheHeadersOptions, Xt as createError, Y as EventStreamMessage, Yt as isError, Z as setResponseCacheHeaders, Zt as HandlerSymbol, _ as getRequestAcceptableLanguages, _t as PluginError, a as SmartRouter, an as AppResponse, at as Route, b as getRequestAcceptableCharset, bt as isHandler, c as RequestProtocolOptions, cn as HeaderName, ct as LruCacheOptions, d as RequestIpOptions, dn as AppError, dt as Plugin, en as IDispatcher, et as AppOptionsInput, f as getRequestIP, fn as ErrorSymbol, ft as PluginInstallContext, g as getRequestAcceptableLanguage, gt as isPluginError, h as matchRequestContentType, ht as PluginInstallError, i as TrieRouter, in as AppRequest, it as ObjectLiteral, j as SendFileContent, jt as defineCoreHandler, k as sendRedirect, kt as NodeHandler, l as getRequestProtocol, ln as MethodName, lt as ICache, m as getRequestHostName, mt as PluginNotInstalledError, n as App, nn as AppEvent, nt as BaseRouterOptions, o as SmartRouterOptions, on as IAppEvent, ot as RouteMatch, p as RequestHostNameOptions, pn as HTTPErrorInput, pt as PluginInstallFn, q as createEventStream, qt as PathMatcherExecResult, r as buildRoutePathMatcher, rn as AppEventCreateContext, rt as IRouter, s as LinearRouter, sn as NextFn, st as LruCache, t as normalizeAppOptions, tn as IDispatcherEvent, tt as IApp, u as useRequestNegotiator, un as MethodNameLike, ut as isPlugin, v as getRequestAcceptableEncoding, vt as PluginErrorCode, w as getRequestHeader, wt as fromWebHandler, x as getRequestAcceptableCharsets, xt as isHandlerOptions, y as getRequestAcceptableEncodings, yt as matchHandlerMethod, z as setResponseHeaderContentType, zt as HandlerAfterListener } from "./index-BeNEpRff.mjs";
|
|
2
2
|
import * as _$srvx from "srvx";
|
|
3
3
|
import { ServerOptions } from "srvx";
|
|
4
4
|
import * as _$srvx_service_worker0 from "srvx/service-worker";
|
|
@@ -6,5 +6,5 @@ import * as _$srvx_service_worker0 from "srvx/service-worker";
|
|
|
6
6
|
//#region src/_entries/service-worker.d.ts
|
|
7
7
|
declare function serve(app: IApp, options?: Omit<ServerOptions, 'fetch'>): _$srvx.Server<_$srvx_service_worker0.ServiceWorkerHandler>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { App, AppContext, AppError, AppEvent, AppEventCreateContext, AppOptions, AppOptionsInput,
|
|
9
|
+
export { App, AppContext, AppError, AppEvent, AppEventCreateContext, AppOptions, AppOptionsInput, AppRequest, AppResponse, BaseRouterOptions, CoreHandler, CoreHandlerOptions, DispatcherEvent, ErrorHandler, ErrorHandlerOptions, ErrorSymbol, EventStreamHandle, EventStreamListener, EventStreamMessage, EventStreamOptions, HTTPErrorInput, Handler, HandlerAfterListener, HandlerBaseOptions, HandlerBeforeListener, HandlerErrorListener, HandlerOptions, HandlerSymbol, HandlerType, HeaderName, IApp, IAppEvent, ICache, IDispatcher, IDispatcherEvent, IPathMatcher, IRouter, LinearRouter, LruCache, LruCacheOptions, MethodName, MethodNameLike, NextFn, NodeHandler, NodeMiddleware, ObjectLiteral, Path, PathMatcher, PathMatcherExecResult, PathMatcherOptions, Plugin, PluginError, PluginErrorCode, PluginInstallContext, PluginInstallError, PluginInstallFn, PluginNotInstalledError, RequestHostNameOptions, RequestIpOptions, RequestProtocolOptions, ResponseCacheHeadersOptions, Route, 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 };
|
|
10
10
|
//# sourceMappingURL=service-worker.d.mts.map
|
package/dist/service-worker.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as setResponseHeaderContentType, A as isWebHandler, B as sendStream, C as getRequestAcceptableCharset, D as isHandler, E as matchHandlerMethod, F as defineCoreHandler, G as useRequestNegotiator, H as sendFormat, I as Handler, J as sendCreated, K as getRequestHeader, L as HandlerSymbol, M as fromNodeHandler, N as fromNodeMiddleware, O as isHandlerOptions, P as defineErrorHandler, Q as isError, R as HandlerType, S as getRequestAcceptableEncodings, T as isRequestCacheable, U as getRequestAcceptableContentType, V as sendRedirect, W as getRequestAcceptableContentTypes, X as toResponse, Y as sendAccepted, Z as createError, _ as getRequestHostName, a as LinearRouter, at as createEventStream, b as getRequestAcceptableLanguages, c as PluginNotInstalledError, ct as ErrorSymbol, d as isPluginError, dt as HeaderName, et as setResponseHeaderAttachment, f as PluginErrorCode, ft as MethodName, g as getRequestIP, h as getRequestProtocol, i as TrieRouter, it as appendResponseHeaderDirective, j as isWebHandlerProvider, k as fromWebHandler, l as PluginInstallError, lt as setResponseCacheHeaders, m as PathMatcher, n as normalizeAppOptions, nt as setResponseContentTypeByFileName, o as buildRoutePathMatcher, ot as serializeEventStreamMessage, p as isPath, pt as LruCache, q as sendFile, r as SmartRouter, rt as appendResponseHeader, s as isPlugin, st as AppError, t as App, tt as setResponseHeaderInline, u as PluginError, ut as AppEvent, v as matchRequestContentType, w as getRequestAcceptableCharsets, x as getRequestAcceptableEncoding, y as getRequestAcceptableLanguage, z as DispatcherEvent } from "./src-KLwWuArk.mjs";
|
|
2
2
|
import { serve as serve$1 } from "srvx/service-worker";
|
|
3
3
|
//#region src/_entries/service-worker.ts
|
|
4
4
|
function serve(app, options) {
|
|
@@ -8,6 +8,6 @@ function serve(app, options) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { App, AppError, AppEvent, DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, LinearRouter, LruCache, MethodName, PathMatcher,
|
|
11
|
+
export { App, AppError, AppEvent, DispatcherEvent, ErrorSymbol, Handler, HandlerSymbol, HandlerType, HeaderName, LinearRouter, LruCache, MethodName, PathMatcher, 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=service-worker.mjs.map
|