@kevisual/router 0.0.36 → 0.0.37
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/router-browser.d.ts +3 -2
- package/dist/router-browser.js +3 -3
- package/dist/router.d.ts +9 -3
- package/dist/router.js +5 -5
- package/package.json +2 -2
- package/src/app.ts +2 -2
- package/src/route.ts +3 -3
package/dist/router-browser.d.ts
CHANGED
|
@@ -341,8 +341,9 @@ declare class QueryRouterServer extends QueryRouter {
|
|
|
341
341
|
* @param param0
|
|
342
342
|
* @returns
|
|
343
343
|
*/
|
|
344
|
-
run(
|
|
345
|
-
|
|
344
|
+
run(msg: {
|
|
345
|
+
id?: string;
|
|
346
|
+
path?: string;
|
|
346
347
|
key?: string;
|
|
347
348
|
payload?: any;
|
|
348
349
|
}, ctx?: RouteContext & {
|
package/dist/router-browser.js
CHANGED
|
@@ -707,13 +707,13 @@ class QueryRouterServer extends QueryRouter {
|
|
|
707
707
|
* @param param0
|
|
708
708
|
* @returns
|
|
709
709
|
*/
|
|
710
|
-
async run(
|
|
710
|
+
async run(msg, ctx) {
|
|
711
711
|
const handle = this.handle;
|
|
712
712
|
if (handle) {
|
|
713
|
-
const result = await this.call(
|
|
713
|
+
const result = await this.call(msg, ctx);
|
|
714
714
|
return handle(result);
|
|
715
715
|
}
|
|
716
|
-
return super.run(
|
|
716
|
+
return super.run(msg, ctx);
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
719
|
class Mini extends QueryRouterServer {
|
package/dist/router.d.ts
CHANGED
|
@@ -345,8 +345,9 @@ declare class QueryRouterServer extends QueryRouter {
|
|
|
345
345
|
* @param param0
|
|
346
346
|
* @returns
|
|
347
347
|
*/
|
|
348
|
-
run(
|
|
349
|
-
|
|
348
|
+
run(msg: {
|
|
349
|
+
id?: string;
|
|
350
|
+
path?: string;
|
|
350
351
|
key?: string;
|
|
351
352
|
payload?: any;
|
|
352
353
|
}, ctx?: RouteContext & {
|
|
@@ -709,7 +710,12 @@ declare class App<U = {}> {
|
|
|
709
710
|
data: any;
|
|
710
711
|
message: any;
|
|
711
712
|
}>;
|
|
712
|
-
run(
|
|
713
|
+
run(msg: {
|
|
714
|
+
id?: string;
|
|
715
|
+
path?: string;
|
|
716
|
+
key?: string;
|
|
717
|
+
payload?: any;
|
|
718
|
+
}, ctx?: AppRouteContext<U> & {
|
|
713
719
|
[key: string]: any;
|
|
714
720
|
}): Promise<{
|
|
715
721
|
code: any;
|
package/dist/router.js
CHANGED
|
@@ -729,13 +729,13 @@ class QueryRouterServer extends QueryRouter {
|
|
|
729
729
|
* @param param0
|
|
730
730
|
* @returns
|
|
731
731
|
*/
|
|
732
|
-
async run(
|
|
732
|
+
async run(msg, ctx) {
|
|
733
733
|
const handle = this.handle;
|
|
734
734
|
if (handle) {
|
|
735
|
-
const result = await this.call(
|
|
735
|
+
const result = await this.call(msg, ctx);
|
|
736
736
|
return handle(result);
|
|
737
737
|
}
|
|
738
|
-
return super.run(
|
|
738
|
+
return super.run(msg, ctx);
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
class Mini extends QueryRouterServer {
|
|
@@ -10331,8 +10331,8 @@ class App {
|
|
|
10331
10331
|
async queryRoute(path, key, payload, ctx) {
|
|
10332
10332
|
return await this.router.queryRoute({ path, key, payload }, ctx);
|
|
10333
10333
|
}
|
|
10334
|
-
async run(
|
|
10335
|
-
return await this.router.run(
|
|
10334
|
+
async run(msg, ctx) {
|
|
10335
|
+
return await this.router.run(msg, ctx);
|
|
10336
10336
|
}
|
|
10337
10337
|
exportRoutes() {
|
|
10338
10338
|
return this.router.exportRoutes();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@kevisual/router",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.37",
|
|
5
5
|
"description": "",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/router.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
29
29
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
30
30
|
"@types/lodash-es": "^4.17.12",
|
|
31
|
-
"@types/node": "^24.10.
|
|
31
|
+
"@types/node": "^24.10.2",
|
|
32
32
|
"@types/send": "^1.2.1",
|
|
33
33
|
"@types/ws": "^8.18.1",
|
|
34
34
|
"@types/xml2js": "^0.4.14",
|
package/src/app.ts
CHANGED
|
@@ -107,8 +107,8 @@ export class App<U = {}> {
|
|
|
107
107
|
async queryRoute(path: string, key?: string, payload?: any, ctx?: AppRouteContext<U> & { [key: string]: any }) {
|
|
108
108
|
return await this.router.queryRoute({ path, key, payload }, ctx);
|
|
109
109
|
}
|
|
110
|
-
async run(
|
|
111
|
-
return await this.router.run(
|
|
110
|
+
async run(msg: { id?: string, path?: string; key?: string; payload?: any }, ctx?: AppRouteContext<U> & { [key: string]: any }) {
|
|
111
|
+
return await this.router.run(msg, ctx);
|
|
112
112
|
}
|
|
113
113
|
exportRoutes() {
|
|
114
114
|
return this.router.exportRoutes();
|
package/src/route.ts
CHANGED
|
@@ -655,13 +655,13 @@ export class QueryRouterServer extends QueryRouter {
|
|
|
655
655
|
* @param param0
|
|
656
656
|
* @returns
|
|
657
657
|
*/
|
|
658
|
-
async run({
|
|
658
|
+
async run(msg: { id?: string; path?: string; key?: string; payload?: any }, ctx?: RouteContext & { [key: string]: any }) {
|
|
659
659
|
const handle = this.handle;
|
|
660
660
|
if (handle) {
|
|
661
|
-
const result = await this.call(
|
|
661
|
+
const result = await this.call(msg, ctx);
|
|
662
662
|
return handle(result);
|
|
663
663
|
}
|
|
664
|
-
return super.run(
|
|
664
|
+
return super.run(msg, ctx);
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
|