@mcesystems/adb-kit 1.0.87 → 1.0.91
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/README.md +23 -4
- package/dist/index.js +105 -78
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +102 -78
- package/dist/index.mjs.map +4 -4
- package/dist/types/index.d.ts +15 -2
- package/package.json +5 -3
- package/scripts/export-resources.ts +8 -7
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
3
|
import { Client as AdbClient, DeviceClient } from '@devicefarmer/adbkit';
|
|
4
|
+
import { EventEmitter } from 'node:events';
|
|
4
5
|
|
|
5
6
|
declare const deviceProps: {
|
|
6
7
|
Manufacturer: string;
|
|
@@ -33,11 +34,12 @@ declare const deviceProps: {
|
|
|
33
34
|
export type DeviceProperty = keyof typeof deviceProps;
|
|
34
35
|
export declare class AdbDeviceKit {
|
|
35
36
|
private readonly port;
|
|
37
|
+
private readonly config?;
|
|
36
38
|
private client;
|
|
37
39
|
private device;
|
|
38
40
|
private deviceId;
|
|
39
41
|
private devicePort;
|
|
40
|
-
constructor(deviceId: string, port: number);
|
|
42
|
+
constructor(deviceId: string, port: number, config?: AdbClientConfig | undefined);
|
|
41
43
|
private connect;
|
|
42
44
|
listDevices(): Promise<Bluebird<adbkit.Device[]>>;
|
|
43
45
|
private getProperty;
|
|
@@ -58,12 +60,23 @@ export declare class AdbDeviceKit {
|
|
|
58
60
|
* during tracking don't affect other operations.
|
|
59
61
|
*/
|
|
60
62
|
private createTrackingClient;
|
|
61
|
-
|
|
63
|
+
private matchesDeviceId;
|
|
64
|
+
waitForUsbDebugging(timeout?: number, _numberOfAllowedAttempts?: number): {
|
|
65
|
+
promise: Promise<boolean>;
|
|
66
|
+
events: EventEmitter;
|
|
67
|
+
};
|
|
62
68
|
startPortForward(serviceName: string): Promise<number | null>;
|
|
63
69
|
getDeviceId(): string;
|
|
64
70
|
getPort(): number;
|
|
65
71
|
getDeviceClient(): Promise<DeviceClient>;
|
|
66
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* USB debugging wait event names.
|
|
75
|
+
* Use with EventEmitter.on/emit from waitForUsbDebugging().events.
|
|
76
|
+
*/
|
|
77
|
+
export declare const USB_DEBUGGING_EVENT_OFF = "usbDebuggingOff";
|
|
78
|
+
export declare const USB_DEBUGGING_EVENT_NEEDS_ALWAYS_ALLOW = "usbDebuggingNeedsAlwaysAllow";
|
|
79
|
+
export declare const USB_DEBUGGING_EVENT_AUTHORIZED = "usbDebuggingAuthorized";
|
|
67
80
|
export declare const readAll: typeof import("@devicefarmer/adbkit/dist/src/adb/util").default.readAll;
|
|
68
81
|
|
|
69
82
|
export {};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcesystems/adb-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.91",
|
|
4
4
|
"description": "ADB (Android Debug Bridge) toolkit for device management",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"my-internal": "./src/index.ts",
|
|
10
11
|
"types": "./dist/types/index.d.ts",
|
|
11
12
|
"import": "./dist/index.mjs",
|
|
12
13
|
"require": "./dist/index.js"
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"@devicefarmer/adbkit": "^3.3.8",
|
|
32
33
|
"get-port": "^7.1.0",
|
|
33
34
|
"tsx": "^4.21.0",
|
|
34
|
-
"@mcesystems/tool-debug-g4": "1.0.
|
|
35
|
+
"@mcesystems/tool-debug-g4": "1.0.91"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@types/node": "^22.10.2",
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
"pack": "npm pack",
|
|
59
60
|
"test": "vitest run",
|
|
60
61
|
"test:watch": "vitest",
|
|
61
|
-
"example:first-android-properties": "tsx src/examples/first-connected-android-properties.ts"
|
|
62
|
+
"example:first-android-properties": "tsx src/examples/first-connected-android-properties.ts",
|
|
63
|
+
"example:usb-debugging-playground": "tsx src/examples/usb-debugging-playground.ts"
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -29,17 +29,18 @@ import {
|
|
|
29
29
|
} from "node:fs";
|
|
30
30
|
import path from "node:path";
|
|
31
31
|
import { promisify } from "node:util";
|
|
32
|
+
import { createLoggers } from "@mcesystems/tool-debug-g4";
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
const {
|
|
35
|
+
logInfo,
|
|
35
36
|
logDetail,
|
|
36
37
|
logError,
|
|
37
|
-
logErrorObject,
|
|
38
|
-
logInfo,
|
|
39
|
-
logNamespace,
|
|
40
38
|
logWarning,
|
|
39
|
+
logDataObject,
|
|
40
|
+
setNamespace,
|
|
41
41
|
setLogLevel,
|
|
42
|
-
|
|
42
|
+
logErrorObject,
|
|
43
|
+
} = createLoggers("adb-kit");
|
|
43
44
|
|
|
44
45
|
const execAsync = promisify(exec);
|
|
45
46
|
|
|
@@ -294,7 +295,7 @@ https://android.googlesource.com/platform/packages/modules/adb/
|
|
|
294
295
|
async function main(): Promise<void> {
|
|
295
296
|
const args = process.argv.slice(2);
|
|
296
297
|
|
|
297
|
-
|
|
298
|
+
setNamespace("adb-resources");
|
|
298
299
|
|
|
299
300
|
if (args.includes("-v") || args.includes("--verbose")) {
|
|
300
301
|
setLogLevel("debug");
|