@poi/cli-utils
Advanced tools
Comparing version
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
-20%1926
-10.46%4
-20%58
-13.43%2
100%+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed