para-client-js 1.37.14 → 1.38.1

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/lib/index.js +4 -2
  2. package/package.json +6 -6
package/lib/index.js CHANGED
@@ -22,7 +22,6 @@
22
22
  var err = console.error;
23
23
  import lodash from 'lodash';
24
24
  import assert from 'assert';
25
- import { stringify } from 'querystring';
26
25
  import apiClient from 'superagent';
27
26
  import aws4 from 'aws4';
28
27
  import { Promise } from 'rsvp';
@@ -69,6 +68,9 @@ export default class ParaClient {
69
68
 
70
69
  this.getFullPath = function (resourcePath) {
71
70
  if (resourcePath && startsWith(resourcePath, JWT_PATH)) {
71
+ if ((that.apiPath.match(/\//g) || []).length > 2) {
72
+ return that.apiPath.substring(0, that.apiPath.indexOf("/", 1)) + resourcePath;
73
+ }
72
74
  return resourcePath;
73
75
  }
74
76
  if (!resourcePath) {
@@ -223,7 +225,7 @@ export default class ParaClient {
223
225
  paramsObj[key] = (value !== null) ? value : "";
224
226
  }
225
227
  }
226
- opts.path += stringify(paramsObj);
228
+ opts.path += new URLSearchParams(paramsObj).toString();
227
229
  }
228
230
 
229
231
  if (jsonEntity) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "para-client-js",
3
- "version": "1.37.14",
3
+ "version": "1.38.1",
4
4
  "description": "JavaScript Client for Para",
5
5
  "homepage": "https://paraio.org",
6
6
  "repository": "erudika/para-client-js",
@@ -30,8 +30,8 @@
30
30
  ],
31
31
  "devDependencies": {
32
32
  "browserify": "^17.0.0",
33
- "minimist": "^1.2.6",
34
- "mocha": "^10.0.0"
33
+ "minimist": "^1.2.7",
34
+ "mocha": "^10.2.0"
35
35
  },
36
36
  "scripts": {
37
37
  "test": "mocha",
@@ -39,10 +39,10 @@
39
39
  },
40
40
  "license": "Apache-2.0",
41
41
  "dependencies": {
42
- "aws4": "^1.11.0",
42
+ "aws4": "^1.12.0",
43
43
  "lodash": "^4.17.21",
44
- "lru-cache": "^7.10.1",
44
+ "lru-cache": "^7.14.1",
45
45
  "rsvp": "^4.8.5",
46
- "superagent": "^7.1.6"
46
+ "superagent": "^8.0.6"
47
47
  }
48
48
  }