@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.mjs
CHANGED
|
@@ -31542,7 +31542,9 @@ var AdbDeviceKit = class {
|
|
|
31542
31542
|
waitForUsbDebugging(timeout2 = 12e4, _numberOfAllowedAttempts = 5) {
|
|
31543
31543
|
const events = new EventEmitter();
|
|
31544
31544
|
const promise = (async () => {
|
|
31545
|
-
const device = (await this.client.listDevices()).find(
|
|
31545
|
+
const device = (await this.client.listDevices()).find(
|
|
31546
|
+
(device2) => device2.id === this.deviceId
|
|
31547
|
+
);
|
|
31546
31548
|
logDetail(`Device: ${device?.id} (${device?.type})`);
|
|
31547
31549
|
if (device?.type === "device") {
|
|
31548
31550
|
logDetail("USB debugging is already enabled");
|
|
@@ -31550,12 +31552,13 @@ var AdbDeviceKit = class {
|
|
|
31550
31552
|
}
|
|
31551
31553
|
const trackingClient = this.createTrackingClient();
|
|
31552
31554
|
const tracker = await trackingClient.trackDevices();
|
|
31553
|
-
|
|
31554
|
-
|
|
31555
|
-
|
|
31556
|
-
|
|
31557
|
-
|
|
31558
|
-
|
|
31555
|
+
setTimeout(() => {
|
|
31556
|
+
if (device?.type === "unauthorized") {
|
|
31557
|
+
events.emit(USB_DEBUGGING_EVENT_NEEDS_ALWAYS_ALLOW);
|
|
31558
|
+
} else {
|
|
31559
|
+
events.emit(USB_DEBUGGING_EVENT_OFF);
|
|
31560
|
+
}
|
|
31561
|
+
}, 0);
|
|
31559
31562
|
let settled = false;
|
|
31560
31563
|
return new Promise((resolve, reject) => {
|
|
31561
31564
|
const timeoutId = setTimeout(() => {
|