@jayfong/x-server 2.44.0 → 2.45.0

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.
@@ -149,7 +149,8 @@ class Handler {
149
149
  });
150
150
  };
151
151
  if (options.requestDataSchemaVae) {
152
- this.requestDataSchemaVae = typeof options.requestDataSchemaVae === 'function' ? options.requestDataSchemaVae(vae.v) : options.requestDataSchemaVae;
152
+ const res = typeof options.requestDataSchemaVae === 'function' ? options.requestDataSchemaVae(new vae.VaeSchemaBuilder()) : options.requestDataSchemaVae;
153
+ this.requestDataSchemaVae = res instanceof vae.VaeSchema ? res : new vae.VaeObjectSchema(res);
153
154
  } else if (options.requestDataSchema) {
154
155
  this.requestDataSchema = options.requestDataSchema(_validator.yup);
155
156
  }
@@ -143,7 +143,8 @@ export class Handler {
143
143
  });
144
144
  };
145
145
  if (options.requestDataSchemaVae) {
146
- this.requestDataSchemaVae = typeof options.requestDataSchemaVae === 'function' ? options.requestDataSchemaVae(vae.v) : options.requestDataSchemaVae;
146
+ const res = typeof options.requestDataSchemaVae === 'function' ? options.requestDataSchemaVae(new vae.VaeSchemaBuilder()) : options.requestDataSchemaVae;
147
+ this.requestDataSchemaVae = res instanceof vae.VaeSchema ? res : new vae.VaeObjectSchema(res);
147
148
  } else if (options.requestDataSchema) {
148
149
  this.requestDataSchema = options.requestDataSchema(yup);
149
150
  }
@@ -149,7 +149,7 @@ export declare namespace XHandler {
149
149
  /**
150
150
  * 请求数据验证结构(vae)
151
151
  */
152
- requestDataSchemaVae?: vae.VaeSchemaOf<TReqData> | ((_: typeof vae.v) => vae.VaeSchemaOf<TReqData>);
152
+ requestDataSchemaVae?: vae.VaeSchemaOf<TReqData> | ((_: vae.VaeSchemaBuilder<TReqData>) => vae.VaeSchemaOf<TReqData> | vae.VaeObjectSchemaShapeOf<TReqData>);
153
153
  /**
154
154
  * 处理器
155
155
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "2.44.0",
3
+ "version": "2.45.0",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",
@@ -69,7 +69,7 @@
69
69
  "tsx": "^4.6.2",
70
70
  "utf-8-validate": "^5.0.9",
71
71
  "vscode-generate-index-standalone": "^1.7.1",
72
- "vtils": "^4.95.0",
72
+ "vtils": "^4.114.0",
73
73
  "yaml": "^2.3.1",
74
74
  "yargs": "^17.4.1"
75
75
  },