@nestjs/common 8.4.1 → 8.4.4
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 +5 -3
- package/decorators/http/render.decorator.d.ts +1 -1
- package/decorators/http/render.decorator.js +1 -1
- package/exceptions/bad-gateway.exception.d.ts +1 -1
- package/exceptions/bad-gateway.exception.js +1 -1
- package/exceptions/bad-request.exception.d.ts +1 -1
- package/exceptions/bad-request.exception.js +1 -1
- package/exceptions/conflict.exception.d.ts +1 -1
- package/exceptions/conflict.exception.js +1 -1
- package/exceptions/forbidden.exception.d.ts +1 -1
- package/exceptions/forbidden.exception.js +1 -1
- package/exceptions/gateway-timeout.exception.d.ts +1 -1
- package/exceptions/gateway-timeout.exception.js +1 -1
- package/exceptions/gone.exception.d.ts +1 -1
- package/exceptions/gone.exception.js +1 -1
- package/exceptions/http-version-not-supported.exception.d.ts +1 -1
- package/exceptions/http-version-not-supported.exception.js +1 -1
- package/exceptions/http.exception.d.ts +1 -1
- package/exceptions/http.exception.js +1 -1
- package/exceptions/im-a-teapot.exception.d.ts +1 -1
- package/exceptions/im-a-teapot.exception.js +1 -1
- package/exceptions/internal-server-error.exception.d.ts +1 -1
- package/exceptions/internal-server-error.exception.js +1 -1
- package/exceptions/method-not-allowed.exception.d.ts +1 -1
- package/exceptions/method-not-allowed.exception.js +1 -1
- package/exceptions/misdirected.exception.d.ts +1 -1
- package/exceptions/misdirected.exception.js +1 -1
- package/exceptions/not-acceptable.exception.d.ts +1 -1
- package/exceptions/not-acceptable.exception.js +1 -1
- package/exceptions/not-found.exception.d.ts +1 -1
- package/exceptions/not-found.exception.js +1 -1
- package/exceptions/not-implemented.exception.d.ts +1 -1
- package/exceptions/not-implemented.exception.js +1 -1
- package/exceptions/payload-too-large.exception.d.ts +1 -1
- package/exceptions/payload-too-large.exception.js +1 -1
- package/exceptions/precondition-failed.exception.d.ts +1 -1
- package/exceptions/precondition-failed.exception.js +1 -1
- package/exceptions/request-timeout.exception.d.ts +1 -1
- package/exceptions/request-timeout.exception.js +1 -1
- package/exceptions/service-unavailable.exception.d.ts +1 -1
- package/exceptions/service-unavailable.exception.js +1 -1
- package/exceptions/unauthorized.exception.d.ts +1 -1
- package/exceptions/unauthorized.exception.js +1 -1
- package/exceptions/unprocessable-entity.exception.d.ts +1 -1
- package/exceptions/unprocessable-entity.exception.js +1 -1
- package/exceptions/unsupported-media-type.exception.d.ts +1 -1
- package/exceptions/unsupported-media-type.exception.js +1 -1
- package/file-stream/streamable-file.js +3 -0
- package/index.js +1 -1
- package/interfaces/modules/provider.interface.d.ts +4 -4
- package/package.json +1 -1
- package/pipes/default-value.pipe.d.ts +1 -1
- package/pipes/parse-array.pipe.d.ts +1 -1
- package/utils/cli-colors.util.js +1 -2
package/Readme.md
CHANGED
|
@@ -64,6 +64,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
64
64
|
<a href="https://github.com/Sanofi-IADC" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/sanofi.png" width="180" valign="middle" /></a></td>
|
|
65
65
|
<td>
|
|
66
66
|
<a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/nx-logo.png" height="45" valign="middle" /></a></td>
|
|
67
|
+
<td>
|
|
68
|
+
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
|
|
67
69
|
</tr></table>
|
|
68
70
|
|
|
69
71
|
#### Gold Sponsors
|
|
@@ -71,10 +73,10 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
71
73
|
<table style="text-align:center;"><tr><td>
|
|
72
74
|
<a href="https://careers.labster.com/departments/platform" target="_blank"><img src="https://nestjs.com/img/labster-logo.png" width="170" valign="middle" /></a></td><td>
|
|
73
75
|
<a href="https://weld.app/" target="_blank"><img src="https://nestjs.com/img/weld-logo.svg" width="150" valign="middle" /></a></td>
|
|
74
|
-
<td>
|
|
75
|
-
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
|
|
76
76
|
<td>
|
|
77
|
-
<a href="https://intrinsic.ventures/" target="_blank"><img src="https://nestjs.com/img/intrinisic-logo.png" width="210" valign="middle" /></a></td
|
|
77
|
+
<a href="https://intrinsic.ventures/" target="_blank"><img src="https://nestjs.com/img/intrinisic-logo.png" width="210" valign="middle" /></a></td>
|
|
78
|
+
<td>
|
|
79
|
+
<a href="https://jetbrains.com/" target="_blank"><img src="https://nestjs.com/img/jetbrains-logo.svg" width="110" valign="middle" /></a></td></</tr></table>
|
|
78
80
|
|
|
79
81
|
#### Silver Sponsors
|
|
80
82
|
|
|
@@ -9,7 +9,7 @@ const constants_1 = require("../../constants");
|
|
|
9
9
|
*
|
|
10
10
|
* @param template name of the render engine template file
|
|
11
11
|
*
|
|
12
|
-
* @see [Model-View-Controller](https://docs.nestjs.com/techniques
|
|
12
|
+
* @see [Model-View-Controller](https://docs.nestjs.com/techniques/mvc)
|
|
13
13
|
*
|
|
14
14
|
* @publicApi
|
|
15
15
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Bad Gateway* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Bad Gateway* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Bad Request* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Bad Request* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Conflict* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Conflict* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Forbidden* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Forbidden* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Gateway Timeout* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Gateway Timeout* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Gone* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Gone* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Http Version Not Supported* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Http Version Not Supported* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Defines the base Nest HTTP exception, which is handled by the default
|
|
3
3
|
* Exceptions Handler.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const shared_utils_1 = require("../utils/shared.utils");
|
|
|
6
6
|
* Defines the base Nest HTTP exception, which is handled by the default
|
|
7
7
|
* Exceptions Handler.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -5,7 +5,7 @@ import { HttpException } from './http.exception';
|
|
|
5
5
|
* Any attempt to brew coffee with a teapot should result in the error code
|
|
6
6
|
* "418 I'm a teapot". The resulting entity body MAY be short and stout.
|
|
7
7
|
*
|
|
8
|
-
* @see [
|
|
8
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
9
9
|
*
|
|
10
10
|
* @publicApi
|
|
11
11
|
*/
|
|
@@ -9,7 +9,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
9
9
|
* Any attempt to brew coffee with a teapot should result in the error code
|
|
10
10
|
* "418 I'm a teapot". The resulting entity body MAY be short and stout.
|
|
11
11
|
*
|
|
12
|
-
* @see [
|
|
12
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
13
13
|
*
|
|
14
14
|
* @publicApi
|
|
15
15
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Internal Server Error* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Internal Server Error* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Method Not Allowed* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Method Not Allowed* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Misdirected* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Misdirected* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Not Acceptable* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Not Acceptable* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Not Found* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Not Found* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Not Implemented* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Not Implemented* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Payload Too Large* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Payload Too Large* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Precondition Failed* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Precondition Failed* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Request Timeout* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Request Timeout* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Service Unavailable* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Service Unavailable* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Unauthorized* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Unauthorized* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Unprocessable Entity* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Unprocessable Entity* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@ import { HttpException } from './http.exception';
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an HTTP exception for *Unsupported Media Type* type errors.
|
|
4
4
|
*
|
|
5
|
-
* @see [
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
6
|
*
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
@@ -6,7 +6,7 @@ const http_exception_1 = require("./http.exception");
|
|
|
6
6
|
/**
|
|
7
7
|
* Defines an HTTP exception for *Unsupported Media Type* type errors.
|
|
8
8
|
*
|
|
9
|
-
* @see [
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
10
|
*
|
|
11
11
|
* @publicApi
|
|
12
12
|
*/
|
|
@@ -6,11 +6,14 @@ const util_1 = require("util");
|
|
|
6
6
|
const shared_utils_1 = require("../utils/shared.utils");
|
|
7
7
|
class StreamableFile {
|
|
8
8
|
constructor(bufferOrReadStream, options = {}) {
|
|
9
|
+
var _a;
|
|
10
|
+
var _b;
|
|
9
11
|
this.options = options;
|
|
10
12
|
if (util_1.types.isUint8Array(bufferOrReadStream)) {
|
|
11
13
|
this.stream = new stream_1.Readable();
|
|
12
14
|
this.stream.push(bufferOrReadStream);
|
|
13
15
|
this.stream.push(null);
|
|
16
|
+
(_a = (_b = this.options).length) !== null && _a !== void 0 ? _a : (_b.length = bufferOrReadStream.length);
|
|
14
17
|
}
|
|
15
18
|
else if (bufferOrReadStream.pipe && (0, shared_utils_1.isFunction)(bufferOrReadStream.pipe)) {
|
|
16
19
|
this.stream = bufferOrReadStream;
|
package/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export declare type Provider<T = any> = Type<any> | ClassProvider<T> | ValueProv
|
|
|
21
21
|
* };
|
|
22
22
|
* ```
|
|
23
23
|
*
|
|
24
|
-
* @see [
|
|
24
|
+
* @see [Class providers](https://docs.nestjs.com/fundamentals/custom-providers#class-providers-useclass)
|
|
25
25
|
* @see [Injection scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
|
|
26
26
|
*
|
|
27
27
|
* @publicApi
|
|
@@ -51,7 +51,7 @@ export interface ClassProvider<T = any> {
|
|
|
51
51
|
* };
|
|
52
52
|
* ```
|
|
53
53
|
*
|
|
54
|
-
* @see [
|
|
54
|
+
* @see [Value providers](https://docs.nestjs.com/fundamentals/custom-providers#value-providers-usevalue)
|
|
55
55
|
*
|
|
56
56
|
* @publicApi
|
|
57
57
|
*/
|
|
@@ -80,7 +80,7 @@ export interface ValueProvider<T = any> {
|
|
|
80
80
|
* };
|
|
81
81
|
* ```
|
|
82
82
|
*
|
|
83
|
-
* @see [
|
|
83
|
+
* @see [Factory providers](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory)
|
|
84
84
|
* @see [Injection scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
|
|
85
85
|
*
|
|
86
86
|
* @publicApi
|
|
@@ -114,7 +114,7 @@ export interface FactoryProvider<T = any> {
|
|
|
114
114
|
* };
|
|
115
115
|
* ```
|
|
116
116
|
*
|
|
117
|
-
* @see [
|
|
117
|
+
* @see [Alias providers](https://docs.nestjs.com/fundamentals/custom-providers#alias-providers-useexisting)
|
|
118
118
|
*
|
|
119
119
|
* @publicApi
|
|
120
120
|
*/
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-tra
|
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
9
|
export declare class DefaultValuePipe<T = any, R = any> implements PipeTransform<T, T | R> {
|
|
10
|
-
|
|
10
|
+
protected readonly defaultValue: R;
|
|
11
11
|
constructor(defaultValue: R);
|
|
12
12
|
transform(value?: T, _metadata?: ArgumentMetadata): T | R;
|
|
13
13
|
}
|
|
@@ -15,7 +15,7 @@ export interface ParseArrayOptions extends Omit<ValidationPipeOptions, 'transfor
|
|
|
15
15
|
* @publicApi
|
|
16
16
|
*/
|
|
17
17
|
export declare class ParseArrayPipe implements PipeTransform {
|
|
18
|
-
|
|
18
|
+
protected readonly options: ParseArrayOptions;
|
|
19
19
|
protected readonly validationPipe: ValidationPipe;
|
|
20
20
|
protected exceptionFactory: (error: string) => any;
|
|
21
21
|
constructor(options?: ParseArrayOptions);
|
package/utils/cli-colors.util.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.yellow = exports.clc = void 0;
|
|
4
|
-
const
|
|
5
|
-
const isColorAllowed = () => !process.env.NO_COLOR && tty_1.WriteStream.prototype.hasColors();
|
|
4
|
+
const isColorAllowed = () => !process.env.NO_COLOR;
|
|
6
5
|
const colorIfAllowed = (colorFn) => (text) => isColorAllowed() ? colorFn(text) : text;
|
|
7
6
|
exports.clc = {
|
|
8
7
|
green: colorIfAllowed((text) => `\x1B[32m${text}\x1B[39m`),
|