status-dev-cli
Advanced tools
Comparing version 3.2.7 to 3.2.8
41
cli.js
@@ -52,17 +52,8 @@ #!/usr/bin/env node | ||
resp.files.forEach(function (file) { | ||
//console.log('File changed: ' + file); | ||
console.log('File changed: ' + file); | ||
}); | ||
url = "http://" + (cli.ip || defaultIp) + ":5561/dapp-changed"; | ||
child.execSync("curl -X POST -H \"Content-Type: application/json\" -d '{\"encoded\": \"" + fromAscii(contactData) + "\"}' " + url); | ||
request({ | ||
url: "http://" + (cli.ip || defaultIp) + ":5561/dapp-changed", | ||
method: "POST", | ||
json: true, | ||
body: { encoded: fromAscii(contactData) } | ||
}, function (error, response, body) { | ||
if (error) { | ||
printMan(); | ||
} | ||
var statusDev = new StatusDev({ip: cli.ip || defaultIp}); | ||
statusDev.refreshContact(contactData, function(err, body) { | ||
// nothing | ||
}); | ||
@@ -80,7 +71,2 @@ }); | ||
obj["bot-url"] = json["bot-url"] || cli.botUrl; | ||
if (!obj["dapp-url"] && !obj["bot-url"]) { | ||
console.error(chalk.red("Neither 'dapp-url' nor 'bot-url' have been found in your package.json file.")); | ||
return null; | ||
} | ||
} | ||
@@ -142,3 +128,8 @@ return obj; | ||
var statusDev = new StatusDev({ip: cli.ip || defaultIp}); | ||
var contactData = getPackageData(JSON.stringify({"whisper-identity": contactIdentity})); | ||
var contact = null; | ||
if (contactIdentity) { | ||
contact = JSON.stringify({"whisper-identity": contactIdentity}); | ||
} | ||
var contactData = getPackageData(contact); | ||
if (contactData) { | ||
@@ -161,3 +152,8 @@ statusDev.removeContact(contactData, function(err, body) { | ||
var statusDev = new StatusDev({ip: cli.ip || defaultIp}); | ||
var contactData = getPackageData(JSON.stringify({"whisper-identity": contactIdentity})); | ||
var contact = null; | ||
if (contactIdentity) { | ||
contact = JSON.stringify({"whisper-identity": contactIdentity}); | ||
} | ||
var contactData = getPackageData(contact); | ||
if (contactData) { | ||
@@ -265,3 +261,6 @@ statusDev.refreshContact(contactData, function(err, body) { | ||
.action(function (dir, contactIdentity) { | ||
var contact = JSON.stringify({"whisper-identity": contactIdentity}); | ||
var contact = null; | ||
if (contactIdentity) { | ||
contact = JSON.stringify({"whisper-identity": contactIdentity}); | ||
} | ||
var contactData = getPackageData(contact); | ||
@@ -268,0 +267,0 @@ if (!contactData) { |
{ | ||
"name": "status-dev-cli", | ||
"version": "3.2.7", | ||
"version": "3.2.8", | ||
"description": "CLI for Status", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
18089
358