hardware-example 1.1.10-alpha.8 → 1.1.11-alpha.1

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.
@@ -11,11 +11,6 @@ module.exports = {
11
11
  productName: 'HardwareExample',
12
12
  copyright: 'Copyright © OeKey 2024',
13
13
  asar: true,
14
- // Unpack native modules so they can be loaded at runtime
15
- asarUnpack: [
16
- 'node_modules/@stoprocent/noble/**',
17
- 'node_modules/@stoprocent/bluetooth-hci-socket/**',
18
- ],
19
14
  buildVersion: version,
20
15
  directories: {
21
16
  output: 'out',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "hardware-example",
3
3
  "productName": "HardwareExample",
4
4
  "executableName": "onekey-hardware-example",
5
- "version": "1.1.10-alpha.8",
5
+ "version": "1.1.11-alpha.1",
6
6
  "author": "OneKey",
7
7
  "description": "End-to-end encrypted workspaces for teams",
8
8
  "main": "dist/index.js",
@@ -15,15 +15,12 @@
15
15
  "dev": "npx concurrently \"yarn dev:electron\" \"cross-env TRANSFORM_REGENERATOR_DISABLED=true BROWSER=none yarn dev-electron-web\"",
16
16
  "dev:electron": "electron --inspect=5858 dist/index.js",
17
17
  "build:main": "webpack --config webpack.config.ts",
18
- "rebuild:deps": "electron-builder install-app-deps",
19
- "make:mac": "yarn rebuild:deps && yarn clean:build && yarn build-electron-web && electron-builder build --mac --config electron-builder.config.js --publish always",
20
- "make:win": "yarn rebuild:deps && yarn clean:build && yarn build-electron-web && electron-builder build --win --config electron-builder.config.js --publish always",
18
+ "make": "yarn clean:build && yarn build-electron-web && electron-builder build -mw --config electron-builder.config.js --publish always",
21
19
  "lint": "eslint --ext .tsx --ext .ts ./",
22
20
  "ts:check": "yarn tsc --noEmit"
23
21
  },
24
22
  "dependencies": {
25
- "@onekeyfe/hd-transport-electron": "1.1.10-alpha.8",
26
- "@stoprocent/noble": "2.3.4",
23
+ "@abandonware/noble": "^1.9.2-26",
27
24
  "debug": "4.3.4",
28
25
  "electron-is-dev": "^3.0.1",
29
26
  "electron-log": "^5.1.5",
@@ -44,5 +41,5 @@
44
41
  "resolutions": {
45
42
  "**/node-gyp": "^10.0.1"
46
43
  },
47
- "gitHead": "eba2dfb26824720a90e8bfb06ea434023eec3a23"
44
+ "gitHead": "160f065737c84886f317a23058304584333bc885"
48
45
  }
package/src/index.ts CHANGED
@@ -257,6 +257,8 @@ function createMainWindow() {
257
257
  }
258
258
  });
259
259
 
260
+ initNobleBleSupport(browserWindow.webContents);
261
+
260
262
  ipcMain.on(ipcMessageKeys.APP_RESTART, () => {
261
263
  browserWindow?.reload();
262
264
  });
@@ -281,15 +283,6 @@ if (!singleInstance && !process.mas) {
281
283
  if (!mainWindow) {
282
284
  mainWindow = createMainWindow();
283
285
  }
284
-
285
- try {
286
- log.info('Initializing Noble BLE support...');
287
- initNobleBleSupport(mainWindow.webContents);
288
- log.info('Noble BLE support initialized successfully.');
289
- } catch (e) {
290
- log.error('Failed to initialize Noble BLE support:', e);
291
- }
292
-
293
286
  initChildProcess();
294
287
  showMainWindow();
295
288
  console.log('日志文件位置:', log.transports.file.getFile().path);
package/webpack.config.ts CHANGED
@@ -48,9 +48,8 @@ module.exports = {
48
48
  }),
49
49
  }),
50
50
  {
51
- '@onekeyfe/hd-transport-electron': 'commonjs @onekeyfe/hd-transport-electron',
52
- '@stoprocent/noble': 'commonjs @stoprocent/noble',
53
- '@stoprocent/bluetooth-hci-socket': 'commonjs @stoprocent/bluetooth-hci-socket',
51
+ '@abandonware/noble': 'commonjs @abandonware/noble',
52
+ '@abandonware/bluetooth-hci-socket': 'commonjs @abandonware/bluetooth-hci-socket',
54
53
  bufferutil: 'commonjs bufferutil',
55
54
  'utf-8-validate': 'commonjs utf-8-validate',
56
55
  },