@nestjs/common 9.3.1 → 9.3.2
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/constants.d.ts +1 -1
- package/exceptions/http.exception.js +2 -2
- package/index.js +1 -1
- package/package.json +2 -2
- package/pipes/validation.pipe.js +2 -1
package/constants.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare const ENHANCER_KEY_TO_SUBTYPE_MAP: {
|
|
|
31
31
|
readonly __pipes__: "pipe";
|
|
32
32
|
readonly __exceptionFilters__: "filter";
|
|
33
33
|
};
|
|
34
|
-
export type EnhancerSubtype = typeof ENHANCER_KEY_TO_SUBTYPE_MAP[keyof typeof ENHANCER_KEY_TO_SUBTYPE_MAP];
|
|
34
|
+
export type EnhancerSubtype = (typeof ENHANCER_KEY_TO_SUBTYPE_MAP)[keyof typeof ENHANCER_KEY_TO_SUBTYPE_MAP];
|
|
35
35
|
export declare const RENDER_METADATA = "__renderTemplate__";
|
|
36
36
|
export declare const HTTP_CODE_METADATA = "__httpCode__";
|
|
37
37
|
export declare const MODULE_PATH = "__module_path__";
|
|
@@ -85,8 +85,8 @@ class HttpException extends Error {
|
|
|
85
85
|
this.message = this.response.message;
|
|
86
86
|
}
|
|
87
87
|
else if (this.constructor) {
|
|
88
|
-
this.message =
|
|
89
|
-
.match(/[A-Z][a-z]+|[0-9]+/g)) === null || _a === void 0 ? void 0 : _a.join(' ')) !== null && _b !== void 0 ? _b : 'Error';
|
|
88
|
+
this.message =
|
|
89
|
+
(_b = (_a = this.constructor.name.match(/[A-Z][a-z]+|[0-9]+/g)) === null || _a === void 0 ? void 0 : _a.join(' ')) !== null && _b !== void 0 ? _b : 'Error';
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
initName() {
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/common",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.2",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"homepage": "https://nestjs.com",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"iterare": "1.2.1",
|
|
21
|
-
"tslib": "2.
|
|
21
|
+
"tslib": "2.5.0",
|
|
22
22
|
"uid": "2.0.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
package/pipes/validation.pipe.js
CHANGED
|
@@ -21,8 +21,9 @@ let ValidationPipe = class ValidationPipe {
|
|
|
21
21
|
constructor(options) {
|
|
22
22
|
options = options || {};
|
|
23
23
|
const { transform, disableErrorMessages, errorHttpStatusCode, expectedType, transformOptions, validateCustomDecorators } = options, validatorOptions = tslib_1.__rest(options, ["transform", "disableErrorMessages", "errorHttpStatusCode", "expectedType", "transformOptions", "validateCustomDecorators"]);
|
|
24
|
+
// @see https://github.com/nestjs/nest/issues/10683#issuecomment-1413690508
|
|
25
|
+
this.validatorOptions = Object.assign({ forbidUnknownValues: false }, validatorOptions);
|
|
24
26
|
this.isTransformEnabled = !!transform;
|
|
25
|
-
this.validatorOptions = validatorOptions;
|
|
26
27
|
this.transformOptions = transformOptions;
|
|
27
28
|
this.isDetailedOutputDisabled = disableErrorMessages;
|
|
28
29
|
this.validateCustomDecorators = validateCustomDecorators || false;
|