diff --git a/package.json b/package.json index 2743568ce..6f2a45a7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nestia", - "version": "4.0.11", + "version": "4.0.13", "description": "Nestia CLI tool", "main": "bin/index.js", "bin": { diff --git a/src/NestiaSetupWizard.ts b/src/NestiaSetupWizard.ts index 69471dac4..a83f4c4ae 100644 --- a/src/NestiaSetupWizard.ts +++ b/src/NestiaSetupWizard.ts @@ -23,26 +23,30 @@ export namespace NestiaSetupWizard { CommandExecutor.run("npx tsc --init"); return (args.project = "tsconfig.json"); })(); - pack.install({ dev: true, modulo: "ts-node" }); + pack.install({ dev: true, modulo: "ts-node", version: "latest" }); // INSTALL COMPILER - pack.install({ dev: true, modulo: args.compiler }); + pack.install({ dev: true, modulo: args.compiler, version: "latest" }); if (args.compiler === "ts-patch") { await pack.save((data) => { data.scripts ??= {}; - if (typeof data.scripts.prepare === "string") - data.scripts.prepare = - "ts-patch install && " + data.scripts.prepare; - else data.scripts.prepare = "ts-patch install"; + if ( + typeof data.scripts.prepare === "string" && + data.scripts.prepare.length + ) { + if (data.scripts.prepare.indexOf("ts-patch install") === -1) + data.scripts.prepare = + "ts-patch install && " + data.scripts.prepare; + } else data.scripts.prepare = "ts-patch install"; }); CommandExecutor.run("npm run prepare"); } // INSTALL AND CONFIGURE TYPIA - pack.install({ dev: false, modulo: "typia" }); - pack.install({ dev: false, modulo: "@nestia/core" }); - pack.install({ dev: true, modulo: "@nestia/sdk" }); - pack.install({ dev: true, modulo: "nestia" }); + pack.install({ dev: false, modulo: "typia", version: "latest" }); + pack.install({ dev: false, modulo: "@nestia/core", version: "latest" }); + pack.install({ dev: true, modulo: "@nestia/sdk", version: "latest" }); + await PluginConfigurator.configure(args); } } diff --git a/src/internal/PackageManager.ts b/src/internal/PackageManager.ts index 903396c23..dec2b0a4a 100644 --- a/src/internal/PackageManager.ts +++ b/src/internal/PackageManager.ts @@ -38,7 +38,7 @@ export class PackageManager { public install(props: { dev: boolean; modulo: string; - version?: string; + version: `latest` | `${number}.${number}.${number}`; }): boolean { const middle: string = this.manager === "yarn"