Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (npm.color) peerMissing = color.bgBlack(color.red(peerMissing))
out.label = peerMissing + ' ' + out.label
}
if (data.extraneous && data.path !== dir) {
var extraneous = 'extraneous'
if (npm.color) extraneous = color.bgBlack(color.green(extraneous))
out.label += ' ' + extraneous
}
if (data.error && depth) {
var message = data.error.message
if (message.indexOf('\n')) message = message.slice(0, message.indexOf('\n'))
var error = 'error: ' + message
if (npm.color) error = color.bgRed(color.brightWhite(error))
out.label += ' ' + error
}
// add giturl to name@version
if (data._resolved) {
try {
var type = npa(data._resolved).type
var isGit = type === 'git' || type === 'hosted'
if (isGit) {
out.label += ' (' + data._resolved + ')'
}
} catch (ex) {
// npa threw an exception then it ain't git so whatev
}
}
var peerMissing = 'UNMET PEER DEPENDENCY'
if (npm.color) peerMissing = color.bgBlack(color.red(peerMissing))
out.label = peerMissing + ' ' + out.label
}
if (data.extraneous && data.path !== dir) {
var extraneous = 'extraneous'
if (npm.color) extraneous = color.bgBlack(color.green(extraneous))
out.label += ' ' + extraneous
}
if (data.error && depth) {
var message = data.error.message
if (message.indexOf('\n')) message = message.slice(0, message.indexOf('\n'))
var error = 'error: ' + message
if (npm.color) error = color.bgRed(color.brightWhite(error))
out.label += ' ' + error
}
// add giturl to name@version
if (data._resolved) {
try {
var type = npa(data._resolved).type
var isGit = type === 'git' || type === 'hosted'
if (isGit) {
out.label += ' (' + data._resolved + ')'
}
} catch (ex) {
// npa threw an exception then it ain't git so whatev
}
}