@nestia/core 4.6.1 → 4.6.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/README.md +22 -17
- package/lib/decorators/DynamicModule.d.ts +1 -1
- package/lib/decorators/DynamicModule.js +1 -1
- package/lib/decorators/EncryptedBody.d.ts +2 -2
- package/lib/decorators/EncryptedBody.js +2 -2
- package/lib/decorators/TypedException.d.ts +4 -4
- package/lib/decorators/TypedRoute.d.ts +1 -1
- package/lib/decorators/WebSocketRoute.d.ts +1 -1
- package/lib/decorators/WebSocketRoute.js +1 -1
- package/lib/utils/ExceptionManager.d.ts +1 -1
- package/lib/utils/ExceptionManager.js +1 -1
- package/package.json +3 -3
- package/src/decorators/DynamicModule.ts +1 -1
- package/src/decorators/EncryptedBody.ts +2 -2
- package/src/decorators/TypedException.ts +4 -4
- package/src/decorators/TypedRoute.ts +1 -1
- package/src/decorators/WebSocketRoute.ts +1 -1
- package/src/utils/ExceptionManager.ts +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/@nestia/fetcher)
|
|
6
6
|
[](https://www.npmjs.com/package/@nestia/fetcher)
|
|
7
7
|
[](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
|
|
8
|
-
[](https://nestia.io/docs/)
|
|
9
|
+
[](https://gurubase.io/g/nestia)
|
|
9
10
|
[](https://discord.gg/E94XhzrUCZ)
|
|
10
11
|
|
|
11
12
|
Nestia is a set of helper libraries for NestJS, supporting below features:
|
|
@@ -14,13 +15,13 @@ Nestia is a set of helper libraries for NestJS, supporting below features:
|
|
|
14
15
|
- Super-fast/easy decorators
|
|
15
16
|
- Advanced WebSocket routes
|
|
16
17
|
- `@nestia/sdk`:
|
|
17
|
-
- Swagger generator evolved than ever
|
|
18
|
+
- Swagger generator, more evolved than ever
|
|
18
19
|
- SDK library generator for clients
|
|
19
20
|
- Mockup Simulator for client applications
|
|
20
21
|
- Automatic E2E test functions generator
|
|
21
22
|
- `@nestia/e2e`: Test program utilizing e2e test functions
|
|
22
23
|
- `@nestia/benchmark`: Benchmark program using e2e test functions
|
|
23
|
-
- `@nestia/
|
|
24
|
+
- `@nestia/chat`: Super A.I. Chatbot by Swagger document
|
|
24
25
|
- `@nestia/editor`: Swagger-UI with Online TypeScript Editor
|
|
25
26
|
- `nestia`: Just CLI (command line interface) tool
|
|
26
27
|
|
|
@@ -62,24 +63,28 @@ Check out the document in the [website](https://nestia.io/docs/):
|
|
|
62
63
|
|
|
63
64
|
### 📖 Features
|
|
64
65
|
- Core Library
|
|
65
|
-
- [WebSocketRoute](https://nestia.io/docs/core/WebSocketRoute)
|
|
66
|
-
- [TypedRoute](https://nestia.io/docs/core/TypedRoute/)
|
|
67
|
-
- [TypedBody](https://nestia.io/docs/core/TypedBody/)
|
|
68
|
-
- [TypedParam](https://nestia.io/docs/core/TypedParam/)
|
|
69
|
-
- [TypedQuery](https://nestia.io/docs/core/TypedQuery/)
|
|
70
|
-
- [
|
|
71
|
-
- [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [
|
|
75
|
-
- [
|
|
76
|
-
- [
|
|
66
|
+
- [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
|
|
67
|
+
- [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
|
|
68
|
+
- [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
|
|
69
|
+
- [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
|
|
70
|
+
- [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
|
|
71
|
+
- [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
|
|
72
|
+
- [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
|
|
73
|
+
- [`@TypedException`](https://nestia.io/docs/core/TypedException/)
|
|
74
|
+
- Software Development Kit
|
|
75
|
+
- [SDK Builder](https://nestia.io/docs/sdk/)
|
|
76
|
+
- [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
|
|
77
|
+
- [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
|
|
78
|
+
- [Distribution](https://nestia.io/docs/sdk/distribute/)
|
|
79
|
+
- Swagger Document
|
|
80
|
+
- [Swagger Builder](https://nestia.io/docs/swagger/)
|
|
81
|
+
- [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
|
|
82
|
+
- [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
|
|
83
|
+
- [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
|
|
77
84
|
- E2E Testing
|
|
78
85
|
- [Why E2E Test?](https://nestia.io/docs/e2e/why/)
|
|
79
86
|
- [Test Program Development](https://nestia.io/docs/e2e/development/)
|
|
80
87
|
- [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
|
|
81
|
-
- [Swagger to NestJS](https://nestia.io/docs/migrate/)
|
|
82
|
-
- [TypeScript Swagger Editor](https://nestia.io/docs/editor/)
|
|
83
88
|
|
|
84
89
|
### 🔗 Appendix
|
|
85
90
|
- [API Documents](https://nestia.io/api)
|
|
@@ -16,7 +16,7 @@ export declare namespace DynamicModule {
|
|
|
16
16
|
* Every controller classes in the target directory would be dynamically mounted.
|
|
17
17
|
*
|
|
18
18
|
* @param path Path of controllers
|
|
19
|
-
* @param metadata
|
|
19
|
+
* @param metadata Additional metadata except controllers
|
|
20
20
|
* @returns module instance
|
|
21
21
|
*/
|
|
22
22
|
function mount(path: string | string[] | {
|
|
@@ -36,7 +36,7 @@ var DynamicModule;
|
|
|
36
36
|
* Every controller classes in the target directory would be dynamically mounted.
|
|
37
37
|
*
|
|
38
38
|
* @param path Path of controllers
|
|
39
|
-
* @param metadata
|
|
39
|
+
* @param metadata Additional metadata except controllers
|
|
40
40
|
* @returns module instance
|
|
41
41
|
*/
|
|
42
42
|
function mount(path_1) {
|
|
@@ -3,8 +3,8 @@ import { IRequestBodyValidator } from "../options/IRequestBodyValidator";
|
|
|
3
3
|
* Encrypted body decorator.
|
|
4
4
|
*
|
|
5
5
|
* `EncryptedBody` is a decorator function getting `application/json` typed data from
|
|
6
|
-
*
|
|
7
|
-
* `
|
|
6
|
+
* request body which has been encrypted by AES-128/256 algorithm. Also,
|
|
7
|
+
* `EncryptedBody` validates the request body data type through
|
|
8
8
|
* [typia](https://github.com/samchon/typia) ad the validation speed is
|
|
9
9
|
* maximum 15,000x times faster than `class-validator`.
|
|
10
10
|
*
|
|
@@ -21,8 +21,8 @@ const validate_request_body_1 = require("./internal/validate_request_body");
|
|
|
21
21
|
* Encrypted body decorator.
|
|
22
22
|
*
|
|
23
23
|
* `EncryptedBody` is a decorator function getting `application/json` typed data from
|
|
24
|
-
*
|
|
25
|
-
* `
|
|
24
|
+
* request body which has been encrypted by AES-128/256 algorithm. Also,
|
|
25
|
+
* `EncryptedBody` validates the request body data type through
|
|
26
26
|
* [typia](https://github.com/samchon/typia) ad the validation speed is
|
|
27
27
|
* maximum 15,000x times faster than `class-validator`.
|
|
28
28
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Exception decorator.
|
|
5
5
|
*
|
|
6
6
|
* `TypedException` is a decorator function describing HTTP exception and its type
|
|
7
|
-
* which could be
|
|
7
|
+
* which could be occurred in the method.
|
|
8
8
|
*
|
|
9
9
|
* For reference, this decorator function does not affect to the method's behavior,
|
|
10
10
|
* but only affects to the swagger documents generation. Also, it does not affect to
|
|
@@ -21,7 +21,7 @@ export declare function TypedException(props: TypedException.IProps<unknown>): n
|
|
|
21
21
|
* Exception decorator.
|
|
22
22
|
*
|
|
23
23
|
* `TypedException` is a decorator function describing HTTP exception and its type
|
|
24
|
-
* which could be
|
|
24
|
+
* which could be occurred in the method.
|
|
25
25
|
*
|
|
26
26
|
* For reference, this decorator function does not affect to the method's behavior,
|
|
27
27
|
* but only affects to the swagger documents generation. Also, it does not affect to
|
|
@@ -40,7 +40,7 @@ export declare function TypedException(status: number | "2XX" | "3XX" | "4XX" |
|
|
|
40
40
|
* Exception decorator.
|
|
41
41
|
*
|
|
42
42
|
* `TypedException` is a decorator function describing HTTP exception and its type
|
|
43
|
-
* which could be
|
|
43
|
+
* which could be occurred in the method.
|
|
44
44
|
*
|
|
45
45
|
* For reference, this decorator function does not affect to the method's behavior,
|
|
46
46
|
* but only affects to the swagger documents generation. Also, it does not affect to
|
|
@@ -57,7 +57,7 @@ export declare function TypedException<T>(props: TypedException.IProps<T>): Meth
|
|
|
57
57
|
* Exception decorator.
|
|
58
58
|
*
|
|
59
59
|
* `TypedException` is a decorator function describing HTTP exception and its type
|
|
60
|
-
* which could be
|
|
60
|
+
* which could be occurred in the method.
|
|
61
61
|
*
|
|
62
62
|
* For reference, this decorator function does not affect to the method's behavior,
|
|
63
63
|
* but only affects to the swagger documents generation. Also, it does not affect to
|
|
@@ -28,7 +28,7 @@ import { IRequestQueryValidator } from "../options/IRequestQueryValidator";
|
|
|
28
28
|
*
|
|
29
29
|
* Furthermore, if you build SDK (Software Development Kit) library through
|
|
30
30
|
* `@nestia/sdk`, you can make safe WebSocket client taking advantages of
|
|
31
|
-
* TypeScript type hints and
|
|
31
|
+
* TypeScript type hints and checks.
|
|
32
32
|
*
|
|
33
33
|
* @param path Path(s) of the WebSocket request
|
|
34
34
|
* @returns Method decorator
|
|
@@ -32,7 +32,7 @@ const validate_request_query_1 = require("./internal/validate_request_query");
|
|
|
32
32
|
*
|
|
33
33
|
* Furthermore, if you build SDK (Software Development Kit) library through
|
|
34
34
|
* `@nestia/sdk`, you can make safe WebSocket client taking advantages of
|
|
35
|
-
* TypeScript type hints and
|
|
35
|
+
* TypeScript type hints and checks.
|
|
36
36
|
*
|
|
37
37
|
* @param path Path(s) of the WebSocket request
|
|
38
38
|
* @returns Method decorator
|
|
@@ -4,7 +4,7 @@ import { Creator } from "../typings/Creator";
|
|
|
4
4
|
* Exception manager for HTTP server.
|
|
5
5
|
*
|
|
6
6
|
* `ExceptionManager` is an utility class who can insert or erase custom error class with
|
|
7
|
-
* its
|
|
7
|
+
* its conversion method to a regular {@link nest.HttpException} instance.
|
|
8
8
|
*
|
|
9
9
|
* If you define an API function through {@link TypedRoute} or {@link EncryptedRoute}
|
|
10
10
|
* instead of the basic router decorator functions like {@link nest.Get} or
|
|
@@ -7,7 +7,7 @@ const common_1 = require("@nestjs/common");
|
|
|
7
7
|
* Exception manager for HTTP server.
|
|
8
8
|
*
|
|
9
9
|
* `ExceptionManager` is an utility class who can insert or erase custom error class with
|
|
10
|
-
* its
|
|
10
|
+
* its conversion method to a regular {@link nest.HttpException} instance.
|
|
11
11
|
*
|
|
12
12
|
* If you define an API function through {@link TypedRoute} or {@link EncryptedRoute}
|
|
13
13
|
* instead of the basic router decorator functions like {@link nest.Get} or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestia/core",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.2",
|
|
4
4
|
"description": "Super-fast validation decorators of NestJS",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://nestia.io",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@nestia/fetcher": "^4.6.
|
|
39
|
+
"@nestia/fetcher": "^4.6.2",
|
|
40
40
|
"@nestjs/common": ">=7.0.1",
|
|
41
41
|
"@nestjs/core": ">=7.0.1",
|
|
42
42
|
"@samchon/openapi": "^2.4.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"ws": "^7.5.3"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@nestia/fetcher": ">=4.6.
|
|
55
|
+
"@nestia/fetcher": ">=4.6.2",
|
|
56
56
|
"@nestjs/common": ">=7.0.1",
|
|
57
57
|
"@nestjs/core": ">=7.0.1",
|
|
58
58
|
"reflect-metadata": ">=0.1.12",
|
|
@@ -21,7 +21,7 @@ export namespace DynamicModule {
|
|
|
21
21
|
* Every controller classes in the target directory would be dynamically mounted.
|
|
22
22
|
*
|
|
23
23
|
* @param path Path of controllers
|
|
24
|
-
* @param metadata
|
|
24
|
+
* @param metadata Additional metadata except controllers
|
|
25
25
|
* @returns module instance
|
|
26
26
|
*/
|
|
27
27
|
export async function mount(
|
|
@@ -19,8 +19,8 @@ import { validate_request_body } from "./internal/validate_request_body";
|
|
|
19
19
|
* Encrypted body decorator.
|
|
20
20
|
*
|
|
21
21
|
* `EncryptedBody` is a decorator function getting `application/json` typed data from
|
|
22
|
-
*
|
|
23
|
-
* `
|
|
22
|
+
* request body which has been encrypted by AES-128/256 algorithm. Also,
|
|
23
|
+
* `EncryptedBody` validates the request body data type through
|
|
24
24
|
* [typia](https://github.com/samchon/typia) ad the validation speed is
|
|
25
25
|
* maximum 15,000x times faster than `class-validator`.
|
|
26
26
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Exception decorator.
|
|
5
5
|
*
|
|
6
6
|
* `TypedException` is a decorator function describing HTTP exception and its type
|
|
7
|
-
* which could be
|
|
7
|
+
* which could be occurred in the method.
|
|
8
8
|
*
|
|
9
9
|
* For reference, this decorator function does not affect to the method's behavior,
|
|
10
10
|
* but only affects to the swagger documents generation. Also, it does not affect to
|
|
@@ -22,7 +22,7 @@ export function TypedException(props: TypedException.IProps<unknown>): never;
|
|
|
22
22
|
* Exception decorator.
|
|
23
23
|
*
|
|
24
24
|
* `TypedException` is a decorator function describing HTTP exception and its type
|
|
25
|
-
* which could be
|
|
25
|
+
* which could be occurred in the method.
|
|
26
26
|
*
|
|
27
27
|
* For reference, this decorator function does not affect to the method's behavior,
|
|
28
28
|
* but only affects to the swagger documents generation. Also, it does not affect to
|
|
@@ -45,7 +45,7 @@ export function TypedException(
|
|
|
45
45
|
* Exception decorator.
|
|
46
46
|
*
|
|
47
47
|
* `TypedException` is a decorator function describing HTTP exception and its type
|
|
48
|
-
* which could be
|
|
48
|
+
* which could be occurred in the method.
|
|
49
49
|
*
|
|
50
50
|
* For reference, this decorator function does not affect to the method's behavior,
|
|
51
51
|
* but only affects to the swagger documents generation. Also, it does not affect to
|
|
@@ -65,7 +65,7 @@ export function TypedException<T>(
|
|
|
65
65
|
* Exception decorator.
|
|
66
66
|
*
|
|
67
67
|
* `TypedException` is a decorator function describing HTTP exception and its type
|
|
68
|
-
* which could be
|
|
68
|
+
* which could be occurred in the method.
|
|
69
69
|
*
|
|
70
70
|
* For reference, this decorator function does not affect to the method's behavior,
|
|
71
71
|
* but only affects to the swagger documents generation. Also, it does not affect to
|
|
@@ -33,7 +33,7 @@ import { validate_request_query } from "./internal/validate_request_query";
|
|
|
33
33
|
*
|
|
34
34
|
* Furthermore, if you build SDK (Software Development Kit) library through
|
|
35
35
|
* `@nestia/sdk`, you can make safe WebSocket client taking advantages of
|
|
36
|
-
* TypeScript type hints and
|
|
36
|
+
* TypeScript type hints and checks.
|
|
37
37
|
*
|
|
38
38
|
* @param path Path(s) of the WebSocket request
|
|
39
39
|
* @returns Method decorator
|
|
@@ -7,7 +7,7 @@ import { Creator } from "../typings/Creator";
|
|
|
7
7
|
* Exception manager for HTTP server.
|
|
8
8
|
*
|
|
9
9
|
* `ExceptionManager` is an utility class who can insert or erase custom error class with
|
|
10
|
-
* its
|
|
10
|
+
* its conversion method to a regular {@link nest.HttpException} instance.
|
|
11
11
|
*
|
|
12
12
|
* If you define an API function through {@link TypedRoute} or {@link EncryptedRoute}
|
|
13
13
|
* instead of the basic router decorator functions like {@link nest.Get} or
|