@arrowsphere/api-client 3.17.0-rc.4 → 3.17.0-rc.5

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.
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AxiosSingleton = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
+ const lodash_1 = require("lodash");
8
9
  class AxiosSingleton {
9
10
  static getInstance() {
10
11
  if (!AxiosSingleton._axiosInstance) {
@@ -40,18 +41,22 @@ class AxiosSingleton {
40
41
  */
41
42
  static cleanRequestLog(request) {
42
43
  var _a;
43
- const tempRequest = request;
44
- (_a = tempRequest === null || tempRequest === void 0 ? void 0 : tempRequest.headers) === null || _a === void 0 ? true : delete _a.apiKey;
44
+ const tempRequest = lodash_1.cloneDeep(request);
45
+ // coverage bug delete undefined element
46
+ /* istanbul ignore next */
47
+ (_a = tempRequest.headers) === null || _a === void 0 ? true : delete _a.apiKey;
45
48
  return tempRequest;
46
49
  }
47
50
  /**
48
51
  * @param response - Axios Response
49
52
  */
50
53
  static cleanResponseLog(response) {
51
- var _a, _b;
52
- const tempResponse = response;
53
- (_b = (_a = tempResponse === null || tempResponse === void 0 ? void 0 : tempResponse.config) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? true : delete _b.apiKey;
54
- tempResponse === null || tempResponse === void 0 ? true : delete tempResponse.request;
54
+ var _a;
55
+ const tempResponse = lodash_1.cloneDeep(response);
56
+ // coverage bug delete undefined element
57
+ /* istanbul ignore next */
58
+ (_a = tempResponse.config.headers) === null || _a === void 0 ? true : delete _a.apiKey;
59
+ delete tempResponse.request;
55
60
  return tempResponse;
56
61
  }
57
62
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/ArrowSphere/nodejs-api-client.git"
6
6
  },
7
- "version": "3.17.0-rc.4",
7
+ "version": "3.17.0-rc.5",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",
@@ -32,6 +32,7 @@
32
32
  "devDependencies": {
33
33
  "@types/chai": "4.2.15",
34
34
  "@types/chai-as-promised": "7.1.3",
35
+ "@types/lodash": "^4.14.191",
35
36
  "@types/mocha": "8.2.0",
36
37
  "@types/node": "18.11.10",
37
38
  "@types/sinon": "9.0.10",
@@ -82,6 +83,7 @@
82
83
  "axios": "1.1.3",
83
84
  "graphql": "^16.3.0",
84
85
  "graphql-request": "4.2.0",
86
+ "lodash": "^4.17.21",
85
87
  "validatorjs": "3.22.1"
86
88
  }
87
89
  }