@kevisual/router 0.0.25 → 0.0.26-alpha

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Schema } from 'zod';
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) => Schema;
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]: Schema<any>;
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]: Schema<any>;
187
+ [key: string]: any;
188
188
  };
189
189
  data?: any;
190
190
  /**