@onekeyfe/hd-transport-http 0.1.19 → 0.1.22
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.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +4 -4
- package/src/index.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import _onekeyfe_hd_transport__default, { OneKeyDeviceInfoWithSession, AcquireIn
|
|
|
4
4
|
declare type IncompleteRequestOptions = {
|
|
5
5
|
body?: Array<any> | Record<string, unknown> | string;
|
|
6
6
|
url: string;
|
|
7
|
+
timeout?: number;
|
|
7
8
|
};
|
|
8
9
|
declare class HttpTransport {
|
|
9
10
|
_messages: ReturnType<typeof _onekeyfe_hd_transport__default.parseConfigure> | undefined;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAMxF,aAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACrD,GAAG,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAMxF,aAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,SAAS,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;IAEnE,UAAU,UAAS;IAEnB,OAAO,UAAS;IAEhB,GAAG,EAAE,MAAM,CAAC;IAEZ,GAAG,CAAC,EAAE,GAAG,CAAC;gBAEE,GAAG,CAAC,EAAE,MAAM;IAIxB,KAAK,CAAC,OAAO,EAAE,wBAAwB;IAWjC,IAAI,CAAC,MAAM,EAAE,GAAG;IAMhB,WAAW;IAUjB,SAAS,CAAC,UAAU,EAAE,GAAG;IAMnB,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,2BAA2B,CAAC;IAY/C,SAAS;IAMf,aAAa,CAAC,KAAK,EAAE,YAAY;IAO3B,OAAO,CAAC,KAAK,EAAE,YAAY;IAK3B,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAUzC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAoBjE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAYjE,IAAI,CAAC,OAAO,EAAE,MAAM;IAe1B,aAAa;IAKb,IAAI;IAIJ,MAAM;CAGP"}
|
package/dist/index.js
CHANGED
|
@@ -173,6 +173,7 @@ class HttpTransport {
|
|
|
173
173
|
const resData = yield this._post({
|
|
174
174
|
url: `/call/${session}`,
|
|
175
175
|
body: outData,
|
|
176
|
+
timeout: name === 'Initialize' ? 10000 : undefined,
|
|
176
177
|
});
|
|
177
178
|
if (typeof resData !== 'string') {
|
|
178
179
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.NetworkError, 'Returning data is not string.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport-http",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "hardware http transport",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@onekeyfe/hd-shared": "^0.1.
|
|
29
|
-
"@onekeyfe/hd-transport": "^0.1.
|
|
28
|
+
"@onekeyfe/hd-shared": "^0.1.22",
|
|
29
|
+
"@onekeyfe/hd-transport": "^0.1.22",
|
|
30
30
|
"axios": "^0.27.2"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "ebc730c7be2b0d11fc8ec5f3ee08b1440d345c7a"
|
|
33
33
|
}
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ const { check, buildOne, receiveOne, parseConfigure } = transport;
|
|
|
9
9
|
type IncompleteRequestOptions = {
|
|
10
10
|
body?: Array<any> | Record<string, unknown> | string;
|
|
11
11
|
url: string;
|
|
12
|
+
timeout?: number;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export default class HttpTransport {
|
|
@@ -110,6 +111,7 @@ export default class HttpTransport {
|
|
|
110
111
|
const resData = await this._post({
|
|
111
112
|
url: `/call/${session}`,
|
|
112
113
|
body: outData,
|
|
114
|
+
timeout: name === 'Initialize' ? 10000 : undefined,
|
|
113
115
|
});
|
|
114
116
|
if (typeof resData !== 'string') {
|
|
115
117
|
throw ERRORS.TypedError(HardwareErrorCode.NetworkError, 'Returning data is not string.');
|