@nestia/migrate 10.0.2 → 11.0.0-dev.20260305

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 (162) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +93 -93
  3. package/package.json +32 -46
  4. package/src/NestiaMigrateApplication.ts +161 -159
  5. package/src/analyzers/NestiaMigrateControllerAnalyzer.ts +51 -51
  6. package/src/archivers/NestiaMigrateFileArchiver.ts +28 -28
  7. package/src/bundles/NEST_TEMPLATE.ts +48 -48
  8. package/src/bundles/SDK_TEMPLATE.ts +21 -21
  9. package/src/executable/NestiaMigrateCommander.ts +98 -98
  10. package/src/executable/NestiaMigrateInquirer.ts +106 -106
  11. package/src/executable/bundle.js +125 -125
  12. package/src/executable/migrate.ts +7 -7
  13. package/src/factories/TypeLiteralFactory.ts +57 -57
  14. package/src/index.ts +4 -4
  15. package/src/module.ts +6 -2
  16. package/src/programmers/NestiaMigrateApiFileProgrammer.ts +55 -55
  17. package/src/programmers/NestiaMigrateApiFunctionProgrammer.ts +347 -344
  18. package/src/programmers/NestiaMigrateApiNamespaceProgrammer.ts +517 -514
  19. package/src/programmers/NestiaMigrateApiProgrammer.ts +107 -107
  20. package/src/programmers/NestiaMigrateApiSimulationProgrammer.ts +308 -309
  21. package/src/programmers/NestiaMigrateApiStartProgrammer.ts +197 -198
  22. package/src/programmers/NestiaMigrateDtoProgrammer.ts +98 -98
  23. package/src/programmers/NestiaMigrateE2eFileProgrammer.ts +153 -153
  24. package/src/programmers/NestiaMigrateE2eProgrammer.ts +48 -48
  25. package/src/programmers/NestiaMigrateImportProgrammer.ts +118 -118
  26. package/src/programmers/NestiaMigrateNestControllerProgrammer.ts +69 -69
  27. package/src/programmers/NestiaMigrateNestMethodProgrammer.ts +409 -406
  28. package/src/programmers/NestiaMigrateNestModuleProgrammer.ts +65 -65
  29. package/src/programmers/NestiaMigrateNestProgrammer.ts +88 -88
  30. package/src/programmers/NestiaMigrateSchemaProgrammer.ts +465 -467
  31. package/src/structures/INestiaMigrateConfig.ts +19 -19
  32. package/src/structures/INestiaMigrateContext.ts +9 -9
  33. package/src/structures/INestiaMigrateController.ts +8 -8
  34. package/src/structures/INestiaMigrateDto.ts +8 -8
  35. package/src/structures/INestiaMigrateFile.ts +5 -5
  36. package/src/structures/INestiaMigrateProgram.ts +11 -11
  37. package/src/structures/INestiaMigrateSchema.ts +4 -4
  38. package/src/utils/FilePrinter.ts +49 -49
  39. package/src/utils/MapUtil.ts +13 -13
  40. package/src/utils/SetupWizard.ts +12 -12
  41. package/src/utils/StringUtil.ts +114 -113
  42. package/src/utils/openapi-down-convert/RefVisitor.ts +134 -134
  43. package/src/utils/openapi-down-convert/converter.ts +536 -536
  44. package/lib/NestiaMigrateApplication.d.ts +0 -24
  45. package/lib/NestiaMigrateApplication.js +0 -18757
  46. package/lib/NestiaMigrateApplication.js.map +0 -1
  47. package/lib/analyzers/NestiaMigrateControllerAnalyzer.d.ts +0 -5
  48. package/lib/analyzers/NestiaMigrateControllerAnalyzer.js +0 -46
  49. package/lib/analyzers/NestiaMigrateControllerAnalyzer.js.map +0 -1
  50. package/lib/archivers/NestiaMigrateFileArchiver.d.ts +0 -8
  51. package/lib/archivers/NestiaMigrateFileArchiver.js +0 -36
  52. package/lib/archivers/NestiaMigrateFileArchiver.js.map +0 -1
  53. package/lib/bundles/NEST_TEMPLATE.d.ts +0 -1
  54. package/lib/bundles/NEST_TEMPLATE.js +0 -55
  55. package/lib/bundles/NEST_TEMPLATE.js.map +0 -1
  56. package/lib/bundles/SDK_TEMPLATE.d.ts +0 -1
  57. package/lib/bundles/SDK_TEMPLATE.js +0 -27
  58. package/lib/bundles/SDK_TEMPLATE.js.map +0 -1
  59. package/lib/executable/NestiaMigrateCommander.d.ts +0 -4
  60. package/lib/executable/NestiaMigrateCommander.js +0 -125
  61. package/lib/executable/NestiaMigrateCommander.js.map +0 -1
  62. package/lib/executable/NestiaMigrateInquirer.d.ts +0 -12
  63. package/lib/executable/NestiaMigrateInquirer.js +0 -94
  64. package/lib/executable/NestiaMigrateInquirer.js.map +0 -1
  65. package/lib/executable/migrate.d.ts +0 -2
  66. package/lib/executable/migrate.js +0 -9
  67. package/lib/executable/migrate.js.map +0 -1
  68. package/lib/factories/TypeLiteralFactory.d.ts +0 -4
  69. package/lib/factories/TypeLiteralFactory.js +0 -35
  70. package/lib/factories/TypeLiteralFactory.js.map +0 -1
  71. package/lib/index.d.ts +0 -3
  72. package/lib/index.js +0 -42
  73. package/lib/index.js.map +0 -1
  74. package/lib/index.mjs +0 -19359
  75. package/lib/index.mjs.map +0 -1
  76. package/lib/module.d.ts +0 -2
  77. package/lib/module.js +0 -19
  78. package/lib/module.js.map +0 -1
  79. package/lib/programmers/NestiaMigrateApiFileProgrammer.d.ts +0 -13
  80. package/lib/programmers/NestiaMigrateApiFileProgrammer.js +0 -40
  81. package/lib/programmers/NestiaMigrateApiFileProgrammer.js.map +0 -1
  82. package/lib/programmers/NestiaMigrateApiFunctionProgrammer.d.ts +0 -14
  83. package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js +0 -179
  84. package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js.map +0 -1
  85. package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.d.ts +0 -14
  86. package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.js +0 -226
  87. package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.js.map +0 -1
  88. package/lib/programmers/NestiaMigrateApiProgrammer.d.ts +0 -4
  89. package/lib/programmers/NestiaMigrateApiProgrammer.js +0 -82
  90. package/lib/programmers/NestiaMigrateApiProgrammer.js.map +0 -1
  91. package/lib/programmers/NestiaMigrateApiSimulationProgrammer.d.ts +0 -14
  92. package/lib/programmers/NestiaMigrateApiSimulationProgrammer.js +0 -142
  93. package/lib/programmers/NestiaMigrateApiSimulationProgrammer.js.map +0 -1
  94. package/lib/programmers/NestiaMigrateApiStartProgrammer.d.ts +0 -4
  95. package/lib/programmers/NestiaMigrateApiStartProgrammer.js +0 -80
  96. package/lib/programmers/NestiaMigrateApiStartProgrammer.js.map +0 -1
  97. package/lib/programmers/NestiaMigrateDtoProgrammer.d.ts +0 -15
  98. package/lib/programmers/NestiaMigrateDtoProgrammer.js +0 -65
  99. package/lib/programmers/NestiaMigrateDtoProgrammer.js.map +0 -1
  100. package/lib/programmers/NestiaMigrateE2eFileProgrammer.d.ts +0 -14
  101. package/lib/programmers/NestiaMigrateE2eFileProgrammer.js +0 -81
  102. package/lib/programmers/NestiaMigrateE2eFileProgrammer.js.map +0 -1
  103. package/lib/programmers/NestiaMigrateE2eProgrammer.d.ts +0 -4
  104. package/lib/programmers/NestiaMigrateE2eProgrammer.js +0 -32
  105. package/lib/programmers/NestiaMigrateE2eProgrammer.js.map +0 -1
  106. package/lib/programmers/NestiaMigrateImportProgrammer.d.ts +0 -18
  107. package/lib/programmers/NestiaMigrateImportProgrammer.js +0 -65
  108. package/lib/programmers/NestiaMigrateImportProgrammer.js.map +0 -1
  109. package/lib/programmers/NestiaMigrateNestControllerProgrammer.d.ts +0 -12
  110. package/lib/programmers/NestiaMigrateNestControllerProgrammer.js +0 -46
  111. package/lib/programmers/NestiaMigrateNestControllerProgrammer.js.map +0 -1
  112. package/lib/programmers/NestiaMigrateNestMethodProgrammer.d.ts +0 -15
  113. package/lib/programmers/NestiaMigrateNestMethodProgrammer.js +0 -224
  114. package/lib/programmers/NestiaMigrateNestMethodProgrammer.js.map +0 -1
  115. package/lib/programmers/NestiaMigrateNestModuleProgrammer.d.ts +0 -5
  116. package/lib/programmers/NestiaMigrateNestModuleProgrammer.js +0 -29
  117. package/lib/programmers/NestiaMigrateNestModuleProgrammer.js.map +0 -1
  118. package/lib/programmers/NestiaMigrateNestProgrammer.d.ts +0 -4
  119. package/lib/programmers/NestiaMigrateNestProgrammer.js +0 -65
  120. package/lib/programmers/NestiaMigrateNestProgrammer.js.map +0 -1
  121. package/lib/programmers/NestiaMigrateSchemaProgrammer.d.ts +0 -10
  122. package/lib/programmers/NestiaMigrateSchemaProgrammer.js +0 -341
  123. package/lib/programmers/NestiaMigrateSchemaProgrammer.js.map +0 -1
  124. package/lib/structures/INestiaMigrateConfig.d.ts +0 -15
  125. package/lib/structures/INestiaMigrateConfig.js +0 -3
  126. package/lib/structures/INestiaMigrateConfig.js.map +0 -1
  127. package/lib/structures/INestiaMigrateContext.d.ts +0 -7
  128. package/lib/structures/INestiaMigrateContext.js +0 -3
  129. package/lib/structures/INestiaMigrateContext.js.map +0 -1
  130. package/lib/structures/INestiaMigrateController.d.ts +0 -7
  131. package/lib/structures/INestiaMigrateController.js +0 -3
  132. package/lib/structures/INestiaMigrateController.js.map +0 -1
  133. package/lib/structures/INestiaMigrateDto.d.ts +0 -7
  134. package/lib/structures/INestiaMigrateDto.js +0 -3
  135. package/lib/structures/INestiaMigrateDto.js.map +0 -1
  136. package/lib/structures/INestiaMigrateFile.d.ts +0 -5
  137. package/lib/structures/INestiaMigrateFile.js +0 -3
  138. package/lib/structures/INestiaMigrateFile.js.map +0 -1
  139. package/lib/structures/INestiaMigrateProgram.d.ts +0 -9
  140. package/lib/structures/INestiaMigrateProgram.js +0 -3
  141. package/lib/structures/INestiaMigrateProgram.js.map +0 -1
  142. package/lib/structures/INestiaMigrateSchema.d.ts +0 -4
  143. package/lib/structures/INestiaMigrateSchema.js +0 -3
  144. package/lib/structures/INestiaMigrateSchema.js.map +0 -1
  145. package/lib/utils/FilePrinter.d.ts +0 -9
  146. package/lib/utils/FilePrinter.js +0 -35
  147. package/lib/utils/FilePrinter.js.map +0 -1
  148. package/lib/utils/MapUtil.d.ts +0 -3
  149. package/lib/utils/MapUtil.js +0 -15
  150. package/lib/utils/MapUtil.js.map +0 -1
  151. package/lib/utils/SetupWizard.d.ts +0 -3
  152. package/lib/utils/SetupWizard.js +0 -18
  153. package/lib/utils/SetupWizard.js.map +0 -1
  154. package/lib/utils/StringUtil.d.ts +0 -6
  155. package/lib/utils/StringUtil.js +0 -108
  156. package/lib/utils/StringUtil.js.map +0 -1
  157. package/lib/utils/openapi-down-convert/RefVisitor.d.ts +0 -52
  158. package/lib/utils/openapi-down-convert/RefVisitor.js +0 -102
  159. package/lib/utils/openapi-down-convert/RefVisitor.js.map +0 -1
  160. package/lib/utils/openapi-down-convert/converter.d.ts +0 -146
  161. package/lib/utils/openapi-down-convert/converter.js +0 -441
  162. package/lib/utils/openapi-down-convert/converter.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 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,93 +1,93 @@
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/editor`: Swagger-UI with Online TypeScript Editor
25
- - [`@agentica`](https://github.com/wrtnlabs/agentica): Agentic AI library specialized in LLM function calling
26
- - [`@autobe`](https://github.com/wrtnlabs/autobe): Vibe coding agent generating NestJS application
27
- - `nestia`: Just CLI (command line interface) tool
28
-
29
- > [!NOTE]
30
- >
31
- > - **Only one line** required, with pure TypeScript type
32
- > - Enhance performance **30x** up
33
- > - Runtime validator is **20,000x faster** than `class-validator`
34
- > - JSON serialization is **200x faster** than `class-transformer`
35
- > - Software Development Kit
36
- > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
37
- > - Mockup simulator means embedded backend simulator in the SDK
38
- > - similar with [msw](https://mswjs.io/), but fully automated
39
-
40
- ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
41
-
42
- > Left is NestJS server code, and right is client (frontend) code utilizing SDK
43
-
44
-
45
-
46
-
47
- ## Sponsors and Backers
48
- Thanks for your support.
49
-
50
- Your donation would encourage `nestia` development.
51
-
52
- [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
53
-
54
-
55
-
56
-
57
- ## Guide Documents
58
- Check out the document in the [website](https://nestia.io/docs/):
59
-
60
- ### 🏠 Home
61
- - [Introduction](https://nestia.io/docs/)
62
- - [Setup](https://nestia.io/docs/setup/)
63
- - [Pure TypeScript](https://nestia.io/docs/pure)
64
-
65
- ### 📖 Features
66
- - Core Library
67
- - [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
68
- - [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
69
- - [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
70
- - [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
71
- - [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
72
- - [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
73
- - [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
74
- - [`@TypedException`](https://nestia.io/docs/core/TypedException/)
75
- - Software Development Kit
76
- - [SDK Builder](https://nestia.io/docs/sdk/)
77
- - [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
78
- - [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
79
- - [Distribution](https://nestia.io/docs/sdk/distribute/)
80
- - Swagger Document
81
- - [Swagger Builder](https://nestia.io/docs/swagger/)
82
- - [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
83
- - [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
84
- - [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
85
- - E2E Testing
86
- - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
87
- - [Test Program Development](https://nestia.io/docs/e2e/development/)
88
- - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
89
-
90
- ### 🔗 Appendix
91
- - [API Documents](https://nestia.io/api)
92
- - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
93
- - [⇲ `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/test/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Atest)
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/editor`: Swagger-UI with Online TypeScript Editor
25
+ - [`@agentica`](https://github.com/wrtnlabs/agentica): Agentic AI library specialized in LLM function calling
26
+ - [`@autobe`](https://github.com/wrtnlabs/autobe): Vibe coding agent generating NestJS application
27
+ - `nestia`: Just CLI (command line interface) tool
28
+
29
+ > [!NOTE]
30
+ >
31
+ > - **Only one line** required, with pure TypeScript type
32
+ > - Enhance performance **30x** up
33
+ > - Runtime validator is **20,000x faster** than `class-validator`
34
+ > - JSON serialization is **200x faster** than `class-transformer`
35
+ > - Software Development Kit
36
+ > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
37
+ > - Mockup simulator means embedded backend simulator in the SDK
38
+ > - similar with [msw](https://mswjs.io/), but fully automated
39
+
40
+ ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
41
+
42
+ > Left is NestJS server code, and right is client (frontend) code utilizing SDK
43
+
44
+
45
+
46
+
47
+ ## Sponsors and Backers
48
+ Thanks for your support.
49
+
50
+ Your donation would encourage `nestia` development.
51
+
52
+ [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
53
+
54
+
55
+
56
+
57
+ ## Guide Documents
58
+ Check out the document in the [website](https://nestia.io/docs/):
59
+
60
+ ### 🏠 Home
61
+ - [Introduction](https://nestia.io/docs/)
62
+ - [Setup](https://nestia.io/docs/setup/)
63
+ - [Pure TypeScript](https://nestia.io/docs/pure)
64
+
65
+ ### 📖 Features
66
+ - Core Library
67
+ - [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
68
+ - [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
69
+ - [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
70
+ - [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
71
+ - [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
72
+ - [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
73
+ - [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
74
+ - [`@TypedException`](https://nestia.io/docs/core/TypedException/)
75
+ - Software Development Kit
76
+ - [SDK Builder](https://nestia.io/docs/sdk/)
77
+ - [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
78
+ - [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
79
+ - [Distribution](https://nestia.io/docs/sdk/distribute/)
80
+ - Swagger Document
81
+ - [Swagger Builder](https://nestia.io/docs/swagger/)
82
+ - [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
83
+ - [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
84
+ - [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
85
+ - E2E Testing
86
+ - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
87
+ - [Test Program Development](https://nestia.io/docs/e2e/development/)
88
+ - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
89
+
90
+ ### 🔗 Appendix
91
+ - [API Documents](https://nestia.io/api)
92
+ - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
93
+ - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)
package/package.json CHANGED
@@ -1,20 +1,18 @@
1
1
  {
2
2
  "name": "@nestia/migrate",
3
- "version": "10.0.2",
3
+ "version": "11.0.0-dev.20260305",
4
4
  "description": "Migration program from swagger to NestJS",
5
- "typings": "lib/index.d.ts",
6
5
  "main": "lib/index.js",
7
- "module": "lib/index.mjs",
8
- "bin": {
9
- "@nestia/migrate": "lib/executable/migrate.js"
6
+ "exports": {
7
+ ".": {
8
+ "types": "./lib/index.d.ts",
9
+ "import": "./lib/index.mjs",
10
+ "default": "./lib/index.js"
11
+ },
12
+ "./package.json": "./package.json"
10
13
  },
11
- "scripts": {
12
- "build": "rimraf lib && tsc && rollup -c",
13
- "bundle": "node src/executable/bundle.js",
14
- "dev": "rimraf lib && tsc --watch",
15
- "package:next": "npm publish --access public --tag next",
16
- "prepare": "ts-patch install && typia patch && npm run bundle",
17
- "test": "node lib/test"
14
+ "bin": {
15
+ "@nestia/migrate": "src/executable/migrate.ts"
18
16
  },
19
17
  "repository": {
20
18
  "type": "git",
@@ -37,49 +35,25 @@
37
35
  },
38
36
  "homepage": "https://nestia.io",
39
37
  "devDependencies": {
40
- "@nestia/benchmark": "^10.0.2",
41
- "@nestia/core": "^10.0.2",
42
- "@nestia/e2e": "^10.0.2",
43
- "@nestia/fetcher": "^10.0.2",
44
- "@nestia/sdk": "^10.0.2",
45
- "@nestjs/common": "^11.0.13",
46
- "@nestjs/core": "^11.0.13",
47
- "@nestjs/platform-express": "^11.0.13",
48
- "@nestjs/platform-fastify": "^11.0.13",
49
38
  "@rollup/plugin-terser": "^0.4.4",
50
39
  "@rollup/plugin-typescript": "^12.1.1",
51
- "@trivago/prettier-plugin-sort-imports": "^4.3.0",
52
- "@types/cli-progress": "^3.11.5",
53
- "@types/express": "^4.17.21",
54
40
  "@types/inquirer": "^9.0.7",
55
- "@types/multer": "^1.4.12",
56
- "@types/node": "^20.3.3",
57
- "@types/swagger-ui-express": "^4.1.6",
58
- "chalk": "4.1.2",
59
- "cli-progress": "^3.12.0",
60
- "dotenv": "^16.3.1",
61
- "dotenv-expand": "^10.0.0",
62
- "express": "^4.19.2",
63
- "multer": "^2.0.2",
41
+ "@types/node": "^25.3.3",
64
42
  "rimraf": "^6.0.1",
65
- "rollup": "^4.24.3",
66
- "serialize-error": "^4.1.0",
67
- "source-map-support": "^0.5.21",
68
- "swagger-ui-express": "^5.0.0",
69
- "tgrid": "^1.1.0",
70
- "ts-node": "^10.9.1",
71
- "ts-patch": "^3.3.0",
72
- "typescript-transform-paths": "^3.5.2"
43
+ "rollup": "^4.24.3"
73
44
  },
74
45
  "dependencies": {
75
- "@samchon/openapi": "^6.0.0",
46
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
47
+ "@typia/core": "12.0.0-dev.20260303-2",
48
+ "@typia/interface": "12.0.0-dev.20260303-2",
49
+ "@typia/utils": "12.0.0-dev.20260303-2",
76
50
  "commander": "10.0.0",
77
51
  "inquirer": "8.2.5",
78
- "prettier": "^3.3.3",
79
- "prettier-plugin-jsdoc": "^1.3.2",
52
+ "prettier": "^3.8.1",
53
+ "prettier-plugin-jsdoc": "^1.8.0",
80
54
  "tstl": "^3.0.0",
81
55
  "typescript": "~5.9.3",
82
- "typia": "^11.0.0"
56
+ "typia": "12.0.0-dev.20260303-2"
83
57
  },
84
58
  "files": [
85
59
  "lib",
@@ -89,5 +63,17 @@
89
63
  "package.json",
90
64
  "README.md",
91
65
  "LICENSE"
92
- ]
66
+ ],
67
+ "publishConfig": {
68
+ "access": "public"
69
+ },
70
+ "scripts": {
71
+ "build": "rimraf lib && tsc && rollup -c",
72
+ "bundle": "node src/executable/bundle.js",
73
+ "dev": "rimraf lib && tsc --watch",
74
+ "package:next": "npm publish --access public --tag next",
75
+ "test": "node lib/test"
76
+ },
77
+ "types": "lib/index.d.ts",
78
+ "module": "lib/index.mjs"
93
79
  }
@@ -1,159 +1,161 @@
1
- import {
2
- HttpMigration,
3
- IHttpMigrateApplication,
4
- OpenApi,
5
- OpenApiV3,
6
- OpenApiV3_1,
7
- SwaggerV2,
8
- } from "@samchon/openapi";
9
- import typia, { IValidation } from "typia";
10
-
11
- import { NEST_TEMPLATE } from "./bundles/NEST_TEMPLATE";
12
- import { SDK_TEMPLATE } from "./bundles/SDK_TEMPLATE";
13
- import { NestiaMigrateApiProgrammer } from "./programmers/NestiaMigrateApiProgrammer";
14
- import { NestiaMigrateApiStartProgrammer } from "./programmers/NestiaMigrateApiStartProgrammer";
15
- import { NestiaMigrateE2eProgrammer } from "./programmers/NestiaMigrateE2eProgrammer";
16
- import { NestiaMigrateNestProgrammer } from "./programmers/NestiaMigrateNestProgrammer";
17
- import { INestiaMigrateConfig } from "./structures/INestiaMigrateConfig";
18
- import { INestiaMigrateContext } from "./structures/INestiaMigrateContext";
19
- import { INestiaMigrateFile } from "./structures/INestiaMigrateFile";
20
-
21
- export class NestiaMigrateApplication {
22
- private readonly data_: IHttpMigrateApplication;
23
-
24
- /* -----------------------------------------------------------
25
- CONSTRUCTORS
26
- ----------------------------------------------------------- */
27
- public constructor(public readonly document: OpenApi.IDocument) {
28
- this.data_ = HttpMigration.application(document);
29
- }
30
-
31
- public static assert(
32
- document:
33
- | SwaggerV2.IDocument
34
- | OpenApiV3.IDocument
35
- | OpenApiV3_1.IDocument
36
- | OpenApi.IDocument,
37
- ): NestiaMigrateApplication {
38
- return new NestiaMigrateApplication(
39
- OpenApi.convert(typia.assert(document)),
40
- );
41
- }
42
-
43
- public static validate(
44
- document:
45
- | SwaggerV2.IDocument
46
- | OpenApiV3.IDocument
47
- | OpenApiV3_1.IDocument
48
- | OpenApi.IDocument,
49
- ): IValidation<NestiaMigrateApplication> {
50
- const result: IValidation<
51
- | SwaggerV2.IDocument
52
- | OpenApiV3.IDocument
53
- | OpenApiV3_1.IDocument
54
- | OpenApi.IDocument
55
- > = typia.validate(document);
56
- if (result.success === false) return result;
57
- return {
58
- success: true,
59
- data: new NestiaMigrateApplication(OpenApi.convert(document)),
60
- };
61
- }
62
-
63
- /* -----------------------------------------------------------
64
- ACCESSORS
65
- ----------------------------------------------------------- */
66
- public getData(): IHttpMigrateApplication {
67
- return this.data_;
68
- }
69
-
70
- /** @deprecated */
71
- public getErrors(): IHttpMigrateApplication.IError[] {
72
- return this.data_.errors;
73
- }
74
-
75
- public nest(config: INestiaMigrateConfig): Record<string, string> {
76
- const context: INestiaMigrateContext = createContext(
77
- "nest",
78
- this.data_,
79
- config,
80
- );
81
- const files: Record<string, string> = {
82
- ...Object.fromEntries(
83
- Object.entries(NEST_TEMPLATE).filter(
84
- ([key]) =>
85
- key.startsWith("src/api/structures") === false &&
86
- key.startsWith("src/api/functional") === false &&
87
- key.startsWith("src/api/controllers") === false &&
88
- key.startsWith("test/features") === false,
89
- ),
90
- ),
91
- ...NestiaMigrateNestProgrammer.write(context),
92
- ...NestiaMigrateApiProgrammer.write(context),
93
- ...(config.e2e ? NestiaMigrateE2eProgrammer.write(context) : {}),
94
- ...(config.keyword === false
95
- ? {
96
- "nestia.config.ts": NEST_TEMPLATE["nestia.config.ts"].replace(
97
- "keyword: true",
98
- "keyword: false",
99
- ),
100
- }
101
- : {}),
102
- };
103
- return config.package ? renameSlug(config.package, files) : files;
104
- }
105
-
106
- public sdk(config: INestiaMigrateConfig): Record<string, string> {
107
- const context: INestiaMigrateContext = createContext(
108
- "sdk",
109
- this.data_,
110
- config,
111
- );
112
- const files: Record<string, string> = {
113
- ...Object.fromEntries(
114
- Object.entries(SDK_TEMPLATE).filter(
115
- ([key]) =>
116
- key.startsWith("src/structures") === false &&
117
- key.startsWith("src/functional") === false &&
118
- key.startsWith("test/features") === false,
119
- ),
120
- ),
121
- ...NestiaMigrateApiProgrammer.write(context),
122
- ...NestiaMigrateApiStartProgrammer.write(context),
123
- ...(config.e2e ? NestiaMigrateE2eProgrammer.write(context) : {}),
124
- "swagger.json": JSON.stringify(this.document, null, 2),
125
- };
126
- return config.package ? renameSlug(config.package, files) : files;
127
- }
128
- }
129
- export namespace MigrateApplication {
130
- export interface IOutput {
131
- context: INestiaMigrateContext;
132
- files: INestiaMigrateFile[];
133
- errors: IHttpMigrateApplication.IError[];
134
- }
135
- }
136
-
137
- const createContext = (
138
- mode: "nest" | "sdk",
139
- application: IHttpMigrateApplication,
140
- config: INestiaMigrateConfig,
141
- ): INestiaMigrateContext => {
142
- return {
143
- mode,
144
- application,
145
- config,
146
- };
147
- };
148
-
149
- const renameSlug = (
150
- slug: string,
151
- files: Record<string, string>,
152
- ): Record<string, string> => {
153
- return Object.fromEntries(
154
- Object.entries(files).map(([key, value]) => [
155
- key,
156
- value.split(`@ORGANIZATION/PROJECT`).join(slug),
157
- ]),
158
- );
159
- };
1
+ import {
2
+ IHttpMigrateApplication,
3
+ OpenApi,
4
+ OpenApiV3,
5
+ OpenApiV3_1,
6
+ SwaggerV2,
7
+ } from "@typia/interface";
8
+ import { HttpMigration, OpenApiConverter } from "@typia/utils";
9
+ import typia, { IValidation } from "typia";
10
+
11
+ import { NEST_TEMPLATE } from "./bundles/NEST_TEMPLATE";
12
+ import { SDK_TEMPLATE } from "./bundles/SDK_TEMPLATE";
13
+ import { NestiaMigrateApiProgrammer } from "./programmers/NestiaMigrateApiProgrammer";
14
+ import { NestiaMigrateApiStartProgrammer } from "./programmers/NestiaMigrateApiStartProgrammer";
15
+ import { NestiaMigrateE2eProgrammer } from "./programmers/NestiaMigrateE2eProgrammer";
16
+ import { NestiaMigrateNestProgrammer } from "./programmers/NestiaMigrateNestProgrammer";
17
+ import { INestiaMigrateConfig } from "./structures/INestiaMigrateConfig";
18
+ import { INestiaMigrateContext } from "./structures/INestiaMigrateContext";
19
+ import { INestiaMigrateFile } from "./structures/INestiaMigrateFile";
20
+
21
+ export class NestiaMigrateApplication {
22
+ private readonly data_: IHttpMigrateApplication;
23
+
24
+ /* -----------------------------------------------------------
25
+ CONSTRUCTORS
26
+ ----------------------------------------------------------- */
27
+ public constructor(public readonly document: OpenApi.IDocument) {
28
+ this.data_ = HttpMigration.application(document);
29
+ }
30
+
31
+ public static assert(
32
+ document:
33
+ | SwaggerV2.IDocument
34
+ | OpenApiV3.IDocument
35
+ | OpenApiV3_1.IDocument
36
+ | OpenApi.IDocument,
37
+ ): NestiaMigrateApplication {
38
+ return new NestiaMigrateApplication(
39
+ OpenApiConverter.upgradeDocument(typia.assert(document)),
40
+ );
41
+ }
42
+
43
+ public static validate(
44
+ document:
45
+ | SwaggerV2.IDocument
46
+ | OpenApiV3.IDocument
47
+ | OpenApiV3_1.IDocument
48
+ | OpenApi.IDocument,
49
+ ): IValidation<NestiaMigrateApplication> {
50
+ const result: IValidation<
51
+ | SwaggerV2.IDocument
52
+ | OpenApiV3.IDocument
53
+ | OpenApiV3_1.IDocument
54
+ | OpenApi.IDocument
55
+ > = typia.validate(document);
56
+ if (result.success === false) return result;
57
+ return {
58
+ success: true,
59
+ data: new NestiaMigrateApplication(
60
+ OpenApiConverter.upgradeDocument(document),
61
+ ),
62
+ };
63
+ }
64
+
65
+ /* -----------------------------------------------------------
66
+ ACCESSORS
67
+ ----------------------------------------------------------- */
68
+ public getData(): IHttpMigrateApplication {
69
+ return this.data_;
70
+ }
71
+
72
+ /** @deprecated */
73
+ public getErrors(): IHttpMigrateApplication.IError[] {
74
+ return this.data_.errors;
75
+ }
76
+
77
+ public nest(config: INestiaMigrateConfig): Record<string, string> {
78
+ const context: INestiaMigrateContext = createContext(
79
+ "nest",
80
+ this.data_,
81
+ config,
82
+ );
83
+ const files: Record<string, string> = {
84
+ ...Object.fromEntries(
85
+ Object.entries(NEST_TEMPLATE).filter(
86
+ ([key]) =>
87
+ key.startsWith("src/api/structures") === false &&
88
+ key.startsWith("src/api/functional") === false &&
89
+ key.startsWith("src/api/controllers") === false &&
90
+ key.startsWith("test/features") === false,
91
+ ),
92
+ ),
93
+ ...NestiaMigrateNestProgrammer.write(context),
94
+ ...NestiaMigrateApiProgrammer.write(context),
95
+ ...(config.e2e ? NestiaMigrateE2eProgrammer.write(context) : {}),
96
+ ...(config.keyword === false
97
+ ? {
98
+ "nestia.config.ts": NEST_TEMPLATE["nestia.config.ts"]!.replace(
99
+ "keyword: true",
100
+ "keyword: false",
101
+ ),
102
+ }
103
+ : {}),
104
+ };
105
+ return config.package ? renameSlug(config.package, files) : files;
106
+ }
107
+
108
+ public sdk(config: INestiaMigrateConfig): Record<string, string> {
109
+ const context: INestiaMigrateContext = createContext(
110
+ "sdk",
111
+ this.data_,
112
+ config,
113
+ );
114
+ const files: Record<string, string> = {
115
+ ...Object.fromEntries(
116
+ Object.entries(SDK_TEMPLATE).filter(
117
+ ([key]) =>
118
+ key.startsWith("src/structures") === false &&
119
+ key.startsWith("src/functional") === false &&
120
+ key.startsWith("test/features") === false,
121
+ ),
122
+ ),
123
+ ...NestiaMigrateApiProgrammer.write(context),
124
+ ...NestiaMigrateApiStartProgrammer.write(context),
125
+ ...(config.e2e ? NestiaMigrateE2eProgrammer.write(context) : {}),
126
+ "swagger.json": JSON.stringify(this.document, null, 2),
127
+ };
128
+ return config.package ? renameSlug(config.package, files) : files;
129
+ }
130
+ }
131
+ export namespace MigrateApplication {
132
+ export interface IOutput {
133
+ context: INestiaMigrateContext;
134
+ files: INestiaMigrateFile[];
135
+ errors: IHttpMigrateApplication.IError[];
136
+ }
137
+ }
138
+
139
+ const createContext = (
140
+ mode: "nest" | "sdk",
141
+ application: IHttpMigrateApplication,
142
+ config: INestiaMigrateConfig,
143
+ ): INestiaMigrateContext => {
144
+ return {
145
+ mode,
146
+ application,
147
+ config,
148
+ };
149
+ };
150
+
151
+ const renameSlug = (
152
+ slug: string,
153
+ files: Record<string, string>,
154
+ ): Record<string, string> => {
155
+ return Object.fromEntries(
156
+ Object.entries(files).map(([key, value]) => [
157
+ key,
158
+ value.split(`@ORGANIZATION/PROJECT`).join(slug),
159
+ ]),
160
+ );
161
+ };