@mcesystems/adb-kit 1.0.92 → 1.0.93
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.js +10 -7
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +10 -7
- package/dist/index.mjs.map +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -31549,7 +31549,9 @@ var AdbDeviceKit = class {
|
|
|
31549
31549
|
waitForUsbDebugging(timeout2 = 12e4, _numberOfAllowedAttempts = 5) {
|
|
31550
31550
|
const events = new import_node_events.EventEmitter();
|
|
31551
31551
|
const promise = (async () => {
|
|
31552
|
-
const device = (await this.client.listDevices()).find(
|
|
31552
|
+
const device = (await this.client.listDevices()).find(
|
|
31553
|
+
(device2) => device2.id === this.deviceId
|
|
31554
|
+
);
|
|
31553
31555
|
logDetail(`Device: ${device?.id} (${device?.type})`);
|
|
31554
31556
|
if (device?.type === "device") {
|
|
31555
31557
|
logDetail("USB debugging is already enabled");
|
|
@@ -31557,12 +31559,13 @@ var AdbDeviceKit = class {
|
|
|
31557
31559
|
}
|
|
31558
31560
|
const trackingClient = this.createTrackingClient();
|
|
31559
31561
|
const tracker = await trackingClient.trackDevices();
|
|
31560
|
-
|
|
31561
|
-
|
|
31562
|
-
|
|
31563
|
-
|
|
31564
|
-
|
|
31565
|
-
|
|
31562
|
+
setTimeout(() => {
|
|
31563
|
+
if (device?.type === "unauthorized") {
|
|
31564
|
+
events.emit(USB_DEBUGGING_EVENT_NEEDS_ALWAYS_ALLOW);
|
|
31565
|
+
} else {
|
|
31566
|
+
events.emit(USB_DEBUGGING_EVENT_OFF);
|
|
31567
|
+
}
|
|
31568
|
+
}, 0);
|
|
31566
31569
|
let settled = false;
|
|
31567
31570
|
return new Promise((resolve, reject) => {
|
|
31568
31571
|
const timeoutId = setTimeout(() => {
|