Comparing version 6.1.0-dev.20240910 to 6.1.0-dev.20240910-2
@@ -41,10 +41,10 @@ "use strict"; | ||
install(props) { | ||
const cmd = installCmdTable[this.manager]; | ||
const option = props.dev ? devOptionTable[this.manager] : ""; | ||
const middle = `${cmd} ${option}`; | ||
CommandExecutor_1.CommandExecutor.run([ | ||
this.manager, | ||
middle, | ||
`${props.modulo}${props.version ? `@${props.version}` : ""}`, | ||
].join(" ")); | ||
const middle = [ | ||
installCmdTable[this.manager], | ||
props.dev ? devOptionTable[this.manager] : "", | ||
] | ||
.filter((str) => !!str.length) | ||
.join(" "); | ||
const modulo = `${props.modulo}${props.version ? `@${props.version}` : ""}`; | ||
CommandExecutor_1.CommandExecutor.run([this.manager, middle, modulo].join(" ")); | ||
return true; | ||
@@ -66,3 +66,3 @@ } | ||
const installCmdTable = { | ||
npm: "install", | ||
npm: "i", | ||
pnpm: "add", | ||
@@ -73,7 +73,7 @@ yarn: "add", | ||
const devOptionTable = { | ||
npm: "--save-dev", | ||
pnpm: "--save-dev", | ||
yarn: "--dev", | ||
bun: "--dev", | ||
npm: "-D", | ||
pnpm: "-D", | ||
yarn: "-D", | ||
bun: "-d", | ||
}; | ||
//# sourceMappingURL=PackageManager.js.map |
{ | ||
"name": "nestia", | ||
"version": "6.1.0-dev.20240910", | ||
"version": "6.1.0-dev.20240910-2", | ||
"description": "Nestia CLI tool", | ||
@@ -5,0 +5,0 @@ "main": "bin/index.js", |
@@ -48,12 +48,10 @@ import fs from "fs"; | ||
}): boolean { | ||
const cmd = installCmdTable[this.manager]; | ||
const option = props.dev ? devOptionTable[this.manager] : ""; | ||
const middle: string = `${cmd} ${option}` as const; | ||
CommandExecutor.run( | ||
[ | ||
this.manager, | ||
middle, | ||
`${props.modulo}${props.version ? `@${props.version}` : ""}`, | ||
].join(" "), | ||
); | ||
const middle: string = [ | ||
installCmdTable[this.manager], | ||
props.dev ? devOptionTable[this.manager] : "", | ||
] | ||
.filter((str) => !!str.length) | ||
.join(" "); | ||
const modulo: string = `${props.modulo}${props.version ? `@${props.version}` : ""}`; | ||
CommandExecutor.run([this.manager, middle, modulo].join(" ")); | ||
return true; | ||
@@ -83,3 +81,3 @@ } | ||
const installCmdTable = { | ||
npm: "install", | ||
npm: "i", | ||
pnpm: "add", | ||
@@ -91,6 +89,6 @@ yarn: "add", | ||
const devOptionTable = { | ||
npm: "--save-dev", | ||
pnpm: "--save-dev", | ||
yarn: "--dev", | ||
bun: "--dev", | ||
npm: "-D", | ||
pnpm: "-D", | ||
yarn: "-D", | ||
bun: "-d", | ||
} as const satisfies Record<Manager, string>; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73262
1194