@kevisual/router 0.0.25 → 0.0.26-alpha.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/dist/router-browser.d.ts +7 -6
- package/dist/router-browser.js +3152 -21606
- package/dist/router.d.ts +4 -4
- package/dist/router.js +3198 -21652
- package/package.json +9 -25
- package/src/auto/listen-sock.ts +1 -1
- package/src/route.ts +5 -10
- package/src/sign.ts +1 -1
- package/src/validator/index.ts +4 -1
- package/src/validator/rule.ts +2 -3
- package/dist/router-sign.d.ts +0 -16
- package/dist/router-sign.js +0 -28662
- package/dist/router-simple-lib.d.ts +0 -3
- package/dist/router-simple-lib.js +0 -35
- package/src/io.ts +0 -6
package/dist/router.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export { Schema } from 'zod';
|
|
3
3
|
import http, { IncomingMessage, ServerResponse } from 'node:http';
|
|
4
4
|
import https from 'node:https';
|
|
@@ -41,7 +41,7 @@ type RuleAny = {
|
|
|
41
41
|
type: 'any';
|
|
42
42
|
} & BaseRule;
|
|
43
43
|
type Rule = RuleString | RuleNumber | RuleBoolean | RuleArray | RuleObject | RuleAny;
|
|
44
|
-
declare const createSchema: (rule: Rule) =>
|
|
44
|
+
declare const createSchema: (rule: Rule) => z.ZodType<any, any, any>;
|
|
45
45
|
|
|
46
46
|
type RouterContextT = {
|
|
47
47
|
code?: number;
|
|
@@ -143,7 +143,7 @@ type RouteOpts = {
|
|
|
143
143
|
[key: string]: Rule;
|
|
144
144
|
};
|
|
145
145
|
schema?: {
|
|
146
|
-
[key: string]:
|
|
146
|
+
[key: string]: any;
|
|
147
147
|
};
|
|
148
148
|
isVerify?: boolean;
|
|
149
149
|
verify?: (ctx?: RouteContext, dev?: boolean) => boolean;
|
|
@@ -184,7 +184,7 @@ declare class Route<U = {
|
|
|
184
184
|
type?: string;
|
|
185
185
|
private _validator?;
|
|
186
186
|
schema?: {
|
|
187
|
-
[key: string]:
|
|
187
|
+
[key: string]: any;
|
|
188
188
|
};
|
|
189
189
|
data?: any;
|
|
190
190
|
/**
|