@onekeyfe/hd-transport-electron 1.1.20-alpha.1 → 1.1.20
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.
|
@@ -32,7 +32,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
32
32
|
|
|
33
33
|
function initNobleBleSupport(webContents) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const { setupNobleBleHandlers } = yield Promise.resolve().then(function () { return require('./noble-ble-handler-
|
|
35
|
+
const { setupNobleBleHandlers } = yield Promise.resolve().then(function () { return require('./noble-ble-handler-1a6d7f4a.js'); });
|
|
36
36
|
setupNobleBleHandlers(webContents);
|
|
37
37
|
});
|
|
38
38
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-1fa563cd.js');
|
|
4
4
|
var hdShared = require('@onekeyfe/hd-shared');
|
|
5
5
|
var hdTransport = require('@onekeyfe/hd-transport');
|
|
6
6
|
var pRetry = require('p-retry');
|
|
@@ -614,7 +614,7 @@ function enumerateDevices() {
|
|
|
614
614
|
if (!existingDevice) {
|
|
615
615
|
const deviceName = ((_a = peripheral.advertisement) === null || _a === void 0 ? void 0 : _a.localName) || 'Unknown Device';
|
|
616
616
|
devices.push({
|
|
617
|
-
|
|
617
|
+
commType: 'electron-ble',
|
|
618
618
|
id,
|
|
619
619
|
name: deviceName,
|
|
620
620
|
state: peripheral.state || 'disconnected',
|
|
@@ -664,7 +664,7 @@ function getDevice(deviceId) {
|
|
|
664
664
|
if (peripheral) {
|
|
665
665
|
const deviceName = ((_a = peripheral.advertisement) === null || _a === void 0 ? void 0 : _a.localName) || 'Unknown Device';
|
|
666
666
|
return {
|
|
667
|
-
|
|
667
|
+
commType: 'electron-ble',
|
|
668
668
|
id: peripheral.id,
|
|
669
669
|
name: deviceName,
|
|
670
670
|
state: peripheral.state || 'disconnected',
|
|
@@ -674,14 +674,14 @@ function getDevice(deviceId) {
|
|
|
674
674
|
if (connectedPeripheral) {
|
|
675
675
|
const deviceName = ((_b = connectedPeripheral.advertisement) === null || _b === void 0 ? void 0 : _b.localName) || 'Unknown Device';
|
|
676
676
|
return {
|
|
677
|
-
|
|
677
|
+
commType: 'electron-ble',
|
|
678
678
|
id: connectedPeripheral.id,
|
|
679
679
|
name: deviceName,
|
|
680
680
|
state: connectedPeripheral.state || 'connected',
|
|
681
681
|
};
|
|
682
682
|
}
|
|
683
683
|
return {
|
|
684
|
-
|
|
684
|
+
commType: 'electron-ble',
|
|
685
685
|
id: deviceId,
|
|
686
686
|
name: 'OneKey Device',
|
|
687
687
|
state: 'disconnected',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport-electron",
|
|
3
|
-
"version": "1.1.20
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"author": "OneKey",
|
|
5
5
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"electron-log": ">=4.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@onekeyfe/hd-core": "1.1.20
|
|
29
|
-
"@onekeyfe/hd-shared": "1.1.20
|
|
30
|
-
"@onekeyfe/hd-transport": "1.1.20
|
|
28
|
+
"@onekeyfe/hd-core": "1.1.20",
|
|
29
|
+
"@onekeyfe/hd-shared": "1.1.20",
|
|
30
|
+
"@onekeyfe/hd-transport": "1.1.20",
|
|
31
31
|
"@stoprocent/noble": "2.3.4",
|
|
32
32
|
"p-retry": "^4.6.2"
|
|
33
33
|
},
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"electron": "^25.0.0",
|
|
37
37
|
"typescript": "^5.3.3"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "3f1367f1ad5253e2207442e74fa47361df7ff442"
|
|
40
40
|
}
|
package/src/noble-ble-handler.ts
CHANGED
|
@@ -824,7 +824,7 @@ async function enumerateDevices(): Promise<DeviceInfo[]> {
|
|
|
824
824
|
if (!existingDevice) {
|
|
825
825
|
const deviceName = peripheral.advertisement?.localName || 'Unknown Device';
|
|
826
826
|
devices.push({
|
|
827
|
-
|
|
827
|
+
commType: 'electron-ble',
|
|
828
828
|
id,
|
|
829
829
|
name: deviceName,
|
|
830
830
|
state: peripheral.state || 'disconnected',
|
|
@@ -883,7 +883,7 @@ function getDevice(deviceId: string): DeviceInfo | null {
|
|
|
883
883
|
if (peripheral) {
|
|
884
884
|
const deviceName = peripheral.advertisement?.localName || 'Unknown Device';
|
|
885
885
|
return {
|
|
886
|
-
|
|
886
|
+
commType: 'electron-ble',
|
|
887
887
|
id: peripheral.id,
|
|
888
888
|
name: deviceName,
|
|
889
889
|
state: peripheral.state || 'disconnected',
|
|
@@ -895,7 +895,7 @@ function getDevice(deviceId: string): DeviceInfo | null {
|
|
|
895
895
|
if (connectedPeripheral) {
|
|
896
896
|
const deviceName = connectedPeripheral.advertisement?.localName || 'Unknown Device';
|
|
897
897
|
return {
|
|
898
|
-
|
|
898
|
+
commType: 'electron-ble',
|
|
899
899
|
id: connectedPeripheral.id,
|
|
900
900
|
name: deviceName,
|
|
901
901
|
state: connectedPeripheral.state || 'connected',
|
|
@@ -905,7 +905,7 @@ function getDevice(deviceId: string): DeviceInfo | null {
|
|
|
905
905
|
// For direct connection mode, return a placeholder device info
|
|
906
906
|
// This allows the connection process to proceed without prior discovery
|
|
907
907
|
return {
|
|
908
|
-
|
|
908
|
+
commType: 'electron-ble',
|
|
909
909
|
id: deviceId,
|
|
910
910
|
name: 'OneKey Device',
|
|
911
911
|
state: 'disconnected',
|