@poi/cli-utils
Advanced tools
Comparing version 11.0.0-alpha.9 to 11.0.0-alpha.10
const chalk = require('chalk') | ||
const execute = require('./execute') | ||
const spawn = require('./spawn') | ||
const getNpmClient = require('./get-npm-client') | ||
const spinner = require('./spinner') | ||
@@ -9,24 +8,22 @@ module.exports = async ({ cwd, deps, saveDev }) => { | ||
spinner.start( | ||
`Installing dependencies ${ | ||
deps ? deps.map(v => chalk.cyan(v)).join(', ') + ' ' : '' | ||
}with ${pm}...` | ||
) | ||
const args = deps ? ['add'].concat(deps) : ['install'] | ||
const devFlags = saveDev ? (pm === 'yarn' ? ['--dev'] : ['-D']) : [] | ||
try { | ||
await execute(pm, args.concat(devFlags), { | ||
cwd, | ||
stdio: 'ignore' | ||
}) | ||
spinner.succeed( | ||
`Installed dependencies ${ | ||
const cp = await spawn(pm, args.concat(devFlags), { | ||
cwd, | ||
banner: chalk.bold( | ||
`${chalk.cyan('===>')} Installing dependencies ${ | ||
deps ? deps.map(v => chalk.cyan(v)).join(', ') + ' ' : '' | ||
}` | ||
}with ${pm}...` | ||
) | ||
} catch (err) { | ||
spinner.fail(err.message) | ||
process.exitCode = 1 | ||
}) | ||
if (cp.exitCode !== 0) { | ||
console.log( | ||
chalk.red( | ||
`The command '${cp.spawnargs.join( | ||
' ' | ||
)}' has failed, you can run it youself later.` | ||
) | ||
) | ||
process.exitCode = cp.exitCode | ||
} | ||
} |
{ | ||
"name": "@poi/cli-utils", | ||
"version": "11.0.0-alpha.9", | ||
"version": "11.0.0-alpha.10", | ||
"publishConfig": { | ||
@@ -12,7 +12,6 @@ "access": "public" | ||
"command-exists": "^1.2.7", | ||
"cross-spawn": "^6.0.5", | ||
"joycon": "^2.1.2", | ||
"ora": "^3.0.0" | ||
"croatia": "^1.0.3", | ||
"joycon": "^2.1.2" | ||
}, | ||
"gitHead": "7229e823a5d28bf7f6bef787ec120361c03decbf" | ||
"gitHead": "ad5f480da011a9d73afe18be084a4bae25884d5a" | ||
} |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
4
1926
4
58
2
+ Addedcroatia@^1.0.3
+ Addedansi-regex@3.0.1(transitive)
+ Addedcroatia@1.0.3(transitive)
+ Addedstrip-ansi@4.0.0(transitive)
- Removedcross-spawn@^6.0.5
- Removedora@^3.0.0
- Removedansi-regex@4.1.1(transitive)
- Removedcli-cursor@2.1.0(transitive)
- Removedcli-spinners@2.9.2(transitive)
- Removedlog-symbols@2.2.0(transitive)
- Removedmimic-fn@1.2.0(transitive)
- Removedonetime@2.0.1(transitive)
- Removedora@3.4.0(transitive)
- Removedrestore-cursor@2.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstrip-ansi@5.2.0(transitive)