@esportsplus/routing 0.3.0 → 0.3.1
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/build/browser.d.ts +1 -1
- package/build/browser.js +2 -2
- package/package.json +4 -4
- package/src/browser.ts +2 -2
package/build/browser.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const _default: <T, TRoutes extends RouteRegistry = {}>(instance?: Route
|
|
|
6
6
|
back: typeof back;
|
|
7
7
|
forward: typeof forward;
|
|
8
8
|
middleware: {
|
|
9
|
-
(...middleware: Middleware<T>[]): T
|
|
9
|
+
(...middleware: Middleware<T>[]): import("@esportsplus/pipeline").Pipeline<Request<T>, T>;
|
|
10
10
|
dispatch(request: Request<T>): T;
|
|
11
11
|
match(fallback: Route<T>): (request: Request<T>, next: Next<T>) => T;
|
|
12
12
|
};
|
package/build/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { effect, reactive, root } from '@esportsplus/reactivity';
|
|
2
|
-
import
|
|
2
|
+
import pipeline from '@esportsplus/pipeline';
|
|
3
3
|
import factory from './router/index.js';
|
|
4
4
|
let cache = [], location = window.location;
|
|
5
5
|
function back() {
|
|
@@ -42,7 +42,7 @@ function match(request, router, subdomain) {
|
|
|
42
42
|
}
|
|
43
43
|
function middleware(request, router) {
|
|
44
44
|
function host(...middleware) {
|
|
45
|
-
return
|
|
45
|
+
return pipeline(middleware);
|
|
46
46
|
}
|
|
47
47
|
;
|
|
48
48
|
host.dispatch = (request) => {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "ICJR",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@esportsplus/pipeline": "^1.
|
|
5
|
-
"@esportsplus/reactivity": "^0.
|
|
6
|
-
"@esportsplus/utilities": "^0.
|
|
4
|
+
"@esportsplus/pipeline": "^1.2.0",
|
|
5
|
+
"@esportsplus/reactivity": "^0.22.1",
|
|
6
|
+
"@esportsplus/utilities": "^0.26.0"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@esportsplus/typescript": "^0.9.2"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"type": "module",
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"types": "./build/index.d.ts",
|
|
21
|
-
"version": "0.3.
|
|
21
|
+
"version": "0.3.1",
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsc && tsc-alias",
|
|
24
24
|
"-": "-",
|
package/src/browser.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { effect, reactive, root } from '@esportsplus/reactivity';
|
|
2
|
-
import
|
|
2
|
+
import pipeline from '@esportsplus/pipeline';
|
|
3
3
|
import { Middleware, Next, PathParamsTuple, Request, Route, Router, RouteRegistry } from './types';
|
|
4
4
|
import { Router as RouterClass } from './router';
|
|
5
5
|
import factory from './router';
|
|
@@ -63,7 +63,7 @@ function match<T>(request: Request<T>, router: Router<T>, subdomain?: string) {
|
|
|
63
63
|
|
|
64
64
|
function middleware<T>(request: Request<T>, router: Router<T>) {
|
|
65
65
|
function host(...middleware: Middleware<T>[]) {
|
|
66
|
-
return
|
|
66
|
+
return pipeline(middleware);
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
host.dispatch = (request: Request<T>) => {
|