Skip to content

Commit b544784

Browse files
author
betzrhodes
authored
Merge pull request #59 from electricimp/develop
Develop
2 parents 40b92e9 + 4ae4d20 commit b544784

File tree

6 files changed

+34
-36
lines changed

6 files changed

+34
-36
lines changed

Diff for: ProductionGuide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# impt Production Guide #
22

3-
**NOTE:** The contents of this guide have **NOT** been updated with the release of v2.5.0 (support for DUT device groups), and so some of the contents may be out of date.
3+
**NOTE:** The contents of this guide have **NOT** been updated with the release of v2.5.0 and above (support for DUT device groups), and so some of the contents may be out of date.
44

55
This additional guide is intended for those customers who use *impt* with [production processes](https://developer.electricimp.com/manufacturing). You may use scripts on top of *impt* commands to automate some of the operations.
66

Diff for: README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Call `impt --version` or `impt -v` to display the version of the installed *impt
4646

4747
```bash
4848
> impt --version
49-
2.5.0
49+
2.5.1
5050
```
5151

5252
## Proxy Setup ##
@@ -314,7 +314,7 @@ Response body: {
314314
}
315315
}
316316
Product "TestProduct" is created successfully.
317-
Product:
317+
Product:
318318
id: 4e264cef-3316-cdfa-7f39-7a5d458994b3
319319
name: TestProduct
320320
IMPT COMMAND SUCCEEDS
@@ -365,7 +365,7 @@ The Command Execution Context rules (how *impt* determines authentication and ot
365365
impt auth login --lk <login_key>
366366
```
367367
368-
or by an account identifier:
368+
or by an account identifier:
369369
370370
```bash
371371
impt auth login --user <user_id> --pwd <password>
@@ -412,13 +412,13 @@ The `IMPT_LOGINKEY`, `IMPT_USER`, `IMPT_PASSWORD`, `IMPT_ENDPOINT` variables may
412412
- You may have as many different [local auth files](./CommandsManual.md#local-auth-file) as you want and run *impt* commands with different authentication information in parallel (eg. for different projects/products) by running them from different processes (eg. consoles). But you should note that a [local auth file](./CommandsManual.md#local-auth-file) affects commands called from the directory where the file is located only, not from sub-directories.
413413
414414
- If you want to run *impt* commands in parallel in different processes (eg. consoles) with different authentication information and call them from any directory, you can utilize the [environment variables](./CommandsManual.md#auth-environment-variables):
415-
415+
416416
- Option 1 &mdash; Create the required number of [auth files](./CommandsManual.md#auth-files) with different authentication information; in every process specify its own path to the required auth file using the `IMPT_AUTH_FILE_PATH` environment variable.
417417
418418
- Option 2 &mdash; In every process specify its own required authentication information using the `IMPT_LOGINKEY`, `IMPT_USER`, `IMPT_PASSWORD` and `IMPT_ENDPOINT` environment variables.
419419
420420
- If you do not want to have the user credentials visible in the console (shell) history, call the [login command](./CommandsManual.md#auth-login) without specifying the credentials; *impt* will prompt to enter them.
421-
421+
422422
- If you do not want to store any authentication information in files, use the `IMPT_LOGINKEY`, `IMPT_USER`, `IMPT_PASSWORD` and `IMPT_ENDPOINT` environment variables for authentication.
423423
424424
- At any time and in any directory you can get the execution context currently applicable to this directory and the login status. Call the [`impt auth info`](./CommandsManual.md#auth-info) command from the required directory. The returned information includes a type of the authentication applicable to the current directory, access token status, account ID and other details.
@@ -440,7 +440,7 @@ Choose authentication method:
440440
(2) Login Key
441441
Enter 1 or 2: 1
442442
Enter username or email address: username
443-
Enter password:
443+
Enter password:
444444
Global login is successful.
445445
IMPT COMMAND SUCCEEDS
446446
```
@@ -527,7 +527,7 @@ If you want to use this feature, please read the [Commands Manual](./CommandsMan
527527
528528
When it is hard to uniquely specify an entity without knowing the entity ID, use [entity listing](#entity-listing-and-ownership) commands to view the entities basing on some attributes, choose the required entity and use its entity ID in the required command.
529529
530-
For some impCentral entities, such as Products and Device Groups, *impt* provides the ability, when using hierarchical identifiers, to identify them solely by their name. This is particularly helpful when you are developing scripts: you can pass the name of an entity and then call all manipulation commands with that entity (create, update, delete, etc.) without first obtaining the ID of the entity. The format and details of every concrete hierarchical identifier are described in the [Commands Manual](./CommandsManual.md#entity-identification).
530+
For some impCentral entities, such as Products and Device Groups, *impt* provides the ability, when using hierarchical identifiers, to identify them solely by their name. This is particularly helpful when you are developing scripts: you can pass the name of an entity and then call all manipulation commands with that entity (create, update, delete, etc.) without first obtaining the ID of the entity. The format and details of every concrete hierarchical identifier are described in the [Commands Manual](./CommandsManual.md#entity-identification).
531531
532532
##### Example 1: An entity is found successfully**
533533

Diff for: lib/util/ImpCentralApiHelper.js

+5
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,11 @@ class ImpCentralApiHelper {
480480
stateChangeHandler,
481481
errorHandler,
482482
LogStreams.FORMAT_JSON)).
483+
then((logStream) => {
484+
return new Promise((resolve) => {
485+
setTimeout(() => { resolve(logStream); }, 500);
486+
});
487+
}).
483488
then((logStream) => {
484489
logStreamId = logStream.data.id;
485490
return this.makeConcurrentOperations(deviceIds, (deviceId) =>

Diff for: lib/util/UserInteractor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const Config = require('./Config');
3535
const Identifier = require('./Identifier');
3636
const JsonFormatter = require('./JsonFormatter');
3737

38-
const SPINNER_TEXT = 'Contacting the impCentral...';
38+
const SPINNER_TEXT = 'Contacting impCentral...';
3939

4040
const PRINTED_ENTITIES_LIMIT = 5;
4141

Diff for: package-lock.json

+19-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "imp-central-impt",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"description": "impt - command line tool for the Electric Imp impCentral API",
55
"main": "bin/impt",
66
"engines": {

0 commit comments

Comments
 (0)