@nestia/migrate 4.5.2 → 4.6.1-dev.20250117

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 (50) hide show
  1. package/README.md +87 -87
  2. package/lib/bundles/NEST_TEMPLATE.js +66 -66
  3. package/lib/bundles/NEST_TEMPLATE.js.map +1 -1
  4. package/lib/bundles/SDK_TEMPLATE.js +30 -30
  5. package/lib/bundles/SDK_TEMPLATE.js.map +1 -1
  6. package/lib/index.mjs +92 -92
  7. package/lib/index.mjs.map +1 -1
  8. package/lib/utils/openapi-down-convert/converter.js +2 -2
  9. package/package.json +9 -9
  10. package/src/MigrateApplication.ts +107 -107
  11. package/src/analyzers/MigrateApplicationAnalyzer.ts +18 -18
  12. package/src/analyzers/MigrateControllerAnalyzer.ts +51 -51
  13. package/src/archivers/MigrateFileArchiver.ts +38 -38
  14. package/src/bundles/NEST_TEMPLATE.ts +66 -66
  15. package/src/bundles/SDK_TEMPLATE.ts +30 -30
  16. package/src/executable/bundle.js +125 -125
  17. package/src/executable/migrate.ts +7 -7
  18. package/src/factories/TypeLiteralFactory.ts +57 -57
  19. package/src/index.ts +4 -4
  20. package/src/internal/MigrateCommander.ts +86 -86
  21. package/src/internal/MigrateInquirer.ts +89 -89
  22. package/src/module.ts +8 -8
  23. package/src/programmers/MigrateApiFileProgrammer.ts +49 -49
  24. package/src/programmers/MigrateApiFunctionProgrammer.ts +210 -210
  25. package/src/programmers/MigrateApiNamespaceProgrammer.ts +417 -417
  26. package/src/programmers/MigrateApiProgrammer.ts +103 -103
  27. package/src/programmers/MigrateApiSimulatationProgrammer.ts +324 -324
  28. package/src/programmers/MigrateApiStartProgrammer.ts +194 -194
  29. package/src/programmers/MigrateDtoProgrammer.ts +87 -87
  30. package/src/programmers/MigrateE2eFileProgrammer.ts +117 -117
  31. package/src/programmers/MigrateE2eProgrammer.ts +34 -34
  32. package/src/programmers/MigrateImportProgrammer.ts +118 -118
  33. package/src/programmers/MigrateNestControllerProgrammer.ts +50 -50
  34. package/src/programmers/MigrateNestMethodProgrammer.ts +393 -393
  35. package/src/programmers/MigrateNestModuleProgrammer.ts +65 -65
  36. package/src/programmers/MigrateNestProgrammer.ts +81 -81
  37. package/src/programmers/MigrateSchemaProgrammer.ts +373 -373
  38. package/src/structures/IHttpMigrateController.ts +8 -8
  39. package/src/structures/IHttpMigrateDto.ts +8 -8
  40. package/src/structures/IHttpMigrateFile.ts +5 -5
  41. package/src/structures/IHttpMigrateProgram.ts +27 -27
  42. package/src/structures/IHttpMigrateRoute.ts +1 -1
  43. package/src/structures/IHttpMigrateSchema.ts +4 -4
  44. package/src/utils/FilePrinter.ts +36 -36
  45. package/src/utils/MapUtil.ts +13 -13
  46. package/src/utils/OpenApiTypeChecker.ts +73 -73
  47. package/src/utils/SetupWizard.ts +12 -12
  48. package/src/utils/StringUtil.ts +113 -113
  49. package/src/utils/openapi-down-convert/RefVisitor.ts +139 -139
  50. package/src/utils/openapi-down-convert/converter.ts +527 -527
package/README.md CHANGED
@@ -1,87 +1,87 @@
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
+ [![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)