@onekeyfe/hd-transport-web-device 1.1.27-alpha.39 → 1.1.27-alpha.40
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/electron-ble-transport.d.ts.map +1 -1
- package/dist/index.js +10 -16
- package/dist/webusb.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/electron-ble-transport.ts +5 -8
- package/src/webusb.ts +5 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"electron-ble-transport.d.ts","sourceRoot":"","sources":["../src/electron-ble-transport.ts"],"names":[],"mappings":";AAmBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,KAAK,YAAY,MAAM,QAAQ,CAAC;AAWvC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,CAAC,EAAE,UAAU,CAAC;KACzB;CACF;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,gBAAgB,CAAC,EAAE,YAAY,CAAC;CACjC,CAAC;AAuCF,MAAM,CAAC,OAAO,OAAO,oBAAoB;IACvC,OAAO,CAAC,SAAS,CAA0D;IAE3E,OAAO,CAAC,WAAW,CAA0D;IAE7E,IAAI,SAA0B;IAE9B,UAAU,UAAS;IAEnB,UAAU,EAAE,QAAQ,CAAC,UAAU,GAAG,MAAM,CAAC,GAAG,IAAI,CAAQ;IAExD,GAAG,CAAC,EAAE,GAAG,CAAC;IAEV,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB,OAAO,CAAC,gBAAgB,CAA0B;IAElD,OAAO,CAAC,cAAc,CAAwC;IAE9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,MAAM;IAexB,OAAO,CAAC,2BAA2B;IAOnC,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,kBAAkB;YAMZ,cAAc;IAkD5B,OAAO,CAAC,8BAA8B;YAgBxB,iCAAiC;YAoCjC,eAAe;YAgBf,eAAe;YAuBf,iBAAiB;YAsBjB,cAAc;IA4B5B,OAAO,CAAC,kBAAkB;IAuB1B,OAAO,CAAC,4BAA4B;IA6BpC,OAAO,CAAC,uBAAuB;IAS/B,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,yBAAyB;IAQjC,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,sBAAsB;YAIhB,mBAAmB;IAiBjC,OAAO,CAAC,4BAA4B;IAgB9B,IAAI,CACR,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,oBAAoB;YA+BlB,cAAc;YAuEd,cAAc;IAmF5B,OAAO,CAAC,6BAA6B;IAsCrC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;CAGxD"}
|
package/dist/index.js
CHANGED
|
@@ -185,19 +185,16 @@ class WebUsbTransport {
|
|
|
185
185
|
throw this.createProtocolMismatchError(expectedProtocol);
|
|
186
186
|
}
|
|
187
187
|
if (expectedProtocol === 'V2') {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
return 'V2';
|
|
192
|
-
}
|
|
193
|
-
throw this.createProtocolMismatchError(expectedProtocol);
|
|
188
|
+
this.deviceProtocol.set(path, 'V2');
|
|
189
|
+
this.Log.debug(`[WebUsbTransport] detectProtocol: path=${path} -> V2 (expected)`);
|
|
190
|
+
return 'V2';
|
|
194
191
|
}
|
|
195
|
-
if (protocolHint === 'V2'
|
|
192
|
+
if (protocolHint === 'V2') {
|
|
196
193
|
this.deviceProtocol.set(path, 'V2');
|
|
197
194
|
this.Log.debug(`[WebUsbTransport] detectProtocol: path=${path} -> V2 (hint)`);
|
|
198
195
|
return 'V2';
|
|
199
196
|
}
|
|
200
|
-
if (this.deviceProtocol.get(path) === 'V2'
|
|
197
|
+
if (this.deviceProtocol.get(path) === 'V2') {
|
|
201
198
|
this.deviceProtocol.set(path, 'V2');
|
|
202
199
|
this.Log.debug(`[WebUsbTransport] detectProtocol: path=${path} -> V2 (cached)`);
|
|
203
200
|
return 'V2';
|
|
@@ -936,19 +933,16 @@ class ElectronBleTransport {
|
|
|
936
933
|
throw this.createProtocolMismatchError(expectedProtocol);
|
|
937
934
|
}
|
|
938
935
|
if (expectedProtocol === 'V2') {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
return 'V2';
|
|
943
|
-
}
|
|
944
|
-
throw this.createProtocolMismatchError(expectedProtocol);
|
|
936
|
+
this.deviceProtocol.set(uuid, 'V2');
|
|
937
|
+
(_b = this.Log) === null || _b === void 0 ? void 0 : _b.debug(`[Electron BLE] detectProtocol: uuid=${uuid} -> V2 (expected)`);
|
|
938
|
+
return 'V2';
|
|
945
939
|
}
|
|
946
|
-
if (protocolHint === 'V2'
|
|
940
|
+
if (protocolHint === 'V2') {
|
|
947
941
|
this.deviceProtocol.set(uuid, 'V2');
|
|
948
942
|
(_c = this.Log) === null || _c === void 0 ? void 0 : _c.debug(`[Electron BLE] detectProtocol: uuid=${uuid} -> V2 (hint)`);
|
|
949
943
|
return 'V2';
|
|
950
944
|
}
|
|
951
|
-
if (this.deviceProtocol.get(uuid) === 'V2'
|
|
945
|
+
if (this.deviceProtocol.get(uuid) === 'V2') {
|
|
952
946
|
this.deviceProtocol.set(uuid, 'V2');
|
|
953
947
|
(_d = this.Log) === null || _d === void 0 ? void 0 : _d.debug(`[Electron BLE] detectProtocol: uuid=${uuid} -> V2 (cached)`);
|
|
954
948
|
return 'V2';
|
package/dist/webusb.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webusb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,OAAO,CAAC,iBAAiB;IAiCnB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAgC5C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIvE,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,wBAAwB;YAalB,yBAAyB;IAiCvC,OAAO,CAAC,iBAAiB;IAUzB,OAAO,CAAC,aAAa;YASP,oBAAoB;YAoCpB,mBAAmB;YA2CnB,yBAAyB;YAuBzB,uBAAuB;YA4CvB,eAAe;YAcf,eAAe;IAiBvB,IAAI,CACR,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,oBAAoB;YAkClB,cAAc;YAkCd,cAAc;YAmCd,sBAAsB;IA4C9B,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAgD5C,OAAO,CAAC,IAAI,EAAE,MAAM;IAiB1B,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;CAGxD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport-web-device",
|
|
3
|
-
"version": "1.1.27-alpha.
|
|
3
|
+
"version": "1.1.27-alpha.40",
|
|
4
4
|
"author": "OneKey",
|
|
5
5
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"lint:fix": "eslint . --fix"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@onekeyfe/hd-shared": "1.1.27-alpha.
|
|
24
|
-
"@onekeyfe/hd-transport": "1.1.27-alpha.
|
|
23
|
+
"@onekeyfe/hd-shared": "1.1.27-alpha.40",
|
|
24
|
+
"@onekeyfe/hd-transport": "1.1.27-alpha.40"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@onekeyfe/hd-transport-electron": "1.1.27-alpha.
|
|
27
|
+
"@onekeyfe/hd-transport-electron": "1.1.27-alpha.40",
|
|
28
28
|
"@types/w3c-web-usb": "^1.0.6",
|
|
29
29
|
"@types/web-bluetooth": "^0.0.17"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "484f6253dd8c776fc4037f5da171c8f2226baea6"
|
|
32
32
|
}
|
|
@@ -364,21 +364,18 @@ export default class ElectronBleTransport {
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
if (expectedProtocol === 'V2') {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
return 'V2';
|
|
371
|
-
}
|
|
372
|
-
throw this.createProtocolMismatchError(expectedProtocol);
|
|
367
|
+
this.deviceProtocol.set(uuid, 'V2');
|
|
368
|
+
this.Log?.debug(`[Electron BLE] detectProtocol: uuid=${uuid} -> V2 (expected)`);
|
|
369
|
+
return 'V2';
|
|
373
370
|
}
|
|
374
371
|
|
|
375
|
-
if (protocolHint === 'V2'
|
|
372
|
+
if (protocolHint === 'V2') {
|
|
376
373
|
this.deviceProtocol.set(uuid, 'V2');
|
|
377
374
|
this.Log?.debug(`[Electron BLE] detectProtocol: uuid=${uuid} -> V2 (hint)`);
|
|
378
375
|
return 'V2';
|
|
379
376
|
}
|
|
380
377
|
|
|
381
|
-
if (this.deviceProtocol.get(uuid) === 'V2'
|
|
378
|
+
if (this.deviceProtocol.get(uuid) === 'V2') {
|
|
382
379
|
this.deviceProtocol.set(uuid, 'V2');
|
|
383
380
|
this.Log?.debug(`[Electron BLE] detectProtocol: uuid=${uuid} -> V2 (cached)`);
|
|
384
381
|
return 'V2';
|
package/src/webusb.ts
CHANGED
|
@@ -267,21 +267,18 @@ export default class WebUsbTransport {
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
if (expectedProtocol === 'V2') {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
return 'V2';
|
|
274
|
-
}
|
|
275
|
-
throw this.createProtocolMismatchError(expectedProtocol);
|
|
270
|
+
this.deviceProtocol.set(path, 'V2');
|
|
271
|
+
this.Log.debug(`[WebUsbTransport] detectProtocol: path=${path} -> V2 (expected)`);
|
|
272
|
+
return 'V2';
|
|
276
273
|
}
|
|
277
274
|
|
|
278
|
-
if (protocolHint === 'V2'
|
|
275
|
+
if (protocolHint === 'V2') {
|
|
279
276
|
this.deviceProtocol.set(path, 'V2');
|
|
280
277
|
this.Log.debug(`[WebUsbTransport] detectProtocol: path=${path} -> V2 (hint)`);
|
|
281
278
|
return 'V2';
|
|
282
279
|
}
|
|
283
280
|
|
|
284
|
-
if (this.deviceProtocol.get(path) === 'V2'
|
|
281
|
+
if (this.deviceProtocol.get(path) === 'V2') {
|
|
285
282
|
this.deviceProtocol.set(path, 'V2');
|
|
286
283
|
this.Log.debug(`[WebUsbTransport] detectProtocol: path=${path} -> V2 (cached)`);
|
|
287
284
|
return 'V2';
|