appium-adb 14.3.2 → 14.3.4
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/CHANGELOG.md +12 -0
- package/build/lib/adb.d.ts +9 -9
- package/build/lib/adb.d.ts.map +1 -1
- package/build/lib/adb.js +61 -61
- package/build/lib/adb.js.map +1 -1
- package/build/lib/logcat.d.ts.map +1 -1
- package/build/lib/logcat.js +43 -37
- package/build/lib/logcat.js.map +1 -1
- package/build/lib/tools/aab-utils.d.ts.map +1 -1
- package/build/lib/tools/aab-utils.js +1 -2
- package/build/lib/tools/aab-utils.js.map +1 -1
- package/build/lib/tools/apk-utils.d.ts.map +1 -1
- package/build/lib/tools/apk-utils.js +29 -29
- package/build/lib/tools/apk-utils.js.map +1 -1
- package/build/lib/tools/apks-utils.d.ts.map +1 -1
- package/build/lib/tools/apks-utils.js +44 -45
- package/build/lib/tools/apks-utils.js.map +1 -1
- package/build/lib/tools/app-commands.d.ts +11 -11
- package/build/lib/tools/app-commands.d.ts.map +1 -1
- package/build/lib/tools/app-commands.js +0 -2
- package/build/lib/tools/app-commands.js.map +1 -1
- package/build/lib/tools/device-settings.d.ts.map +1 -1
- package/build/lib/tools/device-settings.js +14 -15
- package/build/lib/tools/device-settings.js.map +1 -1
- package/build/lib/tools/emulator-commands.d.ts.map +1 -1
- package/build/lib/tools/emulator-commands.js +43 -44
- package/build/lib/tools/emulator-commands.js.map +1 -1
- package/build/lib/tools/fs-commands.d.ts.map +1 -1
- package/build/lib/tools/fs-commands.js +3 -3
- package/build/lib/tools/fs-commands.js.map +1 -1
- package/build/lib/tools/keyboard-commands.d.ts.map +1 -1
- package/build/lib/tools/keyboard-commands.js +1 -5
- package/build/lib/tools/keyboard-commands.js.map +1 -1
- package/build/lib/tools/lockmgmt.d.ts.map +1 -1
- package/build/lib/tools/lockmgmt.js +72 -73
- package/build/lib/tools/lockmgmt.js.map +1 -1
- package/build/lib/tools/process-commands.d.ts.map +1 -1
- package/build/lib/tools/process-commands.js +1 -2
- package/build/lib/tools/process-commands.js.map +1 -1
- package/build/lib/tools/system-calls.d.ts +6 -6
- package/build/lib/tools/system-calls.d.ts.map +1 -1
- package/build/lib/tools/system-calls.js +11 -14
- package/build/lib/tools/system-calls.js.map +1 -1
- package/lib/adb.ts +69 -69
- package/lib/logcat.ts +47 -44
- package/lib/tools/aab-utils.ts +1 -2
- package/lib/tools/apk-utils.ts +37 -37
- package/lib/tools/apks-utils.ts +50 -51
- package/lib/tools/app-commands.ts +12 -16
- package/lib/tools/device-settings.ts +15 -16
- package/lib/tools/emulator-commands.ts +51 -52
- package/lib/tools/fs-commands.ts +4 -4
- package/lib/tools/keyboard-commands.ts +2 -3
- package/lib/tools/lockmgmt.ts +85 -86
- package/lib/tools/process-commands.ts +1 -2
- package/lib/tools/system-calls.ts +12 -17
- package/package.json +1 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import {log} from '../logger';
|
|
3
|
-
import B from 'bluebird';
|
|
4
3
|
import type {ExecError} from 'teen_process';
|
|
5
4
|
import type {ADB} from '../adb';
|
|
6
5
|
|
|
@@ -130,7 +129,7 @@ export async function killProcessesByName(
|
|
|
130
129
|
if (_.isEmpty(pids)) {
|
|
131
130
|
log.info(`No '${name}' process has been found`);
|
|
132
131
|
} else {
|
|
133
|
-
await
|
|
132
|
+
await Promise.all(pids.map((p: number) => this.killProcessByPID(p, signal)));
|
|
134
133
|
}
|
|
135
134
|
} catch (e: unknown) {
|
|
136
135
|
const err: Error = e as Error;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import {log} from '../logger';
|
|
3
|
-
import B from 'bluebird';
|
|
4
3
|
import {system, fs, util, tempDir, timing} from '@appium/support';
|
|
5
4
|
import {DEFAULT_ADB_EXEC_TIMEOUT, getSdkRootFromEnv} from '../helpers';
|
|
6
5
|
import {exec, SubProcess} from 'teen_process';
|
|
7
6
|
import type {ExecError, TeenProcessExecResult} from 'teen_process';
|
|
8
|
-
import {retry, retryInterval, waitForCondition} from 'asyncbox';
|
|
7
|
+
import {asyncmap, retry, retryInterval, sleep, waitForCondition} from 'asyncbox';
|
|
9
8
|
import _ from 'lodash';
|
|
10
9
|
import * as semver from 'semver';
|
|
11
10
|
import type {ADB} from '../adb';
|
|
@@ -43,7 +42,15 @@ const MIN_DELAY_ADB_API_LEVEL = 28;
|
|
|
43
42
|
const REQUIRED_SERVICES = ['activity', 'package', 'window'] as const;
|
|
44
43
|
const MAX_SHELL_BUFFER_LENGTH = 1000;
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Retrieve full path to the given binary.
|
|
47
|
+
*
|
|
48
|
+
* @param binaryName - The name of the binary
|
|
49
|
+
* @returns The full path to the binary
|
|
50
|
+
*/
|
|
51
|
+
export async function getSdkBinaryPath(this: ADB, binaryName: string): Promise<string> {
|
|
52
|
+
return await this.getBinaryFromSdkRoot(binaryName);
|
|
53
|
+
}
|
|
47
54
|
|
|
48
55
|
/**
|
|
49
56
|
* Retrieve full binary name for the current operating system.
|
|
@@ -93,18 +100,6 @@ async function getOpenSslForOs(): Promise<string> {
|
|
|
93
100
|
}
|
|
94
101
|
}
|
|
95
102
|
|
|
96
|
-
// Public methods
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Retrieve full path to the given binary.
|
|
100
|
-
*
|
|
101
|
-
* @param binaryName - The name of the binary
|
|
102
|
-
* @returns The full path to the binary
|
|
103
|
-
*/
|
|
104
|
-
export async function getSdkBinaryPath(this: ADB, binaryName: string): Promise<string> {
|
|
105
|
-
return await this.getBinaryFromSdkRoot(binaryName);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
103
|
export const getBinaryNameForOS = _.memoize(_getBinaryNameForOS);
|
|
109
104
|
|
|
110
105
|
/**
|
|
@@ -1124,7 +1119,7 @@ export async function reboot(
|
|
|
1124
1119
|
try {
|
|
1125
1120
|
// Stop and re-start the device
|
|
1126
1121
|
await this.shell(['stop']);
|
|
1127
|
-
await
|
|
1122
|
+
await sleep(2000); // let the emu finish stopping;
|
|
1128
1123
|
await this.setDeviceProperty('sys.boot_completed', '0', {
|
|
1129
1124
|
privileged: false, // no need to set privileged true because device already rooted
|
|
1130
1125
|
});
|
|
@@ -1443,7 +1438,7 @@ export const getBuildToolsDirs = _.memoize(async function getBuildToolsDirs(
|
|
|
1443
1438
|
`by semantic version names.`,
|
|
1444
1439
|
);
|
|
1445
1440
|
log.warn(`Falling back to sorting by modification date. Original error: ${error.message}`);
|
|
1446
|
-
const pairs = await
|
|
1441
|
+
const pairs = await asyncmap(
|
|
1447
1442
|
buildToolsDirs,
|
|
1448
1443
|
async (dir) => [(await fs.stat(dir)).mtime.valueOf(), dir] as [number, string],
|
|
1449
1444
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-adb",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.4",
|
|
4
4
|
"description": "Android Debug Bridge interface",
|
|
5
5
|
"main": "./build/lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"@appium/support": "^7.0.0-rc.1",
|
|
50
50
|
"async-lock": "^1.0.0",
|
|
51
51
|
"asyncbox": "^6.0.1",
|
|
52
|
-
"bluebird": "^3.4.7",
|
|
53
52
|
"ini": "^6.0.0",
|
|
54
53
|
"lodash": "^4.0.0",
|
|
55
54
|
"lru-cache": "^11.1.0",
|
|
@@ -63,7 +62,6 @@
|
|
|
63
62
|
"@semantic-release/changelog": "^6.0.1",
|
|
64
63
|
"@semantic-release/git": "^10.0.1",
|
|
65
64
|
"@types/async-lock": "^1.4.0",
|
|
66
|
-
"@types/bluebird": "^3.5.38",
|
|
67
65
|
"@types/ini": "^4.1.0",
|
|
68
66
|
"@types/lodash": "^4.14.195",
|
|
69
67
|
"@types/mocha": "^10.0.1",
|