@pryv/monitor 1.0.2 → 1.0.6

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 +12 -6
  2. package/package.json +7 -6
package/README.md CHANGED
@@ -122,19 +122,19 @@ new Pryv.Monitor.UpdateMethod.EventsTimer({ms})
122
122
  ```
123
123
 
124
124
  This will call `monitor.updateEvents()` regularly at a rate `{ms}` in milliseconds (It has no real world but for demonstrative purposes).
125
-
125
+
126
126
  - **Socket**
127
127
 
128
128
  ```javascript
129
129
  new Pryv.Monitor.UpdateMethod.Socket()
130
130
  ```
131
-
131
+
132
132
  Based on websockets, it uses [lib-js-socket.io](https://github.com/pryv/lib-js-socket.io) to relay notification from Pryv.io to the monitor.
133
-
133
+
134
134
  - **Custom**
135
135
 
136
136
  You can design your own UpdateMethod by extending the [UpdateMethod](https://github.com/pryv/lib-js-monitor/blob/master/src/UpdateMethod/UpdateMethod.js) class.
137
-
137
+
138
138
  #### Stop monitoring
139
139
 
140
140
  ```javascript
@@ -181,10 +181,12 @@ Chain (async) `.start()`
181
181
 
182
182
  #### Node.js
183
183
 
184
+ Install packages: `npm install pryv @pryv/socket.io @pryv/monitor`
185
+
184
186
  ```javascript
185
187
  const Pryv = require('pryv');
186
188
  require('@pryv/socket.io')(Pryv);
187
- require('../src/')(Pryv);
189
+ require('@pryv/monitor')(Pryv);
188
190
 
189
191
  const apiEndpoint = 'https://ck60yn9yv00011hd3vu1ocpi7@jslibtest.pryv.me';
190
192
  (async () => { 
@@ -201,6 +203,10 @@ const apiEndpoint = 'https://ck60yn9yv00011hd3vu1ocpi7@jslibtest.pryv.me';
201
203
  <script src="https://api.pryv.com/lib-js/pryv.js"></script>
202
204
  <script src="https://api.pryv.com/lib-js-socket.io/pryv-socket.io.js"></script>
203
205
  <script src="https://api.pryv.com/lib-js-monitor/pryv-monitor.js"></script>
206
+ <!--
207
+ Previous lines can be replaced by a single "bundle"
208
+ <script src="https://api.pryv.com/lib-js/pryv-socket.io-monitor.js"></script>
209
+ -->
204
210
 
205
211
  <script>
206
212
  const apiEndpoint = 'https://ck60yn9yv00011hd3vu1ocpi7@jslibtest.pryv.me';
@@ -233,4 +239,4 @@ It can be tested on [http://pryv.github.io/lib-js-monitor](http://pryv.github.io
233
239
 
234
240
  ## Known limitations
235
241
 
236
- - If an event's update makes it "out of eventsGetScope". For example an (in eventsGetScope) event streamIds[] property is "moved" to a streamId not convered by the eventsGetScope, the current Pryv.io API does not provide the necessary synchronization mechanism to detect such changes.
242
+ - If an event's update makes it "out of eventsGetScope". For example an (in eventsGetScope) event streamIds[] property is "moved" to a streamId not convered by the eventsGetScope, the current Pryv.io API does not provide the necessary synchronization mechanism to detect such changes.
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@pryv/monitor",
3
- "version": "1.0.2",
3
+ "version": "1.0.6",
4
4
  "description": "Extends `pryv` lib-js with event driven notifications for changes on a Pryv.io account.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
7
  "test": "mocha --reporter spec test/*.test.js",
8
8
  "setup": "./scripts/setup-environment-dev.sh",
9
+ "example": "npx rec-la ./examples",
9
10
  "build": "webpack"
10
11
  },
11
12
  "repository": {
@@ -25,10 +26,10 @@
25
26
  "author": "Pryv S.A.",
26
27
  "license": "BSD-3-Clause",
27
28
  "devDependencies": {
28
- "@pryv/lib-js-common": "git+https://github.com/pryv/lib-js-common.git#1.0.2",
29
- "@pryv/socket.io": "^1.0.2",
30
- "chai": "^4.2.0",
31
- "mocha": "^8.2.1",
32
- "pryv": "^2.1.2"
29
+ "@pryv/lib-js-common": "github:pryv/lib-js-common#1.0.6",
30
+ "@pryv/socket.io": "^1.0.6",
31
+ "chai": "^4.3.4",
32
+ "mocha": "^9.1.3",
33
+ "pryv": "^2.1.9"
33
34
  }
34
35
  }