@onekeyfe/hd-core 0.2.31 → 0.2.33
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/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/device/DeviceConnector.d.ts +1 -1
- package/dist/device/DeviceConnector.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +4 -4
- package/src/api/FirmwareUpdateV2.ts +5 -1
- package/src/device/DeviceConnector.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FirmwareUpdateV2.d.ts","sourceRoot":"","sources":["../../src/api/FirmwareUpdateV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAIT,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C,OAAO,KAAK,EAAe,QAAQ,EAAE,MAAM,UAAU,CAAC;AAItD,aAAK,MAAM,GAAG;IACZ,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,UAAU,GAAG,KAAK,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAIF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,MAAM,CAAC;IAC9D,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAE1C,IAAI;IAsCJ,cAAc,YAAa,MAAM,UAS/B;IAEF,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS;
|
|
1
|
+
{"version":3,"file":"FirmwareUpdateV2.d.ts","sourceRoot":"","sources":["../../src/api/FirmwareUpdateV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAIT,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C,OAAO,KAAK,EAAe,QAAQ,EAAE,MAAM,UAAU,CAAC;AAItD,aAAK,MAAM,GAAG;IACZ,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,UAAU,GAAG,KAAK,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAIF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,MAAM,CAAC;IAC9D,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAE1C,IAAI;IAsCJ,cAAc,YAAa,MAAM,UAS/B;IAEF,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS;IAsDrD,qBAAqB,CAAC,QAAQ,EAAE,QAAQ;IAUxC,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM;IAc9D,gCAAgC,CAAC,QAAQ,CAAC,EAAE,QAAQ;IAwB9C,GAAG;CAiGV"}
|
|
@@ -10,7 +10,7 @@ export default class DeviceConnector {
|
|
|
10
10
|
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
11
11
|
listen(): Promise<void>;
|
|
12
12
|
stop(): void;
|
|
13
|
-
acquire(path: string, session?: string | null): Promise<string | undefined>;
|
|
13
|
+
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean): Promise<string | undefined>;
|
|
14
14
|
release(session: string, onclose: boolean): Promise<void>;
|
|
15
15
|
_reportDevicesChange(): void;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceConnector.d.ts","sourceRoot":"","sources":["../../src/device/DeviceConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAIzF,OAAO,EAAc,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAMhE,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,SAAS,EAAE,SAAS,CAAC;IAErB,eAAe,SAAK;IAEpB,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAQ;IAE1C,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAElC,SAAS,UAAS;;IAQZ,SAAS;IAWT,MAAM;IAiCZ,IAAI;IAIE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"DeviceConnector.d.ts","sourceRoot":"","sources":["../../src/device/DeviceConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAIzF,OAAO,EAAc,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAMhE,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,SAAS,EAAE,SAAS,CAAC;IAErB,eAAe,SAAK;IAEpB,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAQ;IAE1C,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAElC,SAAS,UAAS;;IAQZ,SAAS;IAWT,MAAM;IAiCZ,IAAI;IAIE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,oBAAoB,CAAC,EAAE,OAAO;IAiB7E,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAS/C,oBAAoB;CAGrB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1917,7 +1917,7 @@ declare class DeviceConnector {
|
|
|
1917
1917
|
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
1918
1918
|
listen(): Promise<void>;
|
|
1919
1919
|
stop(): void;
|
|
1920
|
-
acquire(path: string, session?: string | null): Promise<string | undefined>;
|
|
1920
|
+
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean): Promise<string | undefined>;
|
|
1921
1921
|
release(session: string, onclose: boolean): Promise<void>;
|
|
1922
1922
|
_reportDevicesChange(): void;
|
|
1923
1923
|
}
|
package/dist/index.js
CHANGED
|
@@ -13599,7 +13599,7 @@ class FirmwareUpdateV2 extends BaseMethod {
|
|
|
13599
13599
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
13600
13600
|
if (isBleReconnect) {
|
|
13601
13601
|
try {
|
|
13602
|
-
yield ((_a = this.device.deviceConnector) === null || _a === void 0 ? void 0 : _a.acquire(this.device.originalDescriptor.id));
|
|
13602
|
+
yield ((_a = this.device.deviceConnector) === null || _a === void 0 ? void 0 : _a.acquire(this.device.originalDescriptor.id, null, true));
|
|
13603
13603
|
yield this.device.initialize();
|
|
13604
13604
|
if ((_b = this.device.features) === null || _b === void 0 ? void 0 : _b.bootloader_mode) {
|
|
13605
13605
|
clearInterval(intervalTimer);
|
|
@@ -18305,14 +18305,14 @@ class DeviceConnector {
|
|
|
18305
18305
|
stop() {
|
|
18306
18306
|
this.listening = false;
|
|
18307
18307
|
}
|
|
18308
|
-
acquire(path, session) {
|
|
18308
|
+
acquire(path, session, forceCleanRunPromise) {
|
|
18309
18309
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18310
18310
|
Log$1.debug('acquire', path, session);
|
|
18311
18311
|
const env = DataManager.getSettings('env');
|
|
18312
18312
|
try {
|
|
18313
18313
|
let res;
|
|
18314
18314
|
if (env === 'react-native') {
|
|
18315
|
-
res = yield this.transport.acquire({ uuid: path });
|
|
18315
|
+
res = yield this.transport.acquire({ uuid: path, forceCleanRunPromise });
|
|
18316
18316
|
}
|
|
18317
18317
|
else {
|
|
18318
18318
|
res = yield this.transport.acquire({ path, previous: session !== null && session !== void 0 ? session : null });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.33",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@onekeyfe/hd-shared": "^0.2.
|
|
28
|
-
"@onekeyfe/hd-transport": "^0.2.
|
|
27
|
+
"@onekeyfe/hd-shared": "^0.2.33",
|
|
28
|
+
"@onekeyfe/hd-transport": "^0.2.33",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"bignumber.js": "^9.0.2",
|
|
31
31
|
"jszip": "^3.10.1",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@types/semver": "^7.3.9",
|
|
43
43
|
"ripple-keypairs": "^1.1.4"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "c9180a19c4b3faf1e47ed119ecaa91f35cae27c5"
|
|
46
46
|
}
|
|
@@ -91,7 +91,11 @@ export default class FirmwareUpdateV2 extends BaseMethod<Params> {
|
|
|
91
91
|
async () => {
|
|
92
92
|
if (isBleReconnect) {
|
|
93
93
|
try {
|
|
94
|
-
await this.device.deviceConnector?.acquire(
|
|
94
|
+
await this.device.deviceConnector?.acquire(
|
|
95
|
+
this.device.originalDescriptor.id,
|
|
96
|
+
null,
|
|
97
|
+
true
|
|
98
|
+
);
|
|
95
99
|
await this.device.initialize();
|
|
96
100
|
if (this.device.features?.bootloader_mode) {
|
|
97
101
|
clearInterval(intervalTimer);
|
|
@@ -73,13 +73,13 @@ export default class DeviceConnector {
|
|
|
73
73
|
this.listening = false;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
async acquire(path: string, session?: string | null) {
|
|
76
|
+
async acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean) {
|
|
77
77
|
Log.debug('acquire', path, session);
|
|
78
78
|
const env = DataManager.getSettings('env');
|
|
79
79
|
try {
|
|
80
80
|
let res;
|
|
81
81
|
if (env === 'react-native') {
|
|
82
|
-
res = await this.transport.acquire({ uuid: path });
|
|
82
|
+
res = await this.transport.acquire({ uuid: path, forceCleanRunPromise });
|
|
83
83
|
} else {
|
|
84
84
|
res = await this.transport.acquire({ path, previous: session ?? null });
|
|
85
85
|
}
|