Comparing version 1.11.1-alpha1 to 1.11.1
@@ -9,3 +9,3 @@ #!/usr/bin/env node | ||
var cli = args.method.apply(null, args.options._).then(function (result) { | ||
args.method.apply(null, args.options._).then(function (result) { | ||
var analytics = require('../lib/analytics'); | ||
@@ -28,5 +28,4 @@ var res = analytics({ | ||
analytics.add('error', error.stack); | ||
analytics.add('command', args.command); | ||
var res = analytics({ | ||
command: 'cli-bad-command', | ||
command: args.command, | ||
args: args.options._, | ||
@@ -54,23 +53,18 @@ }); | ||
console.log('super fail', e.stack); | ||
}).then(function (res) { | ||
if (!process.env.TAP && exitcode) { | ||
return process.exit(1); | ||
}).then(function () { | ||
if (exitcode) { | ||
process.exit(1); | ||
} | ||
return res; | ||
}); | ||
if (module.parent) { | ||
module.exports = cli; | ||
} else { | ||
debug('checking for cli updates'); | ||
// finally, check for available update and returns an instance | ||
var defaults = require('lodash').defaults; | ||
var pkg = require('../package.json'); | ||
debug('checking for cli updates'); | ||
// finally, check for available update and returns an instance | ||
var defaults = require('lodash').defaults; | ||
var pkg = require('../package.json'); | ||
// only run if we're not inside an npm.script | ||
if (!process.env['npm_config_node_version']) { // jshint ignore:line | ||
require('update-notifier')({ | ||
pkg: defaults(pkg, { version: '0.0.0' }), | ||
}).notify(); | ||
} | ||
// only run if we're not inside an npm.script | ||
if (!process.env['npm_config_node_version']) { // jshint ignore:line | ||
require('update-notifier')({ | ||
pkg: defaults(pkg, { version: '0.0.0' }), | ||
}).notify(); | ||
} |
@@ -38,4 +38,3 @@ module.exports = analytics; | ||
// ths applies to all sending to protect user's privacy | ||
if (snyk.config.get('disable-analytics') || config.DISABLE_ANALYTICS) { | ||
debug('analytics disabled'); | ||
if (snyk.config.get('disable-analytics')) { | ||
return Promise.resolve(); | ||
@@ -42,0 +41,0 @@ } |
@@ -580,10 +580,9 @@ var protect = module.exports = { | ||
function generatePolicy(policy, tasks, live) { | ||
var promises = ['ignore', 'update', 'patch'].filter(function (task) { | ||
return tasks[task].length; | ||
}).map(function (task) { | ||
return protect[task](tasks[task], live); | ||
}); | ||
var promises = [ | ||
protect.ignore(tasks.ignore, live), | ||
protect.update(tasks.update, live), | ||
protect.patch(tasks.patch, live), | ||
log(tasks, live), | ||
]; | ||
promises.push(log(tasks, live)); | ||
return Promise.all(promises).then(function (res) { | ||
@@ -590,0 +589,0 @@ // we're squashing the arrays of arrays into a flat structure |
{ | ||
"name": "snyk", | ||
"description": "snyk library and cli utility", | ||
"version": "1.11.1-alpha1", | ||
"main": "lib/index.js", | ||
@@ -45,3 +44,3 @@ "directories": { | ||
"snyk-resolve": "^1.0.0", | ||
"snyk-resolve-deps": "^1.4.1", | ||
"snyk-resolve-deps": "^1.4.3", | ||
"snyk-try-require": "^1.0.0", | ||
@@ -59,3 +58,3 @@ "tempfile": "^1.1.1", | ||
"nodemon": "^1.3.7", | ||
"proxyquire": "^1.7.4", | ||
"proxyquire": "^1.7.3", | ||
"restify": "^4.0.4", | ||
@@ -72,3 +71,4 @@ "semantic-release": "^4.3.5", | ||
}, | ||
"snyk": true | ||
} | ||
"snyk": true, | ||
"version": "1.11.1" | ||
} |
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
10
145827
55
3804
Updatedsnyk-resolve-deps@^1.4.3