@onekeyfe/hd-transport-http 1.1.15 → 1.1.16-alpha.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.
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
41
41
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
42
42
  };
43
43
 
44
+ var _a;
44
45
  function contentType(body) {
45
46
  if (typeof body === 'string') {
46
47
  return 'text/plain';
@@ -112,7 +113,7 @@ function request(options) {
112
113
  }
113
114
  });
114
115
  }
115
- axios__default["default"].interceptors.request.use((config) => {
116
+ (_a = axios__default["default"] === null || axios__default["default"] === void 0 ? void 0 : axios__default["default"].interceptors) === null || _a === void 0 ? void 0 : _a.request.use((config) => {
116
117
  var _a;
117
118
  if (typeof window !== 'undefined') {
118
119
  return config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-transport-http",
3
- "version": "1.1.15",
3
+ "version": "1.1.16-alpha.0",
4
4
  "description": "hardware http transport",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -24,10 +24,10 @@
24
24
  "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
25
25
  },
26
26
  "dependencies": {
27
- "@onekeyfe/hd-shared": "1.1.15",
28
- "@onekeyfe/hd-transport": "1.1.15",
27
+ "@onekeyfe/hd-shared": "1.1.16-alpha.0",
28
+ "@onekeyfe/hd-transport": "1.1.16-alpha.0",
29
29
  "axios": "1.12.2",
30
30
  "secure-json-parse": "^4.0.0"
31
31
  },
32
- "gitHead": "76833323c9a31ae4f5ba1f5ca235d8c618e9acab"
32
+ "gitHead": "5176cda0516c2c6112cb8e70ba5e7d6d7a8ebfdd"
33
33
  }
package/src/http.ts CHANGED
@@ -88,7 +88,7 @@ export async function request(options: HttpRequestOptions) {
88
88
  }
89
89
  }
90
90
 
91
- axios.interceptors.request.use((config: InternalAxiosRequestConfig) => {
91
+ axios?.interceptors?.request.use((config: InternalAxiosRequestConfig) => {
92
92
  if (typeof window !== 'undefined') {
93
93
  return config;
94
94
  }