@nestia/core 4.6.1 → 5.0.0-dev.20250223

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.
Files changed (87) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +92 -87
  3. package/lib/decorators/DynamicModule.d.ts +1 -1
  4. package/lib/decorators/DynamicModule.js +1 -1
  5. package/lib/decorators/EncryptedBody.d.ts +2 -2
  6. package/lib/decorators/EncryptedBody.js +2 -2
  7. package/lib/decorators/TypedException.d.ts +4 -4
  8. package/lib/decorators/TypedRoute.d.ts +1 -1
  9. package/lib/decorators/WebSocketRoute.d.ts +1 -1
  10. package/lib/decorators/WebSocketRoute.js +1 -1
  11. package/lib/programmers/TypedBodyProgrammer.js +4 -4
  12. package/lib/programmers/TypedBodyProgrammer.js.map +1 -1
  13. package/lib/utils/ExceptionManager.d.ts +1 -1
  14. package/lib/utils/ExceptionManager.js +1 -1
  15. package/package.json +6 -6
  16. package/src/adaptors/WebSocketAdaptor.ts +429 -429
  17. package/src/decorators/DynamicModule.ts +43 -43
  18. package/src/decorators/EncryptedBody.ts +101 -101
  19. package/src/decorators/EncryptedController.ts +38 -38
  20. package/src/decorators/EncryptedModule.ts +100 -100
  21. package/src/decorators/EncryptedRoute.ts +219 -219
  22. package/src/decorators/HumanRoute.ts +22 -22
  23. package/src/decorators/NoTransformConfigurationError.ts +32 -32
  24. package/src/decorators/PlainBody.ts +79 -79
  25. package/src/decorators/SwaggerCustomizer.ts +115 -115
  26. package/src/decorators/SwaggerExample.ts +100 -100
  27. package/src/decorators/TypedBody.ts +59 -59
  28. package/src/decorators/TypedException.ts +166 -166
  29. package/src/decorators/TypedFormData.ts +195 -195
  30. package/src/decorators/TypedHeaders.ts +64 -64
  31. package/src/decorators/TypedParam.ts +77 -77
  32. package/src/decorators/TypedQuery.ts +245 -245
  33. package/src/decorators/TypedRoute.ts +214 -214
  34. package/src/decorators/WebSocketRoute.ts +242 -242
  35. package/src/decorators/internal/EncryptedConstant.ts +4 -4
  36. package/src/decorators/internal/IWebSocketRouteReflect.ts +23 -23
  37. package/src/decorators/internal/NoTransformConfigureError.ts +2 -2
  38. package/src/decorators/internal/get_path_and_querify.ts +108 -108
  39. package/src/decorators/internal/get_path_and_stringify.ts +122 -122
  40. package/src/decorators/internal/get_text_body.ts +20 -20
  41. package/src/decorators/internal/headers_to_object.ts +13 -13
  42. package/src/decorators/internal/is_request_body_undefined.ts +14 -14
  43. package/src/decorators/internal/load_controller.ts +49 -49
  44. package/src/decorators/internal/route_error.ts +45 -45
  45. package/src/decorators/internal/validate_request_body.ts +74 -74
  46. package/src/decorators/internal/validate_request_form_data.ts +77 -77
  47. package/src/decorators/internal/validate_request_headers.ts +86 -86
  48. package/src/decorators/internal/validate_request_query.ts +74 -74
  49. package/src/index.ts +5 -5
  50. package/src/module.ts +22 -22
  51. package/src/options/INestiaTransformOptions.ts +38 -38
  52. package/src/options/INestiaTransformProject.ts +8 -8
  53. package/src/options/IRequestBodyValidator.ts +20 -20
  54. package/src/options/IRequestFormDataProps.ts +27 -27
  55. package/src/options/IRequestHeadersValidator.ts +22 -22
  56. package/src/options/IRequestQueryValidator.ts +20 -20
  57. package/src/options/IResponseBodyQuerifier.ts +25 -25
  58. package/src/options/IResponseBodyStringifier.ts +30 -30
  59. package/src/programmers/PlainBodyProgrammer.ts +70 -70
  60. package/src/programmers/TypedBodyProgrammer.ts +142 -142
  61. package/src/programmers/TypedFormDataBodyProgrammer.ts +118 -118
  62. package/src/programmers/TypedHeadersProgrammer.ts +63 -63
  63. package/src/programmers/TypedParamProgrammer.ts +33 -33
  64. package/src/programmers/TypedQueryBodyProgrammer.ts +112 -112
  65. package/src/programmers/TypedQueryProgrammer.ts +114 -114
  66. package/src/programmers/TypedQueryRouteProgrammer.ts +105 -105
  67. package/src/programmers/TypedRouteProgrammer.ts +94 -94
  68. package/src/programmers/http/HttpAssertQuerifyProgrammer.ts +72 -72
  69. package/src/programmers/http/HttpIsQuerifyProgrammer.ts +75 -75
  70. package/src/programmers/http/HttpQuerifyProgrammer.ts +108 -108
  71. package/src/programmers/http/HttpValidateQuerifyProgrammer.ts +76 -76
  72. package/src/programmers/internal/CoreMetadataUtil.ts +21 -21
  73. package/src/transform.ts +35 -35
  74. package/src/transformers/FileTransformer.ts +110 -110
  75. package/src/transformers/MethodTransformer.ts +103 -103
  76. package/src/transformers/NodeTransformer.ts +23 -23
  77. package/src/transformers/ParameterDecoratorTransformer.ts +143 -143
  78. package/src/transformers/ParameterTransformer.ts +57 -57
  79. package/src/transformers/TypedRouteTransformer.ts +85 -85
  80. package/src/transformers/WebSocketRouteTransformer.ts +120 -120
  81. package/src/typings/Creator.ts +3 -3
  82. package/src/typings/get-function-location.d.ts +7 -7
  83. package/src/utils/ArrayUtil.ts +7 -7
  84. package/src/utils/ExceptionManager.ts +112 -112
  85. package/src/utils/Singleton.ts +20 -20
  86. package/src/utils/SourceFinder.ts +57 -57
  87. package/src/utils/VersioningStrategy.ts +27 -27
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Jeongho Nam
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Jeongho Nam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,87 +1,92 @@
1
- # Nestia
2
- ![Nestia Logo](https://nestia.io/logo.png)
3
-
4
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)
5
- [![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
6
- [![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
7
- [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
8
- [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/)
9
- [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
10
-
11
- Nestia is a set of helper libraries for NestJS, supporting below features:
12
-
13
- - `@nestia/core`:
14
- - Super-fast/easy decorators
15
- - Advanced WebSocket routes
16
- - `@nestia/sdk`:
17
- - Swagger generator evolved than ever
18
- - SDK library generator for clients
19
- - Mockup Simulator for client applications
20
- - Automatic E2E test functions generator
21
- - `@nestia/e2e`: Test program utilizing e2e test functions
22
- - `@nestia/benchmark`: Benchmark program using e2e test functions
23
- - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK
24
- - `@nestia/editor`: Swagger-UI with Online TypeScript Editor
25
- - `nestia`: Just CLI (command line interface) tool
26
-
27
- > [!NOTE]
28
- >
29
- > - **Only one line** required, with pure TypeScript type
30
- > - Enhance performance **30x** up
31
- > - Runtime validator is **20,000x faster** than `class-validator`
32
- > - JSON serialization is **200x faster** than `class-transformer`
33
- > - Software Development Kit
34
- > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
35
- > - Mockup simulator means embedded backend simulator in the SDK
36
- > - similar with [msw](https://mswjs.io/), but fully automated
37
-
38
- ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
39
-
40
- > Left is NestJS server code, and right is client (frontend) code utilizing SDK
41
-
42
-
43
-
44
-
45
- ## Sponsors and Backers
46
- Thanks for your support.
47
-
48
- Your donation would encourage `nestia` development.
49
-
50
- [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
51
-
52
-
53
-
54
-
55
- ## Guide Documents
56
- Check out the document in the [website](https://nestia.io/docs/):
57
-
58
- ### 🏠 Home
59
- - [Introduction](https://nestia.io/docs/)
60
- - [Setup](https://nestia.io/docs/setup/)
61
- - [Pure TypeScript](https://nestia.io/docs/pure)
62
-
63
- ### 📖 Features
64
- - 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
- - [TypedHeaders](https://nestia.io/docs/core/TypedHeaders/)
71
- - [TypedException](https://nestia.io/docs/core/TypedException/)
72
- - Generators
73
- - [Swagger Documents](https://nestia.io/docs/sdk/swagger/)
74
- - [Software Development Kit](https://nestia.io/docs/sdk/sdk/)
75
- - [E2E Functions](https://nestia.io/docs/sdk/e2e/)
76
- - [Mockup Simulator](https://nestia.io/docs/sdk/simulator/)
77
- - E2E Testing
78
- - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
79
- - [Test Program Development](https://nestia.io/docs/e2e/development/)
80
- - [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
-
84
- ### 🔗 Appendix
85
- - [API Documents](https://nestia.io/api)
86
- - [ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
87
- - [ `dev.to` Articles](https://dev.to/samchon/series/22751)
1
+ # Nestia
2
+ ![Nestia Logo](https://nestia.io/logo.png)
3
+
4
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)
5
+ [![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
6
+ [![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
7
+ [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
8
+ [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://nestia.io/docs/)
9
+ [![Gurubase](https://img.shields.io/badge/Gurubase-Document%20Chatbot-006BFF)](https://gurubase.io/g/nestia)
10
+ [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
11
+
12
+ Nestia is a set of helper libraries for NestJS, supporting below features:
13
+
14
+ - `@nestia/core`:
15
+ - Super-fast/easy decorators
16
+ - Advanced WebSocket routes
17
+ - `@nestia/sdk`:
18
+ - Swagger generator, more evolved than ever
19
+ - SDK library generator for clients
20
+ - Mockup Simulator for client applications
21
+ - Automatic E2E test functions generator
22
+ - `@nestia/e2e`: Test program utilizing e2e test functions
23
+ - `@nestia/benchmark`: Benchmark program using e2e test functions
24
+ - `@nestia/chat`: Super A.I. Chatbot by Swagger document
25
+ - `@nestia/editor`: Swagger-UI with Online TypeScript Editor
26
+ - `nestia`: Just CLI (command line interface) tool
27
+
28
+ > [!NOTE]
29
+ >
30
+ > - **Only one line** required, with pure TypeScript type
31
+ > - Enhance performance **30x** up
32
+ > - Runtime validator is **20,000x faster** than `class-validator`
33
+ > - JSON serialization is **200x faster** than `class-transformer`
34
+ > - Software Development Kit
35
+ > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
36
+ > - Mockup simulator means embedded backend simulator in the SDK
37
+ > - similar with [msw](https://mswjs.io/), but fully automated
38
+
39
+ ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
40
+
41
+ > Left is NestJS server code, and right is client (frontend) code utilizing SDK
42
+
43
+
44
+
45
+
46
+ ## Sponsors and Backers
47
+ Thanks for your support.
48
+
49
+ Your donation would encourage `nestia` development.
50
+
51
+ [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
52
+
53
+
54
+
55
+
56
+ ## Guide Documents
57
+ Check out the document in the [website](https://nestia.io/docs/):
58
+
59
+ ### 🏠 Home
60
+ - [Introduction](https://nestia.io/docs/)
61
+ - [Setup](https://nestia.io/docs/setup/)
62
+ - [Pure TypeScript](https://nestia.io/docs/pure)
63
+
64
+ ### 📖 Features
65
+ - Core Library
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/)
84
+ - E2E Testing
85
+ - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
86
+ - [Test Program Development](https://nestia.io/docs/e2e/development/)
87
+ - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
88
+
89
+ ### 🔗 Appendix
90
+ - [API Documents](https://nestia.io/api)
91
+ - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
92
+ - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)
@@ -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 Addtional metadata except controllers
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 Addtional metadata except controllers
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
- * requeset body which has been encrypted by AES-128/256 algorithm. Also,
7
- * `EncyrptedBody` validates the request body data type through
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
- * requeset body which has been encrypted by AES-128/256 algorithm. Also,
25
- * `EncyrptedBody` validates the request body data type through
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 occured in the method.
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 occured in the method.
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 occured in the method.
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 occured in the method.
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
@@ -112,7 +112,7 @@ export declare namespace TypedRoute {
112
112
  */
113
113
  path: string;
114
114
  /**
115
- * Validation error informations with detailed reasons.
115
+ * Validation error information with detailed reasons.
116
116
  */
117
117
  errors: IValidation.IError[];
118
118
  /**
@@ -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 checkings.
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 checkings.
35
+ * TypeScript type hints and checks.
36
36
  *
37
37
  * @param path Path(s) of the WebSocket request
38
38
  * @returns Method decorator
@@ -69,10 +69,10 @@ var TypedBodyProgrammer;
69
69
  //----
70
70
  const category = props.context.options.validate;
71
71
  // NORMAL
72
- if (category === "is")
72
+ if (category === "assert")
73
+ return check("assert")(false)(AssertProgrammer_1.AssertProgrammer.write);
74
+ else if (category === "is")
73
75
  return check("is")(false)(IsProgrammer_1.IsProgrammer.write);
74
- else if (category === "validate")
75
- return check("validate")(false)(ValidateProgrammer_1.ValidateProgrammer.write);
76
76
  // STRICT
77
77
  else if (category === "validateEquals")
78
78
  return check("validate")(true)(ValidateProgrammer_1.ValidateProgrammer.write);
@@ -91,7 +91,7 @@ var TypedBodyProgrammer;
91
91
  else if (category === "validatePrune")
92
92
  return misc("validate")(MiscValidatePruneProgrammer_1.MiscValidatePruneProgrammer.write);
93
93
  // DEFAULT
94
- return check("assert")(false)(AssertProgrammer_1.AssertProgrammer.write);
94
+ return check("validate")(false)(ValidateProgrammer_1.ValidateProgrammer.write);
95
95
  };
96
96
  })(TypedBodyProgrammer || (exports.TypedBodyProgrammer = TypedBodyProgrammer = {}));
97
97
  //# sourceMappingURL=TypedBodyProgrammer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypedBodyProgrammer.js","sourceRoot":"","sources":["../../src/programmers/TypedBodyProgrammer.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,iFAA8E;AAC9E,6EAA0E;AAC1E,qEAAkE;AAClE,iFAA8E;AAC9E,uFAAoF;AACpF,oGAAiG;AACjG,oGAAiG;AACjG,wGAAqG;AACrG,wGAAqG;AAMrG,IAAiB,mBAAmB,CA8HnC;AA9HD,WAAiB,mBAAmB;IACrB,4BAAQ,GAAG,CAAC,KAIxB,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AO,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,2BAAY,CAAC,KAAK,CAAC,CAAC;QAC1E,SAAS;aACJ,IAAI,QAAQ,KAAK,gBAAgB;YACpC,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,uCAAkB,CAAC,KAAK,CAAC,CAAC;aACtD,IAAI,QAAQ,KAAK,QAAQ;YAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,2BAAY,CAAC,KAAK,CAAC,CAAC;aAC1C,IAAI,QAAQ,KAAK,cAAc;YAClC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,mCAAgB,CAAC,KAAK,CAAC,CAAC;QACvD,QAAQ;aACH,IAAI,QAAQ,KAAK,aAAa;YACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,qDAAyB,CAAC,KAAK,CAAC,CAAC;aACpD,IAAI,QAAQ,KAAK,eAAe;YACnC,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,yDAA2B,CAAC,KAAK,CAAC,CAAC;QAC7D,QAAQ;aACH,IAAI,QAAQ,KAAK,aAAa;YACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,qDAAyB,CAAC,KAAK,CAAC,CAAC;aACpD,IAAI,QAAQ,KAAK,eAAe;YACnC,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,yDAA2B,CAAC,KAAK,CAAC,CAAC;QAC7D,UAAU;QACV,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,uCAAkB,CAAC,KAAK,CAAC,CAAC;IAC5D,CAAC,CAAC;AACJ,CAAC,EA9HgB,mBAAmB,mCAAnB,mBAAmB,QA8HnC"}
@@ -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 convertion method to a regular {@link nest.HttpException} instance.
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 convertion method to a regular {@link nest.HttpException} instance.
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.1",
3
+ "version": "5.0.0-dev.20250223",
4
4
  "description": "Super-fast validation decorators of NestJS",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "homepage": "https://nestia.io",
38
38
  "dependencies": {
39
- "@nestia/fetcher": "^4.6.1",
39
+ "@nestia/fetcher": "^5.0.0-dev.20250223",
40
40
  "@nestjs/common": ">=7.0.1",
41
41
  "@nestjs/core": ">=7.0.1",
42
- "@samchon/openapi": "^2.4.0",
42
+ "@samchon/openapi": "3.0.0-dev.20250222",
43
43
  "detect-ts-node": "^1.0.5",
44
44
  "get-function-location": "^2.0.0",
45
45
  "glob": "^7.2.0",
@@ -48,16 +48,16 @@
48
48
  "reflect-metadata": ">=0.1.12",
49
49
  "rxjs": ">=6.0.3",
50
50
  "tgrid": "^1.1.0",
51
- "typia": "^7.6.0",
51
+ "typia": "^8.0.0-dev.20250222",
52
52
  "ws": "^7.5.3"
53
53
  },
54
54
  "peerDependencies": {
55
- "@nestia/fetcher": ">=4.6.1",
55
+ "@nestia/fetcher": ">=5.0.0-dev.20250223",
56
56
  "@nestjs/common": ">=7.0.1",
57
57
  "@nestjs/core": ">=7.0.1",
58
58
  "reflect-metadata": ">=0.1.12",
59
59
  "rxjs": ">=6.0.3",
60
- "typia": ">=7.6.0 <8.0.0"
60
+ "typia": ">=8.0.0 <9.0.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@nestjs/common": "^11.0.2",