@opentap/runner-client 1.2.1-alpha.1.13 → 1.2.1-alpha.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +14 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,15 +9,15 @@ This is the web client for the OpenTAP Runner.
9
9
  - [@OpenTAP.io](https://opentap.io/)
10
10
 
11
11
 
12
- ## Installation
12
+ ## How to install the client
13
13
 
14
- Install my-project with npm
14
+ Install with npm
15
15
 
16
16
  ```bash
17
17
  npm install @opentap/runner-client
18
18
  ```
19
19
 
20
- ## Usage example
20
+ ## How to use the client
21
21
 
22
22
  ```typescript
23
23
  import { RunnerClient } from "@openTap/runner-client";
@@ -27,34 +27,34 @@ class client {
27
27
 
28
28
  constructor() {
29
29
  this.runnerClient = new RunnerClient('<BASE_SUBJECT>', { servers: '<SERVER_ADDRESS>' });
30
+ // Always connect first
31
+ this.runnerClient.connect()
32
+ .then(() => console.log('CONNECTED'))
33
+ .catch(err => console.log(err));
30
34
  }
31
35
 
32
36
  getImages() {
33
- try {
34
- this.data = this.runnerClient?.getImages()
35
- .then(res => console.log(res))
36
- .catch(error => console.error(error));
37
- } catch (error) {
38
- console.error(error);
39
- }
37
+ this.data = this.runnerClient?.getImages()
38
+ .then(res => console.log(res))
39
+ .catch(error => console.error(error));
40
40
  }
41
41
  }
42
42
 
43
43
  ```
44
44
 
45
45
 
46
- ## Build locally
46
+ ## How to build locally
47
47
 
48
48
  Clone the project
49
49
 
50
50
  ```bash
51
- git clone https://link-to-project
51
+ ~ git clone https://github.com/opentap/runner-client-web.git
52
52
  ```
53
53
 
54
54
  Go to the project directory
55
55
 
56
56
  ```bash
57
- cd my-project
57
+ ~ cd runner-client-web
58
58
  ```
59
59
 
60
60
  Install dependencies
@@ -69,6 +69,7 @@ Build the library
69
69
  npm run build
70
70
  ```
71
71
 
72
+ ## How to debug the project
72
73
 
73
74
  ## License
74
75
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "1.2.1-alpha.1.13",
3
+ "version": "1.2.1-alpha.1.14",
4
4
  "description": "This is the web client for the OpenTAP Runner.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",