typia 3.7.4-dev.20230410-3 → 3.7.4-dev.20230410-5
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/executable/typia.js
CHANGED
|
@@ -60,7 +60,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
|
-
var TypiaGenerateWizard_1 = require("./TypiaGenerateWizard");
|
|
64
63
|
var TypiaSetupWizard_1 = require("./TypiaSetupWizard");
|
|
65
64
|
var USAGE = "Wrong command has been detected. Use like below:\n\n npx typia setup \\\n --compiler (ttypescript|ts-patch) \\\n --manager (npm|pnpm|yarn) \\\n --project {tsconfig.json file path}\n\n - npx typia setup\n - npx typia setup --compiler ts-patch\n - npx typia setup --manager pnpm\n - npx typia setup --project tsconfig.test.json\n\n npx typia generate \n --input {directory} \\\n --output {directory}\n\n --npx typia generate --input src/templates --output src/functinoal\n";
|
|
66
65
|
function halt(desc) {
|
|
@@ -69,7 +68,7 @@ function halt(desc) {
|
|
|
69
68
|
}
|
|
70
69
|
function main() {
|
|
71
70
|
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
-
var _a, type;
|
|
71
|
+
var _a, type, TypiaGenerateWizard;
|
|
73
72
|
return __generator(this, function (_b) {
|
|
74
73
|
switch (_b.label) {
|
|
75
74
|
case 0:
|
|
@@ -96,17 +95,20 @@ function main() {
|
|
|
96
95
|
return [4, TypiaSetupWizard_1.TypiaSetupWizard.setup()];
|
|
97
96
|
case 6:
|
|
98
97
|
_b.sent();
|
|
99
|
-
return [3,
|
|
98
|
+
return [3, 11];
|
|
100
99
|
case 7:
|
|
101
|
-
if (!(type === "generate")) return [3,
|
|
102
|
-
return [4,
|
|
100
|
+
if (!(type === "generate")) return [3, 10];
|
|
101
|
+
return [4, Promise.resolve().then(function () { return __importStar(require("./TypiaGenerateWizard")); })];
|
|
103
102
|
case 8:
|
|
104
|
-
_b.sent();
|
|
105
|
-
return [
|
|
103
|
+
TypiaGenerateWizard = (_b.sent()).TypiaGenerateWizard;
|
|
104
|
+
return [4, TypiaGenerateWizard.generate()];
|
|
106
105
|
case 9:
|
|
106
|
+
_b.sent();
|
|
107
|
+
return [3, 11];
|
|
108
|
+
case 10:
|
|
107
109
|
halt(USAGE);
|
|
108
|
-
_b.label =
|
|
109
|
-
case
|
|
110
|
+
_b.label = 11;
|
|
111
|
+
case 11: return [2];
|
|
110
112
|
}
|
|
111
113
|
});
|
|
112
114
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typia.js","sourceRoot":"","sources":["../../src/executable/typia.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"typia.js","sourceRoot":"","sources":["../../src/executable/typia.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uDAAsD;AAEtD,IAAM,KAAK,GAAG,wfAiBb,CAAC;AAEF,SAAS,IAAI,CAAC,IAAY;IACtB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAED,SAAe,IAAI;;;;;;;oBAEX,4EAAa,cAAc,QAAC;;oBAA5B,SAA4B,CAAC;oBAC7B,4EAAa,UAAU,QAAC;;oBAAxB,SAAwB,CAAC;oBACzB,4EAAa,WAAW,QAAC;;oBAAzB,SAAyB,CAAC;;;;oBAE1B,IAAI,CAAC,yDAAyD,CAAC,CAAC;;;oBAGpE,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;oBAChC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;oBAEpC,IAAI,GAAuB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;yBAC7C,CAAA,IAAI,KAAK,OAAO,CAAA,EAAhB,cAAgB;oBAAE,WAAM,mCAAgB,CAAC,KAAK,EAAE,EAAA;;oBAA9B,SAA8B,CAAC;;;yBAC5C,CAAA,IAAI,KAAK,UAAU,CAAA,EAAnB,eAAmB;oBACQ,4EAAa,uBAAuB,QAAC;;oBAA7D,mBAAmB,GAAK,CAAA,SAAqC,CAAA,oBAA1C;oBAC3B,WAAM,mBAAmB,CAAC,QAAQ,EAAE,EAAA;;oBAApC,SAAoC,CAAC;;;oBAClC,IAAI,CAAC,KAAK,CAAC,CAAC;;;;;;CACtB;AACD,IAAI,EAAE,CAAC,KAAK,CAAC,UAAC,GAAG;IACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/executable/typia.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { TypiaGenerateWizard } from "./TypiaGenerateWizard";
|
|
3
2
|
import { TypiaSetupWizard } from "./TypiaSetupWizard";
|
|
4
3
|
|
|
5
4
|
const USAGE = `Wrong command has been detected. Use like below:
|
|
@@ -40,8 +39,10 @@ async function main(): Promise<void> {
|
|
|
40
39
|
|
|
41
40
|
const type: string | undefined = process.argv[2];
|
|
42
41
|
if (type === "setup") await TypiaSetupWizard.setup();
|
|
43
|
-
else if (type === "generate")
|
|
44
|
-
|
|
42
|
+
else if (type === "generate") {
|
|
43
|
+
const { TypiaGenerateWizard } = await import("./TypiaGenerateWizard");
|
|
44
|
+
await TypiaGenerateWizard.generate();
|
|
45
|
+
} else halt(USAGE);
|
|
45
46
|
}
|
|
46
47
|
main().catch((exp) => {
|
|
47
48
|
console.error(exp);
|