famous-cli
Advanced tools
Comparing version 0.1.2 to 0.1.4
@@ -14,5 +14,7 @@ #!/usr/bin/env node | ||
var auto = require('../lib/autoupdate'); | ||
auto(function(){ | ||
program | ||
.version('0.0.1'); | ||
.version(require('../package').version); | ||
// .command('user <cmd>', 'famous hub user CLI') | ||
@@ -75,2 +77,2 @@ // .command('container <cmd>', 'famous hub container CLI') | ||
} | ||
}); |
@@ -6,2 +6,3 @@ 'use strict'; | ||
var chalk = require('chalk'); | ||
var ver = require('latest-version'); | ||
@@ -16,21 +17,10 @@ /** | ||
var current = pkg.version; | ||
var versions; | ||
var latest; | ||
var child = spawn('npm', ['view', 'famous-cli', 'versions']); | ||
child.stdout.on('data', function(data) { | ||
versions = data.toString(); | ||
versions = versions.replace(/\s|\]/g, ''); | ||
versions = versions.replace(/\'/g, ''); | ||
versions = versions.split(','); | ||
latest = versions[versions.length -1]; | ||
if (current < latest) { | ||
console.log(chalk.bold('Famous'), 'CLI version', current, 'is out of date.', 'Updating to', latest); | ||
ver('famous-cli', function(err, version) { | ||
if (current < version) { | ||
console.log(chalk.bold('Famous'), 'CLI version', current, 'is out of date.', 'Updating to', version); | ||
return update(callback); | ||
} | ||
return callback(); | ||
}); | ||
}); | ||
}; | ||
@@ -44,3 +34,3 @@ | ||
var update = function (callback) { | ||
var child = spawn('npm', ['update', '-g', 'famous-cli']); | ||
var child = spawn('npm', ['install', '-g', 'famous-cli']); | ||
@@ -47,0 +37,0 @@ child.on('close', function (code) { |
@@ -57,2 +57,6 @@ 'use strict'; | ||
inquirer.prompt([emailPrompt, usernamePrompt, passPrompt, trackingPrompt, eulaPrompt], function(answers) { | ||
if (!answers.eula) { | ||
console.log(chalk.bold.red('You must agree to the eula to register with Hub')); | ||
process.exit(1); | ||
} | ||
metrics.setTracking(answers.tracking, function() { | ||
@@ -59,0 +63,0 @@ callback(null, answers); |
@@ -11,2 +11,11 @@ 'use strict'; | ||
var getUser = function() { | ||
var auto = require('../autoupdate'); | ||
console.log('calling auto'); | ||
auto(function(){ | ||
console.log('autoupdate finished'); | ||
}); | ||
getGlobal(function (error, session) { | ||
@@ -13,0 +22,0 @@ if (error) { |
{ | ||
"name": "famous-cli", | ||
"version": "0.1.2", | ||
"version": "0.1.4", | ||
"description": "CLI interface for Famous Industries Web Services", | ||
@@ -31,2 +31,3 @@ "main": "index.js", | ||
"isbinaryfile": "2.0.3", | ||
"latest-version": "^1.0.0", | ||
"mime": "^1.3.4", | ||
@@ -33,0 +34,0 @@ "mime-types": "^2.0.12", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
82994
57
1233
8
16
+ Addedlatest-version@^1.0.0
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addedduplexify@3.7.1(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedgot@3.3.1(transitive)
+ Addedinfinity-agent@2.0.3(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-redirect@1.0.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedlatest-version@1.0.1(transitive)
+ Addedlowercase-keys@1.0.1(transitive)
+ Addednested-error-stacks@1.0.2(transitive)
+ Addedobject-assign@3.0.0(transitive)
+ Addedpackage-json@1.2.0(transitive)
+ Addedpinkie@2.0.4(transitive)
+ Addedpinkie-promise@2.0.1(transitive)
+ Addedprepend-http@1.0.4(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedread-all-stream@3.1.0(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedregistry-url@3.1.0(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedstream-shift@1.0.3(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedtimed-out@2.0.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)