@nestia/migrate 14.0.1 → 14.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/NestiaMigrateApplication.d.ts +111 -0
- package/lib/NestiaMigrateApplication.js +148 -9
- package/lib/NestiaMigrateApplication.js.map +1 -1
- package/lib/NestiaMigrateApplication.mjs +147 -5
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.d.ts +45 -0
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.js +59 -3
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.js.map +1 -1
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.mjs +9 -3
- package/lib/archivers/NestiaMigrateFileArchiver.d.ts +34 -0
- package/lib/archivers/NestiaMigrateFileArchiver.js +34 -0
- package/lib/archivers/NestiaMigrateFileArchiver.js.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +1 -1
- package/lib/bundles/NEST_TEMPLATE.mjs +1 -1
- package/lib/bundles/SDK_TEMPLATE.js +1 -1
- package/lib/bundles/SDK_TEMPLATE.mjs +1 -1
- package/lib/executable/NestiaMigrateCommander.d.ts +36 -0
- package/lib/executable/NestiaMigrateCommander.js +38 -0
- package/lib/executable/NestiaMigrateCommander.js.map +1 -1
- package/lib/executable/NestiaMigrateCommander.mjs +3 -1
- package/lib/executable/NestiaMigrateInquirer.d.ts +29 -0
- package/lib/executable/NestiaMigrateInquirer.js +20 -0
- package/lib/executable/NestiaMigrateInquirer.js.map +1 -1
- package/lib/factories/ExpressionFactory.d.ts +14 -0
- package/lib/factories/ExpressionFactory.js +14 -0
- package/lib/factories/ExpressionFactory.js.map +1 -1
- package/lib/factories/IdentifierFactory.d.ts +20 -0
- package/lib/factories/IdentifierFactory.js +20 -0
- package/lib/factories/IdentifierFactory.js.map +1 -1
- package/lib/factories/LiteralFactory.d.ts +18 -2
- package/lib/factories/LiteralFactory.js +18 -2
- package/lib/factories/LiteralFactory.js.map +1 -1
- package/lib/factories/StatementFactory.d.ts +26 -1
- package/lib/factories/StatementFactory.js +26 -1
- package/lib/factories/StatementFactory.js.map +1 -1
- package/lib/factories/SupportedStringFormats.d.ts +6 -0
- package/lib/factories/SupportedStringFormats.js +33 -0
- package/lib/factories/SupportedStringFormats.js.map +1 -0
- package/lib/factories/SupportedStringFormats.mjs +34 -0
- package/lib/factories/SupportedStringFormats.mjs.map +1 -0
- package/lib/factories/TypeFactory.d.ts +21 -0
- package/lib/factories/TypeFactory.js +13 -0
- package/lib/factories/TypeFactory.js.map +1 -1
- package/lib/factories/TypeLiteralFactory.d.ts +18 -0
- package/lib/factories/TypeLiteralFactory.js +18 -0
- package/lib/factories/TypeLiteralFactory.js.map +1 -1
- package/lib/internal/ts.d.ts +153 -0
- package/lib/internal/ts.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiFileProgrammer.d.ts +31 -0
- package/lib/programmers/NestiaMigrateApiFileProgrammer.js +17 -0
- package/lib/programmers/NestiaMigrateApiFileProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.d.ts +40 -0
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js +27 -0
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.d.ts +39 -0
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.js +26 -0
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiProgrammer.d.ts +18 -0
- package/lib/programmers/NestiaMigrateApiProgrammer.js +18 -0
- package/lib/programmers/NestiaMigrateApiProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiProgrammer.mjs +1 -1
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer.d.ts +40 -0
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer.js +27 -0
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiStartProgrammer.d.ts +17 -0
- package/lib/programmers/NestiaMigrateApiStartProgrammer.js +19 -8
- package/lib/programmers/NestiaMigrateApiStartProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiStartProgrammer.mjs +1 -6
- package/lib/programmers/NestiaMigrateDtoProgrammer.d.ts +30 -0
- package/lib/programmers/NestiaMigrateDtoProgrammer.js +17 -0
- package/lib/programmers/NestiaMigrateDtoProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateE2eFileProgrammer.d.ts +39 -0
- package/lib/programmers/NestiaMigrateE2eFileProgrammer.js +26 -0
- package/lib/programmers/NestiaMigrateE2eFileProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateE2eProgrammer.d.ts +16 -0
- package/lib/programmers/NestiaMigrateE2eProgrammer.js +16 -0
- package/lib/programmers/NestiaMigrateE2eProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateImportProgrammer.d.ts +75 -0
- package/lib/programmers/NestiaMigrateImportProgrammer.js +58 -3
- package/lib/programmers/NestiaMigrateImportProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateImportProgrammer.mjs +58 -3
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.d.ts +28 -0
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.js +16 -0
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateNestMethodProgrammer.d.ts +30 -0
- package/lib/programmers/NestiaMigrateNestMethodProgrammer.js +16 -0
- package/lib/programmers/NestiaMigrateNestMethodProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateNestModuleProgrammer.d.ts +16 -0
- package/lib/programmers/NestiaMigrateNestModuleProgrammer.js +16 -0
- package/lib/programmers/NestiaMigrateNestModuleProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateNestProgrammer.d.ts +17 -0
- package/lib/programmers/NestiaMigrateNestProgrammer.js +17 -0
- package/lib/programmers/NestiaMigrateNestProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateSchemaProgrammer.d.ts +16 -0
- package/lib/programmers/NestiaMigrateSchemaProgrammer.js +20 -5
- package/lib/programmers/NestiaMigrateSchemaProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateSchemaProgrammer.mjs +4 -4
- package/lib/structures/INestiaMigrateConfig.d.ts +21 -0
- package/lib/structures/INestiaMigrateContext.d.ts +15 -0
- package/lib/structures/INestiaMigrateController.d.ts +13 -0
- package/lib/structures/INestiaMigrateFile.d.ts +11 -0
- package/lib/utils/FilePrinter.d.ts +33 -0
- package/lib/utils/FilePrinter.js +33 -0
- package/lib/utils/FilePrinter.js.map +1 -1
- package/lib/utils/MapUtil.d.ts +17 -0
- package/lib/utils/MapUtil.js +19 -3
- package/lib/utils/MapUtil.js.map +1 -1
- package/lib/utils/MapUtil.mjs +1 -2
- package/lib/utils/PathTemplate.d.ts +23 -1
- package/lib/utils/PathTemplate.js +15 -1
- package/lib/utils/PathTemplate.js.map +1 -1
- package/lib/utils/RequestBody.d.ts +13 -0
- package/lib/utils/RequestBody.js +13 -0
- package/lib/utils/RequestBody.js.map +1 -1
- package/lib/utils/StringUtil.d.ts +55 -0
- package/lib/utils/StringUtil.js +93 -8
- package/lib/utils/StringUtil.js.map +1 -1
- package/lib/utils/StringUtil.mjs +30 -8
- package/lib/utils/SuccessStatus.d.ts +21 -1
- package/lib/utils/SuccessStatus.js +21 -1
- package/lib/utils/SuccessStatus.js.map +1 -1
- package/package.json +4 -3
- package/src/NestiaMigrateApplication.ts +151 -13
- package/src/analyzers/NestiaMigrateControllerAnalyzer.ts +59 -4
- package/src/archivers/NestiaMigrateFileArchiver.ts +34 -0
- package/src/bundles/NEST_TEMPLATE.ts +1 -1
- package/src/bundles/SDK_TEMPLATE.ts +1 -1
- package/src/executable/NestiaMigrateCommander.ts +40 -0
- package/src/executable/NestiaMigrateInquirer.ts +29 -0
- package/src/factories/ExpressionFactory.ts +14 -0
- package/src/factories/IdentifierFactory.ts +20 -0
- package/src/factories/LiteralFactory.ts +18 -2
- package/src/factories/StatementFactory.ts +26 -1
- package/src/factories/SupportedStringFormats.ts +29 -0
- package/src/factories/TypeFactory.ts +21 -0
- package/src/factories/TypeLiteralFactory.ts +18 -0
- package/src/internal/ts.ts +153 -0
- package/src/programmers/NestiaMigrateApiFileProgrammer.ts +35 -0
- package/src/programmers/NestiaMigrateApiFunctionProgrammer.ts +43 -0
- package/src/programmers/NestiaMigrateApiNamespaceProgrammer.ts +42 -0
- package/src/programmers/NestiaMigrateApiProgrammer.ts +18 -0
- package/src/programmers/NestiaMigrateApiSimulationProgrammer.ts +43 -0
- package/src/programmers/NestiaMigrateApiStartProgrammer.ts +19 -10
- package/src/programmers/NestiaMigrateDtoProgrammer.ts +33 -0
- package/src/programmers/NestiaMigrateE2eFileProgrammer.ts +42 -0
- package/src/programmers/NestiaMigrateE2eProgrammer.ts +16 -0
- package/src/programmers/NestiaMigrateImportProgrammer.ts +86 -5
- package/src/programmers/NestiaMigrateNestControllerProgrammer.ts +30 -0
- package/src/programmers/NestiaMigrateNestMethodProgrammer.ts +34 -0
- package/src/programmers/NestiaMigrateNestModuleProgrammer.ts +16 -0
- package/src/programmers/NestiaMigrateNestProgrammer.ts +17 -0
- package/src/programmers/NestiaMigrateSchemaProgrammer.ts +25 -8
- package/src/structures/INestiaMigrateConfig.ts +26 -0
- package/src/structures/INestiaMigrateContext.ts +17 -0
- package/src/structures/INestiaMigrateController.ts +16 -0
- package/src/structures/INestiaMigrateFile.ts +13 -0
- package/src/utils/FilePrinter.ts +33 -0
- package/src/utils/MapUtil.ts +18 -2
- package/src/utils/PathTemplate.ts +23 -1
- package/src/utils/RequestBody.ts +13 -0
- package/src/utils/StringUtil.ts +101 -9
- package/src/utils/SuccessStatus.ts +21 -1
- package/lib/factories/FormatCheatSheet.d.ts +0 -25
- package/lib/factories/FormatCheatSheet.js +0 -34
- package/lib/factories/FormatCheatSheet.js.map +0 -1
- package/lib/factories/FormatCheatSheet.mjs +0 -31
- package/lib/factories/FormatCheatSheet.mjs.map +0 -1
- package/src/factories/FormatCheatSheet.ts +0 -71
package/lib/internal/ts.d.ts
CHANGED
|
@@ -20,24 +20,177 @@ type _TypeNode = TypeNode;
|
|
|
20
20
|
type _TypeReferenceNode = TypeReferenceNode;
|
|
21
21
|
type _UnionTypeNode = UnionTypeNode;
|
|
22
22
|
type _VariableStatement = VariableStatement;
|
|
23
|
+
/**
|
|
24
|
+
* A compatibility stand-in for `import ts from "typescript"`: the one value the
|
|
25
|
+
* generators still call, and the node types under the names they use.
|
|
26
|
+
*
|
|
27
|
+
* @evidence contracts/common.md#principled-implementation The value is the union-type guard, and the namespace aliases map each used compiler type name to the matching node type of the factory package, so existing annotations keep their exact shapes.
|
|
28
|
+
* @evidence contracts/common.md#clear-and-simple-design One value and one declaration-only namespace of aliases.
|
|
29
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It avoids loading the compiler; the guard is implemented on the node kind, not on a patched compiler.
|
|
30
|
+
* @evidence contracts/common.md#meaningful-documentation The leading comment explains why the shim exists.
|
|
31
|
+
*/
|
|
23
32
|
declare namespace ts {
|
|
33
|
+
/**
|
|
34
|
+
* The `Node` node type under the name the generators use.
|
|
35
|
+
*
|
|
36
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `Node` node type of the factory package.
|
|
37
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
38
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
39
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
40
|
+
*/
|
|
24
41
|
type Node = _Node;
|
|
42
|
+
/**
|
|
43
|
+
* The `Block` node type under the name the generators use.
|
|
44
|
+
*
|
|
45
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `Block` node type of the factory package.
|
|
46
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
47
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
48
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
49
|
+
*/
|
|
25
50
|
type Block = _Block;
|
|
51
|
+
/**
|
|
52
|
+
* The `CallExpression` node type under the name the generators use.
|
|
53
|
+
*
|
|
54
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `CallExpression` node type of the factory package.
|
|
55
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
56
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
57
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
58
|
+
*/
|
|
26
59
|
type CallExpression = _CallExpression;
|
|
60
|
+
/**
|
|
61
|
+
* The `ConciseBody` node type under the name the generators use.
|
|
62
|
+
*
|
|
63
|
+
* @evidence contracts/common.md#principled-implementation A concise body is a block or an expression, the same union the compiler defines.
|
|
64
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
65
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
66
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
67
|
+
*/
|
|
27
68
|
type ConciseBody = _Block | _Expression;
|
|
69
|
+
/**
|
|
70
|
+
* The `Decorator` node type under the name the generators use.
|
|
71
|
+
*
|
|
72
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `Decorator` node type of the factory package.
|
|
73
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
74
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
75
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
76
|
+
*/
|
|
28
77
|
type Decorator = _Decorator;
|
|
78
|
+
/**
|
|
79
|
+
* The `Expression` node type under the name the generators use.
|
|
80
|
+
*
|
|
81
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `Expression` node type of the factory package.
|
|
82
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
83
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
84
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
85
|
+
*/
|
|
29
86
|
type Expression = _Expression;
|
|
87
|
+
/**
|
|
88
|
+
* The `FunctionDeclaration` node type under the name the generators use.
|
|
89
|
+
*
|
|
90
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `FunctionDeclaration` node type of the factory package.
|
|
91
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
92
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
93
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
94
|
+
*/
|
|
30
95
|
type FunctionDeclaration = _FunctionDeclaration;
|
|
96
|
+
/**
|
|
97
|
+
* The `Identifier` node type under the name the generators use.
|
|
98
|
+
*
|
|
99
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `Identifier` node type of the factory package.
|
|
100
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
101
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
102
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
103
|
+
*/
|
|
31
104
|
type Identifier = _Identifier;
|
|
105
|
+
/**
|
|
106
|
+
* The `KeywordTypeNode` node type under the name the generators use.
|
|
107
|
+
*
|
|
108
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `KeywordTypeNode` node type of the factory package.
|
|
109
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
110
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
111
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
112
|
+
*/
|
|
32
113
|
type KeywordTypeNode = _KeywordTypeNode;
|
|
114
|
+
/**
|
|
115
|
+
* The `MethodDeclaration` node type under the name the generators use.
|
|
116
|
+
*
|
|
117
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `MethodDeclaration` node type of the factory package.
|
|
118
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
119
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
120
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
121
|
+
*/
|
|
33
122
|
type MethodDeclaration = _MethodDeclaration;
|
|
123
|
+
/**
|
|
124
|
+
* The `ModuleDeclaration` node type under the name the generators use.
|
|
125
|
+
*
|
|
126
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `ModuleDeclaration` node type of the factory package.
|
|
127
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
128
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
129
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
130
|
+
*/
|
|
34
131
|
type ModuleDeclaration = _ModuleDeclaration;
|
|
132
|
+
/**
|
|
133
|
+
* The `ParameterDeclaration` node type under the name the generators use.
|
|
134
|
+
*
|
|
135
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `ParameterDeclaration` node type of the factory package.
|
|
136
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
137
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
138
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
139
|
+
*/
|
|
35
140
|
type ParameterDeclaration = _ParameterDeclaration;
|
|
141
|
+
/**
|
|
142
|
+
* The `Statement` node type under the name the generators use.
|
|
143
|
+
*
|
|
144
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `Statement` node type of the factory package.
|
|
145
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
146
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
147
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
148
|
+
*/
|
|
36
149
|
type Statement = _Statement;
|
|
150
|
+
/**
|
|
151
|
+
* The `TypeAliasDeclaration` node type under the name the generators use.
|
|
152
|
+
*
|
|
153
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `TypeAliasDeclaration` node type of the factory package.
|
|
154
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
155
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
156
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
157
|
+
*/
|
|
37
158
|
type TypeAliasDeclaration = _TypeAliasDeclaration;
|
|
159
|
+
/**
|
|
160
|
+
* The `TypeNode` node type under the name the generators use.
|
|
161
|
+
*
|
|
162
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `TypeNode` node type of the factory package.
|
|
163
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
164
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
165
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
166
|
+
*/
|
|
38
167
|
type TypeNode = _TypeNode;
|
|
168
|
+
/**
|
|
169
|
+
* The `TypeReferenceNode` node type under the name the generators use.
|
|
170
|
+
*
|
|
171
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `TypeReferenceNode` node type of the factory package.
|
|
172
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
173
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
174
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
175
|
+
*/
|
|
39
176
|
type TypeReferenceNode = _TypeReferenceNode;
|
|
177
|
+
/**
|
|
178
|
+
* The `UnionTypeNode` node type under the name the generators use.
|
|
179
|
+
*
|
|
180
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `UnionTypeNode` node type of the factory package.
|
|
181
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
182
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
183
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
184
|
+
*/
|
|
40
185
|
type UnionTypeNode = _UnionTypeNode;
|
|
186
|
+
/**
|
|
187
|
+
* The `VariableStatement` node type under the name the generators use.
|
|
188
|
+
*
|
|
189
|
+
* @evidence contracts/common.md#principled-implementation The alias names the `VariableStatement` node type of the factory package.
|
|
190
|
+
* @evidence contracts/common.md#clear-and-simple-design One alias.
|
|
191
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
192
|
+
* @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.
|
|
193
|
+
*/
|
|
41
194
|
type VariableStatement = _VariableStatement;
|
|
42
195
|
}
|
|
43
196
|
export default ts;
|
package/lib/internal/ts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../src/internal/ts.ts"],"names":[],"mappings":";;AA8BA,MAAM,EAAE,GAAY;IAClB,eAAe,EAAE,CAAC,IAAsB,EAAyB,EAAE,CACjE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe;CAC1C,CAAC;
|
|
1
|
+
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../src/internal/ts.ts"],"names":[],"mappings":";;AA8BA,MAAM,EAAE,GAAY;IAClB,eAAe,EAAE,CAAC,IAAsB,EAAyB,EAAE,CACjE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe;CAC1C,CAAC;kBAkMa,EAAE"}
|
|
@@ -1,13 +1,44 @@
|
|
|
1
1
|
import { IHttpMigrateRoute, OpenApi } from "@typia/interface";
|
|
2
2
|
import ts from "../internal/ts";
|
|
3
3
|
import { INestiaMigrateConfig } from "../structures/INestiaMigrateConfig";
|
|
4
|
+
/**
|
|
5
|
+
* Generates one file of the functional API: the imports, the exports of the
|
|
6
|
+
* child namespaces, and the functions of the routes at this level.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation Each route contributes its function and its namespace, the imports are collected by one importer and emitted first, and each child namespace is re-exported, so a file is a complete module.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One function over the two per-route programmers and the importer.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The output derives from the routes and the configuration.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the file's content.
|
|
12
|
+
*/
|
|
4
13
|
export declare namespace NestiaMigrateApiFileProgrammer {
|
|
14
|
+
/**
|
|
15
|
+
* The input of one API file: the configuration, the components, the namespace
|
|
16
|
+
* path, the routes, and the child namespaces.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/common.md#principled-implementation The record holds exactly what a file needs, so files can be generated independently.
|
|
19
|
+
* @evidence contracts/common.md#clear-and-simple-design A flat record.
|
|
20
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
21
|
+
* @evidence contracts/common.md#meaningful-documentation The comment lists the fields.
|
|
22
|
+
*/
|
|
5
23
|
interface IProps {
|
|
24
|
+
/** Calling convention and optional generated features for this operation. */
|
|
6
25
|
config: INestiaMigrateConfig;
|
|
26
|
+
/** Component schemas used to resolve DTO references. */
|
|
7
27
|
components: OpenApi.IComponents;
|
|
28
|
+
/** Accessor prefix locating this functional API index. */
|
|
8
29
|
namespace: string[];
|
|
30
|
+
/** Operations whose functions belong directly to this index. */
|
|
9
31
|
routes: IHttpMigrateRoute[];
|
|
32
|
+
/** Immediate child namespace names re-exported by this index. */
|
|
10
33
|
children: Set<string>;
|
|
11
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns the statements of one API file.
|
|
37
|
+
*
|
|
38
|
+
* @evidence contracts/common.md#principled-implementation The relative path to the structures directory is derived from the namespace depth, so imports resolve from every level.
|
|
39
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
40
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The depth is computed, not hardcoded.
|
|
41
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its result.
|
|
42
|
+
*/
|
|
12
43
|
const write: (props: IProps) => ts.Statement[];
|
|
13
44
|
}
|
|
@@ -6,8 +6,25 @@ const FilePrinter_1 = require("../utils/FilePrinter");
|
|
|
6
6
|
const NestiaMigrateApiFunctionProgrammer_1 = require("./NestiaMigrateApiFunctionProgrammer");
|
|
7
7
|
const NestiaMigrateApiNamespaceProgrammer_1 = require("./NestiaMigrateApiNamespaceProgrammer");
|
|
8
8
|
const NestiaMigrateImportProgrammer_1 = require("./NestiaMigrateImportProgrammer");
|
|
9
|
+
/**
|
|
10
|
+
* Generates one file of the functional API: the imports, the exports of the
|
|
11
|
+
* child namespaces, and the functions of the routes at this level.
|
|
12
|
+
*
|
|
13
|
+
* @evidence contracts/common.md#principled-implementation Each route contributes its function and its namespace, the imports are collected by one importer and emitted first, and each child namespace is re-exported, so a file is a complete module.
|
|
14
|
+
* @evidence contracts/common.md#clear-and-simple-design One function over the two per-route programmers and the importer.
|
|
15
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The output derives from the routes and the configuration.
|
|
16
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the file's content.
|
|
17
|
+
*/
|
|
9
18
|
var NestiaMigrateApiFileProgrammer;
|
|
10
19
|
(function (NestiaMigrateApiFileProgrammer) {
|
|
20
|
+
/**
|
|
21
|
+
* Returns the statements of one API file.
|
|
22
|
+
*
|
|
23
|
+
* @evidence contracts/common.md#principled-implementation The relative path to the structures directory is derived from the namespace depth, so imports resolve from every level.
|
|
24
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
25
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The depth is computed, not hardcoded.
|
|
26
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its result.
|
|
27
|
+
*/
|
|
11
28
|
NestiaMigrateApiFileProgrammer.write = (props) => {
|
|
12
29
|
const importer = new NestiaMigrateImportProgrammer_1.NestiaMigrateImportProgrammer();
|
|
13
30
|
const statements = props.routes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateApiFileProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiFileProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAKxC,sDAAmD;AACnD,6FAA0F;AAC1F,+FAA4F;AAC5F,mFAAgF;AAEhF,IAAiB,8BAA8B,
|
|
1
|
+
{"version":3,"file":"NestiaMigrateApiFileProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiFileProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAKxC,sDAAmD;AACnD,6FAA0F;AAC1F,+FAA4F;AAC5F,mFAAgF;AAEhF;;;;;;;;GAQG;AACH,IAAiB,8BAA8B,CAsE9C;AAtED,WAAiB,8BAA8B;IA2B7C;;;;;;;OAOG;IACU,oCAAK,GAAG,CAAC,KAAa,EAAkB,EAAE;QACrD,MAAM,QAAQ,GACZ,IAAI,6DAA6B,EAAE,CAAC;QACtC,MAAM,UAAU,GAAmB,KAAK,CAAC,MAAM;aAC5C,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;YACd,yBAAW,CAAC,OAAO,EAAE;YACrB,uEAAkC,CAAC,KAAK,CAAC;gBACvC,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,QAAQ;gBACR,KAAK;aACN,CAAC;YACF,yEAAmC,CAAC,KAAK,CAAC;gBACxC,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,QAAQ;gBACR,KAAK;aACN,CAAC;SACH,CAAC;aACD,IAAI,EAAE,CAAC;QACV,OAAO;YACL,GAAG,QAAQ,CAAC,YAAY,CACtB,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,GAAG,EAAE,CACvE;YACD,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACnC,iBAAO,CAAC,uBAAuB,CAC7B,SAAS,EACT,KAAK,EACL,iBAAO,CAAC,qBAAqB,CAAC,iBAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,EAC9D,iBAAO,CAAC,mBAAmB,CAAC,KAAK,KAAK,QAAQ,CAAC,CAChD,CACF;YACD,GAAG,UAAU;SACd,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,EAtEgB,8BAA8B,aAA9B,8BAA8B,GAA9B,8BAA8B,QAsE9C"}
|
|
@@ -2,13 +2,53 @@ import { IHttpMigrateRoute, OpenApi } from "@typia/interface";
|
|
|
2
2
|
import ts from "../internal/ts";
|
|
3
3
|
import { INestiaMigrateConfig } from "../structures/INestiaMigrateConfig";
|
|
4
4
|
import { NestiaMigrateImportProgrammer } from "./NestiaMigrateImportProgrammer";
|
|
5
|
+
/**
|
|
6
|
+
* Generates the function of one route in the SDK.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The function has the connection parameter, the path, query, header, and body parameters in positional or keyword form, and its body calls the plain or the encrypted fetcher, or the simulator when the connection asks for it, and copies response headers when the description asks.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function, one public parameter builder shared with the simulation programmer, and private helpers for the body and the header directives.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The output derives from the route and the configuration, and the header directives are read from the documented tags.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
12
|
+
*/
|
|
5
13
|
export declare namespace NestiaMigrateApiFunctionProgrammer {
|
|
14
|
+
/**
|
|
15
|
+
* The input of one function: the configuration, the components, the importer,
|
|
16
|
+
* and the route.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/common.md#principled-implementation The record holds exactly what the function generation needs.
|
|
19
|
+
* @evidence contracts/common.md#clear-and-simple-design A flat record.
|
|
20
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
21
|
+
* @evidence contracts/common.md#meaningful-documentation The comment lists the fields.
|
|
22
|
+
*/
|
|
6
23
|
interface IContext {
|
|
24
|
+
/** Calling convention and optional generated features for this operation. */
|
|
7
25
|
config: INestiaMigrateConfig;
|
|
26
|
+
/** Component schemas used to resolve DTO references. */
|
|
8
27
|
components: OpenApi.IComponents;
|
|
28
|
+
/** File-local import collector shared with the surrounding file writer. */
|
|
9
29
|
importer: NestiaMigrateImportProgrammer;
|
|
30
|
+
/** Analyzed operation, with the accessor chosen for this generation. */
|
|
10
31
|
route: IHttpMigrateRoute;
|
|
11
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns the exported async function declaration of the route, with its
|
|
35
|
+
* description.
|
|
36
|
+
*
|
|
37
|
+
* @evidence contracts/common.md#principled-implementation The function name is the last accessor segment, the return type is the namespace's response type or void, and the description comes from the route comment with the path, the accessor, and the author tag.
|
|
38
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the private parts.
|
|
39
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names come from the accessor.
|
|
40
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
41
|
+
*/
|
|
12
42
|
const write: (ctx: IContext) => ts.FunctionDeclaration;
|
|
43
|
+
/**
|
|
44
|
+
* Returns the parameters of the function: the connection first, then either
|
|
45
|
+
* one `props` parameter in keyword mode or the path, query, and body
|
|
46
|
+
* parameters in positional mode.
|
|
47
|
+
*
|
|
48
|
+
* @evidence contracts/common.md#principled-implementation The connection type carries the route's header type when it has one, keyword mode adds `props` only when there is something to pass, and an optional body is marked optional.
|
|
49
|
+
* @evidence contracts/common.md#clear-and-simple-design One function with the two modes as two returns.
|
|
50
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The shape follows the configuration.
|
|
51
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the two modes.
|
|
52
|
+
*/
|
|
13
53
|
const writeParameterDeclarations: (ctx: IContext, connectionName?: string) => ts.ParameterDeclaration[];
|
|
14
54
|
}
|
|
@@ -9,8 +9,25 @@ const FilePrinter_1 = require("../utils/FilePrinter");
|
|
|
9
9
|
const RequestBody_1 = require("../utils/RequestBody");
|
|
10
10
|
const SuccessStatus_1 = require("../utils/SuccessStatus");
|
|
11
11
|
const NestiaMigrateSchemaProgrammer_1 = require("./NestiaMigrateSchemaProgrammer");
|
|
12
|
+
/**
|
|
13
|
+
* Generates the function of one route in the SDK.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/common.md#principled-implementation The function has the connection parameter, the path, query, header, and body parameters in positional or keyword form, and its body calls the plain or the encrypted fetcher, or the simulator when the connection asks for it, and copies response headers when the description asks.
|
|
16
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function, one public parameter builder shared with the simulation programmer, and private helpers for the body and the header directives.
|
|
17
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The output derives from the route and the configuration, and the header directives are read from the documented tags.
|
|
18
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
19
|
+
*/
|
|
12
20
|
var NestiaMigrateApiFunctionProgrammer;
|
|
13
21
|
(function (NestiaMigrateApiFunctionProgrammer) {
|
|
22
|
+
/**
|
|
23
|
+
* Returns the exported async function declaration of the route, with its
|
|
24
|
+
* description.
|
|
25
|
+
*
|
|
26
|
+
* @evidence contracts/common.md#principled-implementation The function name is the last accessor segment, the return type is the namespace's response type or void, and the description comes from the route comment with the path, the accessor, and the author tag.
|
|
27
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the private parts.
|
|
28
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names come from the accessor.
|
|
29
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
30
|
+
*/
|
|
14
31
|
NestiaMigrateApiFunctionProgrammer.write = (ctx) => FilePrinter_1.FilePrinter.description(factory_1.factory.createFunctionDeclaration([
|
|
15
32
|
factory_1.factory.createModifier(factory_1.SyntaxKind.ExportKeyword),
|
|
16
33
|
factory_1.factory.createModifier(factory_1.SyntaxKind.AsyncKeyword),
|
|
@@ -19,6 +36,16 @@ var NestiaMigrateApiFunctionProgrammer;
|
|
|
19
36
|
? "void"
|
|
20
37
|
: `${ctx.route.accessor.at(-1)}.Response`),
|
|
21
38
|
]), factory_1.factory.createBlock(writeBody(ctx), true)), writeDescription(ctx.config, ctx.route));
|
|
39
|
+
/**
|
|
40
|
+
* Returns the parameters of the function: the connection first, then either
|
|
41
|
+
* one `props` parameter in keyword mode or the path, query, and body
|
|
42
|
+
* parameters in positional mode.
|
|
43
|
+
*
|
|
44
|
+
* @evidence contracts/common.md#principled-implementation The connection type carries the route's header type when it has one, keyword mode adds `props` only when there is something to pass, and an optional body is marked optional.
|
|
45
|
+
* @evidence contracts/common.md#clear-and-simple-design One function with the two modes as two returns.
|
|
46
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The shape follows the configuration.
|
|
47
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the two modes.
|
|
48
|
+
*/
|
|
22
49
|
NestiaMigrateApiFunctionProgrammer.writeParameterDeclarations = (ctx, connectionName) => {
|
|
23
50
|
const connection = IdentifierFactory_1.IdentifierFactory.parameter(connectionName !== null && connectionName !== void 0 ? connectionName : "connection", factory_1.factory.createTypeReferenceNode(ctx.importer.external({
|
|
24
51
|
type: "instance",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateApiFunctionProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiFunctionProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AAEpD,wCAAgD;AAEhD,sEAAmE;AACnE,oEAAiE;AAGjE,sDAAmD;AACnD,sDAAmD;AACnD,0DAAuD;AAEvD,mFAAgF;AAEhF,IAAiB,kCAAkC,
|
|
1
|
+
{"version":3,"file":"NestiaMigrateApiFunctionProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiFunctionProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AAEpD,wCAAgD;AAEhD,sEAAmE;AACnE,oEAAiE;AAGjE,sDAAmD;AACnD,sDAAmD;AACnD,0DAAuD;AAEvD,mFAAgF;AAEhF;;;;;;;GAOG;AACH,IAAiB,kCAAkC,CAmXlD;AAnXD,WAAiB,kCAAkC;IAwBjD;;;;;;;;OAQG;IACU,wCAAK,GAAG,CAAC,GAAa,EAA0B,EAAE,CAC7D,yBAAW,CAAC,WAAW,CACrB,iBAAO,CAAC,yBAAyB,CAC/B;QACE,iBAAO,CAAC,cAAc,CAAC,oBAAU,CAAC,aAAa,CAAC;QAChD,iBAAO,CAAC,cAAc,CAAC,oBAAU,CAAC,YAAY,CAAC;KAChD,EACD,SAAS,EACT,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,EAC1B,SAAS,EACT,6DAA0B,CAAC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CAAC;oBACvB,UAAU,CAAC,IAAI,CAAC;wBACd,IAAI,EAAE,QAAQ;wBACd,QAAQ;qBACT,CAAC,CAAC;YACP,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,EAnXgB,kCAAkC,aAAlC,kCAAkC,GAAlC,kCAAkC,QAmXlD"}
|
|
@@ -3,13 +3,52 @@ import { OpenApi } from "typia";
|
|
|
3
3
|
import ts from "../internal/ts";
|
|
4
4
|
import { INestiaMigrateConfig } from "../structures/INestiaMigrateConfig";
|
|
5
5
|
import { NestiaMigrateImportProgrammer } from "./NestiaMigrateImportProgrammer";
|
|
6
|
+
/**
|
|
7
|
+
* Generates the namespace that accompanies the function of a route: its types,
|
|
8
|
+
* its metadata, its path builder, and, in simulation mode, its simulator.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The namespace declares the `Props`, `Query`, `Body`, `Headers`, and `Response` types from the schemas, the route metadata the fetcher reads, the `path` function that fills the parameters into the template, and the simulator members.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function, one public path-call builder shared with the simulation programmer, and private helpers per member.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The output derives from the route and the configuration.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
14
|
+
*/
|
|
6
15
|
export declare namespace NestiaMigrateApiNamespaceProgrammer {
|
|
16
|
+
/**
|
|
17
|
+
* The input of one namespace: the configuration, the components, the
|
|
18
|
+
* importer, and the route.
|
|
19
|
+
*
|
|
20
|
+
* @evidence contracts/common.md#principled-implementation The record holds exactly what the namespace generation needs.
|
|
21
|
+
* @evidence contracts/common.md#clear-and-simple-design A flat record.
|
|
22
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
23
|
+
* @evidence contracts/common.md#meaningful-documentation The comment lists the fields.
|
|
24
|
+
*/
|
|
7
25
|
interface IContext {
|
|
26
|
+
/** Calling convention and optional generated features for this operation. */
|
|
8
27
|
config: INestiaMigrateConfig;
|
|
28
|
+
/** Component schemas used to resolve DTO references. */
|
|
9
29
|
components: OpenApi.IComponents;
|
|
30
|
+
/** File-local import collector shared with the surrounding file writer. */
|
|
10
31
|
importer: NestiaMigrateImportProgrammer;
|
|
32
|
+
/** Analyzed operation, with the accessor chosen for this generation. */
|
|
11
33
|
route: IHttpMigrateRoute;
|
|
12
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns the namespace declaration of a route.
|
|
37
|
+
*
|
|
38
|
+
* @evidence contracts/common.md#principled-implementation The members are written in a fixed order: types, metadata, path function, and the random and simulate members when simulation is enabled.
|
|
39
|
+
* @evidence contracts/common.md#clear-and-simple-design One function composing the private writers.
|
|
40
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The members follow the configuration.
|
|
41
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
42
|
+
*/
|
|
13
43
|
const write: (ctx: IContext) => ts.ModuleDeclaration;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the call expression of the route's `path` function with the
|
|
46
|
+
* arguments the configuration selects.
|
|
47
|
+
*
|
|
48
|
+
* @evidence contracts/common.md#principled-implementation In keyword mode the arguments are the `props` object and otherwise the path and query parameters in order, so the same call is valid in both modes.
|
|
49
|
+
* @evidence contracts/common.md#clear-and-simple-design One function shared by the simulator and the namespace.
|
|
50
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The arguments follow the configuration.
|
|
51
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the two argument forms.
|
|
52
|
+
*/
|
|
14
53
|
const writePathCallExpression: (config: INestiaMigrateConfig, route: IHttpMigrateRoute) => import("@ttsc/factory").CallExpression;
|
|
15
54
|
}
|
|
@@ -11,8 +11,25 @@ const PathTemplate_1 = require("../utils/PathTemplate");
|
|
|
11
11
|
const RequestBody_1 = require("../utils/RequestBody");
|
|
12
12
|
const NestiaMigrateApiSimulationProgrammer_1 = require("./NestiaMigrateApiSimulationProgrammer");
|
|
13
13
|
const NestiaMigrateSchemaProgrammer_1 = require("./NestiaMigrateSchemaProgrammer");
|
|
14
|
+
/**
|
|
15
|
+
* Generates the namespace that accompanies the function of a route: its types,
|
|
16
|
+
* its metadata, its path builder, and, in simulation mode, its simulator.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/common.md#principled-implementation The namespace declares the `Props`, `Query`, `Body`, `Headers`, and `Response` types from the schemas, the route metadata the fetcher reads, the `path` function that fills the parameters into the template, and the simulator members.
|
|
19
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function, one public path-call builder shared with the simulation programmer, and private helpers per member.
|
|
20
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The output derives from the route and the configuration.
|
|
21
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
22
|
+
*/
|
|
14
23
|
var NestiaMigrateApiNamespaceProgrammer;
|
|
15
24
|
(function (NestiaMigrateApiNamespaceProgrammer) {
|
|
25
|
+
/**
|
|
26
|
+
* Returns the namespace declaration of a route.
|
|
27
|
+
*
|
|
28
|
+
* @evidence contracts/common.md#principled-implementation The members are written in a fixed order: types, metadata, path function, and the random and simulate members when simulation is enabled.
|
|
29
|
+
* @evidence contracts/common.md#clear-and-simple-design One function composing the private writers.
|
|
30
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The members follow the configuration.
|
|
31
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
32
|
+
*/
|
|
16
33
|
NestiaMigrateApiNamespaceProgrammer.write = (ctx) => {
|
|
17
34
|
const types = writeTypes(ctx);
|
|
18
35
|
return factory_1.factory.createModuleDeclaration([factory_1.factory.createToken(factory_1.SyntaxKind.ExportKeyword)], factory_1.factory.createIdentifier(ctx.route.accessor.at(-1)), factory_1.factory.createModuleBlock([
|
|
@@ -29,6 +46,15 @@ var NestiaMigrateApiNamespaceProgrammer;
|
|
|
29
46
|
: []),
|
|
30
47
|
]), factory_1.NodeFlags.Namespace);
|
|
31
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Returns the call expression of the route's `path` function with the
|
|
51
|
+
* arguments the configuration selects.
|
|
52
|
+
*
|
|
53
|
+
* @evidence contracts/common.md#principled-implementation In keyword mode the arguments are the `props` object and otherwise the path and query parameters in order, so the same call is valid in both modes.
|
|
54
|
+
* @evidence contracts/common.md#clear-and-simple-design One function shared by the simulator and the namespace.
|
|
55
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The arguments follow the configuration.
|
|
56
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the two argument forms.
|
|
57
|
+
*/
|
|
32
58
|
NestiaMigrateApiNamespaceProgrammer.writePathCallExpression = (config, route) => factory_1.factory.createCallExpression(factory_1.factory.createIdentifier(`${route.accessor.at(-1)}.path`), undefined, route.parameters.length === 0 && route.query === null
|
|
33
59
|
? []
|
|
34
60
|
: config.keyword === true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateApiNamespaceProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiNamespaceProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAI/D,sEAAmE;AACnE,sEAAmE;AACnE,gEAA6D;AAC7D,0DAAuD;AAGvD,sDAAmD;AACnD,wDAAqD;AACrD,sDAAmD;AACnD,iGAA8F;AAE9F,mFAAgF;AAEhF,IAAiB,mCAAmC,CA2dnD;AA3dD,WAAiB,mCAAmC;IAQrC,yCAAK,GAAG,CAAC,GAAa,EAAwB,EAAE;QAC3D,MAAM,KAAK,GAA8B,UAAU,CAAC,GAAG,CAAC,CAAC;QACzD,OAAO,iBAAO,CAAC,uBAAuB,CACpC,CAAC,iBAAO,CAAC,WAAW,CAAC,oBAAU,CAAC,aAAa,CAAC,CAAC,EAC/C,iBAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAA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EAClD,iBAAO,CAAC,6BAA6B,CACnC;IACE,iBAAO,CAAC,yBAAyB,CAC/B,IAAI,EACJ,SAAS,EACT,SAAS,EACT,UAAU,CACX;CACF,EACD,mBAAS,CAAC,KAAK,CAChB,CACF,CAAC;AAEJ,MAAM,OAAO,GAAG,CAAC,KAAwB,EAAE,EAAE,CAC3C,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC;AAErE,MAAM,KAAK,GAAG,CAAC,KAId,EAAE,EAAE,CACH,iBAAO,CAAC,uBAAuB,CAC7B,EAAE,EACF,iBAAO,CAAC,6BAA6B,CACnC;IACE,iBAAO,CAAC,yBAAyB,CAC/B,KAAK,CAAC,IAAI,EACV,SAAS,EACT,iBAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,EAC3C,KAAK,CAAC,UAAU,CACjB;CACF,EACD,mBAAS,CAAC,KAAK,CAChB,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"NestiaMigrateApiNamespaceProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiNamespaceProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAI/D,sEAAmE;AACnE,sEAAmE;AACnE,gEAA6D;AAC7D,0DAAuD;AAGvD,sDAAmD;AACnD,wDAAqD;AACrD,sDAAmD;AACnD,iGAA8F;AAE9F,mFAAgF;AAEhF;;;;;;;;GAQG;AACH,IAAiB,mCAAmC,CA4fnD;AA5fD,WAAiB,mCAAmC;IAwBlD;;;;;;;OAOG;IACU,yCAAK,GAAG,CAAC,GAAa,EAAwB,EAAE;QAC3D,MAAM,KAAK,GAA8B,UAAU,CAAC,GAAG,CAAC,CAAC;QACzD,OAAO,iBAAO,CAAC,uBAAuB,CACpC,CAAC,iBAAO,CAAC,WAAW,CAAC,oBAAU,CAAC,aAAa,CAA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AyB,EAAE,EAAE,CAC3D,iBAAO,CAAC,uBAAuB,CAC7B,CAAC,iBAAO,CAAC,cAAc,CAAC,oBAAU,CAAC,aAAa,CAAC,CAAC,EAClD,iBAAO,CAAC,6BAA6B,CACnC;IACE,iBAAO,CAAC,yBAAyB,CAC/B,IAAI,EACJ,SAAS,EACT,SAAS,EACT,UAAU,CACX;CACF,EACD,mBAAS,CAAC,KAAK,CAChB,CACF,CAAC;AAEJ,MAAM,OAAO,GAAG,CAAC,KAAwB,EAAE,EAAE,CAC3C,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC;AAErE,MAAM,KAAK,GAAG,CAAC,KAId,EAAE,EAAE,CACH,iBAAO,CAAC,uBAAuB,CAC7B,EAAE,EACF,iBAAO,CAAC,6BAA6B,CACnC;IACE,iBAAO,CAAC,yBAAyB,CAC/B,KAAK,CAAC,IAAI,EACV,SAAS,EACT,iBAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,EAC3C,KAAK,CAAC,UAAU,CACjB;CACF,EACD,mBAAS,CAAC,KAAK,CAChB,CACF,CAAC"}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { INestiaMigrateContext } from "../structures/INestiaMigrateContext";
|
|
2
|
+
/**
|
|
3
|
+
* Generates the functional API files and, for an SDK project, the DTO structure
|
|
4
|
+
* files.
|
|
5
|
+
*
|
|
6
|
+
* @evidence contracts/common.md#principled-implementation Routes are grouped by namespace path in a hash map, each parent namespace is given its child, and each namespace becomes one `index.ts`; the DTO files are written per top-level component name.
|
|
7
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function and two private helpers for the DTO files.
|
|
8
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The layout follows the accessors of the routes.
|
|
9
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
10
|
+
*/
|
|
2
11
|
export declare namespace NestiaMigrateApiProgrammer {
|
|
12
|
+
/**
|
|
13
|
+
* Returns the map from file path to content of the functional API, with the
|
|
14
|
+
* DTO files for an SDK project.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/common.md#principled-implementation The grouping creates every ancestor namespace so that each level has an index, and the paths differ between the two modes only by their root.
|
|
17
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
18
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The layout follows the accessors.
|
|
19
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
20
|
+
*/
|
|
3
21
|
const write: (ctx: INestiaMigrateContext) => Record<string, string>;
|
|
4
22
|
}
|
|
@@ -7,8 +7,26 @@ const FilePrinter_1 = require("../utils/FilePrinter");
|
|
|
7
7
|
const NestiaMigrateApiFileProgrammer_1 = require("./NestiaMigrateApiFileProgrammer");
|
|
8
8
|
const NestiaMigrateDtoProgrammer_1 = require("./NestiaMigrateDtoProgrammer");
|
|
9
9
|
const NestiaMigrateImportProgrammer_1 = require("./NestiaMigrateImportProgrammer");
|
|
10
|
+
/**
|
|
11
|
+
* Generates the functional API files and, for an SDK project, the DTO structure
|
|
12
|
+
* files.
|
|
13
|
+
*
|
|
14
|
+
* @evidence contracts/common.md#principled-implementation Routes are grouped by namespace path in a hash map, each parent namespace is given its child, and each namespace becomes one `index.ts`; the DTO files are written per top-level component name.
|
|
15
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function and two private helpers for the DTO files.
|
|
16
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The layout follows the accessors of the routes.
|
|
17
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
18
|
+
*/
|
|
10
19
|
var NestiaMigrateApiProgrammer;
|
|
11
20
|
(function (NestiaMigrateApiProgrammer) {
|
|
21
|
+
/**
|
|
22
|
+
* Returns the map from file path to content of the functional API, with the
|
|
23
|
+
* DTO files for an SDK project.
|
|
24
|
+
*
|
|
25
|
+
* @evidence contracts/common.md#principled-implementation The grouping creates every ancestor namespace so that each level has an index, and the paths differ between the two modes only by their root.
|
|
26
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
27
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The layout follows the accessors.
|
|
28
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
29
|
+
*/
|
|
12
30
|
NestiaMigrateApiProgrammer.write = (ctx) => {
|
|
13
31
|
const dict = new tstl_1.HashMap((x) => (0, tstl_1.hash)(x.join(".")), (x, y) => x.length === y.length && x.join(".") === y.join("."));
|
|
14
32
|
dict.take([], () => ({
|