pryv 2.3.7 → 2.3.9

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.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # `pryv`: JS library for Pryv.io
2
2
 
3
+ [![codecov](https://codecov.io/gh/pryv/lib-js/graph/badge.svg?token=IDE5F6NFZR)](https://codecov.io/gh/pryv/lib-js)
4
+
3
5
  JavaScript library and add-ons for writing Node.js and browser apps connecting to a Pryv.io platform. It follows the [Pryv.io app guidelines](https://api.pryv.com/guides/app-guidelines/).
4
6
 
5
7
 
@@ -648,11 +650,11 @@ There is a possibility that you would like to register the user in another page.
648
650
 
649
651
  You can find HTML examples in the [`./examples`](https://github.com/pryv/lib-js/blob/master/examples) directory. You can run them in two ways:
650
652
 
651
- 1. With [rec.la](https://github.com/pryv/rec.la), which allows to run local code with a valid SSL certificate (you must have run `just build` beforehand):
653
+ 1. With [backloop.dev](https://github.com/pryv/backloop.dev), which allows to run local code with a valid SSL certificate (you must have run `just build` beforehand):
652
654
  ```
653
655
  just serve
654
656
  ```
655
- then open the desired example page (e.g. [https://l.rec.la:9443/examples/auth.html](https://l.rec.la:9443/examples/auth.html)
657
+ then open the desired example page (e.g. [https://l.backloop.dev:9443/examples/auth.html](https://l.backloop.dev:9443/examples/auth.html)
656
658
  2. As a simple HTML file, passing service information as JSON to avoid CORS issues
657
659
 
658
660
 
@@ -676,6 +678,8 @@ The project is structured as a monorepo with components (a.k.a. workspaces in NP
676
678
  - `pryv-socket.io`: Socket.IO add-on
677
679
  - `pryv-monitor`: Monitor add-on
678
680
 
681
+
682
+
679
683
  The code follows the [Semi-Standard](https://github.com/standard/semistandard) style.
680
684
 
681
685
  ### Building for the browser
@@ -707,7 +711,7 @@ TEST_PRYVLIB_SERVICEINFO_URL="https://reg.${DOMAIN}/service/info" just test all
707
711
  To run the tests against _in-development_ API server components (e.g. open-source or Entreprise), set `TEST_PRYVLIB_DNSLESS_URL`; for example:
708
712
 
709
713
  ```bash
710
- TEST_PRYVLIB_DNSLESS_URL="http://l.rec.la:3000/ just test all
714
+ TEST_PRYVLIB_DNSLESS_URL="http://l.backloop.dev:3000/ just test all
711
715
  ```
712
716
 
713
717
  #### Browser
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pryv",
3
- "version": "2.3.7",
3
+ "version": "2.3.9",
4
4
  "description": "Pryv JavaScript library",
5
5
  "keywords": [
6
6
  "Pryv",
@@ -14,6 +14,9 @@
14
14
  "type": "git",
15
15
  "url": "git://github.com/pryv/lib-js"
16
16
  },
17
+ "dependencies": {
18
+ "superagent": "^8.0.6"
19
+ },
17
20
  "license": "BSD-3-Clause",
18
21
  "author": "Pryv S.A. <info@pryv.com> (https://pryv.com)",
19
22
  "main": "src/index.js",
@@ -10,7 +10,7 @@ const Service = require('../src/Service');
10
10
  const AuthController = require('../src/Auth/AuthController.js');
11
11
 
12
12
  describe('Browser.LoginButton', function () {
13
- this.timeout(5000);
13
+ this.timeout(15000);
14
14
 
15
15
  let auth;
16
16
  let removeZombie = false;
@@ -19,10 +19,10 @@ function genSettings () {
19
19
  }
20
20
 
21
21
  describe('Browser', function () {
22
- this.timeout(5000);
22
+ this.timeout(15000);
23
23
 
24
24
  before(async function () {
25
- this.timeout(5000);
25
+ this.timeout(15000);
26
26
  await testData.prepare();
27
27
  });
28
28
 
@@ -20,7 +20,7 @@ if (isNode) { // node
20
20
 
21
21
  describe('Connection', () => {
22
22
  before(async function () {
23
- this.timeout(5000);
23
+ this.timeout(15000);
24
24
  await testData.prepare();
25
25
  conn = new pryv.Connection(testData.apiEndpointWithToken);
26
26
 
@@ -90,7 +90,7 @@ describe('Connection', () => {
90
90
  });
91
91
 
92
92
  describe('.api()', function () {
93
- this.timeout(5000);
93
+ this.timeout(15000);
94
94
  it('.api() events.get', async () => {
95
95
  const res = await conn.api(
96
96
  [
@@ -317,7 +317,7 @@ describe('Connection', () => {
317
317
  });
318
318
 
319
319
  describe('Streamed event get', function () {
320
- this.timeout(5000);
320
+ this.timeout(15000);
321
321
  const now = (new Date()).getTime() / 1000 + 1000;
322
322
 
323
323
  describe('Node & Browser', function () {
@@ -421,7 +421,7 @@ describe('Connection', () => {
421
421
  {
422
422
  method: 'accesses.create',
423
423
  params: {
424
- name: 'test',
424
+ name: 'test' + Math.round(Math.random() * 10000),
425
425
  permissions: [
426
426
  {
427
427
  streamId: 'data',
@@ -9,7 +9,7 @@ const isNode = (typeof window === 'undefined');
9
9
 
10
10
  describe('Service', function () {
11
11
  before(async function () {
12
- this.timeout(5000);
12
+ this.timeout(15000);
13
13
  await testData.prepare();
14
14
  });
15
15
 
@@ -36,7 +36,7 @@ describe('Service', function () {
36
36
  });
37
37
 
38
38
  it('login()', async function () {
39
- this.timeout(5000);
39
+ this.timeout(15000);
40
40
  const pryvService = new pryv.Service(testData.serviceInfoUrl);
41
41
  const conn = await pryvService.login(testData.username, testData.password, 'jslib-test');
42
42
  expect(conn).to.exist;
@@ -69,13 +69,13 @@ describe('Service', function () {
69
69
  });
70
70
 
71
71
  it('login() failed on wrong password', async function () {
72
- this.timeout(5000);
72
+ this.timeout(15000);
73
73
  const pryvService = new pryv.Service(testData.serviceInfoUrl);
74
74
  await expect(pryvService.login(testData.username, 'bobby', 'jslib-test')).to.be.rejectedWith('The given username/password pair is invalid.');
75
75
  });
76
76
 
77
77
  it('login() failed on wrong username', async function () {
78
- this.timeout(5000);
78
+ this.timeout(15000);
79
79
  const pryvService = new pryv.Service(testData.serviceInfoUrl);
80
80
  // check if username is in path or domain
81
81
  try {
@@ -8,7 +8,7 @@ describe('ServiceAssets', function () {
8
8
  let removeZombie = false;
9
9
 
10
10
  before(async function () {
11
- this.timeout(5000);
11
+ this.timeout(15000);
12
12
  await testData.prepare();
13
13
  });
14
14
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  <body>
9
9
  <div id="mocha"></div>
10
- <script src="https://unpkg.com/chai/chai.js"></script>
10
+ <script src="https://unpkg.com/chai@4.3.7/chai.js"></script>
11
11
  <script src="https://unpkg.com/mocha/mocha.js"></script>
12
12
 
13
13
  <script class="mocha-init">
@@ -7,7 +7,7 @@
7
7
 
8
8
  describe('utils', function () {
9
9
  before(async function () {
10
- this.timeout(5000);
10
+ this.timeout(15000);
11
11
  await testData.prepare();
12
12
  });
13
13