@nestia/migrate 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/NestiaMigrateApplication.js +58 -22
- package/lib/NestiaMigrateApplication.js.map +1 -1
- package/lib/bundles/TEMPLATE.js +5 -5
- package/lib/bundles/TEMPLATE.js.map +1 -1
- package/lib/programmers/RouteProgrammer.js +32 -12
- package/lib/programmers/RouteProgrammer.js.map +1 -1
- package/lib/structures/IMigrateRoute.d.ts +1 -1
- package/lib/structures/ISwaggerRoute.d.ts +6 -0
- package/package.json +4 -4
- package/src/bundles/TEMPLATE.ts +5 -5
- package/src/programmers/RouteProgrammer.ts +31 -3
- package/src/structures/IMigrateRoute.ts +4 -1
- package/src/structures/ISwaggerRoute.ts +6 -0
@@ -34,7 +34,7 @@ class NestiaMigrateApplication {
|
|
34
34
|
};
|
35
35
|
this.swagger = (input => {
|
36
36
|
const __is = input => {
|
37
|
-
const $io0 = input => "string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) && ("object" === typeof input.info && null !== input.info && $io1(input.info)) && (Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io4(elem))) && ("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) && $io5(input.components)) && ("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && $io30(input.paths)) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $
|
37
|
+
const $io0 = input => "string" === typeof input.openapi && RegExp(/^3\.0\.[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(input.openapi) && ("object" === typeof input.info && null !== input.info && $io1(input.info)) && (Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io4(elem))) && ("object" === typeof input.components && null !== input.components && false === Array.isArray(input.components) && $io5(input.components)) && ("object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && $io30(input.paths)) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io42(elem)));
|
38
38
|
const $io1 = input => "string" === typeof input.title && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.termsOfService)) && (undefined === input.contact || "object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) && $io2(input.contact)) && (undefined === input.license || "object" === typeof input.license && null !== input.license && $io3(input.license)) && "string" === typeof input.version;
|
39
39
|
const $io2 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url)) && (undefined === input.email || "string" === typeof input.email && /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(input.email));
|
40
40
|
const $io3 = input => "string" === typeof input.name && (undefined === input.url || "string" === typeof input.url && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url));
|
@@ -101,22 +101,24 @@ class NestiaMigrateApplication {
|
|
101
101
|
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io32(value);
|
102
102
|
return true;
|
103
103
|
});
|
104
|
-
const $io32 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $io33(elem))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && $io34(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $
|
104
|
+
const $io32 = input => (undefined === input.parameters || Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $io33(elem))) && (undefined === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && $io34(input.requestBody)) && (undefined === input.responses || "object" === typeof input.responses && null !== input.responses && false === Array.isArray(input.responses) && $io40(input.responses)) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && (undefined === input.security || Array.isArray(input.security) && input.security.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io42(elem))) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input["x-nestia-jsDocTags"] || Array.isArray(input["x-nestia-jsDocTags"]) && input["x-nestia-jsDocTags"].every(elem => "object" === typeof elem && null !== elem && $io43(elem)));
|
105
105
|
const $io33 = input => (undefined === input.name || "string" === typeof input.name) && ("header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || "path" === input["in"]) && ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.description || "string" === typeof input.description);
|
106
106
|
const $io34 = input => (undefined === input.description || "string" === typeof input.description) && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io35(input.content)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
107
|
-
const $io35 = input => (undefined === input["text/plain"] || "object" === typeof input["text/plain"] && null !== input["text/plain"] && $io36(input["text/plain"])) && (undefined === input["application/json"] || "object" === typeof input["application/json"] && null !== input["application/json"] && $io37(input["application/json"]));
|
107
|
+
const $io35 = input => (undefined === input["text/plain"] || "object" === typeof input["text/plain"] && null !== input["text/plain"] && $io36(input["text/plain"])) && (undefined === input["application/json"] || "object" === typeof input["application/json"] && null !== input["application/json"] && $io37(input["application/json"])) && (undefined === input["application/x-www-form-urlencoded"] || "object" === typeof input["application/x-www-form-urlencoded"] && null !== input["application/x-www-form-urlencoded"] && $io38(input["application/x-www-form-urlencoded"])) && (undefined === input["*/*"] || "object" === typeof input["*/*"] && null !== input["*/*"] && $io39(input["*/*"]));
|
108
108
|
const $io36 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
109
109
|
const $io37 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
110
|
-
const $io38 = input =>
|
110
|
+
const $io38 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
111
|
+
const $io39 = input => "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $iu0(input.schema);
|
112
|
+
const $io40 = input => Object.keys(input).every(key => {
|
111
113
|
const value = input[key];
|
112
114
|
if (undefined === value)
|
113
115
|
return true;
|
114
116
|
if (RegExp(/(.*)/).test(key))
|
115
|
-
return "object" === typeof value && null !== value && false === Array.isArray(value) && $
|
117
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io41(value);
|
116
118
|
return true;
|
117
119
|
});
|
118
|
-
const $
|
119
|
-
const $
|
120
|
+
const $io41 = input => (undefined === input.description || "string" === typeof input.description) && (undefined === input.content || "object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && $io35(input.content)) && (undefined === input["x-nestia-encrypted"] || "boolean" === typeof input["x-nestia-encrypted"]);
|
121
|
+
const $io42 = input => Object.keys(input).every(key => {
|
120
122
|
const value = input[key];
|
121
123
|
if (undefined === value)
|
122
124
|
return true;
|
@@ -124,8 +126,8 @@ class NestiaMigrateApplication {
|
|
124
126
|
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
125
127
|
return true;
|
126
128
|
});
|
127
|
-
const $
|
128
|
-
const $
|
129
|
+
const $io43 = input => "string" === typeof input.name && (undefined === input.text || Array.isArray(input.text) && input.text.every(elem => "object" === typeof elem && null !== elem && $io44(elem)));
|
130
|
+
const $io44 = input => "string" === typeof input.text && "string" === typeof input.kind;
|
129
131
|
const $iu0 = input => (() => {
|
130
132
|
if ("null" === input.type)
|
131
133
|
return $io8(input);
|
@@ -222,7 +224,7 @@ class NestiaMigrateApplication {
|
|
222
224
|
path: _path + ".security[" + _index2 + "]",
|
223
225
|
expected: "Record<string, Array<string>>",
|
224
226
|
value: elem
|
225
|
-
})) && $
|
227
|
+
})) && $ao42(elem, _path + ".security[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
226
228
|
path: _path + ".security[" + _index2 + "]",
|
227
229
|
expected: "Record<string, Array<string>>",
|
228
230
|
value: elem
|
@@ -1169,7 +1171,7 @@ class NestiaMigrateApplication {
|
|
1169
1171
|
path: _path + ".responses",
|
1170
1172
|
expected: "(ISwaggerRoute.IResponseBody | undefined)",
|
1171
1173
|
value: input.responses
|
1172
|
-
})) && $
|
1174
|
+
})) && $ao40(input.responses, _path + ".responses", true && _exceptionable) || $guard(_exceptionable, {
|
1173
1175
|
path: _path + ".responses",
|
1174
1176
|
expected: "(ISwaggerRoute.IResponseBody | undefined)",
|
1175
1177
|
value: input.responses
|
@@ -1193,7 +1195,7 @@ class NestiaMigrateApplication {
|
|
1193
1195
|
path: _path + ".security[" + _index12 + "]",
|
1194
1196
|
expected: "Record<string, Array<string>>",
|
1195
1197
|
value: elem
|
1196
|
-
})) && $
|
1198
|
+
})) && $ao42(elem, _path + ".security[" + _index12 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1197
1199
|
path: _path + ".security[" + _index12 + "]",
|
1198
1200
|
expected: "Record<string, Array<string>>",
|
1199
1201
|
value: elem
|
@@ -1221,7 +1223,7 @@ class NestiaMigrateApplication {
|
|
1221
1223
|
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1222
1224
|
expected: "IJsDocTagInfo",
|
1223
1225
|
value: elem
|
1224
|
-
})) && $
|
1226
|
+
})) && $ao43(elem, _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1225
1227
|
path: _path + "[\"x-nestia-jsDocTags\"][" + _index14 + "]",
|
1226
1228
|
expected: "IJsDocTagInfo",
|
1227
1229
|
value: elem
|
@@ -1292,6 +1294,22 @@ class NestiaMigrateApplication {
|
|
1292
1294
|
path: _path + "[\"application/json\"]",
|
1293
1295
|
expected: "(__type.o1 | undefined)",
|
1294
1296
|
value: input["application/json"]
|
1297
|
+
})) && (undefined === input["application/x-www-form-urlencoded"] || ("object" === typeof input["application/x-www-form-urlencoded"] && null !== input["application/x-www-form-urlencoded"] || $guard(_exceptionable, {
|
1298
|
+
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
1299
|
+
expected: "(__type.o2 | undefined)",
|
1300
|
+
value: input["application/x-www-form-urlencoded"]
|
1301
|
+
})) && $ao38(input["application/x-www-form-urlencoded"], _path + "[\"application/x-www-form-urlencoded\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1302
|
+
path: _path + "[\"application/x-www-form-urlencoded\"]",
|
1303
|
+
expected: "(__type.o2 | undefined)",
|
1304
|
+
value: input["application/x-www-form-urlencoded"]
|
1305
|
+
})) && (undefined === input["*/*"] || ("object" === typeof input["*/*"] && null !== input["*/*"] || $guard(_exceptionable, {
|
1306
|
+
path: _path + "[\"*/*\"]",
|
1307
|
+
expected: "(__type.o3 | undefined)",
|
1308
|
+
value: input["*/*"]
|
1309
|
+
})) && $ao39(input["*/*"], _path + "[\"*/*\"]", true && _exceptionable) || $guard(_exceptionable, {
|
1310
|
+
path: _path + "[\"*/*\"]",
|
1311
|
+
expected: "(__type.o3 | undefined)",
|
1312
|
+
value: input["*/*"]
|
1295
1313
|
}));
|
1296
1314
|
const $ao36 = (input, _path, _exceptionable = true) => ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1297
1315
|
path: _path + ".schema",
|
@@ -1311,23 +1329,41 @@ class NestiaMigrateApplication {
|
|
1311
1329
|
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1312
1330
|
value: input.schema
|
1313
1331
|
});
|
1314
|
-
const $ao38 = (input, _path, _exceptionable = true) =>
|
1332
|
+
const $ao38 = (input, _path, _exceptionable = true) => ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1333
|
+
path: _path + ".schema",
|
1334
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1335
|
+
value: input.schema
|
1336
|
+
})) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1337
|
+
path: _path + ".schema",
|
1338
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1339
|
+
value: input.schema
|
1340
|
+
});
|
1341
|
+
const $ao39 = (input, _path, _exceptionable = true) => ("object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) || $guard(_exceptionable, {
|
1342
|
+
path: _path + ".schema",
|
1343
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1344
|
+
value: input.schema
|
1345
|
+
})) && $au0(input.schema, _path + ".schema", true && _exceptionable) || $guard(_exceptionable, {
|
1346
|
+
path: _path + ".schema",
|
1347
|
+
expected: "(ISwaggerSchema.IAnyOf | ISwaggerSchema.IArray | ISwaggerSchema.IBoolean | ISwaggerSchema.IInteger | ISwaggerSchema.INullOnly | ISwaggerSchema.INumber | ISwaggerSchema.IObject | ISwaggerSchema.IOneOf | ISwaggerSchema.IReference | ISwaggerSchema.IString | ISwaggerSchema.IUnknown)",
|
1348
|
+
value: input.schema
|
1349
|
+
});
|
1350
|
+
const $ao40 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1315
1351
|
const value = input[key];
|
1316
1352
|
if (undefined === value)
|
1317
1353
|
return true;
|
1318
1354
|
if (RegExp(/(.*)/).test(key))
|
1319
1355
|
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
1320
1356
|
path: _path + $join(key),
|
1321
|
-
expected: "__type.
|
1357
|
+
expected: "__type.o4",
|
1322
1358
|
value: value
|
1323
|
-
})) && $
|
1359
|
+
})) && $ao41(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
1324
1360
|
path: _path + $join(key),
|
1325
|
-
expected: "__type.
|
1361
|
+
expected: "__type.o4",
|
1326
1362
|
value: value
|
1327
1363
|
});
|
1328
1364
|
return true;
|
1329
1365
|
});
|
1330
|
-
const $
|
1366
|
+
const $ao41 = (input, _path, _exceptionable = true) => (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
1331
1367
|
path: _path + ".description",
|
1332
1368
|
expected: "(string | undefined)",
|
1333
1369
|
value: input.description
|
@@ -1344,7 +1380,7 @@ class NestiaMigrateApplication {
|
|
1344
1380
|
expected: "(boolean | undefined)",
|
1345
1381
|
value: input["x-nestia-encrypted"]
|
1346
1382
|
}));
|
1347
|
-
const $
|
1383
|
+
const $ao42 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
1348
1384
|
const value = input[key];
|
1349
1385
|
if (undefined === value)
|
1350
1386
|
return true;
|
@@ -1364,7 +1400,7 @@ class NestiaMigrateApplication {
|
|
1364
1400
|
});
|
1365
1401
|
return true;
|
1366
1402
|
});
|
1367
|
-
const $
|
1403
|
+
const $ao43 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
1368
1404
|
path: _path + ".name",
|
1369
1405
|
expected: "string",
|
1370
1406
|
value: input.name
|
@@ -1376,7 +1412,7 @@ class NestiaMigrateApplication {
|
|
1376
1412
|
path: _path + ".text[" + _index16 + "]",
|
1377
1413
|
expected: "IJsDocTagInfo.IText",
|
1378
1414
|
value: elem
|
1379
|
-
})) && $
|
1415
|
+
})) && $ao44(elem, _path + ".text[" + _index16 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
1380
1416
|
path: _path + ".text[" + _index16 + "]",
|
1381
1417
|
expected: "IJsDocTagInfo.IText",
|
1382
1418
|
value: elem
|
@@ -1385,7 +1421,7 @@ class NestiaMigrateApplication {
|
|
1385
1421
|
expected: "(Array<IJsDocTagInfo.IText> | undefined)",
|
1386
1422
|
value: input.text
|
1387
1423
|
}));
|
1388
|
-
const $
|
1424
|
+
const $ao44 = (input, _path, _exceptionable = true) => ("string" === typeof input.text || $guard(_exceptionable, {
|
1389
1425
|
path: _path + ".text",
|
1390
1426
|
expected: "string",
|
1391
1427
|
value: input.text
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NestiaMigrateApplication.js","sourceRoot":"","sources":["../src/NestiaMigrateApplication.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA+B;AAE/B,kDAA0B;AAE1B,2DAAwD;AACxD,iDAA8C;AAC9C,uEAAoE;AAKpE,MAAa,wBAAwB;IAKjC,YAAmB,OAAiB;QAsB7B,aAAQ,GACX,CAAC,QAA4C,EAAE,EAAE,CACjD,CAAC,MAAc,EAAQ,EAAE;YACrB,MAAM,OAAO,GAAoB,IAAI,CAAC,OAAO,EAAE,CAAC;YAChD,MAAM,KAAK,GAAmB,qCAAiB,CAAC,KAAK,CACjD,IAAI,CAAC,OAAO,CAAC,UAAU,CAC1B,CAAC,OAAO,CAAC,CAAC;YAEX,IAAI;gBACA,uBAAE,CAAC,QAAQ,CACP,yDAAyD,MAAM,GAAG,EAClE,EAAE,KAAK,EAAE,QAAQ,EAAE,CACtB,CAAC;gBACF,KAAK,MAAM,IAAI,IAAI;oBACf,OAAO;oBACP,UAAU;oBACV,kBAAkB;oBAClB,gBAAgB;oBAChB,gBAAgB;iBACnB;oBACG,uBAAE,CAAC,QAAQ,CAAC,WAAW,MAAM,GAAG,IAAI,GAAG,EAAE;wBACrC,KAAK,EAAE,QAAQ;qBAClB,CAAC,CAAC;aACV;YAAC,WAAM;gBACJ,2BAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,mBAAQ,CAAC,CAAC;aACpD;YACD,2BAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC;QAhDF,IAAI,CAAC,OAAO
|
1
|
+
{"version":3,"file":"NestiaMigrateApplication.js","sourceRoot":"","sources":["../src/NestiaMigrateApplication.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA+B;AAE/B,kDAA0B;AAE1B,2DAAwD;AACxD,iDAA8C;AAC9C,uEAAoE;AAKpE,MAAa,wBAAwB;IAKjC,YAAmB,OAAiB;QAsB7B,aAAQ,GACX,CAAC,QAA4C,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAC,OAAO,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IAEM,OAAO;QACV,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI;YACrB,IAAI,CAAC,OAAO,GAAG,qCAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAEM,KAAK;QACR,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,EAAE;YACrB,MAAM,OAAO,GAAoB,IAAI,CAAC,OAAO,EAAE,CAAC;YAChD,IAAI,CAAC,KAAK,GAAG,qCAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CACzD,OAAO,CACV,CAAC;SACL;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;CA8BJ;AAvDD,4DAuDC"}
|
package/lib/bundles/TEMPLATE.js
CHANGED
@@ -45,12 +45,12 @@ exports.TEMPLATE = [
|
|
45
45
|
{
|
46
46
|
"location": "",
|
47
47
|
"file": "nestia.config.ts",
|
48
|
-
"content": "// nestia configuration file\r\nimport type sdk from \"@nestia/sdk\";\r\n\r\nconst NESTIA_CONFIG: sdk.INestiaConfig = {\r\n input: \"src/controllers\",\r\n output: \"src/api\",\r\n swagger: {\r\n output: \"packages/api/swagger.json\",\r\n servers: [\r\n {\r\n url: \"http://localhost:37001\",\r\n description: \"Local Server\",\r\n },\r\n ],\r\n },\r\n
|
48
|
+
"content": "// nestia configuration file\r\nimport type sdk from \"@nestia/sdk\";\r\n\r\nconst NESTIA_CONFIG: sdk.INestiaConfig = {\r\n input: \"src/controllers\",\r\n output: \"src/api\",\r\n swagger: {\r\n output: \"packages/api/swagger.json\",\r\n servers: [\r\n {\r\n url: \"http://localhost:37001\",\r\n description: \"Local Server\",\r\n },\r\n ],\r\n },\r\n distribute: \"packages/api\",\r\n simulate: true,\r\n e2e: \"test\",\r\n};\r\nexport default NESTIA_CONFIG;\r\n"
|
49
49
|
},
|
50
50
|
{
|
51
51
|
"location": "",
|
52
52
|
"file": "package.json",
|
53
|
-
"content": "{\r\n \"private\": true,\r\n \"name\": \"@ORGANIZATION/PROJECT\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"Starter kit of Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"scripts\": {\r\n \"----------------------------------------------\": \"\",\r\n \"build\": \"npm run build:sdk && npm run build:main && npm run build:test\",\r\n \"build:api\": \"rimraf packages/api/lib && npm run build:sdk && tsc -p packages/api/tsconfig.json\",\r\n \"build:main\": \"rimraf lib && tsc\",\r\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\r\n \"build:swagger\": \"npx nestia swagger\",\r\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\r\n \"dev\": \"npm run build:test -- --watch\",\r\n \"eslint\": \"eslint src && eslint test\",\r\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\r\n \"package:api\": \"npm run build:swagger && npm run build:api && cd packages/api && npm publish\",\r\n \"prepare\": \"ts-patch install\",\r\n \"prettier\": \"prettier src --write && prettier test --write\",\r\n \"-----------------------------------------------\": \"\",\r\n \"start\": \"node lib/executable/server\",\r\n \"test\": \"node bin/test\",\r\n \"------------------------------------------------\": \"\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia-template\"\r\n },\r\n \"keywords\": [\r\n \"nestia\",\r\n \"template\",\r\n \"boilerplate\"\r\n ],\r\n \"author\": \"AUTHOR\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia-template/issues\"\r\n },\r\n \"homepage\": \"https://github.com/samchon/nestia-template#readme\",\r\n \"devDependencies\": {\r\n \"@nestia/e2e\": \"^0.3.6\",\r\n \"@nestia/sdk\": \"^2.1
|
53
|
+
"content": "{\r\n \"private\": true,\r\n \"name\": \"@ORGANIZATION/PROJECT\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"Starter kit of Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"scripts\": {\r\n \"----------------------------------------------\": \"\",\r\n \"build\": \"npm run build:sdk && npm run build:main && npm run build:test\",\r\n \"build:api\": \"rimraf packages/api/lib && npm run build:sdk && tsc -p packages/api/tsconfig.json\",\r\n \"build:main\": \"rimraf lib && tsc\",\r\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\r\n \"build:swagger\": \"npx nestia swagger\",\r\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\r\n \"dev\": \"npm run build:test -- --watch\",\r\n \"eslint\": \"eslint src && eslint test\",\r\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\r\n \"package:api\": \"npm run build:swagger && npm run build:api && cd packages/api && npm publish\",\r\n \"prepare\": \"ts-patch install\",\r\n \"prettier\": \"prettier src --write && prettier test --write\",\r\n \"-----------------------------------------------\": \"\",\r\n \"start\": \"node lib/executable/server\",\r\n \"test\": \"node bin/test\",\r\n \"------------------------------------------------\": \"\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia-template\"\r\n },\r\n \"keywords\": [\r\n \"nestia\",\r\n \"template\",\r\n \"boilerplate\"\r\n ],\r\n \"author\": \"AUTHOR\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia-template/issues\"\r\n },\r\n \"homepage\": \"https://github.com/samchon/nestia-template#readme\",\r\n \"devDependencies\": {\r\n \"@nestia/e2e\": \"^0.3.6\",\r\n \"@nestia/sdk\": \"^2.2.1\",\r\n \"@trivago/prettier-plugin-sort-imports\": \"^3.3.1\",\r\n \"@types/cli\": \"^0.11.21\",\r\n \"@types/inquirer\": \"^8.2.5\",\r\n \"@types/node\": \"^18.11.0\",\r\n \"@types/uuid\": \"^8.3.4\",\r\n \"@typescript-eslint/eslint-plugin\": \"^5.40.0\",\r\n \"@typescript-eslint/parser\": \"^5.40.0\",\r\n \"chalk\": \"^4.1.0\",\r\n \"cli\": \"^1.0.1\",\r\n \"eslint-plugin-deprecation\": \"^1.4.1\",\r\n \"nestia\": \"^5.0.0\",\r\n \"prettier\": \"^2.7.1\",\r\n \"rimraf\": \"^3.0.2\",\r\n \"source-map-support\": \"^0.5.21\",\r\n \"ts-node\": \"^10.9.1\",\r\n \"ts-patch\": \"^3.0.0\",\r\n \"typescript\": \"^5.2.2\",\r\n \"typescript-transform-paths\": \"^3.4.6\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/core\": \"^2.2.1\",\r\n \"serialize-error\": \"^4.1.0\",\r\n \"tstl\": \"^2.5.13\",\r\n \"typia\": \"^5.2.1\",\r\n \"uuid\": \"^9.0.0\"\r\n },\r\n \"stackblitz\": {\r\n \"startCommand\": \"npm run prepare && npm run build:test && npm run test\"\r\n }\r\n}\r\n"
|
54
54
|
},
|
55
55
|
{
|
56
56
|
"location": "/packages/api",
|
@@ -60,12 +60,12 @@ exports.TEMPLATE = [
|
|
60
60
|
{
|
61
61
|
"location": "/packages/api",
|
62
62
|
"file": "package.json",
|
63
|
-
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.
|
63
|
+
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.1\",\r\n \"ts-patch\": \"^3.0.2\",\r\n \"typescript\": \"^5.2.2\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.2.1\",\r\n \"typia\": \"^5.2.1\"\r\n }\r\n}"
|
64
64
|
},
|
65
65
|
{
|
66
66
|
"location": "/packages/api",
|
67
67
|
"file": "README.md",
|
68
|
-
"content": "# SDK
|
68
|
+
"content": "# SDK Library\r\nThis is a SDK library generated by [`nestia`](https://nestia.io).\r\n\r\nWith this SDK library, you can easily and safely interact with backend server.\r\n\r\nJust import and call some API functions like gif image below:\r\n\r\n\r\n\r\n> Left is server code, and right is client code utilizing the SDK\r\n\r\n\r\n\r\n\r\n# What [`Nestia`](https://nestia.io) is:\r\n\r\n\r\n[](https://github.com/samchon/nestia/blob/master/LICENSE)\r\n[](https://www.npmjs.com/package/@nestia/core)\r\n[](https://www.npmjs.com/package/nestia)\r\n[](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)\r\n[](https://nestia.io/docs/)\r\n\r\n[Nestia](https://nestia.io) is a set of helper libraries for NestJS, supporting below features:\r\n\r\n - `@nestia/core`: super-fast decorators\r\n - `@nestia/sdk`\r\n - SDK generator for clients\r\n - Swagger generator evolved than ever\r\n - Automatic E2E test functions generator\r\n - `nestia`: just CLI (command line interface) tool\r\n\r\n> **Note**\r\n> \r\n> - **Only one line** required, with pure TypeScript type\r\n> - Runtime validator is **20,000x faster** than `class-validator`\r\n> - JSON serialization is **200x faster** than `class-transformer`\r\n> - SDK is similar with [tRPC](https://trpc.io), but much advanced"
|
69
69
|
},
|
70
70
|
{
|
71
71
|
"location": "/packages/api",
|
@@ -75,7 +75,7 @@ exports.TEMPLATE = [
|
|
75
75
|
{
|
76
76
|
"location": "/packages/api",
|
77
77
|
"file": "tsconfig.json",
|
78
|
-
"content": "{\r\n \"extends\": \"../../tsconfig.json\",\r\n \"compilerOptions\": {\r\n \"target\": \"ES5\",\r\n \"declaration\": true,\r\n \"outDir\": \"lib\",\r\n \"downlevelIteration\": true,\r\n \"lib\": [\r\n \"DOM\",\r\n \"ES2015\",\r\n ]\r\n },\r\n \"include\": [\"../../src/api\"],\r\n \"exclude\": [\"node_modules\"],\r\n}"
|
78
|
+
"content": "{\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\": \"ES5\", /* 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. */// \"rootDir\": \"./\", /* 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 {\r\n \"transform\": \"typia/lib/transform\"\r\n }\r\n ],\r\n \"strictNullChecks\": true\r\n },\r\n \"include\": [\r\n \"../../src/api\"\r\n ]\r\n}"
|
79
79
|
},
|
80
80
|
{
|
81
81
|
"location": "",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TEMPLATE.js","sourceRoot":"","sources":["../../src/bundles/TEMPLATE.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACpB;QACI,UAAU,EAAE,EAAE;QACd,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,6lCAA6lC;KAC3mC;IACD;QACI,UAAU,EAAE,UAAU;QACtB,MAAM,EAAE,gBAAgB;QACxB,SAAS,EAAE,qtBAAqtB;KACnuB;IACD;QACI,UAAU,EAAE,oBAAoB;QAChC,MAAM,EAAE,WAAW;QACnB,SAAS,EAAE,+lBAA+lB;KAC7mB;IACD;QACI,UAAU,EAAE,EAAE;QACd,MAAM,EAAE,YAAY;QACpB,SAAS,EAAE,sFAAsF;KACpG;IACD;QACI,UAAU,EAAE,EAAE;QACd,MAAM,EAAE,iBAAiB;QACzB,SAAS,EAAE,iIAAiI;KAC/I;IACD;QACI,UAAU,EAAE,UAAU;QACtB,MAAM,EAAE,aAAa;QACrB,SAAS,EAAE,u6CAAu6C;KACr7C;IACD;QACI,UAAU,EAAE,UAAU;QACtB,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,mQAAmQ;KACjR;IACD;QACI,UAAU,EAAE,EAAE;QACd,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,inCAAinC;KAC/nC;IACD;QACI,UAAU,EAAE,EAAE;QACd,MAAM,EAAE,kBAAkB;QAC1B,SAAS,EAAE,
|
1
|
+
{"version":3,"file":"TEMPLATE.js","sourceRoot":"","sources":["../../src/bundles/TE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Programmer;
|
|
12
12
|
const body = emplaceBodySchema(emplaceReference(swagger)("body"))(route.requestBody);
|
13
13
|
const success = emplaceBodySchema(emplaceReference(swagger)("response"))((_b = (_a = route.responses) === null || _a === void 0 ? void 0 : _a["201"]) !== null && _b !== void 0 ? _b : (_c = route.responses) === null || _c === void 0 ? void 0 : _c["200"]);
|
14
14
|
if (body === false || success === false) {
|
15
|
-
console.log(`Failed to migrate ${props.method.toUpperCase()} ${props.path}: @nestia/migrate supports only application/json or text/plain format yet.`);
|
15
|
+
console.log(`Failed to migrate ${props.method.toUpperCase()} ${props.path}: @nestia/migrate supports only application/json, application/x-www-form-urlencoded or text/plain format yet.`);
|
16
16
|
return null;
|
17
17
|
}
|
18
18
|
else if (SUPPORTED_METHODS.has(props.method.toUpperCase()) === false) {
|
@@ -214,7 +214,7 @@ var RouteProgrammer;
|
|
214
214
|
const json = entries.find((e) => meta["x-nestia-encrypted"] === true
|
215
215
|
? e[0].includes("text/plain") ||
|
216
216
|
e[0].includes("application/json")
|
217
|
-
: e[0].includes("application/json"));
|
217
|
+
: e[0].includes("application/json") || e[0].includes("*/*"));
|
218
218
|
if (json) {
|
219
219
|
const { schema } = json[1];
|
220
220
|
return {
|
@@ -225,6 +225,16 @@ var RouteProgrammer;
|
|
225
225
|
"x-nestia-encrypted": meta["x-nestia-encrypted"],
|
226
226
|
};
|
227
227
|
}
|
228
|
+
const query = entries.find((e) => e[0].includes("application/x-www-form-urlencoded"));
|
229
|
+
if (query) {
|
230
|
+
const { schema } = query[1];
|
231
|
+
return {
|
232
|
+
type: "application/x-www-form-urlencoded",
|
233
|
+
schema: isNotObjectLiteral(schema)
|
234
|
+
? schema
|
235
|
+
: emplacer(schema),
|
236
|
+
};
|
237
|
+
}
|
228
238
|
const text = entries.find((e) => e[0].includes("text/plain"));
|
229
239
|
if (text)
|
230
240
|
return { type: "text/plain", schema: { type: "string" } };
|
@@ -238,7 +248,7 @@ var RouteProgrammer;
|
|
238
248
|
return { $ref: `#/components/schemas/${name}` };
|
239
249
|
};
|
240
250
|
RouteProgrammer.write = (components) => (references) => (importer) => (route) => {
|
241
|
-
var _a, _b, _c;
|
251
|
+
var _a, _b, _c, _d;
|
242
252
|
const output = route.success
|
243
253
|
? SchemaProgrammer_1.SchemaProgrammer.write(components)(references)(importer)(route.success.schema)
|
244
254
|
: "void";
|
@@ -253,14 +263,19 @@ var RouteProgrammer;
|
|
253
263
|
`@${external("@nestjs/common")("Header")}("Content-Type", "text/plain")`,
|
254
264
|
`@${methoder((str) => external("@nestjs/common")(str))}`,
|
255
265
|
]
|
256
|
-
: route.
|
266
|
+
: ((_c = route.success) === null || _c === void 0 ? void 0 : _c.type) ===
|
267
|
+
"application/x-www-form-urlencoded"
|
257
268
|
? [
|
258
|
-
`@${external("@
|
269
|
+
`@${external("@nestia/core")("TypedQuery")}.${methoder((str) => str)}`,
|
259
270
|
]
|
260
|
-
:
|
261
|
-
|
262
|
-
|
263
|
-
|
271
|
+
: route.method === "head"
|
272
|
+
? [
|
273
|
+
`@${external("@nestjs/common")("Head")}${methoder(() => "")}`,
|
274
|
+
]
|
275
|
+
: [
|
276
|
+
`@${external("@nestia/core")("TypedRoute")}.${methoder((str) => str)}`,
|
277
|
+
];
|
278
|
+
for (const [key, value] of Object.entries((_d = route.exceptions) !== null && _d !== void 0 ? _d : {}))
|
264
279
|
decorator.push(`@${external("@nestia/core")("TypedException")}<${SchemaProgrammer_1.SchemaProgrammer.write(components)(references)(importer)(value.schema)}>(${isNaN(Number(key)) ? JSON.stringify(key) : key}, ${JSON.stringify(value.description)})`);
|
265
280
|
const content = [
|
266
281
|
...(route.description
|
@@ -294,9 +309,14 @@ var RouteProgrammer;
|
|
294
309
|
? [
|
295
310
|
` @${external("@nestia/core")("TypedBody")}() body: ${SchemaProgrammer_1.SchemaProgrammer.write(components)(references)(importer)(route.body.schema)},`,
|
296
311
|
]
|
297
|
-
:
|
298
|
-
|
299
|
-
|
312
|
+
: route.body.type ===
|
313
|
+
"application/x-www-form-urlencoded"
|
314
|
+
? [
|
315
|
+
` @${external("@nestia/core")("TypedQuery")}.Body() body: ${SchemaProgrammer_1.SchemaProgrammer.write(components)(references)(importer)(route.body.schema)},`,
|
316
|
+
]
|
317
|
+
: [
|
318
|
+
` @${external("@nestia/core")("PlainBody")}() body: string,`,
|
319
|
+
]
|
300
320
|
: []),
|
301
321
|
`): Promise<${output}> {`,
|
302
322
|
...route.parameters.map((p) => ` ${StringUtil_1.StringUtil.normalize(p.key)};`),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RouteProgrammer.js","sourceRoot":"","sources":["../../src/programmers/RouteProgrammer.ts"],"names":[],"mappings":";;;AAAA,qDAAkD;AAOlD,8DAA2D;AAC3D,oDAAiD;AAEjD,yDAAsD;AAEtD,IAAiB,eAAe,CAwc/B;AAxcD,WAAiB,eAAe;IACf,uBAAO,GAChB,CAAC,OAAiB,EAAE,EAAE,CACtB,CAAC,KAAuC,EAAE,EAAE,CAC5C,CAAC,KAAoB,EAAwB,EAAE;;QAC3C,MAAM,IAAI,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAC7D,KAAK,CAAC,WAAW,CACpB,CAAC;QACF,MAAM,OAAO,GAAG,iBAAiB,CAC7B,gBAAgB,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CACxC,CAAC,MAAA,MAAA,KAAK,CAAC,SAAS,0CAAG,KAAK,CAAC,mCAAI,MAAA,KAAK,CAAC,SAAS,0CAAG,KAAK,CAAC,CAAC,CAAC;QACxD,IAAI,IAAI,KAAK,KAAK,IAAI,OAAO,KAAK,KAAK,EAAE;YACrC,OAAO,CAAC,GAAG,CACP,qBAAqB,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,IAC3C,KAAK,CAAC,IACV,4EAA4E,CAC/E,CAAC;YACF,OAAO,IAAI,CAAC;SACf;aAAM,IACH,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,C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,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACtC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACpC,GAAG,CAAC,MAAM,KAAK,MAAM;gBACjB,CAAC,CAAC;oBACI,cAAc,QAAQ,CAAC,OAAO,CAAC,CAC3B,QAAQ,CACX,IAAI,MAAM,MAAM;iBACpB;gBACH,CAAC,CAAC,EAAE,CAAC;YACT,GAAG;SACN,CAAC;QACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CAAC;IAEN,MAAM,cAAc,GAChB,CAAC,UAA8B,EAAE,EAAE,CACnC,CAAC,QAA0B,EAAE,EAAE,CAC/B,CAAC,EAAE,GAAG,EAAE,MAAM,EAA4B,EAAU,EAAE;QAClD,MAAM,QAAQ,GAAG,uBAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC3C,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC;YACzB,OAAO,EAAE,cAAc;YACvB,QAAQ,EAAE,YAAY;SACzB,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,QAAQ,KAAK,mCAAgB,CAAC,KAAK,CAC7D,UAAU,CACb,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IAC9B,CAAC,CAAC;AACV,CAAC,EApegB,eAAe,+BAAf,eAAe,QAoe/B;AAED,MAAM,iBAAiB,GAAgB,IAAI,GAAG,CAAC;IAC3C,KAAK;IACL,MAAM;IACN,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;CACT,CAAC,CAAC"}
|
@@ -20,7 +20,7 @@ export declare namespace IMigrateRoute {
|
|
20
20
|
description?: string;
|
21
21
|
}
|
22
22
|
interface IBody {
|
23
|
-
type: "text/plain" | "application/json";
|
23
|
+
type: "text/plain" | "application/json" | "application/x-www-form-urlencoded";
|
24
24
|
schema: ISwaggerSchema;
|
25
25
|
"x-nestia-encrypted"?: boolean;
|
26
26
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nestia/migrate",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.4",
|
4
4
|
"description": "Migration program from swagger to NestJS",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"typings": "lib/index.d.ts",
|
@@ -30,8 +30,8 @@
|
|
30
30
|
},
|
31
31
|
"homepage": "https://github.com/samchon/nestia#readme",
|
32
32
|
"devDependencies": {
|
33
|
-
"@nestia/core": "^2.1
|
34
|
-
"@nestia/fetcher": "^2.1
|
33
|
+
"@nestia/core": "^2.2.1",
|
34
|
+
"@nestia/fetcher": "^2.2.1",
|
35
35
|
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
36
36
|
"@types/node": "^20.3.3",
|
37
37
|
"prettier": "^2.8.8",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"typescript-transform-paths": "^3.4.6"
|
46
46
|
},
|
47
47
|
"dependencies": {
|
48
|
-
"typia": "^5.1
|
48
|
+
"typia": "^5.2.1"
|
49
49
|
},
|
50
50
|
"files": [
|
51
51
|
"lib",
|
package/src/bundles/TEMPLATE.ts
CHANGED
@@ -42,12 +42,12 @@ export const TEMPLATE = [
|
|
42
42
|
{
|
43
43
|
"location": "",
|
44
44
|
"file": "nestia.config.ts",
|
45
|
-
"content": "// nestia configuration file\r\nimport type sdk from \"@nestia/sdk\";\r\n\r\nconst NESTIA_CONFIG: sdk.INestiaConfig = {\r\n input: \"src/controllers\",\r\n output: \"src/api\",\r\n swagger: {\r\n output: \"packages/api/swagger.json\",\r\n servers: [\r\n {\r\n url: \"http://localhost:37001\",\r\n description: \"Local Server\",\r\n },\r\n ],\r\n },\r\n
|
45
|
+
"content": "// nestia configuration file\r\nimport type sdk from \"@nestia/sdk\";\r\n\r\nconst NESTIA_CONFIG: sdk.INestiaConfig = {\r\n input: \"src/controllers\",\r\n output: \"src/api\",\r\n swagger: {\r\n output: \"packages/api/swagger.json\",\r\n servers: [\r\n {\r\n url: \"http://localhost:37001\",\r\n description: \"Local Server\",\r\n },\r\n ],\r\n },\r\n distribute: \"packages/api\",\r\n simulate: true,\r\n e2e: \"test\",\r\n};\r\nexport default NESTIA_CONFIG;\r\n"
|
46
46
|
},
|
47
47
|
{
|
48
48
|
"location": "",
|
49
49
|
"file": "package.json",
|
50
|
-
"content": "{\r\n \"private\": true,\r\n \"name\": \"@ORGANIZATION/PROJECT\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"Starter kit of Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"scripts\": {\r\n \"----------------------------------------------\": \"\",\r\n \"build\": \"npm run build:sdk && npm run build:main && npm run build:test\",\r\n \"build:api\": \"rimraf packages/api/lib && npm run build:sdk && tsc -p packages/api/tsconfig.json\",\r\n \"build:main\": \"rimraf lib && tsc\",\r\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\r\n \"build:swagger\": \"npx nestia swagger\",\r\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\r\n \"dev\": \"npm run build:test -- --watch\",\r\n \"eslint\": \"eslint src && eslint test\",\r\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\r\n \"package:api\": \"npm run build:swagger && npm run build:api && cd packages/api && npm publish\",\r\n \"prepare\": \"ts-patch install\",\r\n \"prettier\": \"prettier src --write && prettier test --write\",\r\n \"-----------------------------------------------\": \"\",\r\n \"start\": \"node lib/executable/server\",\r\n \"test\": \"node bin/test\",\r\n \"------------------------------------------------\": \"\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia-template\"\r\n },\r\n \"keywords\": [\r\n \"nestia\",\r\n \"template\",\r\n \"boilerplate\"\r\n ],\r\n \"author\": \"AUTHOR\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia-template/issues\"\r\n },\r\n \"homepage\": \"https://github.com/samchon/nestia-template#readme\",\r\n \"devDependencies\": {\r\n \"@nestia/e2e\": \"^0.3.6\",\r\n \"@nestia/sdk\": \"^2.1
|
50
|
+
"content": "{\r\n \"private\": true,\r\n \"name\": \"@ORGANIZATION/PROJECT\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"Starter kit of Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"scripts\": {\r\n \"----------------------------------------------\": \"\",\r\n \"build\": \"npm run build:sdk && npm run build:main && npm run build:test\",\r\n \"build:api\": \"rimraf packages/api/lib && npm run build:sdk && tsc -p packages/api/tsconfig.json\",\r\n \"build:main\": \"rimraf lib && tsc\",\r\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\r\n \"build:swagger\": \"npx nestia swagger\",\r\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\r\n \"dev\": \"npm run build:test -- --watch\",\r\n \"eslint\": \"eslint src && eslint test\",\r\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\r\n \"package:api\": \"npm run build:swagger && npm run build:api && cd packages/api && npm publish\",\r\n \"prepare\": \"ts-patch install\",\r\n \"prettier\": \"prettier src --write && prettier test --write\",\r\n \"-----------------------------------------------\": \"\",\r\n \"start\": \"node lib/executable/server\",\r\n \"test\": \"node bin/test\",\r\n \"------------------------------------------------\": \"\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia-template\"\r\n },\r\n \"keywords\": [\r\n \"nestia\",\r\n \"template\",\r\n \"boilerplate\"\r\n ],\r\n \"author\": \"AUTHOR\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia-template/issues\"\r\n },\r\n \"homepage\": \"https://github.com/samchon/nestia-template#readme\",\r\n \"devDependencies\": {\r\n \"@nestia/e2e\": \"^0.3.6\",\r\n \"@nestia/sdk\": \"^2.2.1\",\r\n \"@trivago/prettier-plugin-sort-imports\": \"^3.3.1\",\r\n \"@types/cli\": \"^0.11.21\",\r\n \"@types/inquirer\": \"^8.2.5\",\r\n \"@types/node\": \"^18.11.0\",\r\n \"@types/uuid\": \"^8.3.4\",\r\n \"@typescript-eslint/eslint-plugin\": \"^5.40.0\",\r\n \"@typescript-eslint/parser\": \"^5.40.0\",\r\n \"chalk\": \"^4.1.0\",\r\n \"cli\": \"^1.0.1\",\r\n \"eslint-plugin-deprecation\": \"^1.4.1\",\r\n \"nestia\": \"^5.0.0\",\r\n \"prettier\": \"^2.7.1\",\r\n \"rimraf\": \"^3.0.2\",\r\n \"source-map-support\": \"^0.5.21\",\r\n \"ts-node\": \"^10.9.1\",\r\n \"ts-patch\": \"^3.0.0\",\r\n \"typescript\": \"^5.2.2\",\r\n \"typescript-transform-paths\": \"^3.4.6\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/core\": \"^2.2.1\",\r\n \"serialize-error\": \"^4.1.0\",\r\n \"tstl\": \"^2.5.13\",\r\n \"typia\": \"^5.2.1\",\r\n \"uuid\": \"^9.0.0\"\r\n },\r\n \"stackblitz\": {\r\n \"startCommand\": \"npm run prepare && npm run build:test && npm run test\"\r\n }\r\n}\r\n"
|
51
51
|
},
|
52
52
|
{
|
53
53
|
"location": "/packages/api",
|
@@ -57,12 +57,12 @@ export const TEMPLATE = [
|
|
57
57
|
{
|
58
58
|
"location": "/packages/api",
|
59
59
|
"file": "package.json",
|
60
|
-
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.
|
60
|
+
"content": "{\r\n \"name\": \"@ORGANIZATION/PROJECT-api\",\r\n \"version\": \"0.1.0\",\r\n \"description\": \"SDK library generated by Nestia\",\r\n \"main\": \"lib/index.js\",\r\n \"typings\": \"lib/index.d.ts\",\r\n \"scripts\": {\r\n \"build\": \"npm run build:sdk && npm run compile\",\r\n \"build:sdk\": \"rimraf ../../src/api/functional && cd ../.. && npx nestia sdk && cd packages/api\",\r\n \"compile\": \"rimraf lib && tsc\",\r\n \"deploy\": \"npm run build && npm publish\",\r\n \"prepare\": \"ts-patch install\"\r\n },\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/samchon/nestia\"\r\n },\r\n \"author\": \"Jeongho Nam\",\r\n \"license\": \"MIT\",\r\n \"bugs\": {\r\n \"url\": \"https://github.com/samchon/nestia/issues\"\r\n },\r\n \"homepage\": \"https://nestia.io\",\r\n \"files\": [\r\n \"lib\",\r\n \"package.json\",\r\n \"README.md\"\r\n ],\r\n \"devDependencies\": {\r\n \"rimraf\": \"^5.0.5\",\r\n \"ts-node\": \"^10.9.1\",\r\n \"ts-patch\": \"^3.0.2\",\r\n \"typescript\": \"^5.2.2\"\r\n },\r\n \"dependencies\": {\r\n \"@nestia/fetcher\": \"^2.2.1\",\r\n \"typia\": \"^5.2.1\"\r\n }\r\n}"
|
61
61
|
},
|
62
62
|
{
|
63
63
|
"location": "/packages/api",
|
64
64
|
"file": "README.md",
|
65
|
-
"content": "# SDK
|
65
|
+
"content": "# SDK Library\r\nThis is a SDK library generated by [`nestia`](https://nestia.io).\r\n\r\nWith this SDK library, you can easily and safely interact with backend server.\r\n\r\nJust import and call some API functions like gif image below:\r\n\r\n\r\n\r\n> Left is server code, and right is client code utilizing the SDK\r\n\r\n\r\n\r\n\r\n# What [`Nestia`](https://nestia.io) is:\r\n\r\n\r\n[](https://github.com/samchon/nestia/blob/master/LICENSE)\r\n[](https://www.npmjs.com/package/@nestia/core)\r\n[](https://www.npmjs.com/package/nestia)\r\n[](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)\r\n[](https://nestia.io/docs/)\r\n\r\n[Nestia](https://nestia.io) is a set of helper libraries for NestJS, supporting below features:\r\n\r\n - `@nestia/core`: super-fast decorators\r\n - `@nestia/sdk`\r\n - SDK generator for clients\r\n - Swagger generator evolved than ever\r\n - Automatic E2E test functions generator\r\n - `nestia`: just CLI (command line interface) tool\r\n\r\n> **Note**\r\n> \r\n> - **Only one line** required, with pure TypeScript type\r\n> - Runtime validator is **20,000x faster** than `class-validator`\r\n> - JSON serialization is **200x faster** than `class-transformer`\r\n> - SDK is similar with [tRPC](https://trpc.io), but much advanced"
|
66
66
|
},
|
67
67
|
{
|
68
68
|
"location": "/packages/api",
|
@@ -72,7 +72,7 @@ export const TEMPLATE = [
|
|
72
72
|
{
|
73
73
|
"location": "/packages/api",
|
74
74
|
"file": "tsconfig.json",
|
75
|
-
"content": "{\r\n \"extends\": \"../../tsconfig.json\",\r\n \"compilerOptions\": {\r\n \"target\": \"ES5\",\r\n \"declaration\": true,\r\n \"outDir\": \"lib\",\r\n \"downlevelIteration\": true,\r\n \"lib\": [\r\n \"DOM\",\r\n \"ES2015\",\r\n ]\r\n },\r\n \"include\": [\"../../src/api\"],\r\n \"exclude\": [\"node_modules\"],\r\n}"
|
75
|
+
"content": "{\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\": \"ES5\", /* 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. */// \"rootDir\": \"./\", /* 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 {\r\n \"transform\": \"typia/lib/transform\"\r\n }\r\n ],\r\n \"strictNullChecks\": true\r\n },\r\n \"include\": [\r\n \"../../src/api\"\r\n ]\r\n}"
|
76
76
|
},
|
77
77
|
{
|
78
78
|
"location": "",
|
@@ -25,7 +25,7 @@ export namespace RouteProgrammer {
|
|
25
25
|
console.log(
|
26
26
|
`Failed to migrate ${props.method.toUpperCase()} ${
|
27
27
|
props.path
|
28
|
-
}: @nestia/migrate supports only application/json or text/plain format yet.`,
|
28
|
+
}: @nestia/migrate supports only application/json, application/x-www-form-urlencoded or text/plain format yet.`,
|
29
29
|
);
|
30
30
|
return null;
|
31
31
|
} else if (
|
@@ -294,9 +294,8 @@ export namespace RouteProgrammer {
|
|
294
294
|
meta["x-nestia-encrypted"] === true
|
295
295
|
? e[0].includes("text/plain") ||
|
296
296
|
e[0].includes("application/json")
|
297
|
-
: e[0].includes("application/json"),
|
297
|
+
: e[0].includes("application/json") || e[0].includes("*/*"),
|
298
298
|
);
|
299
|
-
|
300
299
|
if (json) {
|
301
300
|
const { schema } = json[1];
|
302
301
|
return {
|
@@ -308,6 +307,19 @@ export namespace RouteProgrammer {
|
|
308
307
|
};
|
309
308
|
}
|
310
309
|
|
310
|
+
const query = entries.find((e) =>
|
311
|
+
e[0].includes("application/x-www-form-urlencoded"),
|
312
|
+
);
|
313
|
+
if (query) {
|
314
|
+
const { schema } = query[1];
|
315
|
+
return {
|
316
|
+
type: "application/x-www-form-urlencoded",
|
317
|
+
schema: isNotObjectLiteral(schema)
|
318
|
+
? schema
|
319
|
+
: emplacer(schema),
|
320
|
+
};
|
321
|
+
}
|
322
|
+
|
311
323
|
const text = entries.find((e) => e[0].includes("text/plain"));
|
312
324
|
if (text) return { type: "text/plain", schema: { type: "string" } };
|
313
325
|
return false;
|
@@ -356,6 +368,13 @@ export namespace RouteProgrammer {
|
|
356
368
|
external("@nestjs/common")(str),
|
357
369
|
)}`,
|
358
370
|
]
|
371
|
+
: route.success?.type ===
|
372
|
+
"application/x-www-form-urlencoded"
|
373
|
+
? [
|
374
|
+
`@${external("@nestia/core")(
|
375
|
+
"TypedQuery",
|
376
|
+
)}.${methoder((str) => str)}`,
|
377
|
+
]
|
359
378
|
: route.method === "head"
|
360
379
|
? [
|
361
380
|
`@${external("@nestjs/common")("Head")}${methoder(
|
@@ -429,6 +448,15 @@ export namespace RouteProgrammer {
|
|
429
448
|
references,
|
430
449
|
)(importer)(route.body.schema)},`,
|
431
450
|
]
|
451
|
+
: route.body.type ===
|
452
|
+
"application/x-www-form-urlencoded"
|
453
|
+
? [
|
454
|
+
` @${external("@nestia/core")(
|
455
|
+
"TypedQuery",
|
456
|
+
)}.Body() body: ${SchemaProgrammer.write(
|
457
|
+
components,
|
458
|
+
)(references)(importer)(route.body.schema)},`,
|
459
|
+
]
|
432
460
|
: [
|
433
461
|
` @${external("@nestia/core")(
|
434
462
|
"PlainBody",
|
@@ -22,7 +22,10 @@ export namespace IMigrateRoute {
|
|
22
22
|
description?: string;
|
23
23
|
}
|
24
24
|
export interface IBody {
|
25
|
-
type:
|
25
|
+
type:
|
26
|
+
| "text/plain"
|
27
|
+
| "application/json"
|
28
|
+
| "application/x-www-form-urlencoded";
|
26
29
|
schema: ISwaggerSchema;
|
27
30
|
"x-nestia-encrypted"?: boolean;
|
28
31
|
}
|