@nestia/migrate 12.0.0-rc.2 → 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/LICENSE +21 -21
- 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 +51 -49
- 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 +20 -20
- package/lib/bundles/SDK_TEMPLATE.js.map +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 +8 -12
- package/src/NestiaMigrateApplication.ts +192 -196
- package/src/analyzers/NestiaMigrateControllerAnalyzer.ts +51 -51
- package/src/archivers/NestiaMigrateFileArchiver.ts +32 -28
- package/src/bundles/NEST_TEMPLATE.ts +51 -49
- package/src/bundles/SDK_TEMPLATE.ts +20 -20
- package/src/executable/NestiaMigrateCommander.ts +115 -115
- package/src/executable/NestiaMigrateInquirer.ts +106 -106
- package/src/executable/bundle.js +396 -349
- package/src/executable/migrate.ts +7 -7
- package/src/factories/ExpressionFactory.ts +23 -23
- package/src/factories/FormatCheatSheet.ts +71 -71
- package/src/factories/IdentifierFactory.ts +84 -84
- package/src/factories/LiteralFactory.ts +54 -54
- package/src/factories/StatementFactory.ts +56 -56
- package/src/factories/TypeFactory.ts +27 -27
- package/src/factories/TypeLiteralFactory.ts +59 -62
- package/src/index.ts +4 -4
- package/src/internal/ts.ts +75 -75
- package/src/module.ts +6 -6
- package/src/programmers/NestiaMigrateApiFileProgrammer.ts +55 -55
- package/src/programmers/NestiaMigrateApiFunctionProgrammer.ts +355 -358
- package/src/programmers/NestiaMigrateApiNamespaceProgrammer.ts +511 -511
- package/src/programmers/NestiaMigrateApiProgrammer.ts +108 -108
- package/src/programmers/NestiaMigrateApiSimulationProgrammer.ts +309 -309
- package/src/programmers/NestiaMigrateApiStartProgrammer.ts +198 -198
- package/src/programmers/NestiaMigrateDtoProgrammer.ts +117 -117
- package/src/programmers/NestiaMigrateE2eFileProgrammer.ts +155 -155
- package/src/programmers/NestiaMigrateE2eProgrammer.ts +62 -48
- package/src/programmers/NestiaMigrateImportProgrammer.ts +127 -119
- package/src/programmers/NestiaMigrateNestControllerProgrammer.ts +66 -70
- package/src/programmers/NestiaMigrateNestMethodProgrammer.ts +402 -402
- package/src/programmers/NestiaMigrateNestModuleProgrammer.ts +64 -64
- package/src/programmers/NestiaMigrateNestProgrammer.ts +110 -89
- package/src/programmers/NestiaMigrateSchemaProgrammer.ts +472 -475
- package/src/programmers/index.ts +15 -15
- package/src/structures/INestiaMigrateConfig.ts +19 -19
- package/src/structures/INestiaMigrateContext.ts +9 -9
- package/src/structures/INestiaMigrateController.ts +8 -8
- package/src/structures/INestiaMigrateFile.ts +5 -5
- package/src/structures/index.ts +4 -4
- package/src/utils/FilePrinter.ts +44 -44
- package/src/utils/MapUtil.ts +13 -13
- package/src/utils/StringUtil.ts +109 -109
- package/README.md +0 -93
- 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
|
@@ -2,54 +2,56 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NEST_TEMPLATE = void 0;
|
|
4
4
|
exports.NEST_TEMPLATE = {
|
|
5
|
-
".
|
|
6
|
-
".
|
|
7
|
-
".
|
|
8
|
-
".
|
|
9
|
-
".
|
|
10
|
-
"
|
|
11
|
-
".
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"packages/api
|
|
20
|
-
"packages/api/
|
|
21
|
-
"packages/api/
|
|
22
|
-
"packages/api/
|
|
23
|
-
"packages/api/
|
|
24
|
-
"packages/api/tsconfig.json": "{\r\n \"compilerOptions\": {\r\n /* Visit https://aka.ms/tsconfig to read more about this file */\r\n /* Projects */\r\n // \"incremental\": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */\r\n // \"composite\": true, /* Enable constraints that allow a TypeScript project to be used with project references. */\r\n // \"tsBuildInfoFile\": \"./.tsbuildinfo\", /* Specify the path to .tsbuildinfo incremental compilation file. */\r\n // \"disableSourceOfProjectReferenceRedirect\": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */\r\n // \"disableSolutionSearching\": true, /* Opt a project out of multi-project reference checking when editing. */\r\n // \"disableReferencedProjectLoad\": true, /* Reduce the number of projects loaded automatically by TypeScript. */\r\n /* Language and Environment */\r\n \"target\": \"ES2015\", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */\r\n \"lib\": [\r\n \"DOM\",\r\n \"ES2015\"\r\n ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */// \"jsx\": \"preserve\", /* Specify what JSX code is generated. */\r\n // \"experimentalDecorators\": true, /* Enable experimental support for TC39 stage 2 draft decorators. */\r\n // \"emitDecoratorMetadata\": true, /* Emit design-type metadata for decorated declarations in source files. */\r\n // \"jsxFactory\": \"\", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */\r\n // \"jsxFragmentFactory\": \"\", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */\r\n // \"jsxImportSource\": \"\", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */\r\n // \"reactNamespace\": \"\", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */\r\n // \"noLib\": true, /* Disable including any library files, including the default lib.d.ts. */\r\n // \"useDefineForClassFields\": true, /* Emit ECMAScript-standard-compliant class fields. */\r\n // \"moduleDetection\": \"auto\", /* Control what method is used to detect module-format JS files. */\r\n /* Modules */\r\n \"module\": \"commonjs\", /* Specify what module code is generated. */\r\n \"rootDir\": \"../../src/api\", /* Specify the root folder within your source files. */\r\n // \"moduleResolution\": \"node\", /* Specify how TypeScript looks up a file from a given module specifier. */\r\n // \"baseUrl\": \"./\", /* Specify the base directory to resolve non-relative module names. */\r\n // \"paths\": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */\r\n // \"rootDirs\": [], /* Allow multiple folders to be treated as one when resolving modules. */\r\n // \"typeRoots\": [], /* Specify multiple folders that act like './node_modules/@types'. */\r\n // \"types\": [], /* Specify type package names to be included without being referenced in a source file. */\r\n // \"allowUmdGlobalAccess\": true, /* Allow accessing UMD globals from modules. */\r\n // \"moduleSuffixes\": [], /* List of file name suffixes to search when resolving a module. */\r\n // \"resolveJsonModule\": true, /* Enable importing .json files. */\r\n // \"noResolve\": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */\r\n /* JavaScript Support */\r\n // \"allowJs\": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */\r\n // \"checkJs\": true, /* Enable error reporting in type-checked JavaScript files. */\r\n // \"maxNodeModuleJsDepth\": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */\r\n /* Emit */\r\n \"declaration\": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */// \"declarationMap\": true, /* Create sourcemaps for d.ts files. */\r\n // \"emitDeclarationOnly\": true, /* Only output d.ts files and not JavaScript files. */\r\n \"sourceMap\": true, /* Create source map files for emitted JavaScript files. */// \"outFile\": \"./\", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */\r\n \"outDir\": \"./lib\", /* Specify an output folder for all emitted files. */// \"removeComments\": true, /* Disable emitting comments. */\r\n // \"noEmit\": true, /* Disable emitting files from a compilation. */\r\n // \"importHelpers\": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */\r\n // \"importsNotUsedAsValues\": \"remove\", /* Specify emit/checking behavior for imports that are only used for types. */\r\n // \"downlevelIteration\": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */// \"sourceRoot\": \"\", /* Specify the root path for debuggers to find the reference source code. */\r\n // \"mapRoot\": \"\", /* Specify the location where debugger should locate map files instead of generated locations. */\r\n // \"inlineSourceMap\": true, /* Include sourcemap files inside the emitted JavaScript. */\r\n // \"inlineSources\": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */\r\n // \"emitBOM\": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */\r\n \"newLine\": \"lf\", /* Set the newline character for emitting files. */// \"stripInternal\": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */\r\n // \"noEmitHelpers\": true, /* Disable generating custom helper functions like '__extends' in compiled output. */\r\n // \"noEmitOnError\": true, /* Disable emitting files if any type checking errors are reported. */\r\n // \"preserveConstEnums\": true, /* Disable erasing 'const enum' declarations in generated code. */\r\n // \"declarationDir\": \"./\", /* Specify the output directory for generated declaration files. */\r\n // \"preserveValueImports\": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */\r\n /* Interop Constraints */\r\n // \"isolatedModules\": true, /* Ensure that each file can be safely transpiled without relying on other imports. */\r\n // \"allowSyntheticDefaultImports\": true, /* Allow 'import x from y' when a module doesn't have a default export. */\r\n \"esModuleInterop\": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// \"preserveSymlinks\": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */\r\n \"forceConsistentCasingInFileNames\": true, /* Ensure that casing is correct in imports. *//* Type Checking */\r\n \"strict\": true, /* Enable all strict type-checking options. */// \"noImplicitAny\": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */\r\n // \"strictNullChecks\": true, /* When type checking, take into account 'null' and 'undefined'. */\r\n // \"strictFunctionTypes\": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */\r\n // \"strictBindCallApply\": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */\r\n // \"strictPropertyInitialization\": true, /* Check for class properties that are declared but not set in the constructor. */\r\n // \"noImplicitThis\": true, /* Enable error reporting when 'this' is given the type 'any'. */\r\n // \"useUnknownInCatchVariables\": true, /* Default catch clause variables as 'unknown' instead of 'any'. */\r\n // \"alwaysStrict\": true, /* Ensure 'use strict' is always emitted. */\r\n // \"noUnusedLocals\": true, /* Enable error reporting when local variables aren't read. */\r\n // \"noUnusedParameters\": true, /* Raise an error when a function parameter isn't read. */\r\n // \"exactOptionalPropertyTypes\": true, /* Interpret optional property types as written, rather than adding 'undefined'. */\r\n // \"noImplicitReturns\": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */\r\n // \"noFallthroughCasesInSwitch\": true, /* Enable error reporting for fallthrough cases in switch statements. */\r\n // \"noUncheckedIndexedAccess\": true, /* Add 'undefined' to a type when accessed using an index. */\r\n // \"noImplicitOverride\": true, /* Ensure overriding members in derived classes are marked with an override modifier. */\r\n // \"noPropertyAccessFromIndexSignature\": true, /* Enforces using indexed accessors for keys declared using an indexed type. */\r\n // \"allowUnusedLabels\": true, /* Disable error reporting for unused labels. */\r\n // \"allowUnreachableCode\": true, /* Disable error reporting for unreachable code. */\r\n /* Completeness */\r\n // \"skipDefaultLibCheck\": true, /* Skip type checking .d.ts files that are included with TypeScript. */\r\n \"skipLibCheck\": true, /* Skip type checking all .d.ts files. */\r\n \"plugins\": [\r\n { \"transform\": \"typia/lib/transform\", \"enabled\": false }\r\n ],\r\n \"strictNullChecks\": true\r\n },\r\n \"include\": [\"../../src/api\"]\r\n}",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"src/
|
|
38
|
-
"src/
|
|
39
|
-
"src/
|
|
40
|
-
"src/
|
|
41
|
-
"src/
|
|
42
|
-
"src/utils/
|
|
43
|
-
"
|
|
44
|
-
"test/benchmark/
|
|
45
|
-
"test/
|
|
46
|
-
"test/helpers/
|
|
47
|
-
"test/helpers/
|
|
48
|
-
"test/
|
|
49
|
-
"test/
|
|
50
|
-
"test/
|
|
51
|
-
"tsconfig.json": "{\r\n \"compilerOptions\": {\r\n /* Visit https://aka.ms/tsconfig to read more about this file */\r\n\r\n /* Projects */\r\n // \"incremental\": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */\r\n // \"composite\": true, /* Enable constraints that allow a TypeScript project to be used with project references. */\r\n // \"tsBuildInfoFile\": \"./.tsbuildinfo\", /* Specify the path to .tsbuildinfo incremental compilation file. */\r\n // \"disableSourceOfProjectReferenceRedirect\": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */\r\n // \"disableSolutionSearching\": true, /* Opt a project out of multi-project reference checking when editing. */\r\n // \"disableReferencedProjectLoad\": true, /* Reduce the number of projects loaded automatically by TypeScript. */\r\n\r\n /* Language and Environment */\r\n \"target\": \"ES2015\", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */\r\n \"lib\": [\r\n \"DOM\",\r\n \"ESNext\",\r\n ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */\r\n // \"jsx\": \"preserve\", /* Specify what JSX code is generated. */\r\n \"experimentalDecorators\": true, /* Enable experimental support for TC39 stage 2 draft decorators. */\r\n \"emitDecoratorMetadata\": true, /* Emit design-type metadata for decorated declarations in source files. */\r\n // \"jsxFactory\": \"\", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */\r\n // \"jsxFragmentFactory\": \"\", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */\r\n // \"jsxImportSource\": \"\", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */\r\n // \"reactNamespace\": \"\", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */\r\n // \"noLib\": true, /* Disable including any library files, including the default lib.d.ts. */\r\n // \"useDefineForClassFields\": true, /* Emit ECMAScript-standard-compliant class fields. */\r\n // \"moduleDetection\": \"auto\", /* Control what method is used to detect module-format JS files. */\r\n\r\n /* Modules */\r\n \"module\": \"nodenext\", /* Specify what module code is generated. */\r\n \"moduleResolution\": \"nodenext\", /* Specify how TypeScript looks up a file from a given module specifier. */\r\n \"rootDir\": \"./src\", /* Specify the root folder within your source files. */\r\n // \"baseUrl\": \"./\", /* Specify the base directory to resolve non-relative module names. */\r\n \"paths\": {\r\n \"@ORGANIZATION/PROJECT-api/lib/*\": [\"./src/api/*\"],\r\n \"@ORGANIZATION/PROJECT-api\": [\"./src/api\"],\r\n }, /* Specify a set of entries that re-map imports to additional lookup locations. */\r\n // \"rootDirs\": [], /* Allow multiple folders to be treated as one when resolving modules. */\r\n // \"typeRoots\": [], /* Specify multiple folders that act like './node_modules/@types'. */\r\n \"types\": [\"*\"], /* Specify type package names to be included without being referenced in a source file. */\r\n // \"allowUmdGlobalAccess\": true, /* Allow accessing UMD globals from modules. */\r\n // \"moduleSuffixes\": [], /* List of file name suffixes to search when resolving a module. */\r\n // \"resolveJsonModule\": true, /* Enable importing .json files. */\r\n // \"noResolve\": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */\r\n\r\n /* JavaScript Support */\r\n // \"allowJs\": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */\r\n // \"checkJs\": true, /* Enable error reporting in type-checked JavaScript files. */\r\n // \"maxNodeModuleJsDepth\": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */\r\n\r\n /* Emit */\r\n // \"declaration\": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */\r\n // \"declarationMap\": true, /* Create sourcemaps for d.ts files. */\r\n // \"emitDeclarationOnly\": true, /* Only output d.ts files and not JavaScript files. */\r\n \"sourceMap\": true, /* Create source map files for emitted JavaScript files. */\r\n // \"outFile\": \"./\", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */\r\n \"outDir\": \"./lib\", /* Specify an output folder for all emitted files. */\r\n // \"removeComments\": true, /* Disable emitting comments. */\r\n // \"noEmit\": true, /* Disable emitting files from a compilation. */\r\n // \"importHelpers\": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */\r\n // \"importsNotUsedAsValues\": \"remove\", /* Specify emit/checking behavior for imports that are only used for types. */\r\n // \"downlevelIteration\": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */\r\n // \"sourceRoot\": \"\", /* Specify the root path for debuggers to find the reference source code. */\r\n // \"mapRoot\": \"\", /* Specify the location where debugger should locate map files instead of generated locations. */\r\n // \"inlineSourceMap\": true, /* Include sourcemap files inside the emitted JavaScript. */\r\n // \"inlineSources\": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */\r\n // \"emitBOM\": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */\r\n \"newLine\": \"lf\", /* Set the newline character for emitting files. */\r\n \"stripInternal\": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */\r\n // \"noEmitHelpers\": true, /* Disable generating custom helper functions like '__extends' in compiled output. */\r\n // \"noEmitOnError\": true, /* Disable emitting files if any type checking errors are reported. */\r\n // \"preserveConstEnums\": true, /* Disable erasing 'const enum' declarations in generated code. */\r\n // \"declarationDir\": \"./\", /* Specify the output directory for generated declaration files. */\r\n // \"preserveValueImports\": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */\r\n\r\n /* Interop Constraints */\r\n // \"isolatedModules\": true, /* Ensure that each file can be safely transpiled without relying on other imports. */\r\n // \"allowSyntheticDefaultImports\": true, /* Allow 'import x from y' when a module doesn't have a default export. */\r\n \"esModuleInterop\": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */\r\n // \"preserveSymlinks\": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */\r\n \"forceConsistentCasingInFileNames\": true, /* Ensure that casing is correct in imports. */\r\n\r\n /* Type Checking */\r\n \"strict\": true, /* Enable all strict type-checking options. */\r\n // \"noImplicitAny\": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */\r\n // \"strictNullChecks\": true, /* When type checking, take into account 'null' and 'undefined'. */\r\n // \"strictFunctionTypes\": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */\r\n // \"strictBindCallApply\": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */\r\n // \"strictPropertyInitialization\": true, /* Check for class properties that are declared but not set in the constructor. */\r\n // \"noImplicitThis\": true, /* Enable error reporting when 'this' is given the type 'any'. */\r\n // \"useUnknownInCatchVariables\": true, /* Default catch clause variables as 'unknown' instead of 'any'. */\r\n // \"alwaysStrict\": true, /* Ensure 'use strict' is always emitted. */\r\n \"noUnusedLocals\": true, /* Enable error reporting when local variables aren't read. */\r\n \"noUnusedParameters\": true, /* Raise an error when a function parameter isn't read. */\r\n // \"exactOptionalPropertyTypes\": true, /* Interpret optional property types as written, rather than adding 'undefined'. */\r\n \"noImplicitReturns\": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */\r\n \"noFallthroughCasesInSwitch\": true, /* Enable error reporting for fallthrough cases in switch statements. */\r\n // \"noUncheckedIndexedAccess\": true, /* Add 'undefined' to a type when accessed using an index. */\r\n // \"noImplicitOverride\": true, /* Ensure overriding members in derived classes are marked with an override modifier. */\r\n // \"noPropertyAccessFromIndexSignature\": true, /* Enforces using indexed accessors for keys declared using an indexed type. */\r\n // \"allowUnusedLabels\": true, /* Disable error reporting for unused labels. */\r\n // \"allowUnreachableCode\": true, /* Disable error reporting for unreachable code. */\r\n\r\n /* Completeness */\r\n // \"skipDefaultLibCheck\": true, /* Skip type checking .d.ts files that are included with TypeScript. */\r\n \"skipLibCheck\": true, /* Skip type checking all .d.ts files. */\r\n \"plugins\": [\r\n { \"transform\": \"typescript-transform-paths\" },\r\n { \"transform\": \"typia/lib/transform\", \"enabled\": false },\r\n { \"transform\": \"@nestia/core/native/transform.cjs\" },\r\n { \"transform\": \"@nestia/sdk/lib/transform\" },\r\n ]\r\n },\r\n \"include\": [\r\n \"src\"\r\n ],\r\n \"exclude\": [\r\n \"node_modules\",\r\n \"packages\",\r\n ]\r\n}\r\n",
|
|
52
|
-
"
|
|
53
|
-
"webpack.config.js": "const path = require(\"path\");\
|
|
5
|
+
".github/workflows/build.yml": "name: build\non:\n pull_request:\n push:\n branches:\n - master\n\njobs:\n Ubuntu:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: actions/setup-node@v4\n - uses: pnpm/action-setup@v4\n\n - name: Install\n run: pnpm install\n\n - name: Build\n run: pnpm build\n\n - name: Test\n working-directory: packages/backend\n run: pnpm test --simultaneous 16\n",
|
|
6
|
+
".github/workflows/typos.yml": "name: typos\non:\n pull_request:\n\njobs:\n typos:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout Actions Repository\n uses: actions/checkout@v4\n\n - uses: crate-ci/typos@master\n with:\n config: ./typos.toml\n",
|
|
7
|
+
".gitignore": "bin/\ndist/\nlib/\nnode_modules/\n\n.env\n.npmrc\npackage-lock.json\n*.log\n",
|
|
8
|
+
".vscode/launch.json": "{\n // Use IntelliSense to learn about possible Node.js debug attributes.\n // Hover to view descriptions of existing attributes.\n // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"type\": \"node\",\n \"request\": \"launch\",\n \"name\": \"Backend Test\",\n \"runtimeExecutable\": \"pnpm\",\n \"runtimeArgs\": [\"ttsx\", \"--project\", \"test/tsconfig.json\", \"test/index.ts\"],\n \"cwd\": \"${workspaceRoot}/packages/backend\",\n \"args\": [\n //----\n // You can run specific test functions\n //\n // If you want to include or exclude multiple words,\n // then separate them with space character\n //----\n // \"--include\", \"some-words-to-include\",\n // \"--exclude\", \"some-word another-word\",\n ],\n }\n ]\n}\n",
|
|
9
|
+
".vscode/settings.json": "{\n \"editor.tabSize\": 2\n}\n",
|
|
10
|
+
"LICENSE": "MIT License\n\nCopyright (c) 2022 Jeongho Nam\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
|
|
11
|
+
"README.md": "# Nestia Template\n## Outline\n[](https://github.com/samchon/nestia-start/actions?query=workflow%3Abuild)\n\nA template repository for backend projects using [nestia](https://github.com/samchon/nestia).\n\nYou can create a new project from this boilerplate by running below command:\n\n```bash\nnpx nestia start <directory>\n```\n\nFor reference, this is a minimal boilerplate project concentrating only on [nestia](https://github.com/samchon/nestia) SDK generation. \n\nIf you wanna much detailed boilerplate project, visit [`@samchon/backend`](https://github.com/samchon/backend).\n\n\n\n\n## Directories and Files\nThis template project is a [pnpm](https://pnpm.io) monorepo composed with two packages.\n\nBackend source files are placed into the [packages/backend/src](packages/backend/src) directory, and they are compiled by [`ttsc`](https://ttsc.dev) (TypeScript-Go toolchain supporting compiler-powered plugins like [typia](https://github.com/samchon/typia)) into the `lib` directory. Otherwise, client SDK library files generated by [nestia](https://github.com/samchon/nestia) are placed into the [packages/api](packages/api) directory, and they would be published to the npm registry as `@ORGANIZATION/PROJECT-api`.\n\n - [packages/api/](packages/api): SDK library published to the `@ORGANIZATION/PROJECT-api`\n - [**packages/api/src/functional/**](packages/api/src/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [**packages/api/src/structures/**](packages/api/src/structures/): DTO structures\n - [packages/backend/](packages/backend): Backend server package\n - [packages/backend/src/](packages/backend/src): Backend source directory\n - [packages/backend/src/controllers/](packages/backend/src/controllers/): Controller classes of the Main Program\n - [**packages/backend/test/**](packages/backend/test): Test Automation Program\n - [packages/backend/nestia.config.ts](packages/backend/nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [packages/backend/tsconfig.json](packages/backend/tsconfig.json): TypeScript configuration for the main program\n - [pnpm-workspace.yaml](pnpm-workspace.yaml): Workspace and catalog configuration of [pnpm](https://pnpm.io)\n - [package.json](package.json): Root workspace configuration\n\n\n\n\n## PNPM Run Commands\nList of the run commands defined in the [packages/backend/package.json](packages/backend/package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything (SDK + main program)\n - `build:main`: Build main program (`src` directory)\n - `build:test` Type check test automation program (`test` directory)\n - `build:sdk`: Build SDK into the [packages/api](packages/api) directory\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental type checking for development (test program)\n - Deploy\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - `start:prod`: Start the backend server with the compiled `lib` directory\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\nAlso, in the root directory, you can run below commands:\n\n - `build`: Build every package (`pnpm -r build`)\n - `test`: Run test automation program of the backend\n - `start`: Start the backend server\n - `lint`: Type check and lint every package with [`ttsc`](https://ttsc.dev)\n - `format`: Format every TypeScript file with [`ttsc format`](https://ttsc.dev)\n\nFor reference, TypeScript compiler options and [`@ttsc/lint`](https://ttsc.dev) rules are shared from the [config](config) workspace package. Each package extends [config/tsconfig.json](config/tsconfig.json) and spreads [config/lint.config.ts](config/lint.config.ts) in its own `lint.config.ts` file.\n\nTo publish the SDK library, run `npm publish` in the [packages/api](packages/api) directory. The `prepack` script would build everything before the publishing.\n\n\n\n\n## Specialization\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|-----------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n\n\n\n## Test Driven Development\nWith [nestia](https://github.com/samchon/nestia) helps to accomplish TDD (Test Driven Development). \n\nJust define DTOs and API controllers' methods (only declarations) first. After the definitions, and build SDK (Software Development Kit) through [nestia](https://github.com/samchon/nestia) (`pnpm build:sdk`). After buildling those SDK, develop test automation program using the SDK, following use-case scenarios in the framework of client side.\n\nDuring the test automation program development, you can find that which API is miss-designed or which requirement analysis is not exact. Development of the main program must be the last step after such validation process during TDD.\n\n> Visit the [samchon/backend](https://github.com/samchon/backend), then you may find much detailed story about this TDD.\n>\n> 1. Definitions\n> 2. SDK\n> 3. Test Automation Program\n> 4. Main Program\n\n```typescript\nimport {\n ArrayUtil,\n GaffComparator,\n RandomGenerator,\n TestValidator,\n} from \"@nestia/e2e\";\n\nimport api, { IBbsArticle, IPage } from \"@ORGANIZATION/PROJECT-api\";\n\nexport async function test_api_bbs_article_index_sort(\n connection: api.IConnection,\n): Promise<void> {\n // GENERATE 100 ARTICLES\n const section: string = \"general\";\n await ArrayUtil.asyncRepeat(100, () =>\n api.functional.bbs.articles.create(connection, {\n section,\n body: {\n writer: RandomGenerator.name(),\n title: RandomGenerator.paragraph(),\n body: RandomGenerator.content(),\n format: \"txt\",\n files: [],\n password: RandomGenerator.alphabets(8),\n },\n }),\n );\n\n // PREPARE VALIDATOR\n const validator = TestValidator.sort(\n \"BbsArticleProvider.index()\",\n async (sort: IPage.Sort<IBbsArticle.IRequest.SortableColumns>) => {\n const page: IPage<IBbsArticle.ISummary> =\n await api.functional.bbs.articles.index(connection, {\n section,\n body: {\n limit: 100,\n sort,\n },\n });\n return page.data;\n },\n );\n\n // DO VALIDATE\n const components = [\n validator(\"created_at\")(GaffComparator.dates((x) => x.created_at)),\n validator(\"updated_at\")(GaffComparator.dates((x) => x.updated_at)),\n validator(\"title\")(GaffComparator.strings((x) => x.title)),\n validator(\"writer\")(GaffComparator.strings((x) => x.writer)),\n validator(\n \"writer\",\n \"title\",\n )(GaffComparator.strings((x) => [x.writer, x.title])),\n ];\n for (const comp of components) {\n await comp(\"+\", false);\n await comp(\"-\", false);\n }\n}\n```\n\nFor reference, if you run `pnpm benchmark` command, your test functions defined in the [packages/backend/test/features/api](packages/backend/test/features/api) directory would be utilized for performance benchmarking. If you want to see the performance bench result earlier, visit below link please:\n\n - [packages/backend/docs/benchmarks/AMD Ryzen 9 7940HS w Radeon 780M Graphics.md](https://github.com/samchon/nestia-start/blob/master/packages/backend/docs/benchmarks/AMD%20Ryzen%209%207940HS%20w%20Radeon%20780M%20Graphics.md)\n",
|
|
12
|
+
"config/lint.config.ts": "import type { ITtscLintConfig } from \"@ttsc/lint\";\n\nconst config = {\n format: {\n // Keep @ttsc/lint formatting aligned with the repository import groups.\n severity: \"off\",\n semi: true,\n singleQuote: false,\n arrowParens: \"always\",\n bracketSpacing: true,\n quoteProps: \"as-needed\",\n trailingComma: \"all\",\n printWidth: 80,\n tabWidth: 2,\n useTabs: false,\n endOfLine: \"lf\",\n sortImports: {\n order: [\n \"^@ORGANIZATION/PROJECT-api(.*)$\",\n \"^@/(.*)$\",\n \"<THIRD_PARTY_MODULES>\",\n \"^[./]\",\n ],\n },\n jsDoc: true,\n },\n rules: {\n // ESLint core: runtime correctness and low-noise modern JavaScript.\n \"default-param-last\": \"error\",\n eqeqeq: \"error\",\n \"for-direction\": \"error\",\n \"getter-return\": \"error\",\n \"grouped-accessor-pairs\": \"error\",\n \"guard-for-in\": \"error\",\n \"no-array-constructor\": \"error\",\n \"no-async-promise-executor\": \"error\",\n \"no-caller\": \"error\",\n \"no-case-declarations\": \"error\",\n \"no-class-assign\": \"error\",\n \"no-compare-neg-zero\": \"error\",\n \"no-cond-assign\": \"error\",\n \"no-constructor-return\": \"error\",\n \"no-debugger\": \"error\",\n \"no-delete-var\": \"error\",\n \"no-dupe-args\": \"error\",\n \"no-dupe-class-members\": \"error\",\n \"no-dupe-else-if\": \"error\",\n \"no-dupe-keys\": \"error\",\n \"no-duplicate-case\": \"error\",\n \"no-duplicate-imports\": \"error\",\n \"no-empty-character-class\": \"error\",\n \"no-empty-pattern\": \"error\",\n \"no-empty-static-block\": \"error\",\n \"no-eval\": \"error\",\n \"no-ex-assign\": \"error\",\n \"no-extend-native\": \"error\",\n \"no-extra-bind\": \"error\",\n \"no-extra-boolean-cast\": \"error\",\n \"no-fallthrough\": \"error\",\n \"no-func-assign\": \"error\",\n \"no-import-assign\": \"error\",\n \"no-inner-declarations\": \"error\",\n \"no-invalid-this\": \"error\",\n \"no-irregular-whitespace\": \"error\",\n \"no-iterator\": \"error\",\n \"no-loss-of-precision\": \"error\",\n \"no-multi-assign\": \"error\",\n \"no-multi-str\": \"error\",\n \"no-new-func\": \"error\",\n \"no-new-symbol\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-obj-calls\": \"error\",\n \"no-object-constructor\": \"error\",\n \"no-octal\": \"error\",\n \"no-octal-escape\": \"error\",\n \"no-promise-executor-return\": \"error\",\n \"no-proto\": \"error\",\n \"no-prototype-builtins\": \"error\",\n \"no-redeclare\": \"error\",\n \"no-regex-spaces\": \"error\",\n \"no-return-assign\": \"error\",\n \"no-script-url\": \"error\",\n \"no-self-assign\": \"error\",\n \"no-self-compare\": \"error\",\n \"no-sequences\": \"error\",\n \"no-setter-return\": \"error\",\n \"no-shadow-restricted-names\": \"error\",\n \"no-sparse-arrays\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n \"no-this-before-super\": \"error\",\n \"no-unreachable\": \"error\",\n \"no-unsafe-finally\": \"error\",\n \"no-unsafe-negation\": \"error\",\n \"no-unused-labels\": \"error\",\n \"no-useless-assignment\": \"error\",\n \"no-useless-call\": \"error\",\n \"no-useless-catch\": \"error\",\n \"no-useless-computed-key\": \"error\",\n \"no-useless-escape\": \"error\",\n \"no-useless-rename\": \"error\",\n \"no-var\": \"error\",\n \"no-with\": \"error\",\n \"prefer-const\": \"error\",\n radix: \"error\",\n \"use-isnan\": \"error\",\n \"valid-typeof\": \"error\",\n\n // RegExp: invalid, empty, or misleading regular-expression structure.\n \"regexp/no-dupe-characters-character-class\": \"error\",\n \"regexp/no-empty-alternative\": \"error\",\n \"regexp/no-empty-capturing-group\": \"error\",\n \"regexp/no-empty-group\": \"error\",\n \"regexp/no-empty-lookarounds-assertion\": \"error\",\n \"regexp/no-useless-character-class\": \"error\",\n \"regexp/no-useless-escape\": \"error\",\n \"regexp/no-useless-flag\": \"error\",\n \"regexp/no-useless-quantifier\": \"error\",\n \"regexp/no-useless-two-nums-quantifier\": \"error\",\n \"regexp/no-zero-quantifier\": \"error\",\n \"regexp/sort-flags\": \"error\",\n\n // Promise: chain shapes that can swallow or misroute async errors.\n \"promise/no-multiple-resolved\": \"error\",\n \"promise/no-new-statics\": \"error\",\n \"promise/no-return-in-finally\": \"error\",\n \"promise/no-return-wrap\": \"error\",\n \"promise/param-names\": \"error\",\n \"promise/prefer-catch\": \"error\",\n \"promise/spec-only\": \"error\",\n\n // Security: concrete sink patterns with a low false-positive rate here.\n \"security/detect-bidi-characters\": \"error\",\n \"security/detect-buffer-noassert\": \"error\",\n \"security/detect-eval-with-expression\": \"error\",\n \"security/detect-new-buffer\": \"error\",\n \"security/detect-pseudoRandomBytes\": \"error\",\n \"security/detect-unsafe-regex\": \"error\",\n\n // TypeScript: type-aware correctness rules.\n \"typescript/adjacent-overload-signatures\": \"error\",\n \"typescript/await-thenable\": \"error\",\n \"typescript/ban-ts-comment\": \"error\",\n \"typescript/ban-tslint-comment\": \"error\",\n \"typescript/no-array-delete\": \"error\",\n \"typescript/no-confusing-non-null-assertion\": \"error\",\n \"typescript/no-duplicate-enum-values\": \"error\",\n \"typescript/no-extra-non-null-assertion\": \"error\",\n \"typescript/no-floating-promises\": \"error\",\n \"typescript/no-for-in-array\": \"error\",\n \"typescript/no-invalid-void-type\": \"error\",\n \"typescript/no-misused-new\": \"error\",\n \"typescript/no-misused-promises\": \"error\",\n \"typescript/no-misused-spread\": \"error\",\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-non-null-asserted-nullish-coalescing\": \"error\",\n \"typescript/no-non-null-asserted-optional-chain\": \"error\",\n \"typescript/no-redundant-type-constituents\": \"error\",\n \"typescript/no-unnecessary-type-constraint\": \"error\",\n \"typescript/no-unsafe-declaration-merging\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-unary-minus\": \"error\",\n \"typescript/no-wrapper-object-types\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-as-const\": \"error\",\n \"typescript/prefer-promise-reject-errors\": \"error\",\n \"typescript/require-array-sort-compare\": \"error\",\n \"typescript/switch-exhaustiveness-check\": \"error\",\n \"typescript/triple-slash-reference\": \"error\",\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n\n // Unicorn: correctness-oriented runtime/API traps, not broad style policy.\n \"unicorn/error-message\": \"error\",\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-await-in-promise-methods\": \"error\",\n \"unicorn/no-empty-file\": \"error\",\n \"unicorn/no-invalid-fetch-options\": \"error\",\n \"unicorn/no-invalid-remove-event-listener\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-thenable\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n },\n} satisfies ITtscLintConfig;\n\nexport default config;\n",
|
|
13
|
+
"config/package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT-config\",\n \"version\": \"0.1.0\",\n \"description\": \"Shared TypeScript and @ttsc/lint configuration for the workspace\",\n \"files\": [\n \"lint.config.ts\",\n \"tsconfig.json\"\n ],\n \"devDependencies\": {\n \"@ttsc/lint\": \"catalog:typescript\",\n \"typescript\": \"catalog:typescript\"\n }\n}",
|
|
14
|
+
"config/tsconfig.json": "{\n \"compilerOptions\": {\n \"target\": \"esnext\",\n \"lib\": [\"DOM\", \"ESNext\"],\n \"module\": \"nodenext\",\n \"moduleResolution\": \"nodenext\",\n \"types\": [\"*\"],\n \"resolveJsonModule\": true,\n \"sourceMap\": true,\n \"newLine\": \"lf\",\n \"esModuleInterop\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"strict\": true,\n \"noImplicitReturns\": true,\n \"noUncheckedIndexedAccess\": true,\n \"skipLibCheck\": true,\n }\n}\n",
|
|
15
|
+
"package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT\",\n \"version\": \"0.1.0\",\n \"description\": \"Starter kit of Nestia\",\n \"scripts\": {\n \"build\": \"pnpm -r --if-present build\",\n \"dev\": \"pnpm -C packages/backend dev\",\n \"format\": \"pnpm -r --if-present format\",\n \"lint\": \"pnpm -r --if-present lint\",\n \"start\": \"pnpm -C packages/backend start\",\n \"test\": \"pnpm -C packages/backend test\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"keywords\": [\n \"nestia\",\n \"template\",\n \"boilerplate\"\n ],\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"packageManager\": \"pnpm@10.10.0\",\n \"stackblitz\": {\n \"startCommand\": \"pnpm install && pnpm test -- --simultaneous 1\"\n }\n}",
|
|
16
|
+
"packages/api/.gitignore": "lib/\nnode_modules/\n\nswagger.json\nopenai.json",
|
|
17
|
+
"packages/api/LICENSE": "MIT License\n\nCopyright (c) 2021 ORGANIZATION\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
|
|
18
|
+
"packages/api/README.md": "# SDK Library\nThis is a SDK library generated by [`nestia`](https://nestia.io).\n\nWith this SDK library, you can easily and safely interact with backend server.\n\nJust import and call some API functions like gif image below:\n\n\n\n> Left is server code, and right is client code utilizing the SDK\n\n\n\n\n# What [`Nestia`](https://nestia.io) is:\n\n\n[](https://github.com/samchon/nestia/blob/master/LICENSE)\n[](https://www.npmjs.com/package/@nestia/core)\n[](https://www.npmjs.com/package/@nestia/core)\n[](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)\n[](https://nestia.io/docs/)\n\nNestia is a set of helper libraries for NestJS, supporting below features:\n\n - `@nestia/core`: super-fast decorators\n - `@nestia/sdk`:\n - Swagger generator evolved than ever\n - SDK library generator for clients\n - Mockup Simulator for client applications\n - Automatic E2E test functions generator\n - `@nestia/migrate`: migration from Swagger to NestJS\n - `nestia`: just CLI (command line interface) tool\n\n> **Note**\n> \n> - **Only one line** required, with pure TypeScript type\n> - Enhance performance **30x** up\n> - Runtime validator is **20,000x faster** than `class-validator`\n> - JSON serialization is **200x faster** than `class-transformer`\n> - Software Development Kit\n> - SDK is a collection of `fetch` functions with type definitions like [tRPC](https://trpc.io/)\n> - Mockup simulator means embedded backend simulator in SDK\n> - similar with [msw](https://mswjs.io/), but fully automated",
|
|
19
|
+
"packages/api/lint.config.ts": "import type { ITtscLintConfig } from \"@ttsc/lint\";\n\nexport default {\n extends: \"../../config/lint.config.ts\",\n ignores: [\"src/functional/**/*.ts\"],\n} satisfies ITtscLintConfig;\n",
|
|
20
|
+
"packages/api/package.json": "{\n \"name\": \"@ORGANIZATION/PROJECT-api\",\n \"version\": \"0.1.0\",\n \"description\": \"SDK library generated by Nestia\",\n \"main\": \"src/index.ts\",\n \"exports\": {\n \".\": \"./src/index.ts\"\n },\n \"scripts\": {\n \"build\": \"pnpm build:sdk && pnpm build:ttsc && pnpm build:rollup\",\n \"build:sdk\": \"cd ../backend && pnpm build:sdk\",\n \"build:ttsc\": \"ttsc -p tsconfig.json\",\n \"build:rollup\": \"rollup -c\",\n \"format\": \"ttsc format -p tsconfig.json\",\n \"lint\": \"ttsc -p tsconfig.json --noEmit\",\n \"prepack\": \"pnpm build\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"files\": [\n \"lib\",\n \"package.json\",\n \"swagger.json\",\n \"README.md\"\n ],\n \"dependencies\": {\n \"@nestia/fetcher\": \"catalog:samchon\",\n \"tgrid\": \"catalog:samchon\",\n \"typia\": \"catalog:samchon\"\n },\n \"devDependencies\": {\n \"@rollup/plugin-terser\": \"^0.4.4\",\n \"@ttsc/lint\": \"catalog:typescript\",\n \"@ttsc/paths\": \"catalog:typescript\",\n \"rollup\": \"^4.18.0\",\n \"ttsc\": \"catalog:typescript\",\n \"typescript\": \"catalog:typescript\"\n },\n \"publishConfig\": {\n \"main\": \"./lib/index.js\",\n \"module\": \"./lib/index.mjs\",\n \"types\": \"./lib/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/index.d.ts\",\n \"import\": \"./lib/index.mjs\",\n \"default\": \"./lib/index.js\"\n }\n }\n }\n}",
|
|
21
|
+
"packages/api/rollup.config.js": "const fs = require(\"fs\");\nconst os = require(\"os\");\nconst path = require(\"path\");\nconst terser = require(\"@rollup/plugin-terser\");\nconst { TtscCompiler } = require(\"ttsc\");\n\nconst PROJECT_DIR = __dirname;\nconst VIRTUAL_PREFIX = \"\\0ttsc:\";\n\nconst normalize = (file) => file.replace(/\\\\/g, \"/\");\n\nconst compileProject = () => {\n const directory = fs.mkdtempSync(path.join(os.tmpdir(), \"project-api-rollup-\"));\n const config = path.join(directory, \"tsconfig.json\");\n\n fs.writeFileSync(\n config,\n JSON.stringify(\n {\n extends: normalize(path.join(PROJECT_DIR, \"tsconfig.json\")),\n compilerOptions: {\n declaration: false,\n declarationMap: false,\n module: \"ESNext\",\n moduleResolution: \"bundler\",\n plugins: [\n {\n transform: \"@ttsc/lint\",\n configFile: normalize(path.join(PROJECT_DIR, \"lint.config.ts\")),\n },\n ],\n target: \"ESNext\",\n },\n },\n null,\n 2,\n ),\n );\n\n try {\n const result = new TtscCompiler({\n cwd: PROJECT_DIR,\n projectRoot: PROJECT_DIR,\n tsconfig: config,\n }).compile();\n\n if (result.type === \"exception\") {\n throw new Error(\n result.error instanceof Error ? result.error.message : String(result.error),\n );\n }\n if (result.type === \"failure\") {\n throw new Error(\n result.diagnostics\n .map((d) =>\n [d.file, d.line, d.character, d.messageText]\n .filter((v) => v !== null && v !== undefined && v !== \"\")\n .join(\":\"),\n )\n .join(\"\\n\"),\n );\n }\n return result.output;\n } finally {\n fs.rmSync(directory, { recursive: true, force: true });\n }\n};\n\nconst ttscMemory = () => {\n let output = {};\n\n const resolve = (source, importer) => {\n if (source === \"lib/index.js\") {\n return \"lib/index.js\";\n }\n if (importer === undefined || source.startsWith(\".\") === false) {\n return null;\n }\n\n const base = path.posix.normalize(\n path.posix.join(path.posix.dirname(importer), normalize(source)),\n );\n const candidates = [\n base.endsWith(\".js\") ? base : `${base}.js`,\n path.posix.join(base, \"index.js\"),\n ];\n return candidates.find((key) => output[key] !== undefined) ?? null;\n };\n\n return {\n name: \"ttsc-memory\",\n buildStart: () => {\n output = compileProject();\n },\n resolveId: (source, importer) => {\n const key = resolve(\n source,\n importer?.startsWith(VIRTUAL_PREFIX)\n ? importer.slice(VIRTUAL_PREFIX.length)\n : importer,\n );\n return key === null ? null : `${VIRTUAL_PREFIX}${key}`;\n },\n load: (id) => {\n if (id.startsWith(VIRTUAL_PREFIX) === false) {\n return null;\n }\n\n const key = id.slice(VIRTUAL_PREFIX.length);\n const code = output[key];\n if (code === undefined) {\n return null;\n }\n\n const map = output[`${key}.map`];\n return {\n code: code.replace(/\\n?\\/\\/# sourceMappingURL=.*$/u, \"\"),\n map: map === undefined ? null : JSON.parse(map),\n };\n },\n };\n};\n\nmodule.exports = {\n external: (id) =>\n id.startsWith(VIRTUAL_PREFIX) === false &&\n id.startsWith(\".\") === false &&\n id.startsWith(\"/\") === false &&\n /^[\\w@]/u.test(id),\n output: {\n dir: `${PROJECT_DIR}/lib`,\n entryFileNames: \"[name].mjs\",\n format: \"esm\",\n sourcemap: true,\n },\n input: {\n index: \"lib/index.js\",\n },\n plugins: [\n ttscMemory(),\n terser({\n format: {\n comments: \"some\",\n beautify: true,\n ecma: \"2020\",\n },\n compress: false,\n mangle: false,\n module: true,\n }),\n ],\n};\n",
|
|
22
|
+
"packages/api/scripts/ensure-nestia-exports.cjs": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst root = path.resolve(__dirname, \"..\");\n\nconst files = {\n \"src/index.ts\": `import * as api from \"./module\";\n\nexport type * from \"./IConnection\";\nexport type * from \"./Primitive\";\nexport type * from \"./Resolved\";\nexport * from \"./HttpError\";\n\nexport * from \"./structures\";\n\nexport * as functional from \"./functional/index\";\n\nexport default api;\n`,\n \"src/module.ts\": `export type * from \"./IConnection\";\nexport type * from \"./Primitive\";\nexport type * from \"./Resolved\";\nexport * from \"./HttpError\";\n\nexport * from \"./structures\";\n\nexport * as functional from \"./functional/index\";\n`,\n};\n\nfor (const [relative, content] of Object.entries(files)) {\n const file = path.join(root, relative);\n fs.mkdirSync(path.dirname(file), { recursive: true });\n if (fs.existsSync(file) && fs.readFileSync(file, \"utf8\") === content) continue;\n fs.writeFileSync(file, content, \"utf8\");\n}\n\nconst functional = path.join(root, \"src\", \"functional\", \"index.ts\");\nif (!fs.existsSync(functional)) {\n fs.mkdirSync(path.dirname(functional), { recursive: true });\n fs.writeFileSync(functional, \"export {};\\n\", \"utf8\");\n}\n",
|
|
23
|
+
"packages/api/src/HttpError.ts": "export { HttpError } from \"@nestia/fetcher\";\n",
|
|
24
|
+
"packages/api/src/IConnection.ts": "export type { IConnection } from \"@nestia/fetcher\";\n",
|
|
25
|
+
"packages/api/src/Primitive.ts": "export type { Primitive } from \"typia\";\n",
|
|
26
|
+
"packages/api/src/Resolved.ts": "export type { Resolved } from \"typia\";\n",
|
|
27
|
+
"packages/api/src/index.ts": "import * as api from \"./module\";\nexport * from \"./module\";\n\nexport default api;\n",
|
|
28
|
+
"packages/api/src/module.ts": "export type * from \"./IConnection\";\nexport type * from \"./Primitive\";\nexport type * from \"./Resolved\";\nexport * from \"./HttpError\";\n\nexport * from \"./structures\";\n\nexport * as functional from \"./functional/index\";\n",
|
|
29
|
+
"packages/api/tsconfig.json": "{\n \"extends\": \"../../config/tsconfig.json\",\n \"compilerOptions\": {\n \"declaration\": true,\n \"stripInternal\": true,\n \"outDir\": \"lib\",\n \"rootDir\": \"src\",\n \"paths\": {\n \"@ORGANIZATION/PROJECT-api\": [\"./src\"]\n },\n \"experimentalDecorators\": true,\n \"emitDecoratorMetadata\": true\n },\n \"include\": [\"src\"]\n}\n",
|
|
30
|
+
"packages/backend/.env.local": "API_PORT=37001",
|
|
31
|
+
"packages/backend/build/env.js": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst env = path.join(__dirname, \"../.env\");\nconst local = path.join(__dirname, \"../.env.local\");\n\nif (fs.existsSync(env) === false) fs.copyFileSync(local, env);\n",
|
|
32
|
+
"packages/backend/docs/benchmarks/AMD Ryzen 9 7940HS w Radeon 780M Graphics.md": "# Benchmark Report\n> Generated by [`@nestia/benchmark`](https://github.com/samchon/nestia)\n\n - Specifications\n - CPU: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics \n - RAM: 31 GB\n - NodeJS Version: v20.10.0\n - Backend Server: 1 core / 1 thread\n - Arguments\n - Count: 40,000\n - Threads: 4\n - Simultaneous: 32\n - Time\n - Start: 2024-10-29T19:14:35.941Z\n - Complete: 2024-10-29T19:16:11.418Z\n - Elapsed: 95,477 ms\n\nType | Count | Success | Mean. | Stdev. | Minimum | Maximum\n----|----|----|----|----|----|----\nTotal | 41,586 | 41,586 | 69.24 | 73.05 | 5 | 546\n\n> Unit: milliseconds\n\n## Memory Consumptions\n```mermaid\nxychart-beta\n x-axis \"Time (second)\"\n y-axis \"Memory (MB)\"\n line \"Resident Set Size\" [122, 156, 159, 142, 154, 165, 184, 185, 187, 189, 200, 205, 209, 217, 221, 225, 229, 224, 230, 235, 242, 250, 256, 262, 267, 272, 234, 237, 249, 259, 266, 273, 285, 292, 291, 216, 225, 235, 243, 200, 208, 214, 186, 186, 171, 177, 187, 199, 185, 192, 205, 171, 180, 158, 170, 179, 163, 163, 176, 188, 193, 202, 213, 219, 230, 239, 256, 265, 283, 301, 240, 249, 257, 267, 284, 282, 290, 202, 213, 166, 178, 188, 200, 203, 208, 180, 191, 199, 175]\n line \"Heap Total\" [85, 116, 120, 103, 114, 124, 146, 146, 147, 148, 158, 166, 170, 176, 180, 184, 187, 185, 190, 195, 203, 211, 217, 222, 225, 229, 194, 197, 209, 218, 225, 232, 241, 249, 247, 176, 185, 194, 202, 160, 168, 173, 146, 146, 130, 136, 146, 158, 145, 151, 165, 129, 139, 116, 128, 137, 120, 123, 136, 148, 152, 161, 172, 179, 189, 198, 215, 223, 241, 257, 200, 209, 216, 227, 244, 242, 249, 163, 174, 127, 136, 147, 159, 162, 166, 138, 150, 158, 132]\n line \"Heap Used + External\" [69, 94, 62, 82, 88, 107, 71, 83, 93, 107, 136, 72, 76, 85, 92, 106, 139, 48, 68, 69, 86, 95, 108, 116, 140, 175, 67, 74, 88, 112, 125, 136, 142, 169, 180, 91, 104, 105, 121, 60, 71, 91, 64, 74, 86, 110, 121, 135, 76, 82, 103, 70, 93, 66, 91, 107, 76, 75, 95, 101, 115, 127, 136, 154, 165, 168, 196, 193, 214, 232, 84, 94, 101, 118, 145, 147, 149, 86, 96, 72, 90, 112, 126, 133, 132, 78, 87, 107, 88]\n line \"Heap Used Only\" [66, 89, 59, 78, 83, 100, 68, 79, 88, 101, 129, 68, 72, 80, 86, 100, 131, 45, 64, 65, 81, 90, 103, 110, 133, 168, 64, 71, 84, 108, 120, 130, 136, 162, 173, 88, 100, 101, 117, 58, 68, 87, 61, 71, 83, 107, 118, 130, 73, 79, 99, 67, 89, 63, 88, 103, 74, 72, 91, 98, 111, 123, 132, 149, 160, 163, 190, 187, 208, 225, 81, 90, 97, 114, 140, 143, 145, 83, 93, 70, 87, 108, 122, 130, 128, 76, 84, 104, 85]\n```\n\n> - 🟦 Resident Set Size\n> - 🟢 Heap Total\n> - 🔴 Heap Used + External\n> - 🟡 Heap Used Only\n\n## Endpoints\nType | Count | Success | Mean. | Stdev. | Minimum | Maximum\n----|----|----|----|----|----|----\nPATCH /bbs/articles/:section | 6,439 | 6,439 | 108.37 | 76.56 | 6 | 546\nPUT /bbs/articles/:section/:id | 380 | 380 | 78.52 | 69.03 | 6 | 296\nGET /bbs/articles/:section/:id | 917 | 917 | 77.65 | 69.84 | 6 | 463\nDELETE /bbs/articles/:section/:id | 201 | 201 | 73.89 | 63.55 | 7 | 307\nPOST /bbs/articles/:section | 33,649 | 33,649 | 61.39 | 70.04 | 5 | 546\n\n> Unit: milliseconds\n\n## Failures\nMethod | Path | Count | Failures\n-------|------|-------|----------",
|
|
33
|
+
"packages/backend/lint.config.ts": "import type { ITtscLintConfig } from \"@ttsc/lint\";\n\nexport default {\n extends: \"../../config/lint.config.ts\",\n} satisfies ITtscLintConfig;\n",
|
|
34
|
+
"packages/backend/nest-cli.json": "{\n \"$schema\": \"https://json.schemastore.org/nest-cli\",\n \"collection\": \"@nestjs/schematics\",\n \"sourceRoot\": \"src\",\n \"entryFile\": \"executable/server\",\n \"compilerOptions\": {\n \"deleteOutDir\": true\n }\n}\n",
|
|
35
|
+
"packages/backend/nestia.config.ts": "// nestia configuration file\nimport { INestiaConfig } from \"@nestia/sdk\";\nimport { NestFactory } from \"@nestjs/core\";\n\nimport { MyModule } from \"./src/MyModule\";\n\nexport default {\n input: () => NestFactory.create(MyModule),\n output: \"../api/src\",\n swagger: {\n output: \"../api/swagger.json\",\n servers: [\n {\n url: \"http://localhost:37001\",\n description: \"Local Server\",\n },\n ],\n beautify: true,\n },\n keyword: true,\n simulate: true,\n primitive: false,\n} satisfies INestiaConfig;\n",
|
|
36
|
+
"packages/backend/package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT-backend\",\n \"version\": \"0.1.0\",\n \"description\": \"Starter kit of Nestia\",\n \"main\": \"lib/index.js\",\n \"scripts\": {\n \"benchmark\": \"ttsx --project test/tsconfig.json test/benchmark/index.ts\",\n \"test\": \"ttsx --project test/tsconfig.json test/index.ts\",\n \"------------------------BUILDS------------------------\": \"\",\n \"build\": \"pnpm build:sdk && pnpm build:main\",\n \"build:main\": \"rimraf lib && ttsc -p tsconfig.json\",\n \"build:sdk\": \"rimraf ../api/src/functional && node ../api/scripts/ensure-nestia-exports.cjs && nestia all && node ../api/scripts/ensure-nestia-exports.cjs\",\n \"build:swagger\": \"nestia swagger\",\n \"build:test\": \"ttsc -p test/tsconfig.json\",\n \"dev\": \"ttsc -p test/tsconfig.json --watch\",\n \"format\": \"ttsc format -p tsconfig.json\",\n \"lint\": \"ttsc -p tsconfig.json --noEmit\",\n \"prepare\": \"node build/env.js\",\n \"------------------------WEBPACK------------------------\": \"\",\n \"webpack\": \"rimraf dist && pnpm build:main && webpack\",\n \"webpack:start\": \"cd dist && node server\",\n \"webpack:test\": \"pnpm webpack && ttsx --project test/tsconfig.json test/webpack.ts\",\n \"------------------------DEPLOYS------------------------\": \"\",\n \"start\": \"ttsx src/executable/server.ts\",\n \"start:prod\": \"node lib/executable/server\",\n \"start:dev\": \"nest start --watch\",\n \"start:swagger\": \"ttsx src/executable/swagger.ts\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"keywords\": [\n \"nestia\",\n \"template\",\n \"boilerplate\"\n ],\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"devDependencies\": {\n \"@nestia/benchmark\": \"catalog:samchon\",\n \"@nestia/e2e\": \"catalog:samchon\",\n \"@nestjs/cli\": \"^11.0.16\",\n \"@ttsc/lint\": \"catalog:typescript\",\n \"@ttsc/paths\": \"catalog:typescript\",\n \"@types/cli-progress\": \"^3.11.5\",\n \"@types/express\": \"^4.17.21\",\n \"@types/node\": \"^24.0.0\",\n \"chalk\": \"^4.1.2\",\n \"cli-progress\": \"^3.12.0\",\n \"copy-webpack-plugin\": \"^11.0.0\",\n \"express\": \"^4.18.2\",\n \"nestia\": \"catalog:samchon\",\n \"rimraf\": \"catalog:utils\",\n \"swagger-ui-express\": \"^5.0.0\",\n \"ttsc\": \"catalog:typescript\",\n \"typescript\": \"catalog:typescript\",\n \"webpack\": \"^5.89.0\",\n \"webpack-cli\": \"^5.1.4\",\n \"write-file-webpack-plugin\": \"^4.5.1\"\n },\n \"dependencies\": {\n \"@nestia/core\": \"catalog:samchon\",\n \"@nestia/fetcher\": \"catalog:samchon\",\n \"@nestia/sdk\": \"catalog:samchon\",\n \"@nestjs/common\": \"^11.1.16\",\n \"@nestjs/core\": \"^11.1.16\",\n \"@nestjs/platform-express\": \"^11.1.16\",\n \"@ORGANIZATION/PROJECT-api\": \"workspace:^\",\n \"dotenv\": \"^16.3.1\",\n \"dotenv-expand\": \"^10.0.0\",\n \"serialize-error\": \"^4.1.0\",\n \"source-map-support\": \"^0.5.21\",\n \"tgrid\": \"catalog:samchon\",\n \"tstl\": \"catalog:samchon\",\n \"typia\": \"catalog:samchon\",\n \"uuid\": \"catalog:utils\"\n }\n}",
|
|
37
|
+
"packages/backend/src/MyBackend.ts": "import { WebSocketAdaptor } from \"@nestia/core\";\nimport { INestApplication } from \"@nestjs/common\";\nimport { NestFactory } from \"@nestjs/core\";\nimport { MyConfiguration } from \"./MyConfiguration\";\nimport { MyModule } from \"./MyModule\";\n\nexport class MyBackend {\n private application_?: INestApplication;\n\n public async open(): Promise<void> {\n //----\n // OPEN THE BACKEND SERVER\n //----\n // MOUNT CONTROLLERS\n this.application_ = await NestFactory.create(MyModule, { logger: false });\n await WebSocketAdaptor.upgrade(this.application_);\n\n // DO OPEN\n this.application_.enableCors();\n await this.application_.listen(MyConfiguration.API_PORT(), \"0.0.0.0\");\n\n //----\n // POST-PROCESSES\n //----\n // INFORM TO THE PM2\n if (process.send) process.send(\"ready\");\n\n // WHEN KILL COMMAND COMES\n process.on(\"SIGINT\", async () => {\n await this.close();\n process.exit(0);\n });\n }\n\n public async close(): Promise<void> {\n if (this.application_ === undefined) return;\n\n // DO CLOSE\n await this.application_.close();\n delete this.application_;\n }\n}\n",
|
|
38
|
+
"packages/backend/src/MyConfiguration.ts": "import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { MyGlobal } from \"./MyGlobal\";\n\nexport namespace MyConfiguration {\n export const API_PORT = () => Number(MyGlobal.env.API_PORT);\n\n export const ROOT = (() => {\n const split: string[] = __dirname.split(path.sep);\n return split.at(-1) === \"src\" && split.at(-2) === \"bin\"\n ? path.resolve(__dirname + \"/../..\")\n : fs.existsSync(__dirname + \"/.env\")\n ? __dirname\n : path.resolve(__dirname + \"/..\");\n })();\n}\n",
|
|
39
|
+
"packages/backend/src/MyGlobal.ts": "import dotenv from \"dotenv\";\nimport dotenvExpand from \"dotenv-expand\";\nimport { Singleton } from \"tstl\";\nimport typia from \"typia\";\n\n/* eslint-disable */\nexport class MyGlobal {\n public static testing: boolean = false;\n public static get env(): MyGlobal.IEnvironments {\n return environments.get();\n }\n}\nexport namespace MyGlobal {\n export interface IEnvironments {\n API_PORT: `${number}`;\n }\n}\n\nconst environments = new Singleton(() => {\n const env = dotenv.config();\n dotenvExpand.expand(env);\n return typia.assert<MyGlobal.IEnvironments>(process.env);\n});\n",
|
|
40
|
+
"packages/backend/src/executable/server.ts": "import { MyBackend } from \"../MyBackend\";\n\nconst EXTENSION = __filename.substring(__filename.length - 2);\nif (EXTENSION === \"js\") require(\"source-map-support/register\");\n\nasync function main(): Promise<void> {\n // BACKEND SEVER\n const backend: MyBackend = new MyBackend();\n await backend.open();\n\n // UNEXPECTED ERRORS\n global.process.on(\"uncaughtException\", console.error);\n global.process.on(\"unhandledRejection\", console.error);\n}\nmain().catch((exp: unknown) => {\n console.log(exp);\n process.exit(-1);\n});\n",
|
|
41
|
+
"packages/backend/src/executable/swagger.ts": "import express from \"express\";\nimport cp from \"node:child_process\";\n\nconst execute = (command: string): void => {\n console.log(`\\n$ ${command}\\n`);\n cp.execSync(command, { stdio: \"inherit\" });\n};\n\nconst main = async (): Promise<void> => {\n if (!process.argv.some((str) => str === \"--skipBuild\"))\n execute(\"pnpm build:swagger\");\n\n const docs = await import(\"../../../api/swagger.json\" as any);\n\n const app = express();\n const swaggerUi = require(\"swagger-ui-express\");\n app.use(\"/api-docs\", swaggerUi.serve, swaggerUi.setup(docs));\n app.listen(37810);\n\n console.log(\"\\n\");\n console.log(\"-----------------------------------------------------------\");\n console.log(\"\\n Swagger UI Address: http://127.0.0.1:37810/api-docs \\n\");\n console.log(\"-----------------------------------------------------------\");\n};\nmain().catch((exp: unknown) => {\n console.log(exp);\n process.exit(-1);\n});\n",
|
|
42
|
+
"packages/backend/src/utils/ErrorUtil.ts": "import serializeError = require(\"serialize-error\");\n\nexport namespace ErrorUtil {\n export const toJSON = (err: any): object =>\n err instanceof Object && err.toJSON instanceof Function\n ? err.toJSON()\n : serializeError(err);\n}\n",
|
|
43
|
+
"packages/backend/src/utils/MapUtil.ts": "export namespace MapUtil {\n export function take<Key, T>(\n dict: Map<Key, T>,\n key: Key,\n generator: () => T,\n ): T {\n const oldbie: T | undefined = dict.get(key);\n if (oldbie) return oldbie;\n\n const value: T = generator();\n dict.set(key, value);\n return value;\n }\n}\n",
|
|
44
|
+
"packages/backend/test/benchmark/index.ts": "import { DynamicBenchmarker } from \"@nestia/benchmark\";\nimport cliProgress from \"cli-progress\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport { IPointer } from \"tstl\";\n\nimport { MyBackend } from \"../../src/MyBackend\";\nimport { MyConfiguration } from \"../../src/MyConfiguration\";\nimport { MyGlobal } from \"../../src/MyGlobal\";\nimport { ArgumentParser } from \"../helpers/ArgumentParser\";\n\ninterface IOptions {\n include?: string[];\n exclude?: string[];\n count: number;\n threads: number;\n simultaneous: number;\n}\n\nconst getOptions = () =>\n ArgumentParser.parse<IOptions>(async (command, prompt, action) => {\n // command.option(\"--mode <string>\", \"target mode\");\n // command.option(\"--reset <true|false>\", \"reset local DB or not\");\n command.option(\"--include <string...>\", \"include feature files\");\n command.option(\"--exclude <string...>\", \"exclude feature files\");\n command.option(\"--count <number>\", \"number of requests to make\");\n command.option(\"--threads <number>\", \"number of threads to use\");\n command.option(\n \"--simultaneous <number>\",\n \"number of simultaneous requests to make\",\n );\n return action(async (options) => {\n // if (typeof options.reset === \"string\")\n // options.reset = options.reset === \"true\";\n // options.mode ??= await prompt.select(\"mode\")(\"Select mode\")([\n // \"LOCAL\",\n // \"DEV\",\n // \"REAL\",\n // ]);\n // options.reset ??= await prompt.boolean(\"reset\")(\"Reset local DB\");\n options.count = Number(\n options.count ??\n (await prompt.number(\"count\")(\"Number of requests to make\")),\n );\n options.threads = Number(\n options.threads ??\n (await prompt.number(\"threads\")(\"Number of threads to use\")),\n );\n options.simultaneous = Number(\n options.simultaneous ??\n (await prompt.number(\"simultaneous\")(\n \"Number of simultaneous requests to make\",\n )),\n );\n return options as IOptions;\n });\n });\n\nconst main = async (): Promise<void> => {\n // CONFIGURATIONS\n const options: IOptions = await getOptions();\n MyGlobal.testing = true;\n\n // BACKEND SERVER\n const backend: MyBackend = new MyBackend();\n await backend.open();\n\n // DO BENCHMARK\n const prev: IPointer<number> = { value: 0 };\n const bar: cliProgress.SingleBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n bar.start(options.count, 0);\n\n const report: DynamicBenchmarker.IReport = await DynamicBenchmarker.master({\n servant: `${__dirname}/servant.js`,\n count: options.count,\n threads: options.threads,\n simultaneous: options.simultaneous,\n filter: (func) =>\n (!options.include?.length ||\n (options.include ?? []).some((str) => func.includes(str))) &&\n (!options.exclude?.length ||\n (options.exclude ?? []).every((str) => !func.includes(str))),\n progress: (value: number) => {\n if (value >= 100 + prev.value) {\n bar.update(value);\n prev.value = value;\n }\n },\n stdio: \"ignore\",\n });\n bar.stop();\n\n // DOCUMENTATION\n try {\n await fs.promises.mkdir(`${MyConfiguration.ROOT}/docs/benchmarks`, {\n recursive: true,\n });\n } catch {}\n await fs.promises.writeFile(\n `${MyConfiguration.ROOT}/docs/benchmarks/${(os.cpus()[0]?.model ?? \"unknown\")\n .trim()\n .split(\"\\\\\")\n .join(\"\")\n .split(\"/\")\n .join(\"\")}.md`,\n DynamicBenchmarker.markdown(report),\n \"utf8\",\n );\n\n // CLOSE\n await backend.close();\n};\nmain().catch((exp: unknown) => {\n console.error(exp);\n process.exit(-1);\n});\n",
|
|
45
|
+
"packages/backend/test/benchmark/servant.ts": "import { DynamicBenchmarker } from \"@nestia/benchmark\";\n\nimport { MyConfiguration } from \"../../src/MyConfiguration\";\n\nDynamicBenchmarker.servant({\n connection: {\n host: `http://127.0.0.1:${MyConfiguration.API_PORT()}`,\n },\n location: `${__dirname}/../features`,\n parameters: (connection) => [connection],\n prefix: \"test_api_\",\n}).catch((exp: unknown) => {\n console.error(exp);\n process.exit(-1);\n});\n",
|
|
46
|
+
"packages/backend/test/helpers/ArgumentParser.ts": "import { createInterface } from \"node:readline/promises\";\n\nexport namespace ArgumentParser {\n export interface Command {\n option: (flags: string, description?: string) => Command;\n }\n\n export interface Prompt {\n select: (\n name: string,\n ) => (\n message: string,\n ) => <Choice extends string>(choices: Choice[]) => Promise<Choice>;\n boolean: (name: string) => (message: string) => Promise<boolean>;\n number: (name: string) => (message: string) => Promise<number>;\n }\n\n export const parse = async <T>(\n inquiry: (\n command: Command,\n prompt: Prompt,\n action: (closure: (options: Partial<T>) => Promise<T>) => Promise<T>,\n ) => Promise<T>,\n ): Promise<T> => {\n const command: Command = {\n option: (_flags: string, _description?: string): Command => command,\n };\n const action = (closure: (options: Partial<T>) => Promise<T>) =>\n closure(parseArguments() as Partial<T>);\n return inquiry(\n command,\n { select, boolean, number },\n action,\n );\n };\n\n const select =\n (_name: string) =>\n (message: string) =>\n async <Choice extends string>(choices: Choice[]): Promise<Choice> => {\n const answer: string = await ask(`${message} (${choices.join(\"/\")})`);\n return (choices.find((choice) => choice === answer) ?? choices[0])!;\n };\n\n const boolean = (_name: string) => async (message: string) =>\n /^(true|t|yes|y|1)$/i.test(await ask(`${message} [y/N]`));\n\n const number = (_name: string) => async (message: string) =>\n Number(await ask(message));\n\n const ask = async (message: string): Promise<string> => {\n const reader = createInterface({\n input: process.stdin,\n output: process.stdout,\n });\n try {\n return (await reader.question(`${message}: `)).trim();\n } finally {\n reader.close();\n }\n };\n\n const parseArguments = (): Record<string, string | string[] | boolean> => {\n const output: Record<string, string | string[] | boolean> = {};\n const args: string[] = process.argv.slice(2);\n for (let i = 0; i < args.length; ++i) {\n const raw: string = args[i]!;\n if (raw.startsWith(\"--\") === false) continue;\n\n const equal: number = raw.indexOf(\"=\");\n const name: string = toCamelCase(\n raw.slice(2, equal === -1 ? undefined : equal),\n );\n if (equal !== -1) {\n assign(output, name, raw.slice(equal + 1));\n continue;\n }\n\n const values: string[] = [];\n while (i + 1 < args.length && args[i + 1]!.startsWith(\"--\") === false)\n values.push(args[++i]!);\n assign(\n output,\n name,\n values.length === 0 ? true : values.length === 1 ? values[0]! : values,\n );\n }\n return output;\n };\n\n const assign = (\n output: Record<string, string | string[] | boolean>,\n name: string,\n value: string | string[] | boolean,\n ): void => {\n const current: string | string[] | boolean | undefined = output[name];\n if (current === undefined) output[name] = value;\n else\n output[name] = [\n ...(Array.isArray(current) ? current : [String(current)]),\n ...(Array.isArray(value) ? value : [String(value)]),\n ];\n };\n\n const toCamelCase = (str: string): string =>\n str.replace(/-([a-z])/g, (_matched, letter: string) =>\n letter.toUpperCase(),\n );\n}\n",
|
|
47
|
+
"packages/backend/test/helpers/TestAutomation.ts": "import { DynamicExecutor } from \"@nestia/e2e\";\nimport { sleep_for } from \"tstl\";\n\nimport api from \"@ORGANIZATION/PROJECT-api\";\n\nimport { MyConfiguration } from \"../../src/MyConfiguration\";\n\nexport namespace TestAutomation {\n export interface IProps<T> {\n open(options: IOptions): Promise<T>;\n close(backend: T): Promise<void>;\n onComplete(exec: DynamicExecutor.IExecution): void;\n options: IOptions;\n }\n\n export interface IOptions {\n simultaneous: number;\n include?: string[];\n exclude?: string[];\n }\n\n export const execute = async <T>(\n props: IProps<T>,\n ): Promise<DynamicExecutor.IReport> => {\n // OPEN BACKEND\n const backend: T = await props.open(props.options);\n\n // DO TEST\n const connection: api.IConnection = {\n host: `http://127.0.0.1:${MyConfiguration.API_PORT()}`,\n };\n const report: DynamicExecutor.IReport = await DynamicExecutor.validate({\n prefix: \"test\",\n location: __dirname + \"/../features\",\n parameters: () => [\n {\n host: connection.host,\n encryption: connection.encryption,\n },\n ],\n filter: (func) =>\n (!props.options.include?.length ||\n (props.options.include ?? []).some((str) => func.includes(str))) &&\n (!props.options.exclude?.length ||\n (props.options.exclude ?? []).every((str) => !func.includes(str))),\n onComplete: props.onComplete,\n simultaneous: props.options.simultaneous,\n extension: __filename.endsWith(\".ts\") ? \"ts\" : \"js\",\n });\n\n // TERMINATE - WAIT FOR BACKGROUND EVENTS\n await sleep_for(2500);\n await props.close(backend);\n return report;\n };\n}\n",
|
|
48
|
+
"packages/backend/test/helpers/TestAutomationStdio.ts": "import { DynamicExecutor } from \"@nestia/e2e\";\nimport chalk from \"chalk\";\n\nimport { ArgumentParser } from \"./ArgumentParser\";\nimport { TestAutomation } from \"./TestAutomation\";\n\nexport namespace TestAutomationStdio {\n export const getOptions = () =>\n ArgumentParser.parse<TestAutomation.IOptions>(\n async (command, prompt, action) => {\n command.option(\n \"--simultaneous <number>\",\n \"number of simultaneous requests\",\n );\n command.option(\"--include <string...>\", \"include feature files\");\n command.option(\"--exclude <string...>\", \"exclude feature files\");\n\n return action(async (options) => {\n options.simultaneous = Number(\n options.simultaneous ??\n (await prompt.number(\"simultaneous\")(\n \"Number of simultaneous requests to make\",\n )),\n );\n if (isNaN(options.simultaneous) || options.simultaneous <= 0)\n options.simultaneous = 1;\n return options as TestAutomation.IOptions;\n });\n },\n );\n\n export const onComplete = (exec: DynamicExecutor.IExecution): void => {\n const trace = (str: string) =>\n console.log(` - ${chalk.green(exec.name)}: ${str}`);\n if (exec.error === null) {\n const elapsed: number =\n new Date(exec.completed_at).getTime() -\n new Date(exec.started_at).getTime();\n trace(`${chalk.yellow(elapsed.toLocaleString())} ms`);\n } else trace(chalk.red(exec.error.name));\n };\n\n export const report = (report: DynamicExecutor.IReport): void => {\n const exceptions: Error[] = report.executions\n .filter((exec) => exec.error !== null)\n .map((exec) => exec.error!);\n if (exceptions.length === 0) {\n console.log(\"Success\");\n console.log(\"Elapsed time\", report.time.toLocaleString(), `ms`);\n } else {\n for (const exp of exceptions) console.log(exp);\n console.log(\"Failed\");\n console.log(\"Elapsed time\", report.time.toLocaleString(), `ms`);\n process.exit(-1);\n }\n };\n}\n",
|
|
49
|
+
"packages/backend/test/index.ts": "import { DynamicExecutor } from \"@nestia/e2e\";\n\nimport { MyBackend } from \"../src/MyBackend\";\nimport { MyGlobal } from \"../src/MyGlobal\";\nimport { TestAutomation } from \"./helpers/TestAutomation\";\nimport { TestAutomationStdio } from \"./helpers/TestAutomationStdio\";\n\nconst main = async (): Promise<void> => {\n MyGlobal.testing = true;\n\n const report: DynamicExecutor.IReport = await TestAutomation.execute({\n open: async () => {\n const backend: MyBackend = new MyBackend();\n await backend.open();\n return backend;\n },\n close: (backend) => backend.close(),\n options: await TestAutomationStdio.getOptions(),\n onComplete: TestAutomationStdio.onComplete,\n });\n TestAutomationStdio.report(report);\n};\nmain().catch((exp: unknown) => {\n console.log(exp);\n process.exit(-1);\n});\n",
|
|
50
|
+
"packages/backend/test/tsconfig.json": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"rootDir\": \"..\",\n \"noEmit\": true,\n },\n \"include\": [\".\", \"../src\"]\n}",
|
|
51
|
+
"packages/backend/test/webpack.ts": "import { DynamicExecutor } from \"@nestia/e2e\";\nimport cp from \"node:child_process\";\nimport { sleep_for } from \"tstl\";\n\nimport { MyConfiguration } from \"../src/MyConfiguration\";\nimport { MyGlobal } from \"../src/MyGlobal\";\nimport { TestAutomation } from \"./helpers/TestAutomation\";\nimport { TestAutomationStdio } from \"./helpers/TestAutomationStdio\";\n\nconst wait = async (): Promise<void> => {\n while (true)\n try {\n await fetch(`http://localhost:${MyConfiguration.API_PORT()}/dsafdsafsd`);\n return;\n } catch (exp) {\n await sleep_for(100);\n }\n};\n\nconst main = async (): Promise<void> => {\n MyGlobal.testing = true;\n\n const report: DynamicExecutor.IReport = await TestAutomation.execute({\n open: async () => {\n const backend: cp.ChildProcess = cp.fork(\n `${MyConfiguration.ROOT}/dist/server.js`,\n {\n cwd: `${MyConfiguration.ROOT}/dist`,\n },\n );\n await wait();\n return backend;\n },\n close: async (backend) => {\n backend.kill();\n },\n options: await TestAutomationStdio.getOptions(),\n onComplete: TestAutomationStdio.onComplete,\n });\n TestAutomationStdio.report(report);\n};\nmain().catch((exp: unknown) => {\n console.log(exp);\n process.exit(-1);\n});\n",
|
|
52
|
+
"packages/backend/tsconfig.json": "{\n \"extends\": \"../../config/tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"lib\",\n \"rootDir\": \"src\",\n \"experimentalDecorators\": true,\n \"emitDecoratorMetadata\": true\n },\n \"include\": [\"src\"]\n}\n",
|
|
53
|
+
"packages/backend/webpack.config.js": "const path = require(\"path\");\n\nconst CopyWebpackPlugin = require(\"copy-webpack-plugin\");\nconst WriteFilePlugin = require(\"write-file-webpack-plugin\");\nconst { IgnorePlugin } = require(\"webpack\");\n\nconst lazyImports = [\n \"@modelcontextprotocol/sdk\",\n \"@fastify/static\",\n \"@fastify/view\",\n \"@nestjs/microservices\",\n \"@nestjs/websockets\",\n \"class-transformer\",\n \"class-validator\",\n];\n\n// @reference https://tech-blog.s-yoshiki.com/entry/297\nmodule.exports = {\n // CUSTOMIZE HERE\n entry: {\n server: \"./lib/executable/server.js\",\n },\n output: {\n path: path.join(__dirname, \"dist\"),\n filename: \"[name].js\",\n },\n optimization: {\n minimize: true,\n },\n\n // JUST KEEP THEM\n mode: \"production\",\n target: \"node\",\n plugins: [\n new CopyWebpackPlugin({\n patterns: [\n {\n from: \".env\",\n to: \"[name][ext]\",\n },\n ],\n }),\n new WriteFilePlugin(),\n new IgnorePlugin({\n checkResource: (resource) => {\n if (lazyImports.some((modulo) => resource.startsWith(modulo))) {\n try {\n require.resolve(resource);\n } catch (err) {\n return true;\n }\n }\n return false;\n },\n }),\n ],\n};\n",
|
|
54
|
+
"pnpm-workspace.yaml": "packages:\n - \"config\"\n - \"packages/*\"\ncatalogs:\n samchon:\n nestia: &nestia ^12.0.0-rc.3\n \"@nestia/benchmark\": *nestia\n \"@nestia/core\": *nestia\n \"@nestia/e2e\": *nestia\n \"@nestia/fetcher\": *nestia\n \"@nestia/sdk\": *nestia\n tgrid: ^1.2.1\n tstl: ^3.0.0\n typia: ^13.0.1\n utils:\n rimraf: ^6.1.3\n uuid: ^13.0.0\n typescript:\n ttsc: &ttsc ^0.18.1\n \"@ttsc/lint\": *ttsc\n \"@ttsc/paths\": *ttsc\n \"@ttsc/unplugin\": *ttsc\n typescript: ^7.0.2\n",
|
|
55
|
+
"typos.toml": "[default]\nlocale = 'en-us'\nextend-ignore-re = [\n \"(?Rm)^.*(<!--|#|//)\\\\s*spellchecker:disable-line(-->|\\n)?$\",\n \"(?s)(<!--|#|//)\\\\s*spellchecker:off\\\\s*(-->|\\n).*?(<!--|#|//)\\\\s*spellchecker:on\",\n]\n\n[default.extend-words]\nJeongho = \"Jeongho\"\nNam = \"Nam\"\ntypia = \"typia\"\n\n[files]\nextend-exclude = [\"*.json\"]"
|
|
54
56
|
};
|
|
55
57
|
//# sourceMappingURL=NEST_TEMPLATE.js.map
|