famous-cli
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -73,2 +73,3 @@ 'use strict'; | ||
var autoupdate = function (callback) { | ||
return callback(); | ||
var current = pkg.version; | ||
@@ -75,0 +76,0 @@ |
@@ -13,2 +13,3 @@ 'use strict'; | ||
var login = require('../res/sdk-bundle').user.login; | ||
var loginCLI = require('./user/login'); | ||
var register = require('./user/create'); | ||
@@ -25,3 +26,3 @@ var auto = require('./util/autogenerate'); | ||
var loginPrompt = { | ||
type: 'input', | ||
type: 'confirm', | ||
name: 'login', | ||
@@ -38,4 +39,14 @@ message: 'No current user session. Login to an existing Famous Cloud Services account?: ' | ||
function(response, callback){ | ||
if (/[yY]/.test(response.login)) { | ||
login(); | ||
if (response.login) { | ||
loginCLI(function(err, data) { | ||
if (!err) { | ||
storage.getGlobal(function(er, config) { | ||
if (!config || !config.authentication_token) { | ||
return console.log('Famous CLI error, contact support.') | ||
} | ||
return callback('login', config); | ||
}); | ||
} | ||
}); | ||
} else { | ||
@@ -56,2 +67,5 @@ auto.generate(function(error, data){ | ||
function (error, data) { | ||
if (error === 'login') { | ||
callback(null, data); | ||
} | ||
callback(error, data); | ||
@@ -79,3 +93,3 @@ }); | ||
storage.getGlobal(function(err, config) { | ||
if (!data || !data.authentication_token) { | ||
if (!config || !config.authentication_token) { | ||
return noSession(callback); | ||
@@ -82,0 +96,0 @@ // return callback(new Error('no-token'), null); |
@@ -19,2 +19,5 @@ 'use strict'; | ||
* pushCLI | ||
* | ||
* Pushes the public directory of a seed project to the Hub cloud | ||
* and returns a share and embed link. | ||
* | ||
@@ -21,0 +24,0 @@ */ |
@@ -14,3 +14,3 @@ 'use strict'; | ||
*/ | ||
var loginCLI = function() { | ||
var loginCLI = function(callback) { | ||
var emailPrompt = { | ||
@@ -44,5 +44,6 @@ type: 'input', | ||
} | ||
return; | ||
return callback(); | ||
} | ||
console.log(chalk.bold('Famous'), 'login successful!'); | ||
return callback(error, data); | ||
}); | ||
@@ -49,0 +50,0 @@ }; |
{ | ||
"name": "famous-cli", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "CLI interface for Famous Industries Web Services", | ||
@@ -21,3 +21,3 @@ "main": "index.js", | ||
], | ||
"license": "Proprietary", | ||
"license": "MIT", | ||
"dependencies": { | ||
@@ -24,0 +24,0 @@ "async": "0.9.0", |
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
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
75483
0
1561