@nestjs/common 10.2.5 → 10.2.6
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/Readme.md +6 -3
- package/decorators/http/request-mapping.decorator.d.ts +1 -1
- package/decorators/http/request-mapping.decorator.js +1 -1
- package/module-utils/utils/get-injection-providers.util.js +1 -2
- package/package.json +1 -1
- package/pipes/default-value.pipe.js +2 -1
- package/pipes/file/parse-file.pipe.js +2 -1
- package/pipes/parse-array.pipe.js +2 -1
- package/pipes/parse-bool.pipe.js +2 -1
- package/pipes/parse-enum.pipe.js +2 -1
- package/pipes/parse-float.pipe.js +2 -1
- package/pipes/parse-int.pipe.js +2 -1
- package/pipes/parse-uuid.pipe.js +2 -1
- package/pipes/validation.pipe.js +2 -1
- package/serializer/class-serializer.interceptor.js +2 -1
- package/services/console-logger.service.js +2 -1
- package/services/logger.service.js +14 -13
package/Readme.md
CHANGED
|
@@ -89,7 +89,9 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
89
89
|
|
|
90
90
|
<table style="text-align:center;"><tr>
|
|
91
91
|
<td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/n-inc-logo.svg" width="120" valign="middle" /></td>
|
|
92
|
-
<td><a href="https://twistag.com/" target="_blank"><img src="https://nestjs.com/img/twistag-logo.png" width="120" valign="middle" /></td
|
|
92
|
+
<td><a href="https://twistag.com/" target="_blank"><img src="https://nestjs.com/img/twistag-logo.png" width="120" valign="middle" /></td>
|
|
93
|
+
<td><a href="https://immediateedgeapp.org/" target="_blank"><img src="https://nestjs.com/img/immediate-edge-logo.png" width="120" valign="middle" /></td>
|
|
94
|
+
</tr>
|
|
93
95
|
</table>
|
|
94
96
|
|
|
95
97
|
#### Sponsors
|
|
@@ -116,6 +118,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
116
118
|
<td align="center" valign="middle"><a href="https://www.hingehealth.com/" target="_blank"><img src="https://nestjs.com/img/hinge-health-logo.svg" width="100" valign="middle" /></a></td>
|
|
117
119
|
<td align="center" valign="middle"><a href="https://julienferand.dev/" target="_blank"><img src="https://nestjs.com/img/julienferand-logo.jpeg" width="65" valign="middle" /></a></td>
|
|
118
120
|
<td align="center" valign="middle"><a href="https://www.tripoffice.com/" target="_blank"><img src="https://nestjs.com/img/tripoffice-logo.png" width="140" valign="middle" /></a></td>
|
|
121
|
+
<td align="center" valign="middle"><a href="https://solcellsforetag.se/" target="_blank"><img src="https://nestjs.com/img/solcellsforetag-logo.svg" width="140" valign="middle" /></a></td>
|
|
119
122
|
</tr></table>
|
|
120
123
|
|
|
121
124
|
## Backers
|
|
@@ -124,9 +127,9 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
124
127
|
|
|
125
128
|
## Stay in touch
|
|
126
129
|
|
|
127
|
-
- Author - [Kamil Myśliwiec](https://
|
|
130
|
+
- Author - [Kamil Myśliwiec](https://x.com/kammysliwiec)
|
|
128
131
|
- Website - [https://nestjs.com](https://nestjs.com/)
|
|
129
|
-
-
|
|
132
|
+
- X - [@nestframework](https://x.com/nestframework)
|
|
130
133
|
|
|
131
134
|
## License
|
|
132
135
|
|
|
@@ -69,7 +69,7 @@ export declare const Head: (path?: string | string[]) => MethodDecorator;
|
|
|
69
69
|
*/
|
|
70
70
|
export declare const All: (path?: string | string[]) => MethodDecorator;
|
|
71
71
|
/**
|
|
72
|
-
* Route handler (method) Decorator. Routes
|
|
72
|
+
* Route handler (method) Decorator. Routes HTTP SEARCH requests to the specified path.
|
|
73
73
|
*
|
|
74
74
|
* @see [Routing](https://docs.nestjs.com/controllers#routing)
|
|
75
75
|
*
|
|
@@ -89,7 +89,7 @@ exports.Head = createMappingDecorator(request_method_enum_1.RequestMethod.HEAD);
|
|
|
89
89
|
*/
|
|
90
90
|
exports.All = createMappingDecorator(request_method_enum_1.RequestMethod.ALL);
|
|
91
91
|
/**
|
|
92
|
-
* Route handler (method) Decorator. Routes
|
|
92
|
+
* Route handler (method) Decorator. Routes HTTP SEARCH requests to the specified path.
|
|
93
93
|
*
|
|
94
94
|
* @see [Routing](https://docs.nestjs.com/controllers#routing)
|
|
95
95
|
*
|
|
@@ -27,8 +27,7 @@ function getInjectionProviders(providers, tokens) {
|
|
|
27
27
|
// get injection tokens of the matched providers, if any
|
|
28
28
|
search = match
|
|
29
29
|
.filter(p => p?.inject)
|
|
30
|
-
.
|
|
31
|
-
.flat()
|
|
30
|
+
.flatMap(p => p.inject)
|
|
32
31
|
.map(mapInjectToTokens);
|
|
33
32
|
}
|
|
34
33
|
return result;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ const shared_utils_1 = require("../utils/shared.utils");
|
|
|
11
11
|
*
|
|
12
12
|
* @publicApi
|
|
13
13
|
*/
|
|
14
|
-
let DefaultValuePipe =
|
|
14
|
+
let DefaultValuePipe = class DefaultValuePipe {
|
|
15
15
|
constructor(defaultValue) {
|
|
16
16
|
this.defaultValue = defaultValue;
|
|
17
17
|
}
|
|
@@ -23,6 +23,7 @@ let DefaultValuePipe = exports.DefaultValuePipe = class DefaultValuePipe {
|
|
|
23
23
|
return value;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
+
exports.DefaultValuePipe = DefaultValuePipe;
|
|
26
27
|
exports.DefaultValuePipe = DefaultValuePipe = tslib_1.__decorate([
|
|
27
28
|
(0, injectable_decorator_1.Injectable)(),
|
|
28
29
|
tslib_1.__metadata("design:paramtypes", [Object])
|
|
@@ -16,7 +16,7 @@ const shared_utils_1 = require("../../utils/shared.utils");
|
|
|
16
16
|
*
|
|
17
17
|
* @publicApi
|
|
18
18
|
*/
|
|
19
|
-
let ParseFilePipe =
|
|
19
|
+
let ParseFilePipe = class ParseFilePipe {
|
|
20
20
|
constructor(options = {}) {
|
|
21
21
|
const { exceptionFactory, errorHttpStatusCode = enums_1.HttpStatus.BAD_REQUEST, validators = [], fileIsRequired, } = options;
|
|
22
22
|
this.exceptionFactory =
|
|
@@ -68,6 +68,7 @@ let ParseFilePipe = exports.ParseFilePipe = class ParseFilePipe {
|
|
|
68
68
|
return this.validators;
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
+
exports.ParseFilePipe = ParseFilePipe;
|
|
71
72
|
exports.ParseFilePipe = ParseFilePipe = tslib_1.__decorate([
|
|
72
73
|
(0, core_1.Injectable)(),
|
|
73
74
|
tslib_1.__param(0, (0, core_1.Optional)()),
|
|
@@ -17,7 +17,7 @@ const DEFAULT_ARRAY_SEPARATOR = ',';
|
|
|
17
17
|
*
|
|
18
18
|
* @publicApi
|
|
19
19
|
*/
|
|
20
|
-
let ParseArrayPipe =
|
|
20
|
+
let ParseArrayPipe = class ParseArrayPipe {
|
|
21
21
|
constructor(options = {}) {
|
|
22
22
|
this.options = options;
|
|
23
23
|
this.validationPipe = new validation_pipe_1.ValidationPipe({
|
|
@@ -138,6 +138,7 @@ let ParseArrayPipe = exports.ParseArrayPipe = class ParseArrayPipe {
|
|
|
138
138
|
return originalValue;
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
+
exports.ParseArrayPipe = ParseArrayPipe;
|
|
141
142
|
exports.ParseArrayPipe = ParseArrayPipe = tslib_1.__decorate([
|
|
142
143
|
(0, injectable_decorator_1.Injectable)(),
|
|
143
144
|
tslib_1.__param(0, (0, optional_decorator_1.Optional)()),
|
package/pipes/parse-bool.pipe.js
CHANGED
|
@@ -14,7 +14,7 @@ const shared_utils_1 = require("../utils/shared.utils");
|
|
|
14
14
|
*
|
|
15
15
|
* @publicApi
|
|
16
16
|
*/
|
|
17
|
-
let ParseBoolPipe =
|
|
17
|
+
let ParseBoolPipe = class ParseBoolPipe {
|
|
18
18
|
constructor(options) {
|
|
19
19
|
this.options = options;
|
|
20
20
|
options = options || {};
|
|
@@ -59,6 +59,7 @@ let ParseBoolPipe = exports.ParseBoolPipe = class ParseBoolPipe {
|
|
|
59
59
|
return value === false || value === 'false';
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
+
exports.ParseBoolPipe = ParseBoolPipe;
|
|
62
63
|
exports.ParseBoolPipe = ParseBoolPipe = tslib_1.__decorate([
|
|
63
64
|
(0, injectable_decorator_1.Injectable)(),
|
|
64
65
|
tslib_1.__param(0, (0, optional_decorator_1.Optional)()),
|
package/pipes/parse-enum.pipe.js
CHANGED
|
@@ -13,7 +13,7 @@ const shared_utils_1 = require("../utils/shared.utils");
|
|
|
13
13
|
*
|
|
14
14
|
* @publicApi
|
|
15
15
|
*/
|
|
16
|
-
let ParseEnumPipe =
|
|
16
|
+
let ParseEnumPipe = class ParseEnumPipe {
|
|
17
17
|
constructor(enumType, options) {
|
|
18
18
|
this.enumType = enumType;
|
|
19
19
|
this.options = options;
|
|
@@ -47,6 +47,7 @@ let ParseEnumPipe = exports.ParseEnumPipe = class ParseEnumPipe {
|
|
|
47
47
|
return enumValues.includes(value);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
+
exports.ParseEnumPipe = ParseEnumPipe;
|
|
50
51
|
exports.ParseEnumPipe = ParseEnumPipe = tslib_1.__decorate([
|
|
51
52
|
(0, core_1.Injectable)(),
|
|
52
53
|
tslib_1.__param(1, (0, core_1.Optional)()),
|
|
@@ -13,7 +13,7 @@ const shared_utils_1 = require("../utils/shared.utils");
|
|
|
13
13
|
*
|
|
14
14
|
* @publicApi
|
|
15
15
|
*/
|
|
16
|
-
let ParseFloatPipe =
|
|
16
|
+
let ParseFloatPipe = class ParseFloatPipe {
|
|
17
17
|
constructor(options) {
|
|
18
18
|
this.options = options;
|
|
19
19
|
options = options || {};
|
|
@@ -48,6 +48,7 @@ let ParseFloatPipe = exports.ParseFloatPipe = class ParseFloatPipe {
|
|
|
48
48
|
isFinite(value));
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
+
exports.ParseFloatPipe = ParseFloatPipe;
|
|
51
52
|
exports.ParseFloatPipe = ParseFloatPipe = tslib_1.__decorate([
|
|
52
53
|
(0, core_1.Injectable)(),
|
|
53
54
|
tslib_1.__param(0, (0, core_1.Optional)()),
|
package/pipes/parse-int.pipe.js
CHANGED
|
@@ -14,7 +14,7 @@ const shared_utils_1 = require("../utils/shared.utils");
|
|
|
14
14
|
*
|
|
15
15
|
* @publicApi
|
|
16
16
|
*/
|
|
17
|
-
let ParseIntPipe =
|
|
17
|
+
let ParseIntPipe = class ParseIntPipe {
|
|
18
18
|
constructor(options) {
|
|
19
19
|
this.options = options;
|
|
20
20
|
options = options || {};
|
|
@@ -49,6 +49,7 @@ let ParseIntPipe = exports.ParseIntPipe = class ParseIntPipe {
|
|
|
49
49
|
isFinite(value));
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
+
exports.ParseIntPipe = ParseIntPipe;
|
|
52
53
|
exports.ParseIntPipe = ParseIntPipe = tslib_1.__decorate([
|
|
53
54
|
(0, injectable_decorator_1.Injectable)(),
|
|
54
55
|
tslib_1.__param(0, (0, optional_decorator_1.Optional)()),
|
package/pipes/parse-uuid.pipe.js
CHANGED
|
@@ -15,7 +15,7 @@ const shared_utils_1 = require("../utils/shared.utils");
|
|
|
15
15
|
*
|
|
16
16
|
* @publicApi
|
|
17
17
|
*/
|
|
18
|
-
let ParseUUIDPipe =
|
|
18
|
+
let ParseUUIDPipe = ParseUUIDPipe_1 = class ParseUUIDPipe {
|
|
19
19
|
constructor(options) {
|
|
20
20
|
this.options = options;
|
|
21
21
|
options = options || {};
|
|
@@ -42,6 +42,7 @@ let ParseUUIDPipe = exports.ParseUUIDPipe = ParseUUIDPipe_1 = class ParseUUIDPip
|
|
|
42
42
|
return pattern?.test(str);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
+
exports.ParseUUIDPipe = ParseUUIDPipe;
|
|
45
46
|
ParseUUIDPipe.uuidRegExps = {
|
|
46
47
|
3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
|
|
47
48
|
4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
package/pipes/validation.pipe.js
CHANGED
|
@@ -17,7 +17,7 @@ let classTransformer = {};
|
|
|
17
17
|
*
|
|
18
18
|
* @publicApi
|
|
19
19
|
*/
|
|
20
|
-
let ValidationPipe =
|
|
20
|
+
let ValidationPipe = class ValidationPipe {
|
|
21
21
|
constructor(options) {
|
|
22
22
|
options = options || {};
|
|
23
23
|
const { transform, disableErrorMessages, errorHttpStatusCode, expectedType, transformOptions, validateCustomDecorators, ...validatorOptions } = options;
|
|
@@ -195,6 +195,7 @@ let ValidationPipe = exports.ValidationPipe = class ValidationPipe {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
+
exports.ValidationPipe = ValidationPipe;
|
|
198
199
|
exports.ValidationPipe = ValidationPipe = tslib_1.__decorate([
|
|
199
200
|
(0, core_1.Injectable)(),
|
|
200
201
|
tslib_1.__param(0, (0, decorators_1.Optional)()),
|
|
@@ -16,7 +16,7 @@ const REFLECTOR = 'Reflector';
|
|
|
16
16
|
/**
|
|
17
17
|
* @publicApi
|
|
18
18
|
*/
|
|
19
|
-
let ClassSerializerInterceptor =
|
|
19
|
+
let ClassSerializerInterceptor = class ClassSerializerInterceptor {
|
|
20
20
|
constructor(reflector, defaultOptions = {}) {
|
|
21
21
|
this.reflector = reflector;
|
|
22
22
|
this.defaultOptions = defaultOptions;
|
|
@@ -68,6 +68,7 @@ let ClassSerializerInterceptor = exports.ClassSerializerInterceptor = class Clas
|
|
|
68
68
|
]);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
+
exports.ClassSerializerInterceptor = ClassSerializerInterceptor;
|
|
71
72
|
exports.ClassSerializerInterceptor = ClassSerializerInterceptor = tslib_1.__decorate([
|
|
72
73
|
(0, core_1.Injectable)(),
|
|
73
74
|
tslib_1.__param(0, (0, core_1.Inject)(REFLECTOR)),
|
|
@@ -23,7 +23,7 @@ const dateTimeFormatter = new Intl.DateTimeFormat(undefined, {
|
|
|
23
23
|
day: '2-digit',
|
|
24
24
|
month: '2-digit',
|
|
25
25
|
});
|
|
26
|
-
let ConsoleLogger =
|
|
26
|
+
let ConsoleLogger = ConsoleLogger_1 = class ConsoleLogger {
|
|
27
27
|
constructor(context, options = {}) {
|
|
28
28
|
this.context = context;
|
|
29
29
|
this.options = options;
|
|
@@ -239,6 +239,7 @@ let ConsoleLogger = exports.ConsoleLogger = ConsoleLogger_1 = class ConsoleLogge
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
};
|
|
242
|
+
exports.ConsoleLogger = ConsoleLogger;
|
|
242
243
|
exports.ConsoleLogger = ConsoleLogger = ConsoleLogger_1 = tslib_1.__decorate([
|
|
243
244
|
(0, core_1.Injectable)(),
|
|
244
245
|
tslib_1.__param(0, (0, core_1.Optional)()),
|
|
@@ -19,7 +19,7 @@ const dateTimeFormatter = new Intl.DateTimeFormat(undefined, {
|
|
|
19
19
|
/**
|
|
20
20
|
* @publicApi
|
|
21
21
|
*/
|
|
22
|
-
let Logger =
|
|
22
|
+
let Logger = Logger_1 = class Logger {
|
|
23
23
|
constructor(context, options = {}) {
|
|
24
24
|
this.context = context;
|
|
25
25
|
this.options = options;
|
|
@@ -147,6 +147,7 @@ let Logger = exports.Logger = Logger_1 = class Logger {
|
|
|
147
147
|
return this.localInstanceRef;
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
+
exports.Logger = Logger;
|
|
150
151
|
Logger.logBuffer = new Array();
|
|
151
152
|
Logger.staticInstanceRef = DEFAULT_LOGGER;
|
|
152
153
|
Logger.WrapBuffer = (target, propertyKey, descriptor) => {
|
|
@@ -163,73 +164,73 @@ Logger.WrapBuffer = (target, propertyKey, descriptor) => {
|
|
|
163
164
|
};
|
|
164
165
|
};
|
|
165
166
|
tslib_1.__decorate([
|
|
166
|
-
|
|
167
|
+
Logger.WrapBuffer,
|
|
167
168
|
tslib_1.__metadata("design:type", Function),
|
|
168
169
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
169
170
|
tslib_1.__metadata("design:returntype", void 0)
|
|
170
171
|
], Logger.prototype, "error", null);
|
|
171
172
|
tslib_1.__decorate([
|
|
172
|
-
|
|
173
|
+
Logger.WrapBuffer,
|
|
173
174
|
tslib_1.__metadata("design:type", Function),
|
|
174
175
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
175
176
|
tslib_1.__metadata("design:returntype", void 0)
|
|
176
177
|
], Logger.prototype, "log", null);
|
|
177
178
|
tslib_1.__decorate([
|
|
178
|
-
|
|
179
|
+
Logger.WrapBuffer,
|
|
179
180
|
tslib_1.__metadata("design:type", Function),
|
|
180
181
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
181
182
|
tslib_1.__metadata("design:returntype", void 0)
|
|
182
183
|
], Logger.prototype, "warn", null);
|
|
183
184
|
tslib_1.__decorate([
|
|
184
|
-
|
|
185
|
+
Logger.WrapBuffer,
|
|
185
186
|
tslib_1.__metadata("design:type", Function),
|
|
186
187
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
187
188
|
tslib_1.__metadata("design:returntype", void 0)
|
|
188
189
|
], Logger.prototype, "debug", null);
|
|
189
190
|
tslib_1.__decorate([
|
|
190
|
-
|
|
191
|
+
Logger.WrapBuffer,
|
|
191
192
|
tslib_1.__metadata("design:type", Function),
|
|
192
193
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
193
194
|
tslib_1.__metadata("design:returntype", void 0)
|
|
194
195
|
], Logger.prototype, "verbose", null);
|
|
195
196
|
tslib_1.__decorate([
|
|
196
|
-
|
|
197
|
+
Logger.WrapBuffer,
|
|
197
198
|
tslib_1.__metadata("design:type", Function),
|
|
198
199
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
199
200
|
tslib_1.__metadata("design:returntype", void 0)
|
|
200
201
|
], Logger.prototype, "fatal", null);
|
|
201
202
|
tslib_1.__decorate([
|
|
202
|
-
|
|
203
|
+
Logger.WrapBuffer,
|
|
203
204
|
tslib_1.__metadata("design:type", Function),
|
|
204
205
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
205
206
|
tslib_1.__metadata("design:returntype", void 0)
|
|
206
207
|
], Logger, "error", null);
|
|
207
208
|
tslib_1.__decorate([
|
|
208
|
-
|
|
209
|
+
Logger.WrapBuffer,
|
|
209
210
|
tslib_1.__metadata("design:type", Function),
|
|
210
211
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
211
212
|
tslib_1.__metadata("design:returntype", void 0)
|
|
212
213
|
], Logger, "log", null);
|
|
213
214
|
tslib_1.__decorate([
|
|
214
|
-
|
|
215
|
+
Logger.WrapBuffer,
|
|
215
216
|
tslib_1.__metadata("design:type", Function),
|
|
216
217
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
217
218
|
tslib_1.__metadata("design:returntype", void 0)
|
|
218
219
|
], Logger, "warn", null);
|
|
219
220
|
tslib_1.__decorate([
|
|
220
|
-
|
|
221
|
+
Logger.WrapBuffer,
|
|
221
222
|
tslib_1.__metadata("design:type", Function),
|
|
222
223
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
223
224
|
tslib_1.__metadata("design:returntype", void 0)
|
|
224
225
|
], Logger, "debug", null);
|
|
225
226
|
tslib_1.__decorate([
|
|
226
|
-
|
|
227
|
+
Logger.WrapBuffer,
|
|
227
228
|
tslib_1.__metadata("design:type", Function),
|
|
228
229
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
229
230
|
tslib_1.__metadata("design:returntype", void 0)
|
|
230
231
|
], Logger, "verbose", null);
|
|
231
232
|
tslib_1.__decorate([
|
|
232
|
-
|
|
233
|
+
Logger.WrapBuffer,
|
|
233
234
|
tslib_1.__metadata("design:type", Function),
|
|
234
235
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
235
236
|
tslib_1.__metadata("design:returntype", void 0)
|