@nestia/migrate 12.0.0-rc.3 → 12.0.0-rc.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/lib/NestiaMigrateApplication.js +9 -44
- package/lib/NestiaMigrateApplication.js.map +1 -1
- package/lib/NestiaMigrateApplication.mjs +90 -3
- package/lib/NestiaMigrateApplication.mjs.map +1 -1
- package/lib/_virtual/_rolldown/runtime.mjs +13 -0
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.mjs +45 -3
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.mjs.map +1 -1
- package/lib/archivers/NestiaMigrateFileArchiver.js +4 -0
- package/lib/archivers/NestiaMigrateFileArchiver.js.map +1 -1
- package/lib/archivers/NestiaMigrateFileArchiver.mjs +25 -3
- package/lib/archivers/NestiaMigrateFileArchiver.mjs.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +46 -44
- package/lib/bundles/NEST_TEMPLATE.js.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.mjs +58 -3
- package/lib/bundles/NEST_TEMPLATE.mjs.map +1 -1
- package/lib/bundles/SDK_TEMPLATE.js +1 -1
- package/lib/bundles/SDK_TEMPLATE.mjs +28 -3
- package/lib/bundles/SDK_TEMPLATE.mjs.map +1 -1
- package/lib/executable/NestiaMigrateCommander.mjs +80 -3
- package/lib/executable/NestiaMigrateCommander.mjs.map +1 -1
- package/lib/executable/NestiaMigrateInquirer.mjs +59 -3
- package/lib/executable/NestiaMigrateInquirer.mjs.map +1 -1
- package/lib/executable/migrate.mjs +9 -3
- package/lib/executable/migrate.mjs.map +1 -1
- package/lib/factories/ExpressionFactory.mjs +10 -3
- package/lib/factories/ExpressionFactory.mjs.map +1 -1
- package/lib/factories/FormatCheatSheet.mjs +31 -3
- package/lib/factories/FormatCheatSheet.mjs.map +1 -1
- package/lib/factories/IdentifierFactory.mjs +22 -3
- package/lib/factories/IdentifierFactory.mjs.map +1 -1
- package/lib/factories/LiteralFactory.mjs +31 -3
- package/lib/factories/LiteralFactory.mjs.map +1 -1
- package/lib/factories/StatementFactory.mjs +12 -3
- package/lib/factories/StatementFactory.mjs.map +1 -1
- package/lib/factories/TypeFactory.mjs +21 -3
- package/lib/factories/TypeFactory.mjs.map +1 -1
- package/lib/factories/TypeLiteralFactory.js +2 -37
- package/lib/factories/TypeLiteralFactory.js.map +1 -1
- package/lib/factories/TypeLiteralFactory.mjs +17 -3
- package/lib/factories/TypeLiteralFactory.mjs.map +1 -1
- package/lib/index.mjs +24 -2
- package/lib/index.mjs.map +1 -1
- package/lib/internal/ts.mjs +6 -2
- package/lib/internal/ts.mjs.map +1 -1
- package/lib/module.mjs +43 -2
- package/lib/module.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiFileProgrammer.mjs +36 -3
- package/lib/programmers/NestiaMigrateApiFileProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js +2 -37
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.mjs +106 -3
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.mjs +139 -3
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiProgrammer.js +1 -1
- package/lib/programmers/NestiaMigrateApiProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiProgrammer.mjs +71 -3
- package/lib/programmers/NestiaMigrateApiProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer.mjs +102 -3
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiStartProgrammer.mjs +50 -3
- package/lib/programmers/NestiaMigrateApiStartProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateDtoProgrammer.mjs +53 -3
- package/lib/programmers/NestiaMigrateDtoProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateE2eFileProgrammer.mjs +58 -3
- package/lib/programmers/NestiaMigrateE2eFileProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateE2eProgrammer.js +11 -4
- package/lib/programmers/NestiaMigrateE2eProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateE2eProgrammer.mjs +35 -3
- package/lib/programmers/NestiaMigrateE2eProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateImportProgrammer.js +12 -5
- package/lib/programmers/NestiaMigrateImportProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateImportProgrammer.mjs +50 -3
- package/lib/programmers/NestiaMigrateImportProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.js +4 -3
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.mjs +31 -3
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateNestMethodProgrammer.mjs +128 -3
- package/lib/programmers/NestiaMigrateNestMethodProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateNestModuleProgrammer.mjs +18 -3
- package/lib/programmers/NestiaMigrateNestModuleProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateNestProgrammer.js +25 -4
- package/lib/programmers/NestiaMigrateNestProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateNestProgrammer.mjs +60 -3
- package/lib/programmers/NestiaMigrateNestProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateSchemaProgrammer.js +14 -49
- package/lib/programmers/NestiaMigrateSchemaProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateSchemaProgrammer.mjs +199 -3
- package/lib/programmers/NestiaMigrateSchemaProgrammer.mjs.map +1 -1
- package/lib/programmers/index.mjs +16 -2
- package/lib/structures/INestiaMigrateConfig.mjs +0 -3
- package/lib/structures/INestiaMigrateContext.mjs +0 -3
- package/lib/structures/INestiaMigrateController.mjs +0 -3
- package/lib/structures/INestiaMigrateFile.mjs +0 -3
- package/lib/structures/index.mjs +0 -2
- package/lib/utils/FilePrinter.mjs +20 -3
- package/lib/utils/FilePrinter.mjs.map +1 -1
- package/lib/utils/MapUtil.mjs +15 -3
- package/lib/utils/MapUtil.mjs.map +1 -1
- package/lib/utils/StringUtil.mjs +100 -3
- package/lib/utils/StringUtil.mjs.map +1 -1
- package/package.json +7 -11
- package/src/NestiaMigrateApplication.ts +8 -12
- package/src/archivers/NestiaMigrateFileArchiver.ts +4 -0
- package/src/bundles/NEST_TEMPLATE.ts +46 -44
- package/src/bundles/SDK_TEMPLATE.ts +1 -1
- package/src/executable/bundle.js +96 -23
- package/src/factories/TypeLiteralFactory.ts +1 -4
- package/src/programmers/NestiaMigrateApiFunctionProgrammer.ts +1 -4
- package/src/programmers/NestiaMigrateApiProgrammer.ts +1 -1
- package/src/programmers/NestiaMigrateE2eProgrammer.ts +19 -5
- package/src/programmers/NestiaMigrateImportProgrammer.ts +21 -13
- package/src/programmers/NestiaMigrateNestControllerProgrammer.ts +4 -8
- package/src/programmers/NestiaMigrateNestProgrammer.ts +28 -7
- package/src/programmers/NestiaMigrateSchemaProgrammer.ts +1 -4
- package/lib/NestiaMigrateApplication2.mjs +0 -153
- package/lib/NestiaMigrateApplication2.mjs.map +0 -1
- package/lib/_virtual/ExpressionFactory.mjs +0 -4
- package/lib/_virtual/ExpressionFactory.mjs.map +0 -1
- package/lib/_virtual/FilePrinter.mjs +0 -4
- package/lib/_virtual/FilePrinter.mjs.map +0 -1
- package/lib/_virtual/FormatCheatSheet.mjs +0 -4
- package/lib/_virtual/FormatCheatSheet.mjs.map +0 -1
- package/lib/_virtual/INestiaMigrateConfig.mjs +0 -4
- package/lib/_virtual/INestiaMigrateConfig.mjs.map +0 -1
- package/lib/_virtual/INestiaMigrateContext.mjs +0 -4
- package/lib/_virtual/INestiaMigrateContext.mjs.map +0 -1
- package/lib/_virtual/INestiaMigrateController.mjs +0 -4
- package/lib/_virtual/INestiaMigrateController.mjs.map +0 -1
- package/lib/_virtual/INestiaMigrateFile.mjs +0 -4
- package/lib/_virtual/INestiaMigrateFile.mjs.map +0 -1
- package/lib/_virtual/IdentifierFactory.mjs +0 -4
- package/lib/_virtual/IdentifierFactory.mjs.map +0 -1
- package/lib/_virtual/LiteralFactory.mjs +0 -4
- package/lib/_virtual/LiteralFactory.mjs.map +0 -1
- package/lib/_virtual/MapUtil.mjs +0 -4
- package/lib/_virtual/MapUtil.mjs.map +0 -1
- package/lib/_virtual/NEST_TEMPLATE.mjs +0 -4
- package/lib/_virtual/NEST_TEMPLATE.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateApiFileProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateApiFileProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateApiFunctionProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateApiFunctionProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateApiNamespaceProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateApiNamespaceProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateApiProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateApiProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateApiSimulationProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateApiSimulationProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateApiStartProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateApiStartProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateApplication.mjs +0 -4
- package/lib/_virtual/NestiaMigrateApplication.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateCommander.mjs +0 -4
- package/lib/_virtual/NestiaMigrateCommander.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateControllerAnalyzer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateControllerAnalyzer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateDtoProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateDtoProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateE2eFileProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateE2eFileProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateE2eProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateE2eProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateFileArchiver.mjs +0 -4
- package/lib/_virtual/NestiaMigrateFileArchiver.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateImportProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateImportProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateInquirer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateInquirer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateNestControllerProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateNestControllerProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateNestMethodProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateNestMethodProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateNestModuleProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateNestModuleProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateNestProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateNestProgrammer.mjs.map +0 -1
- package/lib/_virtual/NestiaMigrateSchemaProgrammer.mjs +0 -4
- package/lib/_virtual/NestiaMigrateSchemaProgrammer.mjs.map +0 -1
- package/lib/_virtual/SDK_TEMPLATE.mjs +0 -4
- package/lib/_virtual/SDK_TEMPLATE.mjs.map +0 -1
- package/lib/_virtual/StatementFactory.mjs +0 -4
- package/lib/_virtual/StatementFactory.mjs.map +0 -1
- package/lib/_virtual/StringUtil.mjs +0 -4
- package/lib/_virtual/StringUtil.mjs.map +0 -1
- package/lib/_virtual/TypeFactory.mjs +0 -4
- package/lib/_virtual/TypeFactory.mjs.map +0 -1
- package/lib/_virtual/TypeLiteralFactory.mjs +0 -4
- package/lib/_virtual/TypeLiteralFactory.mjs.map +0 -1
- package/lib/_virtual/_commander.mjs +0 -7
- package/lib/_virtual/_commander.mjs.map +0 -1
- package/lib/_virtual/_commonjsHelpers.mjs +0 -35
- package/lib/_virtual/_commonjsHelpers.mjs.map +0 -1
- package/lib/_virtual/_inquirer.mjs +0 -7
- package/lib/_virtual/_inquirer.mjs.map +0 -1
- package/lib/_virtual/_node_child_process.mjs +0 -7
- package/lib/_virtual/_node_child_process.mjs.map +0 -1
- package/lib/_virtual/_node_fs.mjs +0 -7
- package/lib/_virtual/_node_fs.mjs.map +0 -1
- package/lib/_virtual/_node_path.mjs +0 -7
- package/lib/_virtual/_node_path.mjs.map +0 -1
- package/lib/_virtual/_prettier-plugin-jsdoc.mjs +0 -7
- package/lib/_virtual/_prettier-plugin-jsdoc.mjs.map +0 -1
- package/lib/_virtual/_prettier.mjs +0 -7
- package/lib/_virtual/_prettier.mjs.map +0 -1
- package/lib/_virtual/_tstl.mjs +0 -7
- package/lib/_virtual/_tstl.mjs.map +0 -1
- package/lib/_virtual/factory.mjs +0 -7
- package/lib/_virtual/factory.mjs.map +0 -1
- package/lib/_virtual/index.mjs +0 -4
- package/lib/_virtual/index.mjs.map +0 -1
- package/lib/_virtual/index2.mjs +0 -4
- package/lib/_virtual/index2.mjs.map +0 -1
- package/lib/_virtual/index3.mjs +0 -4
- package/lib/_virtual/index3.mjs.map +0 -1
- package/lib/_virtual/index4.mjs +0 -4
- package/lib/_virtual/index4.mjs.map +0 -1
- package/lib/_virtual/migrate.mjs +0 -4
- package/lib/_virtual/migrate.mjs.map +0 -1
- package/lib/_virtual/module.mjs +0 -4
- package/lib/_virtual/module.mjs.map +0 -1
- package/lib/_virtual/prettier-plugin-sort-imports.mjs +0 -7
- package/lib/_virtual/prettier-plugin-sort-imports.mjs.map +0 -1
- package/lib/_virtual/ts.mjs +0 -4
- package/lib/_virtual/ts.mjs.map +0 -1
- package/lib/_virtual/utils.mjs +0 -7
- package/lib/_virtual/utils.mjs.map +0 -1
- package/lib/analyzers/NestiaMigrateControllerAnalyzer2.mjs +0 -53
- package/lib/analyzers/NestiaMigrateControllerAnalyzer2.mjs.map +0 -1
- package/lib/archivers/NestiaMigrateFileArchiver2.mjs +0 -40
- package/lib/archivers/NestiaMigrateFileArchiver2.mjs.map +0 -1
- package/lib/bundles/NEST_TEMPLATE2.mjs +0 -66
- package/lib/bundles/NEST_TEMPLATE2.mjs.map +0 -1
- package/lib/bundles/SDK_TEMPLATE2.mjs +0 -38
- package/lib/bundles/SDK_TEMPLATE2.mjs.map +0 -1
- package/lib/executable/NestiaMigrateCommander2.mjs +0 -148
- package/lib/executable/NestiaMigrateCommander2.mjs.map +0 -1
- package/lib/executable/NestiaMigrateInquirer2.mjs +0 -93
- package/lib/executable/NestiaMigrateInquirer2.mjs.map +0 -1
- package/lib/executable/migrate2.mjs +0 -13
- package/lib/executable/migrate2.mjs.map +0 -1
- package/lib/factories/ExpressionFactory2.mjs +0 -20
- package/lib/factories/ExpressionFactory2.mjs.map +0 -1
- package/lib/factories/FormatCheatSheet2.mjs +0 -37
- package/lib/factories/FormatCheatSheet2.mjs.map +0 -1
- package/lib/factories/IdentifierFactory2.mjs +0 -56
- package/lib/factories/IdentifierFactory2.mjs.map +0 -1
- package/lib/factories/LiteralFactory2.mjs +0 -56
- package/lib/factories/LiteralFactory2.mjs.map +0 -1
- package/lib/factories/StatementFactory2.mjs +0 -26
- package/lib/factories/StatementFactory2.mjs.map +0 -1
- package/lib/factories/TypeFactory2.mjs +0 -31
- package/lib/factories/TypeFactory2.mjs.map +0 -1
- package/lib/factories/TypeLiteralFactory2.mjs +0 -72
- package/lib/factories/TypeLiteralFactory2.mjs.map +0 -1
- package/lib/index2.mjs +0 -53
- package/lib/index2.mjs.map +0 -1
- package/lib/internal/ts2.mjs +0 -10
- package/lib/internal/ts2.mjs.map +0 -1
- package/lib/module2.mjs +0 -38
- package/lib/module2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateApiFileProgrammer2.mjs +0 -49
- package/lib/programmers/NestiaMigrateApiFileProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer2.mjs +0 -234
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer2.mjs +0 -238
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateApiProgrammer2.mjs +0 -92
- package/lib/programmers/NestiaMigrateApiProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer2.mjs +0 -156
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateApiStartProgrammer2.mjs +0 -88
- package/lib/programmers/NestiaMigrateApiStartProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateDtoProgrammer2.mjs +0 -90
- package/lib/programmers/NestiaMigrateDtoProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateE2eFileProgrammer2.mjs +0 -88
- package/lib/programmers/NestiaMigrateE2eFileProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateE2eProgrammer2.mjs +0 -41
- package/lib/programmers/NestiaMigrateE2eProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateImportProgrammer2.mjs +0 -72
- package/lib/programmers/NestiaMigrateImportProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateNestControllerProgrammer2.mjs +0 -52
- package/lib/programmers/NestiaMigrateNestControllerProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateNestMethodProgrammer2.mjs +0 -229
- package/lib/programmers/NestiaMigrateNestMethodProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateNestModuleProgrammer2.mjs +0 -32
- package/lib/programmers/NestiaMigrateNestModuleProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateNestProgrammer2.mjs +0 -78
- package/lib/programmers/NestiaMigrateNestProgrammer2.mjs.map +0 -1
- package/lib/programmers/NestiaMigrateSchemaProgrammer2.mjs +0 -388
- package/lib/programmers/NestiaMigrateSchemaProgrammer2.mjs.map +0 -1
- package/lib/programmers/index.mjs.map +0 -1
- package/lib/programmers/index2.mjs +0 -71
- package/lib/programmers/index2.mjs.map +0 -1
- package/lib/structures/INestiaMigrateConfig.mjs.map +0 -1
- package/lib/structures/INestiaMigrateConfig2.mjs +0 -6
- package/lib/structures/INestiaMigrateConfig2.mjs.map +0 -1
- package/lib/structures/INestiaMigrateContext.mjs.map +0 -1
- package/lib/structures/INestiaMigrateContext2.mjs +0 -6
- package/lib/structures/INestiaMigrateContext2.mjs.map +0 -1
- package/lib/structures/INestiaMigrateController.mjs.map +0 -1
- package/lib/structures/INestiaMigrateController2.mjs +0 -6
- package/lib/structures/INestiaMigrateController2.mjs.map +0 -1
- package/lib/structures/INestiaMigrateFile.mjs.map +0 -1
- package/lib/structures/INestiaMigrateFile2.mjs +0 -6
- package/lib/structures/INestiaMigrateFile2.mjs.map +0 -1
- package/lib/structures/index.mjs.map +0 -1
- package/lib/structures/index2.mjs +0 -38
- package/lib/structures/index2.mjs.map +0 -1
- package/lib/utils/FilePrinter2.mjs +0 -28
- package/lib/utils/FilePrinter2.mjs.map +0 -1
- package/lib/utils/MapUtil2.mjs +0 -18
- package/lib/utils/MapUtil2.mjs.map +0 -1
- package/lib/utils/StringUtil2.mjs +0 -110
- package/lib/utils/StringUtil2.mjs.map +0 -1
|
@@ -1,3 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { NestiaMigrateApplication } from "../NestiaMigrateApplication.mjs";
|
|
2
|
+
import { NestiaMigrateFileArchiver } from "../archivers/NestiaMigrateFileArchiver.mjs";
|
|
3
|
+
import { NestiaMigrateInquirer } from "./NestiaMigrateInquirer.mjs";
|
|
4
|
+
import * as prettierPluginSortImport from "@trivago/prettier-plugin-sort-imports";
|
|
5
|
+
import fs from "fs";
|
|
6
|
+
import path from "path";
|
|
7
|
+
import { format } from "prettier";
|
|
8
|
+
import * as prettierPluginJsDoc from "prettier-plugin-jsdoc";
|
|
9
|
+
//#region src/executable/NestiaMigrateCommander.ts
|
|
10
|
+
let NestiaMigrateCommander;
|
|
11
|
+
(function(_NestiaMigrateCommander) {
|
|
12
|
+
_NestiaMigrateCommander.main = async () => {
|
|
13
|
+
const resolve = (str) => str ? path.resolve(str).split("\\").join("/") : void 0;
|
|
14
|
+
const options = await NestiaMigrateInquirer.parse();
|
|
15
|
+
const parent = resolve(options.output + "/..");
|
|
16
|
+
if (fs.existsSync(options.output)) halt("Response directory already exists.");
|
|
17
|
+
else if (fs.existsSync(parent) === false) halt("Response directory's parent directory does not exist.");
|
|
18
|
+
else if (fs.statSync(parent).isDirectory() === false) halt("Response directory's parent is not a directory.");
|
|
19
|
+
const document = await (async () => {
|
|
20
|
+
if (isUri(options.input)) {
|
|
21
|
+
const content = await (await fetch(options.input)).text();
|
|
22
|
+
return JSON.parse(content);
|
|
23
|
+
}
|
|
24
|
+
if (fs.existsSync(options.input) === false) halt("Unable to find the input swagger.json file.");
|
|
25
|
+
if (fs.statSync(options.input).isFile() === false) halt("The input swagger.json is not a file.");
|
|
26
|
+
const content = await fs.promises.readFile(options.input, "utf-8");
|
|
27
|
+
return JSON.parse(content);
|
|
28
|
+
})();
|
|
29
|
+
const result = NestiaMigrateApplication.validate(document);
|
|
30
|
+
if (result.success === false) {
|
|
31
|
+
console.error("nestia migrate: invalid swagger:");
|
|
32
|
+
for (const err of result.errors) console.error(` - ${err.path}: ${err.value}`);
|
|
33
|
+
throw new Error(`Invalid swagger file (must follow the OpenAPI 3.0 spec): ${options.input}`);
|
|
34
|
+
}
|
|
35
|
+
const app = result.data;
|
|
36
|
+
const files = options.mode === "nest" ? app.nest(options) : app.sdk(options);
|
|
37
|
+
if (app.getData().errors) for (const error of app.getData().errors) console.error(`Failed to migrate ${error.method} ${error.path}`, ...error.messages.map((msg) => ` - ${msg}`));
|
|
38
|
+
await NestiaMigrateFileArchiver.archive({
|
|
39
|
+
mkdir: fs.promises.mkdir,
|
|
40
|
+
writeFile: async (file, content) => fs.promises.writeFile(file, await beautify(content), "utf-8"),
|
|
41
|
+
root: options.output,
|
|
42
|
+
files
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const beautify = async (script) => {
|
|
46
|
+
try {
|
|
47
|
+
return await format(script, {
|
|
48
|
+
parser: "typescript",
|
|
49
|
+
plugins: [prettierPluginSortImport, prettierPluginJsDoc],
|
|
50
|
+
importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"],
|
|
51
|
+
importOrderSeparation: true,
|
|
52
|
+
importOrderSortSpecifiers: true,
|
|
53
|
+
importOrderParserPlugins: [
|
|
54
|
+
"decorators-legacy",
|
|
55
|
+
"typescript",
|
|
56
|
+
"jsx"
|
|
57
|
+
],
|
|
58
|
+
bracketSpacing: true
|
|
59
|
+
});
|
|
60
|
+
} catch {
|
|
61
|
+
return script;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const halt = (desc) => {
|
|
65
|
+
console.error(desc);
|
|
66
|
+
process.exit(-1);
|
|
67
|
+
};
|
|
68
|
+
const isUri = (input) => {
|
|
69
|
+
try {
|
|
70
|
+
const url = new URL(input);
|
|
71
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
72
|
+
} catch {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
})(NestiaMigrateCommander || (NestiaMigrateCommander = {}));
|
|
77
|
+
//#endregion
|
|
78
|
+
export { NestiaMigrateCommander };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=NestiaMigrateCommander.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateCommander.mjs","
|
|
1
|
+
{"version":3,"file":"NestiaMigrateCommander.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,3 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#
|
|
1
|
+
import { program } from "commander";
|
|
2
|
+
import { createPromptModule } from "inquirer";
|
|
3
|
+
//#region src/executable/NestiaMigrateInquirer.ts
|
|
4
|
+
let NestiaMigrateInquirer;
|
|
5
|
+
(function(_NestiaMigrateInquirer) {
|
|
6
|
+
_NestiaMigrateInquirer.parse = async () => {
|
|
7
|
+
program.option("--mode [nest/sdk]", "migration mode");
|
|
8
|
+
program.option("--input [swagger.json]", "location of target swagger.json file");
|
|
9
|
+
program.option("--output [directory]", "output directory path");
|
|
10
|
+
program.option("--keyword [boolean]", "Keyword parameter mode");
|
|
11
|
+
program.option("--simulate [boolean]", "Mockup simulator");
|
|
12
|
+
program.option("--e2e [boolean]", "Generate E2E tests");
|
|
13
|
+
program.option("--package [name]", "Package name");
|
|
14
|
+
const questioned = { value: false };
|
|
15
|
+
const action = (closure) => new Promise((resolve, reject) => {
|
|
16
|
+
program.action(async (options) => {
|
|
17
|
+
try {
|
|
18
|
+
resolve(await closure(options));
|
|
19
|
+
} catch (exp) {
|
|
20
|
+
reject(exp);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
program.parseAsync().catch(reject);
|
|
24
|
+
});
|
|
25
|
+
const select = (name) => (message) => async (choices, filter) => {
|
|
26
|
+
questioned.value = true;
|
|
27
|
+
return (await createPromptModule()({
|
|
28
|
+
type: "list",
|
|
29
|
+
name,
|
|
30
|
+
message,
|
|
31
|
+
choices,
|
|
32
|
+
filter
|
|
33
|
+
}))[name];
|
|
34
|
+
};
|
|
35
|
+
const input = (name) => async (message) => (await createPromptModule()({
|
|
36
|
+
type: "input",
|
|
37
|
+
name,
|
|
38
|
+
message
|
|
39
|
+
}))[name];
|
|
40
|
+
return action(async (partial) => {
|
|
41
|
+
partial.mode ??= await select("mode")("Migration mode")(["NestJS", "SDK"], (value) => value === "NestJS" ? "nest" : "sdk");
|
|
42
|
+
partial.input ??= await input("input")("Swagger file location");
|
|
43
|
+
partial.output ??= await input("output")("Response directory path");
|
|
44
|
+
partial.package ??= await input("package")("Package name");
|
|
45
|
+
partial.keyword ??= await select("keyword")("Keyword parameter mode")(["true", "false"]) === "true";
|
|
46
|
+
if (partial.keyword) partial.keyword = partial.keyword === "true";
|
|
47
|
+
else partial.keyword = await select("keyword")("Keyword parameter mode")(["true", "false"]) === "true";
|
|
48
|
+
if (partial.simulate) partial.simulate = partial.simulate === "true";
|
|
49
|
+
else partial.simulate = await select("simulate")("Mokup Simulator")(["true", "false"]) === "true";
|
|
50
|
+
if (partial.e2e) partial.e2e = partial.e2e === "true";
|
|
51
|
+
else partial.e2e = await select("e2e")("Generate E2E tests")(["true", "false"]) === "true";
|
|
52
|
+
return partial;
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
})(NestiaMigrateInquirer || (NestiaMigrateInquirer = {}));
|
|
56
|
+
//#endregion
|
|
57
|
+
export { NestiaMigrateInquirer };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=NestiaMigrateInquirer.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateInquirer.mjs","
|
|
1
|
+
{"version":3,"file":"NestiaMigrateInquirer.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { NestiaMigrateCommander } from "./NestiaMigrateCommander.mjs";
|
|
3
|
+
//#region src/executable/migrate.ts
|
|
4
|
+
NestiaMigrateCommander.main().catch((exp) => {
|
|
5
|
+
console.error(exp);
|
|
6
|
+
process.exit(-1);
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=migrate.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.mjs","
|
|
1
|
+
{"version":3,"file":"migrate.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { SyntaxKind, factory } from "@ttsc/factory";
|
|
2
|
+
//#region src/factories/ExpressionFactory.ts
|
|
3
|
+
let ExpressionFactory;
|
|
4
|
+
(function(_ExpressionFactory) {
|
|
5
|
+
_ExpressionFactory.number = (value) => value < 0 ? factory.createPrefixUnaryExpression(SyntaxKind.MinusToken, factory.createNumericLiteral(Math.abs(value))) : factory.createNumericLiteral(value);
|
|
6
|
+
})(ExpressionFactory || (ExpressionFactory = {}));
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ExpressionFactory };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=ExpressionFactory.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionFactory.mjs","
|
|
1
|
+
{"version":3,"file":"ExpressionFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/factories/FormatCheatSheet.ts
|
|
2
|
+
const RegexCall = (text) => `${text}.test($input)`;
|
|
3
|
+
/** @reference https://github.dev/ajv-validator/ajv-formats/blob/master/src/formats.ts */
|
|
4
|
+
const FormatCheatSheet = {
|
|
5
|
+
byte: RegexCall(`/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm`),
|
|
6
|
+
password: `true`,
|
|
7
|
+
regex: `(() => { try { new RegExp($input); return true; } catch { return false; } })()`,
|
|
8
|
+
uuid: RegexCall(`/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i`),
|
|
9
|
+
email: RegexCall(`/^[a-z0-9!#$%&'*+/=?^_\`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_\`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i`),
|
|
10
|
+
hostname: RegexCall(`/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i`),
|
|
11
|
+
"idn-email": RegexCall(`/^(([^<>()[\\]\\.,;:\\s@\\"]+(\\.[^<>()[\\]\\.,;:\\s@\\"]+)*)|(\\".+\\"))@(([^<>()[\\]\\.,;:\\s@\\"]+\\.)+[^<>()[\\]\\.,;:\\s@\\"]{2,})$/i`),
|
|
12
|
+
"idn-hostname": RegexCall(`/^([a-z0-9\\u00a1-\\uffff0-9]+(-[a-z0-9\\u00a1-\\uffff0-9]+)*\\.)+[a-z\\u00a1-\\uffff]{2,}$/i`),
|
|
13
|
+
iri: RegexCall(`/^[A-Za-z][\\d+-.A-Za-z]*:[^\\u0000-\\u0020"<>\\\\^\`{|}]*$/u`),
|
|
14
|
+
"iri-reference": RegexCall(`/^[A-Za-z][\\d+-.A-Za-z]*:[^\\u0000-\\u0020"<>\\\\^\`{|}]*$/u`),
|
|
15
|
+
ipv4: RegexCall(`/^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/`),
|
|
16
|
+
ipv6: RegexCall(`/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(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;=:@/?]|%[0-9a-f]{2})*)?$/i`),
|
|
19
|
+
"uri-template": RegexCall(`/^(?:(?:[^\\x00-\\x20"'<>%\\\\^\`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i`),
|
|
20
|
+
url: RegexCall(`/^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu`),
|
|
21
|
+
"date-time": RegexCall(`/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i`),
|
|
22
|
+
date: RegexCall(`/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/`),
|
|
23
|
+
time: RegexCall(`/^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i`),
|
|
24
|
+
duration: RegexCall(`/^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$/`),
|
|
25
|
+
"json-pointer": RegexCall(`/^(?:\\/(?:[^~/]|~0|~1)*)*$/`),
|
|
26
|
+
"relative-json-pointer": RegexCall(`/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/`)
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { FormatCheatSheet };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=FormatCheatSheet.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormatCheatSheet.mjs","
|
|
1
|
+
{"version":3,"file":"FormatCheatSheet.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#
|
|
1
|
+
import { TypeFactory } from "./TypeFactory.mjs";
|
|
2
|
+
import { SyntaxKind, factory } from "@ttsc/factory";
|
|
3
|
+
//#region src/factories/IdentifierFactory.ts
|
|
4
|
+
const VARIABLE_REGEX = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
5
|
+
const isVariableName = (str) => VARIABLE_REGEX.test(str);
|
|
6
|
+
let IdentifierFactory;
|
|
7
|
+
(function(_IdentifierFactory) {
|
|
8
|
+
const identifier = _IdentifierFactory.identifier = (name) => isVariableName(name) ? factory.createIdentifier(name) : factory.createStringLiteral(name);
|
|
9
|
+
_IdentifierFactory.access = (input, key, chain) => {
|
|
10
|
+
const postfix = identifier(key);
|
|
11
|
+
if (postfix.kind === "StringLiteral") return chain === true ? factory.createElementAccessChain(input, factory.createToken(SyntaxKind.QuestionDotToken), postfix) : factory.createElementAccessExpression(input, postfix);
|
|
12
|
+
return chain === true ? factory.createPropertyAccessChain(input, factory.createToken(SyntaxKind.QuestionDotToken), postfix) : factory.createPropertyAccessExpression(input, postfix);
|
|
13
|
+
};
|
|
14
|
+
_IdentifierFactory.parameter = (name, type, init) => {
|
|
15
|
+
const isQuestionToken = !!init && init.kind === "Token" && init.token === SyntaxKind.QuestionToken;
|
|
16
|
+
return factory.createParameterDeclaration(void 0, void 0, name, isQuestionToken ? factory.createToken(SyntaxKind.QuestionToken) : void 0, type ?? TypeFactory.keyword("any"), isQuestionToken ? void 0 : init);
|
|
17
|
+
};
|
|
18
|
+
})(IdentifierFactory || (IdentifierFactory = {}));
|
|
19
|
+
//#endregion
|
|
20
|
+
export { IdentifierFactory };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=IdentifierFactory.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentifierFactory.mjs","
|
|
1
|
+
{"version":3,"file":"IdentifierFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { IdentifierFactory } from "./IdentifierFactory.mjs";
|
|
2
|
+
import { ExpressionFactory } from "./ExpressionFactory.mjs";
|
|
3
|
+
import { factory } from "@ttsc/factory";
|
|
4
|
+
//#region src/factories/LiteralFactory.ts
|
|
5
|
+
const PASSTHROUGH_KINDS = /* @__PURE__ */ new Set([
|
|
6
|
+
"ArrowFunction",
|
|
7
|
+
"CallExpression",
|
|
8
|
+
"Identifier"
|
|
9
|
+
]);
|
|
10
|
+
const isNode = (value) => typeof value === "object" && value !== null && typeof value.kind === "string";
|
|
11
|
+
let LiteralFactory;
|
|
12
|
+
(function(_LiteralFactory) {
|
|
13
|
+
const write = _LiteralFactory.write = (input) => {
|
|
14
|
+
if (input === null) return factory.createNull();
|
|
15
|
+
if (isNode(input) && PASSTHROUGH_KINDS.has(input.kind)) return input;
|
|
16
|
+
if (Array.isArray(input)) return writeArray(input);
|
|
17
|
+
if (typeof input === "object") return writeObject(input);
|
|
18
|
+
if (typeof input === "boolean") return input ? factory.createTrue() : factory.createFalse();
|
|
19
|
+
if (typeof input === "number") return ExpressionFactory.number(input);
|
|
20
|
+
if (typeof input === "string") return factory.createStringLiteral(input);
|
|
21
|
+
if (typeof input === "bigint") return factory.createStringLiteral(input.toString());
|
|
22
|
+
if (typeof input === "function") return factory.createIdentifier("undefined");
|
|
23
|
+
throw new TypeError("LiteralFactory.write: unsupported input type.");
|
|
24
|
+
};
|
|
25
|
+
const writeObject = (obj) => factory.createObjectLiteralExpression(Object.entries(obj).filter(([, value]) => value !== void 0).map(([key, value]) => factory.createPropertyAssignment(IdentifierFactory.identifier(key), write(value))), true);
|
|
26
|
+
const writeArray = (array) => factory.createArrayLiteralExpression(array.map(write), true);
|
|
27
|
+
})(LiteralFactory || (LiteralFactory = {}));
|
|
28
|
+
//#endregion
|
|
29
|
+
export { LiteralFactory };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=LiteralFactory.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiteralFactory.mjs","
|
|
1
|
+
{"version":3,"file":"LiteralFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#
|
|
1
|
+
import { TypeFactory } from "./TypeFactory.mjs";
|
|
2
|
+
import { NodeFlags, factory } from "@ttsc/factory";
|
|
3
|
+
//#region src/factories/StatementFactory.ts
|
|
4
|
+
let StatementFactory;
|
|
5
|
+
(function(_StatementFactory) {
|
|
6
|
+
_StatementFactory.mut = (props) => factory.createVariableStatement(void 0, factory.createVariableDeclarationList([factory.createVariableDeclaration(props.name, void 0, props.type !== void 0 ? props.type : props.initializer === void 0 ? TypeFactory.keyword("any") : void 0, props.initializer)], NodeFlags.Let));
|
|
7
|
+
_StatementFactory.constant = (props) => factory.createVariableStatement(void 0, factory.createVariableDeclarationList([factory.createVariableDeclaration(props.name, void 0, props.type, props.value)], NodeFlags.Const));
|
|
8
|
+
})(StatementFactory || (StatementFactory = {}));
|
|
9
|
+
//#endregion
|
|
10
|
+
export { StatementFactory };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=StatementFactory.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatementFactory.mjs","
|
|
1
|
+
{"version":3,"file":"StatementFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { SyntaxKind, factory } from "@ttsc/factory";
|
|
2
|
+
//#region src/factories/TypeFactory.ts
|
|
3
|
+
let TypeFactory;
|
|
4
|
+
(function(_TypeFactory) {
|
|
5
|
+
const KEYWORDS = {
|
|
6
|
+
void: SyntaxKind.VoidKeyword,
|
|
7
|
+
any: SyntaxKind.AnyKeyword,
|
|
8
|
+
unknown: SyntaxKind.UnknownKeyword,
|
|
9
|
+
boolean: SyntaxKind.BooleanKeyword,
|
|
10
|
+
number: SyntaxKind.NumberKeyword,
|
|
11
|
+
bigint: SyntaxKind.BigIntKeyword,
|
|
12
|
+
string: SyntaxKind.StringKeyword,
|
|
13
|
+
never: SyntaxKind.NeverKeyword,
|
|
14
|
+
undefined: SyntaxKind.UndefinedKeyword
|
|
15
|
+
};
|
|
16
|
+
_TypeFactory.keyword = (type) => factory.createKeywordTypeNode(KEYWORDS[type]);
|
|
17
|
+
})(TypeFactory || (TypeFactory = {}));
|
|
18
|
+
//#endregion
|
|
19
|
+
export { TypeFactory };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=TypeFactory.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeFactory.mjs","
|
|
1
|
+
{"version":3,"file":"TypeFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,43 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var _a;
|
|
36
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
3
|
exports.TypeLiteralFactory = void 0;
|
|
38
4
|
const factory_1 = require("@ttsc/factory");
|
|
39
|
-
const
|
|
40
|
-
const { NamingConvention } = (_a = typiaUtils.default) !== null && _a !== void 0 ? _a : typiaUtils;
|
|
5
|
+
const utils_1 = require("@typia/utils");
|
|
41
6
|
var TypeLiteralFactory;
|
|
42
7
|
(function (TypeLiteralFactory) {
|
|
43
8
|
TypeLiteralFactory.generate = (value) => typeof value === "boolean"
|
|
@@ -60,7 +25,7 @@ var TypeLiteralFactory;
|
|
|
60
25
|
const generateBoolean = (bool) => factory_1.factory.createLiteralTypeNode(bool ? factory_1.factory.createTrue() : factory_1.factory.createFalse());
|
|
61
26
|
const generateNull = () => factory_1.factory.createLiteralTypeNode(factory_1.factory.createNull());
|
|
62
27
|
const generateTuple = (items) => factory_1.factory.createTupleTypeNode(items.map(TypeLiteralFactory.generate));
|
|
63
|
-
const generateObject = (obj) => factory_1.factory.createTypeLiteralNode(Object.entries(obj).map(([key, value]) => factory_1.factory.createPropertySignature(undefined, NamingConvention.variable(key)
|
|
28
|
+
const generateObject = (obj) => factory_1.factory.createTypeLiteralNode(Object.entries(obj).map(([key, value]) => factory_1.factory.createPropertySignature(undefined, utils_1.NamingConvention.variable(key)
|
|
64
29
|
? factory_1.factory.createIdentifier(key)
|
|
65
30
|
: factory_1.factory.createStringLiteral(key), undefined, TypeLiteralFactory.generate(value))));
|
|
66
31
|
})(TypeLiteralFactory || (exports.TypeLiteralFactory = TypeLiteralFactory = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeLiteralFactory.js","sourceRoot":"","sources":["../../src/factories/TypeLiteralFactory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TypeLiteralFactory.js","sourceRoot":"","sources":["../../src/factories/TypeLiteralFactory.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AACpD,wCAAgD;AAIhD,IAAiB,kBAAkB,CAqDlC;AArDD,WAAiB,kBAAkB;IACpB,2BAAQ,GAAG,CAAC,KAAU,EAAe,EAAE,CAClD,OAAO,KAAK,KAAK,SAAS;QACxB,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC;QACxB,CAAC,CAAC,OAAO,KAAK,KAAK,Q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E,EAAE,CACrC,iBAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,2BAAQ,CAAC,CAAC,CAAC;IAEnD,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CACrC,iBAAO,CAAC,qBAAqB,CAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CACvC,iBAAO,CAAC,uBAAuB,CAC7B,SAAS,EACT,wBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC;QAC5B,CAAC,CAAC,iBAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC;QAC/B,CAAC,CAAC,iBAAO,CAAC,mBAAmB,CAAC,GAAG,CAAC,EACpC,SAAS,EACT,2BAAQ,CAAC,KAAK,CAAC,CAChB,CACF,CACF,CAAC;AACN,CAAC,EArDgB,kBAAkB,aAAlB,kBAAkB,GAAlB,kBAAkB,QAqDlC"}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#
|
|
1
|
+
import { NamingConvention } from "@typia/utils";
|
|
2
|
+
import { SyntaxKind, factory } from "@ttsc/factory";
|
|
3
|
+
//#region src/factories/TypeLiteralFactory.ts
|
|
4
|
+
let TypeLiteralFactory;
|
|
5
|
+
(function(_TypeLiteralFactory) {
|
|
6
|
+
const generate = _TypeLiteralFactory.generate = (value) => typeof value === "boolean" ? generateBoolean(value) : typeof value === "number" ? generateNumber(value) : typeof value === "string" ? generatestring(value) : typeof value === "object" ? value === null ? generateNull() : Array.isArray(value) ? generateTuple(value) : generateObject(value) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword);
|
|
7
|
+
const generatestring = (str) => factory.createLiteralTypeNode(factory.createStringLiteral(str));
|
|
8
|
+
const generateNumber = (num) => factory.createLiteralTypeNode(num < 0 ? factory.createPrefixUnaryExpression(SyntaxKind.MinusToken, factory.createNumericLiteral(-num)) : factory.createNumericLiteral(num));
|
|
9
|
+
const generateBoolean = (bool) => factory.createLiteralTypeNode(bool ? factory.createTrue() : factory.createFalse());
|
|
10
|
+
const generateNull = () => factory.createLiteralTypeNode(factory.createNull());
|
|
11
|
+
const generateTuple = (items) => factory.createTupleTypeNode(items.map(generate));
|
|
12
|
+
const generateObject = (obj) => factory.createTypeLiteralNode(Object.entries(obj).map(([key, value]) => factory.createPropertySignature(void 0, NamingConvention.variable(key) ? factory.createIdentifier(key) : factory.createStringLiteral(key), void 0, generate(value))));
|
|
13
|
+
})(TypeLiteralFactory || (TypeLiteralFactory = {}));
|
|
14
|
+
//#endregion
|
|
15
|
+
export { TypeLiteralFactory };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=TypeLiteralFactory.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeLiteralFactory.mjs","
|
|
1
|
+
{"version":3,"file":"TypeLiteralFactory.mjs","names":[],"sources":[],"mappings":""}
|
package/lib/index.mjs
CHANGED
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { NestiaMigrateSchemaProgrammer } from "./programmers/NestiaMigrateSchemaProgrammer.mjs";
|
|
2
|
+
import { NestiaMigrateApiFunctionProgrammer } from "./programmers/NestiaMigrateApiFunctionProgrammer.mjs";
|
|
3
|
+
import { NestiaMigrateApiSimulationProgrammer } from "./programmers/NestiaMigrateApiSimulationProgrammer.mjs";
|
|
4
|
+
import { NestiaMigrateApiNamespaceProgrammer } from "./programmers/NestiaMigrateApiNamespaceProgrammer.mjs";
|
|
5
|
+
import { NestiaMigrateImportProgrammer } from "./programmers/NestiaMigrateImportProgrammer.mjs";
|
|
6
|
+
import { NestiaMigrateApiFileProgrammer } from "./programmers/NestiaMigrateApiFileProgrammer.mjs";
|
|
7
|
+
import { NestiaMigrateDtoProgrammer } from "./programmers/NestiaMigrateDtoProgrammer.mjs";
|
|
8
|
+
import { NestiaMigrateApiProgrammer } from "./programmers/NestiaMigrateApiProgrammer.mjs";
|
|
9
|
+
import { NestiaMigrateE2eFunctionProgrammer } from "./programmers/NestiaMigrateE2eFileProgrammer.mjs";
|
|
10
|
+
import { NestiaMigrateApiStartProgrammer } from "./programmers/NestiaMigrateApiStartProgrammer.mjs";
|
|
11
|
+
import { NestiaMigrateE2eProgrammer } from "./programmers/NestiaMigrateE2eProgrammer.mjs";
|
|
12
|
+
import { NestiaMigrateNestMethodProgrammer } from "./programmers/NestiaMigrateNestMethodProgrammer.mjs";
|
|
13
|
+
import { NestiaMigrateNestControllerProgrammer } from "./programmers/NestiaMigrateNestControllerProgrammer.mjs";
|
|
14
|
+
import { NestiaMigrateNestModuleProgrammer } from "./programmers/NestiaMigrateNestModuleProgrammer.mjs";
|
|
15
|
+
import { NestiaMigrateNestProgrammer } from "./programmers/NestiaMigrateNestProgrammer.mjs";
|
|
16
|
+
import { NestiaMigrateApplication } from "./NestiaMigrateApplication.mjs";
|
|
17
|
+
import { NestiaMigrateFileArchiver } from "./archivers/NestiaMigrateFileArchiver.mjs";
|
|
18
|
+
import { module_exports } from "./module.mjs";
|
|
19
|
+
//#region src/index.ts
|
|
20
|
+
var src_default = module_exports;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { NestiaMigrateApiFileProgrammer, NestiaMigrateApiFunctionProgrammer, NestiaMigrateApiNamespaceProgrammer, NestiaMigrateApiProgrammer, NestiaMigrateApiSimulationProgrammer, NestiaMigrateApiStartProgrammer, NestiaMigrateApplication, NestiaMigrateDtoProgrammer, NestiaMigrateE2eFunctionProgrammer, NestiaMigrateE2eProgrammer, NestiaMigrateFileArchiver, NestiaMigrateImportProgrammer, NestiaMigrateNestControllerProgrammer, NestiaMigrateNestMethodProgrammer, NestiaMigrateNestModuleProgrammer, NestiaMigrateNestProgrammer, NestiaMigrateSchemaProgrammer, src_default as default };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=index.mjs.map
|
package/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
|
package/lib/internal/ts.mjs
CHANGED
package/lib/internal/ts.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts.mjs","
|
|
1
|
+
{"version":3,"file":"ts.mjs","names":[],"sources":[],"mappings":""}
|
package/lib/module.mjs
CHANGED
|
@@ -1,2 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { NestiaMigrateSchemaProgrammer } from "./programmers/NestiaMigrateSchemaProgrammer.mjs";
|
|
3
|
+
import { NestiaMigrateApiFunctionProgrammer } from "./programmers/NestiaMigrateApiFunctionProgrammer.mjs";
|
|
4
|
+
import { NestiaMigrateApiSimulationProgrammer } from "./programmers/NestiaMigrateApiSimulationProgrammer.mjs";
|
|
5
|
+
import { NestiaMigrateApiNamespaceProgrammer } from "./programmers/NestiaMigrateApiNamespaceProgrammer.mjs";
|
|
6
|
+
import { NestiaMigrateImportProgrammer } from "./programmers/NestiaMigrateImportProgrammer.mjs";
|
|
7
|
+
import { NestiaMigrateApiFileProgrammer } from "./programmers/NestiaMigrateApiFileProgrammer.mjs";
|
|
8
|
+
import { NestiaMigrateDtoProgrammer } from "./programmers/NestiaMigrateDtoProgrammer.mjs";
|
|
9
|
+
import { NestiaMigrateApiProgrammer } from "./programmers/NestiaMigrateApiProgrammer.mjs";
|
|
10
|
+
import { NestiaMigrateE2eFunctionProgrammer } from "./programmers/NestiaMigrateE2eFileProgrammer.mjs";
|
|
11
|
+
import { NestiaMigrateApiStartProgrammer } from "./programmers/NestiaMigrateApiStartProgrammer.mjs";
|
|
12
|
+
import { NestiaMigrateE2eProgrammer } from "./programmers/NestiaMigrateE2eProgrammer.mjs";
|
|
13
|
+
import { NestiaMigrateNestMethodProgrammer } from "./programmers/NestiaMigrateNestMethodProgrammer.mjs";
|
|
14
|
+
import { NestiaMigrateNestControllerProgrammer } from "./programmers/NestiaMigrateNestControllerProgrammer.mjs";
|
|
15
|
+
import { NestiaMigrateNestModuleProgrammer } from "./programmers/NestiaMigrateNestModuleProgrammer.mjs";
|
|
16
|
+
import { NestiaMigrateNestProgrammer } from "./programmers/NestiaMigrateNestProgrammer.mjs";
|
|
17
|
+
import { NestiaMigrateApplication } from "./NestiaMigrateApplication.mjs";
|
|
18
|
+
import { NestiaMigrateFileArchiver } from "./archivers/NestiaMigrateFileArchiver.mjs";
|
|
19
|
+
import "./programmers/index.mjs";
|
|
20
|
+
//#region src/module.ts
|
|
21
|
+
var module_exports = /* @__PURE__ */ __exportAll({
|
|
22
|
+
NestiaMigrateApiFileProgrammer: () => NestiaMigrateApiFileProgrammer,
|
|
23
|
+
NestiaMigrateApiFunctionProgrammer: () => NestiaMigrateApiFunctionProgrammer,
|
|
24
|
+
NestiaMigrateApiNamespaceProgrammer: () => NestiaMigrateApiNamespaceProgrammer,
|
|
25
|
+
NestiaMigrateApiProgrammer: () => NestiaMigrateApiProgrammer,
|
|
26
|
+
NestiaMigrateApiSimulationProgrammer: () => NestiaMigrateApiSimulationProgrammer,
|
|
27
|
+
NestiaMigrateApiStartProgrammer: () => NestiaMigrateApiStartProgrammer,
|
|
28
|
+
NestiaMigrateApplication: () => NestiaMigrateApplication,
|
|
29
|
+
NestiaMigrateDtoProgrammer: () => NestiaMigrateDtoProgrammer,
|
|
30
|
+
NestiaMigrateE2eFunctionProgrammer: () => NestiaMigrateE2eFunctionProgrammer,
|
|
31
|
+
NestiaMigrateE2eProgrammer: () => NestiaMigrateE2eProgrammer,
|
|
32
|
+
NestiaMigrateFileArchiver: () => NestiaMigrateFileArchiver,
|
|
33
|
+
NestiaMigrateImportProgrammer: () => NestiaMigrateImportProgrammer,
|
|
34
|
+
NestiaMigrateNestControllerProgrammer: () => NestiaMigrateNestControllerProgrammer,
|
|
35
|
+
NestiaMigrateNestMethodProgrammer: () => NestiaMigrateNestMethodProgrammer,
|
|
36
|
+
NestiaMigrateNestModuleProgrammer: () => NestiaMigrateNestModuleProgrammer,
|
|
37
|
+
NestiaMigrateNestProgrammer: () => NestiaMigrateNestProgrammer,
|
|
38
|
+
NestiaMigrateSchemaProgrammer: () => NestiaMigrateSchemaProgrammer
|
|
39
|
+
});
|
|
40
|
+
//#endregion
|
|
41
|
+
export { NestiaMigrateApiFileProgrammer, NestiaMigrateApiFunctionProgrammer, NestiaMigrateApiNamespaceProgrammer, NestiaMigrateApiProgrammer, NestiaMigrateApiSimulationProgrammer, NestiaMigrateApiStartProgrammer, NestiaMigrateApplication, NestiaMigrateDtoProgrammer, NestiaMigrateE2eFunctionProgrammer, NestiaMigrateE2eProgrammer, NestiaMigrateFileArchiver, NestiaMigrateImportProgrammer, NestiaMigrateNestControllerProgrammer, NestiaMigrateNestMethodProgrammer, NestiaMigrateNestModuleProgrammer, NestiaMigrateNestProgrammer, NestiaMigrateSchemaProgrammer, module_exports };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=module.mjs.map
|
package/lib/module.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.mjs","
|
|
1
|
+
{"version":3,"file":"module.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FilePrinter } from "../utils/FilePrinter.mjs";
|
|
2
|
+
import { NestiaMigrateApiFunctionProgrammer } from "./NestiaMigrateApiFunctionProgrammer.mjs";
|
|
3
|
+
import { NestiaMigrateApiNamespaceProgrammer } from "./NestiaMigrateApiNamespaceProgrammer.mjs";
|
|
4
|
+
import { NestiaMigrateImportProgrammer } from "./NestiaMigrateImportProgrammer.mjs";
|
|
5
|
+
import { factory } from "@ttsc/factory";
|
|
6
|
+
//#region src/programmers/NestiaMigrateApiFileProgrammer.ts
|
|
7
|
+
let NestiaMigrateApiFileProgrammer;
|
|
8
|
+
(function(_NestiaMigrateApiFileProgrammer) {
|
|
9
|
+
_NestiaMigrateApiFileProgrammer.write = (props) => {
|
|
10
|
+
const importer = new NestiaMigrateImportProgrammer();
|
|
11
|
+
const statements = props.routes.map((route) => [
|
|
12
|
+
FilePrinter.newLine(),
|
|
13
|
+
NestiaMigrateApiFunctionProgrammer.write({
|
|
14
|
+
config: props.config,
|
|
15
|
+
components: props.components,
|
|
16
|
+
importer,
|
|
17
|
+
route
|
|
18
|
+
}),
|
|
19
|
+
NestiaMigrateApiNamespaceProgrammer.write({
|
|
20
|
+
config: props.config,
|
|
21
|
+
components: props.components,
|
|
22
|
+
importer,
|
|
23
|
+
route
|
|
24
|
+
})
|
|
25
|
+
]).flat();
|
|
26
|
+
return [
|
|
27
|
+
...importer.toStatements((ref) => `../${"../".repeat(props.namespace.length)}structures/${ref}`),
|
|
28
|
+
...[...props.children].map((child) => factory.createExportDeclaration(void 0, false, factory.createNamespaceExport(factory.createIdentifier(child)), factory.createStringLiteral(`./${child}/index`))),
|
|
29
|
+
...statements
|
|
30
|
+
];
|
|
31
|
+
};
|
|
32
|
+
})(NestiaMigrateApiFileProgrammer || (NestiaMigrateApiFileProgrammer = {}));
|
|
33
|
+
//#endregion
|
|
34
|
+
export { NestiaMigrateApiFileProgrammer };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=NestiaMigrateApiFileProgrammer.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateApiFileProgrammer.mjs","
|
|
1
|
+
{"version":3,"file":"NestiaMigrateApiFileProgrammer.mjs","names":[],"sources":[],"mappings":""}
|