status-dev-cli
Advanced tools
Comparing version 3.2.3 to 3.2.5
26
cli.js
@@ -135,7 +135,7 @@ #!/usr/bin/env node | ||
cli.command("remove [contact]") | ||
cli.command("remove [contactIdentity]") | ||
.description("Removes a contact") | ||
.action(function (contact) { | ||
.action(function (contactIdentity) { | ||
var statusDev = new StatusDev({ip: cli.ip || defaultIp}); | ||
var contactData = getPackageData(contact); | ||
var contactData = getPackageData(JSON.stringify({"whisper-identity": contactIdentity})); | ||
if (contactData) { | ||
@@ -154,7 +154,7 @@ statusDev.removeContact(contactData, function(err, body) { | ||
cli.command("refresh [contact]") | ||
cli.command("refresh [contactIdentity]") | ||
.description("Refreshes a debuggable contact") | ||
.action(function (contact) { | ||
.action(function (contactIdentity) { | ||
var statusDev = new StatusDev({ip: cli.ip || defaultIp}); | ||
var contactData = getPackageData(contact); | ||
var contactData = getPackageData(JSON.stringify({"whisper-identity": contactIdentity})); | ||
if (contactData) { | ||
@@ -213,7 +213,7 @@ statusDev.refreshContact(contactData, function(err, body) { | ||
cli.command("log <identity>") | ||
cli.command("log <contactIdentity>") | ||
.description("Returns log for a specified DApp or bot") | ||
.action(function (identity) { | ||
.action(function (contactIdentity) { | ||
var statusDev = new StatusDev({ip: cli.ip || defaultIp}); | ||
statusDev.getLog(identity, function (err, body) { | ||
statusDev.getLog(contactIdentity, function (err, body) { | ||
if (err) { | ||
@@ -260,5 +260,6 @@ printMan(); | ||
cli.command("watch [dir] [contact]") | ||
cli.command("watch [dir] [contactIdentity]") | ||
.description("Starts watching for contact changes") | ||
.action(function (dir, contact) { | ||
.action(function (dir, contactIdentity) { | ||
var contact = JSON.stringify({"whisper-identity": contactIdentity}); | ||
var contactData = getPackageData(contact); | ||
@@ -269,5 +270,2 @@ if (!contactData) { | ||
contactDir = dir || process.cwd(); | ||
if (fs.existsSync(contactDir + '/build/')) { | ||
contactDir += '/build'; | ||
} | ||
console.log("Watching for changes in " + contactDir); | ||
@@ -274,0 +272,0 @@ |
{ | ||
"name": "status-dev-cli", | ||
"version": "3.2.3", | ||
"version": "3.2.5", | ||
"description": "CLI for Status", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -39,12 +39,12 @@ # Status CLI | ||
`status-dev-cli remove [contact]` | ||
`status-dev-cli remove [whisper-identity]` | ||
* `contact` — JSON containing `whisper-identity` field. It is not required if you develop a DApp and this DApp contains `package.json` file. | ||
* `whisper-identity` — the identity of your DApp/bot. It is not required if you develop a DApp and this DApp contains `package.json` file. | ||
#### 4. Refreshing a DApp automatically | ||
`status-dev-cli watch [dir] [contact]` | ||
`status-dev-cli watch [dir] [whisper-identity]` | ||
* `dir` — dir that should be observed. Not required; | ||
* `contact` — JSON containing `whisper-identity` field. It is not required if you develop a DApp and this DApp contains `package.json` file. | ||
* `whisper-identity` — the identity of your DApp/bot. It is not required if you develop a DApp and this DApp contains `package.json` file. | ||
@@ -57,5 +57,5 @@ #### 5. Refreshing a DApp manually | ||
`status-dev-cli refresh [dapp]` | ||
`status-dev-cli refresh [whisper-identity]` | ||
* `dapp` — JSON containing `whisper-identity` field. It is not required if your DApp contains `package.json` file. | ||
* `whisper-identity` — the identity of your DApp/bot. It is not required if your DApp contains `package.json` file. | ||
@@ -62,0 +62,0 @@ #### 6. Switching network |
18246
357