@nestia/core 1.6.2 → 1.6.3

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.
@@ -2,7 +2,7 @@ import { IRequestBodyValidator } from "../options/IRequestBodyValidator";
2
2
  /**
3
3
  * Type safe body decorator.
4
4
  *
5
- * `TypedBody` is a decoratur function getting `application/json` typed data from
5
+ * `TypedBody` is a decorator function getting `application/json` typed data from
6
6
  * request body. Also, it validates the request body data type through
7
7
  * [typia](https://github.com/samchon/typia) and the validation speed is
8
8
  * maximum 20,000x times faster than `class-validator`.
@@ -7,7 +7,7 @@ var validate_request_body_1 = require("./internal/validate_request_body");
7
7
  /**
8
8
  * Type safe body decorator.
9
9
  *
10
- * `TypedBody` is a decoratur function getting `application/json` typed data from
10
+ * `TypedBody` is a decorator function getting `application/json` typed data from
11
11
  * request body. Also, it validates the request body data type through
12
12
  * [typia](https://github.com/samchon/typia) and the validation speed is
13
13
  * maximum 20,000x times faster than `class-validator`.
@@ -19,7 +19,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.ExceptionManager = void 0;
20
20
  var fetcher_1 = require("@nestia/fetcher");
21
21
  var common_1 = require("@nestjs/common");
22
- var typia_1 = require("typia");
23
22
  /**
24
23
  * Exception manager for HTTP server.
25
24
  *
@@ -97,13 +96,6 @@ var ExceptionManager;
97
96
  */
98
97
  ExceptionManager.listeners = new Set();
99
98
  })(ExceptionManager || (exports.ExceptionManager = ExceptionManager = {}));
100
- ExceptionManager.insert(typia_1.TypeGuardError, function (error) {
101
- return new common_1.HttpException({
102
- path: error.path,
103
- reason: error.message,
104
- message: "Request message is not following the promised type.",
105
- }, 400);
106
- });
107
99
  ExceptionManager.insert(fetcher_1.HttpError, function (error) {
108
100
  return new common_1.HttpException({
109
101
  path: error.path,
@@ -1 +1 @@
1
- {"version":3,"file":"ExceptionManager.js","sourceRoot":"","sources":["../../src/utils/ExceptionManager.ts"],"names":[],"mappings":";;;;;;;;;;;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BAAS,GAA6B,IAAI,GAAG,EAAE,CAAC;AACjE,CAAC,EAtEgB,gBAAgB,gCAAhB,gBAAgB,QAsEhC;AAED,gBAAgB,CAAC,MAAM,CACnB,mBAAS,EACT,UAAC,KAAK;IACF,OAAA,IAAI,sBAAa,CACb;QACI,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO;KACzB,EACD,KAAK,CAAC,MAAM,CACf;AAND,CAMC,CACR,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/core",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "Super-fast validation decorators of NestJS",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "homepage": "https://nestia.io",
36
36
  "dependencies": {
37
- "@nestia/fetcher": "^1.6.2",
37
+ "@nestia/fetcher": "^1.6.3",
38
38
  "@nestjs/common": ">= 7.0.1",
39
39
  "@nestjs/core": ">= 7.0.1",
40
40
  "@nestjs/platform-express": ">= 7.0.1",
@@ -47,7 +47,7 @@
47
47
  "typia": "^4.2.1"
48
48
  },
49
49
  "peerDependencies": {
50
- "@nestia/fetcher": ">= 1.6.2",
50
+ "@nestia/fetcher": ">= 1.6.3",
51
51
  "@nestjs/common": ">= 7.0.1",
52
52
  "@nestjs/core": ">= 7.0.1",
53
53
  "@nestjs/platform-express": ">= 7.0.1",
@@ -14,7 +14,7 @@ import { validate_request_body } from "./internal/validate_request_body";
14
14
  /**
15
15
  * Type safe body decorator.
16
16
  *
17
- * `TypedBody` is a decoratur function getting `application/json` typed data from
17
+ * `TypedBody` is a decorator function getting `application/json` typed data from
18
18
  * request body. Also, it validates the request body data type through
19
19
  * [typia](https://github.com/samchon/typia) and the validation speed is
20
20
  * maximum 20,000x times faster than `class-validator`.
@@ -1,6 +1,5 @@
1
1
  import { HttpError } from "@nestia/fetcher";
2
2
  import { HttpException } from "@nestjs/common";
3
- import { TypeGuardError } from "typia";
4
3
 
5
4
  import { Creator } from "../typings/Creator";
6
5
 
@@ -100,19 +99,6 @@ export namespace ExceptionManager {
100
99
  export const listeners: Set<(error: any) => any> = new Set();
101
100
  }
102
101
 
103
- ExceptionManager.insert(
104
- TypeGuardError,
105
- (error) =>
106
- new HttpException(
107
- {
108
- path: error.path,
109
- reason: error.message,
110
- message: "Request message is not following the promised type.",
111
- },
112
- 400,
113
- ),
114
- );
115
-
116
102
  ExceptionManager.insert(
117
103
  HttpError,
118
104
  (error) =>