@nestia/migrate 11.2.1 → 12.0.0-dev.20260520.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/lib/NestiaMigrateApplication.d.ts +1 -12
  2. package/lib/NestiaMigrateApplication.js +22 -24873
  3. package/lib/NestiaMigrateApplication.js.map +1 -1
  4. package/lib/analyzers/NestiaMigrateControllerAnalyzer.js.map +1 -1
  5. package/lib/archivers/NestiaMigrateFileArchiver.js.map +1 -1
  6. package/lib/bundles/NEST_TEMPLATE.js +5 -5
  7. package/lib/bundles/NEST_TEMPLATE.js.map +1 -1
  8. package/lib/bundles/SDK_TEMPLATE.js +4 -4
  9. package/lib/bundles/SDK_TEMPLATE.js.map +1 -1
  10. package/lib/executable/NestiaMigrateCommander.js +14 -5
  11. package/lib/executable/NestiaMigrateCommander.js.map +1 -1
  12. package/lib/executable/NestiaMigrateInquirer.js.map +1 -1
  13. package/lib/factories/TypeLiteralFactory.d.ts +1 -1
  14. package/lib/factories/TypeLiteralFactory.js +49 -13
  15. package/lib/factories/TypeLiteralFactory.js.map +1 -1
  16. package/lib/index.js.map +1 -1
  17. package/lib/index.mjs +177 -24588
  18. package/lib/index.mjs.map +1 -1
  19. package/lib/internal/ts.d.ts +32 -0
  20. package/lib/internal/ts.js +37 -0
  21. package/lib/internal/ts.js.map +1 -0
  22. package/lib/programmers/NestiaMigrateApiFileProgrammer.d.ts +1 -1
  23. package/lib/programmers/NestiaMigrateApiFileProgrammer.js +2 -5
  24. package/lib/programmers/NestiaMigrateApiFileProgrammer.js.map +1 -1
  25. package/lib/programmers/NestiaMigrateApiFunctionProgrammer.d.ts +1 -1
  26. package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js +87 -49
  27. package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js.map +1 -1
  28. package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.d.ts +2 -2
  29. package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.js +80 -82
  30. package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.js.map +1 -1
  31. package/lib/programmers/NestiaMigrateApiProgrammer.js +3 -2
  32. package/lib/programmers/NestiaMigrateApiProgrammer.js.map +1 -1
  33. package/lib/programmers/NestiaMigrateApiSimulationProgrammer.d.ts +2 -2
  34. package/lib/programmers/NestiaMigrateApiSimulationProgrammer.js +39 -37
  35. package/lib/programmers/NestiaMigrateApiSimulationProgrammer.js.map +1 -1
  36. package/lib/programmers/NestiaMigrateApiStartProgrammer.js +33 -35
  37. package/lib/programmers/NestiaMigrateApiStartProgrammer.js.map +1 -1
  38. package/lib/programmers/NestiaMigrateDtoProgrammer.d.ts +1 -1
  39. package/lib/programmers/NestiaMigrateDtoProgrammer.js +17 -19
  40. package/lib/programmers/NestiaMigrateDtoProgrammer.js.map +1 -1
  41. package/lib/programmers/NestiaMigrateE2eFileProgrammer.d.ts +1 -1
  42. package/lib/programmers/NestiaMigrateE2eFileProgrammer.js +26 -23
  43. package/lib/programmers/NestiaMigrateE2eFileProgrammer.js.map +1 -1
  44. package/lib/programmers/NestiaMigrateE2eProgrammer.js.map +1 -1
  45. package/lib/programmers/NestiaMigrateImportProgrammer.d.ts +1 -1
  46. package/lib/programmers/NestiaMigrateImportProgrammer.js +11 -14
  47. package/lib/programmers/NestiaMigrateImportProgrammer.js.map +1 -1
  48. package/lib/programmers/NestiaMigrateNestControllerProgrammer.d.ts +1 -1
  49. package/lib/programmers/NestiaMigrateNestControllerProgrammer.js +16 -18
  50. package/lib/programmers/NestiaMigrateNestControllerProgrammer.js.map +1 -1
  51. package/lib/programmers/NestiaMigrateNestMethodProgrammer.d.ts +1 -1
  52. package/lib/programmers/NestiaMigrateNestMethodProgrammer.js +128 -132
  53. package/lib/programmers/NestiaMigrateNestMethodProgrammer.js.map +1 -1
  54. package/lib/programmers/NestiaMigrateNestModuleProgrammer.d.ts +1 -1
  55. package/lib/programmers/NestiaMigrateNestModuleProgrammer.js +10 -9
  56. package/lib/programmers/NestiaMigrateNestModuleProgrammer.js.map +1 -1
  57. package/lib/programmers/NestiaMigrateNestProgrammer.js +3 -2
  58. package/lib/programmers/NestiaMigrateNestProgrammer.js.map +1 -1
  59. package/lib/programmers/NestiaMigrateSchemaProgrammer.d.ts +2 -2
  60. package/lib/programmers/NestiaMigrateSchemaProgrammer.js +114 -81
  61. package/lib/programmers/NestiaMigrateSchemaProgrammer.js.map +1 -1
  62. package/lib/structures/INestiaMigrateConfig.d.ts +1 -1
  63. package/lib/utils/FilePrinter.d.ts +2 -2
  64. package/lib/utils/FilePrinter.js +8 -10
  65. package/lib/utils/FilePrinter.js.map +1 -1
  66. package/lib/utils/MapUtil.js.map +1 -1
  67. package/lib/utils/StringUtil.d.ts +0 -1
  68. package/lib/utils/StringUtil.js +0 -1
  69. package/lib/utils/StringUtil.js.map +1 -1
  70. package/package.json +9 -11
  71. package/src/NestiaMigrateApplication.ts +29 -30
  72. package/src/bundles/NEST_TEMPLATE.ts +5 -5
  73. package/src/bundles/SDK_TEMPLATE.ts +4 -4
  74. package/src/executable/NestiaMigrateCommander.ts +15 -4
  75. package/src/executable/bundle.js +237 -4
  76. package/src/factories/TypeLiteralFactory.ts +22 -16
  77. package/src/internal/ts.ts +94 -0
  78. package/src/programmers/NestiaMigrateApiFileProgrammer.ts +7 -4
  79. package/src/programmers/NestiaMigrateApiFunctionProgrammer.ts +88 -68
  80. package/src/programmers/NestiaMigrateApiNamespaceProgrammer.ts +122 -111
  81. package/src/programmers/NestiaMigrateApiProgrammer.ts +6 -5
  82. package/src/programmers/NestiaMigrateApiSimulationProgrammer.ts +67 -61
  83. package/src/programmers/NestiaMigrateApiStartProgrammer.ts +46 -45
  84. package/src/programmers/NestiaMigrateDtoProgrammer.ts +4 -3
  85. package/src/programmers/NestiaMigrateE2eFileProgrammer.ts +33 -30
  86. package/src/programmers/NestiaMigrateE2eProgrammer.ts +1 -1
  87. package/src/programmers/NestiaMigrateImportProgrammer.ts +20 -19
  88. package/src/programmers/NestiaMigrateNestControllerProgrammer.ts +8 -7
  89. package/src/programmers/NestiaMigrateNestMethodProgrammer.ts +82 -77
  90. package/src/programmers/NestiaMigrateNestModuleProgrammer.ts +18 -17
  91. package/src/programmers/NestiaMigrateNestProgrammer.ts +6 -5
  92. package/src/programmers/NestiaMigrateSchemaProgrammer.ts +54 -42
  93. package/src/structures/INestiaMigrateConfig.ts +1 -1
  94. package/src/utils/FilePrinter.ts +9 -14
  95. package/src/utils/StringUtil.ts +0 -5
  96. package/lib/structures/INestiaMigrateDto.d.ts +0 -7
  97. package/lib/structures/INestiaMigrateDto.js +0 -3
  98. package/lib/structures/INestiaMigrateDto.js.map +0 -1
  99. package/lib/structures/INestiaMigrateProgram.d.ts +0 -9
  100. package/lib/structures/INestiaMigrateProgram.js +0 -3
  101. package/lib/structures/INestiaMigrateProgram.js.map +0 -1
  102. package/lib/structures/INestiaMigrateSchema.d.ts +0 -4
  103. package/lib/structures/INestiaMigrateSchema.js +0 -3
  104. package/lib/structures/INestiaMigrateSchema.js.map +0 -1
  105. package/lib/utils/SetupWizard.d.ts +0 -3
  106. package/lib/utils/SetupWizard.js +0 -18
  107. package/lib/utils/SetupWizard.js.map +0 -1
  108. package/lib/utils/openapi-down-convert/RefVisitor.d.ts +0 -52
  109. package/lib/utils/openapi-down-convert/RefVisitor.js +0 -102
  110. package/lib/utils/openapi-down-convert/RefVisitor.js.map +0 -1
  111. package/lib/utils/openapi-down-convert/converter.d.ts +0 -146
  112. package/lib/utils/openapi-down-convert/converter.js +0 -441
  113. package/lib/utils/openapi-down-convert/converter.js.map +0 -1
  114. package/src/structures/INestiaMigrateDto.ts +0 -8
  115. package/src/structures/INestiaMigrateProgram.ts +0 -11
  116. package/src/structures/INestiaMigrateSchema.ts +0 -4
  117. package/src/utils/SetupWizard.ts +0 -12
  118. package/src/utils/openapi-down-convert/RefVisitor.ts +0 -134
  119. package/src/utils/openapi-down-convert/converter.ts +0 -536
