@midwayjs/validate 3.10.3 → 3.10.5

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.
@@ -30,7 +30,7 @@ let ValidateConfiguration = class ValidateConfiguration {
30
30
  await container.getAsync(pipe_1.ParseIntPipe);
31
31
  await container.getAsync(pipe_1.ParseBoolPipe);
32
32
  await container.getAsync(pipe_1.ParseFloatPipe);
33
- await container.getAsync(pipe_1.DefaultValidPipe);
33
+ await container.getAsync(pipe_1.DecoratorValidPipe);
34
34
  this.decoratorService.registerParameterHandler(constants_1.VALID_KEY, ({ parameterIndex, originParamType, originArgs, metadata }) => {
35
35
  if (!metadata.schema) {
36
36
  metadata.schema = this.validateService.getSchema(originParamType);
@@ -8,7 +8,7 @@ function Valid(schema) {
8
8
  return (0, core_1.createCustomParamDecorator)(constants_1.VALID_KEY, {
9
9
  schema,
10
10
  }, {
11
- pipes: [pipe_1.DefaultValidPipe],
11
+ pipes: [pipe_1.DecoratorValidPipe],
12
12
  });
13
13
  }
14
14
  exports.Valid = Valid;
package/dist/pipe.d.ts CHANGED
@@ -16,7 +16,7 @@ export declare class ValidationPipe extends AbstractValidationPipe {
16
16
  declare abstract class ParsePipe extends AbstractValidationPipe {
17
17
  transform(value: any, options: TransformOptions): any;
18
18
  }
19
- export declare class DefaultValidPipe extends ParsePipe {
19
+ export declare class DecoratorValidPipe extends ParsePipe {
20
20
  }
21
21
  export declare class ParseIntPipe extends ParsePipe {
22
22
  getSchema(): Joi.AnySchema<any>;
package/dist/pipe.js CHANGED
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DefaultValuePipe = exports.ParseFloatPipe = exports.ParseBoolPipe = exports.ParseIntPipe = exports.DefaultValidPipe = exports.ValidationPipe = exports.AbstractValidationPipe = void 0;
12
+ exports.DefaultValuePipe = exports.ParseFloatPipe = exports.ParseBoolPipe = exports.ParseIntPipe = exports.DecoratorValidPipe = exports.ValidationPipe = exports.AbstractValidationPipe = void 0;
13
13
  const core_1 = require("@midwayjs/core");
14
14
  const service_1 = require("./service");
15
15
  const i18n = require("@midwayjs/i18n");
@@ -69,12 +69,12 @@ class ParsePipe extends AbstractValidationPipe {
69
69
  return this.validateWithSchema(value, options, options.metadata['schema'] || this.getSchema());
70
70
  }
71
71
  }
72
- let DefaultValidPipe = class DefaultValidPipe extends ParsePipe {
72
+ let DecoratorValidPipe = class DecoratorValidPipe extends ParsePipe {
73
73
  };
74
- DefaultValidPipe = __decorate([
74
+ DecoratorValidPipe = __decorate([
75
75
  (0, core_1.Pipe)()
76
- ], DefaultValidPipe);
77
- exports.DefaultValidPipe = DefaultValidPipe;
76
+ ], DecoratorValidPipe);
77
+ exports.DecoratorValidPipe = DecoratorValidPipe;
78
78
  let ParseIntPipe = class ParseIntPipe extends ParsePipe {
79
79
  getSchema() {
80
80
  return Joi.number().integer().required();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/validate",
3
- "version": "3.10.3",
3
+ "version": "3.10.5",
4
4
  "description": "Midway Component for mongoose",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -23,14 +23,14 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "@midwayjs/i18n": "^3.10.3",
26
+ "@midwayjs/i18n": "^3.10.5",
27
27
  "joi": "^17.2.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@midwayjs/core": "^3.10.3",
31
- "@midwayjs/express": "^3.10.3",
32
- "@midwayjs/koa": "^3.10.3",
33
- "@midwayjs/mock": "^3.10.3"
30
+ "@midwayjs/core": "^3.10.5",
31
+ "@midwayjs/express": "^3.10.5",
32
+ "@midwayjs/koa": "^3.10.5",
33
+ "@midwayjs/mock": "^3.10.5"
34
34
  },
35
- "gitHead": "de41ae38b72167c2a652d6eae5cfd8026c32c214"
35
+ "gitHead": "954706740b76dfabac9993a3cd6f4a504969a554"
36
36
  }