@alanszp/axios-node 8.0.0 → 10.0.0

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.
@@ -4,13 +4,14 @@ exports.NetworkRequestError = void 0;
4
4
  const RequestError_1 = require("./RequestError");
5
5
  class NetworkRequestError extends RequestError_1.RequestError {
6
6
  constructor(error) {
7
+ var _a, _b;
7
8
  super("Network Error", error);
8
9
  this.request = {
9
10
  host: error.request.host,
10
11
  path: error.request.path,
11
12
  method: error.request.method,
12
- data: error.config.data,
13
- params: error.config.params,
13
+ data: (_a = error.config) === null || _a === void 0 ? void 0 : _a.data,
14
+ params: (_b = error.config) === null || _b === void 0 ? void 0 : _b.params,
14
15
  };
15
16
  }
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkRequestError.js","sourceRoot":"","sources":["../../src/errors/NetworkRequestError.ts"],"names":[],"mappings":";;;AACA,iDAA8C;AAE9C,MAAa,mBAAuB,SAAQ,2BAAe;IASzD,YAAY,KAAoB;QAC9B,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACxB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACxB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM;YAC5B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;YACvB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;SAC5B,CAAC;IACJ,CAAC;CACF;AAnBD,kDAmBC"}
1
+ {"version":3,"file":"NetworkRequestError.js","sourceRoot":"","sources":["../../src/errors/NetworkRequestError.ts"],"names":[],"mappings":";;;AACA,iDAA8C;AAE9C,MAAa,mBAAuB,SAAQ,2BAAe;IASzD,YAAY,KAAoB;;QAC9B,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACxB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACxB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM;YAC5B,IAAI,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,IAAI;YACxB,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,MAAM;SAC7B,CAAC;IACJ,CAAC;CACF;AAnBD,kDAmBC"}
@@ -4,18 +4,18 @@ exports.Non200ResponseError = void 0;
4
4
  const RequestError_1 = require("./RequestError");
5
5
  class Non200ResponseError extends RequestError_1.RequestError {
6
6
  constructor(error) {
7
- var _a, _b;
7
+ var _a, _b, _c, _d;
8
8
  super("Non 200 Response Error", error);
9
9
  this.request = {
10
10
  host: error.request.host,
11
11
  path: error.request.path,
12
12
  method: error.request.method,
13
- data: error.config.data,
14
- params: error.config.params,
13
+ data: (_a = error.config) === null || _a === void 0 ? void 0 : _a.data,
14
+ params: (_b = error.config) === null || _b === void 0 ? void 0 : _b.params,
15
15
  };
16
16
  this.response = {
17
- status: (_a = error.response) === null || _a === void 0 ? void 0 : _a.status,
18
- data: (_b = error.response) === null || _b === void 0 ? void 0 : _b.data,
17
+ status: (_c = error.response) === null || _c === void 0 ? void 0 : _c.status,
18
+ data: (_d = error.response) === null || _d === void 0 ? void 0 : _d.data,
19
19
  };
20
20
  }
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Non200ResponseError.js","sourceRoot":"","sources":["../../src/errors/Non200ResponseError.ts"],"names":[],"mappings":";;;AACA,iDAA8C;AAE9C,MAAa,mBAAuB,SAAQ,2BAAe;IAUzD,YAAY,KAAoB;;QAC9B,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACxB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACxB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM;YAC5B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;YACvB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;SAC5B,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG;YACd,MAAM,EAAE,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAgB;YACxC,IAAI,EAAE,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAW;SAClC,CAAC;IACJ,CAAC;CACF;AAxBD,kDAwBC"}
1
+ {"version":3,"file":"Non200ResponseError.js","sourceRoot":"","sources":["../../src/errors/Non200ResponseError.ts"],"names":[],"mappings":";;;AACA,iDAA8C;AAE9C,MAAa,mBAAuB,SAAQ,2BAAe;IAUzD,YAAY,KAAoB;;QAC9B,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACxB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACxB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM;YAC5B,IAAI,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,IAAI;YACxB,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,MAAM;SAC7B,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG;YACd,MAAM,EAAE,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAgB;YACxC,IAAI,EAAE,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAW;SAClC,CAAC;IACJ,CAAC;CACF;AAxBD,kDAwBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alanszp/axios-node",
3
- "version": "8.0.0",
3
+ "version": "10.0.0",
4
4
  "description": "Alan's axios wrapper with base interceptor.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -19,9 +19,9 @@
19
19
  "yalc-publish": "yarn run yalc publish"
20
20
  },
21
21
  "dependencies": {
22
- "@alanszp/errors": "^8.0.0",
23
- "@alanszp/shared-context": "^8.0.0",
24
- "axios": "^0.24.0"
22
+ "@alanszp/errors": "^10.0.0",
23
+ "@alanszp/shared-context": "^10.0.0",
24
+ "axios": "^0.28.0"
25
25
  },
26
- "gitHead": "8ddbd6ae78e2404fb35497e18308644d3760dd17"
26
+ "gitHead": "e06d4fec832847519814bcf472fdc9fff9ef0829"
27
27
  }
@@ -16,8 +16,8 @@ export class NetworkRequestError<T> extends RequestError<T> {
16
16
  host: error.request.host,
17
17
  path: error.request.path,
18
18
  method: error.request.method,
19
- data: error.config.data,
20
- params: error.config.params,
19
+ data: error.config?.data,
20
+ params: error.config?.params,
21
21
  };
22
22
  }
23
23
  }
@@ -17,8 +17,8 @@ export class Non200ResponseError<T> extends RequestError<T> {
17
17
  host: error.request.host,
18
18
  path: error.request.path,
19
19
  method: error.request.method,
20
- data: error.config.data,
21
- params: error.config.params,
20
+ data: error.config?.data,
21
+ params: error.config?.params,
22
22
  };
23
23
  this.response = {
24
24
  status: error.response?.status as number,