@@ -1,13 +1,17 @@
1
- import { IdentifierFactory, StatementFactory } from "@typia/core";
1
+ import { TypeScriptFactory } from "@nestia/factory";
2
+ import { IdentifierFactory, StatementFactory } from "@nestia/factory";
2
3
  import { IHttpMigrateRoute, OpenApi } from "@typia/interface";
3
- import { NamingConvention } from "@typia/utils";
4
- import ts from "typescript";
4
+ import * as typiaUtils from "@typia/utils";
5
+ import ts from "../internal/ts";
5
6
 
6
7
  import { INestiaMigrateConfig } from "../structures/INestiaMigrateConfig";
7
8
  import { FilePrinter } from "../utils/FilePrinter";
8
9
  import { NestiaMigrateImportProgrammer } from "./NestiaMigrateImportProgrammer";
9
10
  import { NestiaMigrateSchemaProgrammer } from "./NestiaMigrateSchemaProgrammer";
10
11
 
12
+ const { NamingConvention } =
13
+ (typiaUtils as { default?: typeof typiaUtils }).default ?? typiaUtils;
14
+
11
15
  export namespace NestiaMigrateApiFunctionProgrammer {
12
16
  export interface IContext {
13
17
  config: INestiaMigrateConfig;
@@ -18,23 +22,23 @@ export namespace NestiaMigrateApiFunctionProgrammer {
18
22
 
19
23
  export const write = (ctx: IContext): ts.FunctionDeclaration =>
20
24
  FilePrinter.description(
21
- ts.factory.createFunctionDeclaration(
25
+ TypeScriptFactory.createFunctionDeclaration(
22
26
  [
23
- ts.factory.createModifier(ts.SyntaxKind.ExportKeyword),
24
- ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword),
27
+ TypeScriptFactory.createModifier(ts.SyntaxKind.ExportKeyword),
28
+ TypeScriptFactory.createModifier(ts.SyntaxKind.AsyncKeyword),
25
29
  ],
26
30
  undefined,
27
31
  ctx.route.accessor.at(-1)!,
28
32
  undefined,
29
33
  writeParameterDeclarations(ctx),
30
- ts.factory.createTypeReferenceNode("Promise", [
31
- ts.factory.createTypeReferenceNode(
34
+ TypeScriptFactory.createTypeReferenceNode("Promise", [
35
+ TypeScriptFactory.createTypeReferenceNode(
32
36
  ctx.route.success === null
33
37
  ? "void"
34
38
  : `${ctx.route.accessor.at(-1)!}.Response`,
35
39
  ),
36
40
  ]),
37
- ts.factory.createBlock(writeBody(ctx), true),
41
+ TypeScriptFactory.createBlock(writeBody(ctx), true),
38
42
  ),
39
43
  writeDescription(ctx.config, ctx.route),
40
44
  );
@@ -45,7 +49,7 @@ export namespace NestiaMigrateApiFunctionProgrammer {
45
49
  ): ts.ParameterDeclaration[] => {
46
50
  const connection: ts.ParameterDeclaration = IdentifierFactory.parameter(
47
51
  connectionName ?? "connection",
48
- ts.factory.createTypeReferenceNode(
52
+ TypeScriptFactory.createTypeReferenceNode(
49
53
  ctx.importer.external({
50
54
  type: "instance",
51
55
  library: "@nestia/fetcher",
@@ -53,7 +57,7 @@ export namespace NestiaMigrateApiFunctionProgrammer {
53
57
  }),
54
58
  ctx.route.headers
55
59
  ? [
56
- ts.factory.createTypeReferenceNode(
60
+ TypeScriptFactory.createTypeReferenceNode(
57
61
  `${ctx.route.accessor.at(-1)!}.Headers`,
58
62
  ),
59
63
  ]
@@ -68,12 +72,12 @@ export namespace NestiaMigrateApiFunctionProgrammer {
68
72
  if (isProps === false) return [connection];
69
73
  return [
70
74
  connection,
71
- ts.factory.createParameterDeclaration(
75
+ TypeScriptFactory.createParameterDeclaration(
72
76
  undefined,
73
77
  undefined,
74
78
  "props",
75
79
  undefined,
76
- ts.factory.createTypeReferenceNode(
80
+ TypeScriptFactory.createTypeReferenceNode(
77
81
  `${ctx.route.accessor.at(-1)!}.Props`,
78
82
  ),
79
83
  ),
@@ -95,7 +99,7 @@ export namespace NestiaMigrateApiFunctionProgrammer {
95
99
  ? [
96
100
  IdentifierFactory.parameter(
97
101
  ctx.route.query.key,
98
- ts.factory.createTypeReferenceNode(
102
+ TypeScriptFactory.createTypeReferenceNode(
99
103
  `${ctx.route.accessor.at(-1)!}.Query`,
100
104
  ),
101
105
  ),
@@ -105,13 +109,13 @@ export namespace NestiaMigrateApiFunctionProgrammer {
105
109
  ? [
106
110
  IdentifierFactory.parameter(
107
111
  ctx.route.body.key,
108
- ts.factory.createTypeReferenceNode(
112
+ TypeScriptFactory.createTypeReferenceNode(
109
113
  `${ctx.route.accessor.at(-1)!}.Body`,
110
114
  ),
111
115
  (ctx.route.body.type === "application/json" ||
112
116
  ctx.route.body.type === "text/plain") &&
113
117
  ctx.route.operation().requestBody?.required === false
114
- ? ts.factory.createToken(ts.SyntaxKind.QuestionToken)
118
+ ? TypeScriptFactory.createToken(ts.SyntaxKind.QuestionToken)
115
119
  : undefined,
116
120
  ),
117
121
  ]
@@ -140,13 +144,16 @@ export namespace NestiaMigrateApiFunctionProgrammer {
140
144
 
141
145
  const property = (key: string): ts.Expression =>
142
146
  ctx.config.keyword === true
143
- ? IdentifierFactory.access(ts.factory.createIdentifier("props"), key)
144
- : ts.factory.createIdentifier(key);
147
+ ? IdentifierFactory.access(
148
+ TypeScriptFactory.createIdentifier("props"),
149
+ key,
150
+ )
151
+ : TypeScriptFactory.createIdentifier(key);
145
152
  const fetch = () =>
146
- ts.factory.createAwaitExpression(
147
- ts.factory.createCallExpression(
153
+ TypeScriptFactory.createAwaitExpression(
154
+ TypeScriptFactory.createCallExpression(
148
155
  IdentifierFactory.access(
149
- ts.factory.createIdentifier(
156
+ TypeScriptFactory.createIdentifier(
150
157
  ctx.importer.external({
151
158
  type: "instance",
152
159
  library: encrypted
@@ -160,24 +167,26 @@ export namespace NestiaMigrateApiFunctionProgrammer {
160
167
  undefined,
161
168
  [
162
169
  contentType && contentType !== "multipart/form-data"
163
- ? ts.factory.createObjectLiteralExpression(
170
+ ? TypeScriptFactory.createObjectLiteralExpression(
164
171
  [
165
- ts.factory.createSpreadAssignment(
166
- ts.factory.createIdentifier("connection"),
172
+ TypeScriptFactory.createSpreadAssignment(
173
+ TypeScriptFactory.createIdentifier("connection"),
167
174
  ),
168
- ts.factory.createPropertyAssignment(
175
+ TypeScriptFactory.createPropertyAssignment(
169
176
  "headers",
170
- ts.factory.createObjectLiteralExpression(
177
+ TypeScriptFactory.createObjectLiteralExpression(
171
178
  [
172
- ts.factory.createSpreadAssignment(
179
+ TypeScriptFactory.createSpreadAssignment(
173
180
  IdentifierFactory.access(
174
- ts.factory.createIdentifier("connection"),
181
+ TypeScriptFactory.createIdentifier("connection"),
175
182
  "headers",
176
183
  ),
177
184
  ),
178
- ts.factory.createPropertyAssignment(
179
- ts.factory.createStringLiteral("Content-Type"),
180
- ts.factory.createStringLiteral(contentType),
185
+ TypeScriptFactory.createPropertyAssignment(
186
+ TypeScriptFactory.createStringLiteral(
187
+ "Content-Type",
188
+ ),
189
+ TypeScriptFactory.createStringLiteral(contentType),
181
190
  ),
182
191
  ],
183
192
  true,
@@ -186,29 +195,33 @@ export namespace NestiaMigrateApiFunctionProgrammer {
186
195
  ],
187
196
  true,
188
197
  )
189
- : ts.factory.createIdentifier("connection"),
190
- ts.factory.createObjectLiteralExpression(
198
+ : TypeScriptFactory.createIdentifier("connection"),
199
+ TypeScriptFactory.createObjectLiteralExpression(
191
200
  [
192
- ts.factory.createSpreadAssignment(
201
+ TypeScriptFactory.createSpreadAssignment(
193
202
  IdentifierFactory.access(
194
- ts.factory.createIdentifier(ctx.route.accessor.at(-1)!),
203
+ TypeScriptFactory.createIdentifier(
204
+ ctx.route.accessor.at(-1)!,
205
+ ),
195
206
  "METADATA",
196
207
  ),
197
208
  ),
198
- ts.factory.createPropertyAssignment(
209
+ TypeScriptFactory.createPropertyAssignment(
199
210
  "path",
200
- ts.factory.createCallExpression(
211
+ TypeScriptFactory.createCallExpression(
201
212
  IdentifierFactory.access(
202
- ts.factory.createIdentifier(ctx.route.accessor.at(-1)!),
213
+ TypeScriptFactory.createIdentifier(
214
+ ctx.route.accessor.at(-1)!,
215
+ ),
203
216
  "path",
204
217
  ),
205
218
  undefined,
206
219
  getArguments(ctx, false),
207
220
  ),
208
221
  ),
209
- ts.factory.createPropertyAssignment(
222
+ TypeScriptFactory.createPropertyAssignment(
210
223
  "status",
211
- ts.factory.createNull(),
224
+ TypeScriptFactory.createNull(),
212
225
  ),
213
226
  ],
214
227
  true,
@@ -221,19 +234,19 @@ export namespace NestiaMigrateApiFunctionProgrammer {
221
234
  const value: ts.Expression =
222
235
  ctx.config.simulate !== true
223
236
  ? fetch()
224
- : ts.factory.createConditionalExpression(
225
- ts.factory.createStrictEquality(
226
- ts.factory.createTrue(),
227
- ts.factory.createIdentifier("connection.simulate"),
237
+ : TypeScriptFactory.createConditionalExpression(
238
+ TypeScriptFactory.createStrictEquality(
239
+ TypeScriptFactory.createTrue(),
240
+ TypeScriptFactory.createIdentifier("connection.simulate"),
228
241
  ),
229
242
  undefined,
230
- ts.factory.createCallExpression(
231
- ts.factory.createIdentifier(
243
+ TypeScriptFactory.createCallExpression(
244
+ TypeScriptFactory.createIdentifier(
232
245
  `${ctx.route.accessor.at(-1)!}.simulate`,
233
246
  ),
234
247
  [],
235
248
  [
236
- ts.factory.createIdentifier("connection"),
249
+ TypeScriptFactory.createIdentifier("connection"),
237
250
  ...getArguments(ctx, true),
238
251
  ],
239
252
  ),
@@ -243,47 +256,52 @@ export namespace NestiaMigrateApiFunctionProgrammer {
243
256
  const headers: Array<IAssignHeader | ISetHeader> = getHeaders(
244
257
  ctx.route.comment(),
245
258
  );
246
- if (headers.length === 0) return [ts.factory.createReturnStatement(value)];
259
+ if (headers.length === 0)
260
+ return [TypeScriptFactory.createReturnStatement(value)];
247
261
  return [
248
262
  StatementFactory.constant({
249
263
  name: "output",
250
- type: ts.factory.createTypeReferenceNode(
264
+ type: TypeScriptFactory.createTypeReferenceNode(
251
265
  `${ctx.route.accessor.at(-1)!}.Response`,
252
266
  ),
253
267
  value,
254
268
  }),
255
- ts.factory.createExpressionStatement(
256
- ts.factory.createBinaryExpression(
257
- ts.factory.createIdentifier("connection.headers"),
258
- ts.factory.createToken(ts.SyntaxKind.QuestionQuestionEqualsToken),
259
- ts.factory.createObjectLiteralExpression([]),
269
+ TypeScriptFactory.createExpressionStatement(
270
+ TypeScriptFactory.createBinaryExpression(
271
+ TypeScriptFactory.createIdentifier("connection.headers"),
272
+ TypeScriptFactory.createToken(
273
+ ts.SyntaxKind.QuestionQuestionEqualsToken,
274
+ ),
275
+ TypeScriptFactory.createObjectLiteralExpression([]),
260
276
  ),
261
277
  ),
262
278
  ...headers.map((h) =>
263
- ts.factory.createExpressionStatement(
279
+ TypeScriptFactory.createExpressionStatement(
264
280
  h.type === "assign"
265
- ? ts.factory.createCallExpression(
266
- ts.factory.createIdentifier("Object.assign"),
281
+ ? TypeScriptFactory.createCallExpression(
282
+ TypeScriptFactory.createIdentifier("Object.assign"),
267
283
  undefined,
268
284
  [
269
- ts.factory.createIdentifier("connection.headers"),
270
- ts.factory.createIdentifier(`output.${h.accessor}`),
285
+ TypeScriptFactory.createIdentifier("connection.headers"),
286
+ TypeScriptFactory.createIdentifier(`output.${h.accessor}`),
271
287
  ],
272
288
  )
273
- : ts.factory.createBinaryExpression(
274
- ts.factory.createIdentifier(
289
+ : TypeScriptFactory.createBinaryExpression(
290
+ TypeScriptFactory.createIdentifier(
275
291
  `connection.headers${
276
292
  NamingConvention.variable(h.property)
277
293
  ? `.${h.property}`
278
294
  : `[${JSON.stringify(h.property)}]`
279
295
  }`,
280
296
  ),
281
- ts.factory.createToken(ts.SyntaxKind.EqualsToken),
282
- ts.factory.createIdentifier(`output.${h.accessor}`),
297
+ TypeScriptFactory.createToken(ts.SyntaxKind.EqualsToken),
298
+ TypeScriptFactory.createIdentifier(`output.${h.accessor}`),
283
299
  ),
284
300
  ),
285
301
  ),
286
- ts.factory.createReturnStatement(ts.factory.createIdentifier("output")),
302
+ TypeScriptFactory.createReturnStatement(
303
+ TypeScriptFactory.createIdentifier("output"),
304
+ ),
287
305
  ];
288
306
  };
289
307
 
@@ -295,14 +313,16 @@ export namespace NestiaMigrateApiFunctionProgrammer {
295
313
  )
296
314
  return [];
297
315
  else if (ctx.config.keyword === true)
298
- return [ts.factory.createIdentifier("props")];
316
+ return [TypeScriptFactory.createIdentifier("props")];
299
317
  return [
300
- ...ctx.route.parameters.map((p) => ts.factory.createIdentifier(p.key)),
318
+ ...ctx.route.parameters.map((p) =>
319
+ TypeScriptFactory.createIdentifier(p.key),
320
+ ),
301
321
  ...(ctx.route.query
302
- ? [ts.factory.createIdentifier(ctx.route.query.key)]
322
+ ? [TypeScriptFactory.createIdentifier(ctx.route.query.key)]
303
323
  : []),
304
324
  ...(body && ctx.route.body
305
- ? [ts.factory.createIdentifier(ctx.route.body.key)]
325
+ ? [TypeScriptFactory.createIdentifier(ctx.route.body.key)]
306
326
  : []),
307
327
  ];
308
328
  };