appium-adb 16.0.0 → 16.0.2

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.
Files changed (103) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/build/lib/adb.d.ts +11 -11
  3. package/build/lib/adb.d.ts.map +1 -1
  4. package/build/lib/adb.js +9 -9
  5. package/build/lib/adb.js.map +1 -1
  6. package/build/lib/logcat.d.ts +1 -1
  7. package/build/lib/logcat.d.ts.map +1 -1
  8. package/build/lib/logcat.js +4 -14
  9. package/build/lib/logcat.js.map +1 -1
  10. package/build/lib/tools/aab-utils.d.ts.map +1 -1
  11. package/build/lib/tools/aab-utils.js +4 -4
  12. package/build/lib/tools/aab-utils.js.map +1 -1
  13. package/build/lib/tools/android-manifest.d.ts.map +1 -1
  14. package/build/lib/tools/android-manifest.js +4 -7
  15. package/build/lib/tools/android-manifest.js.map +1 -1
  16. package/build/lib/tools/apk-signing.d.ts.map +1 -1
  17. package/build/lib/tools/apk-signing.js +9 -11
  18. package/build/lib/tools/apk-signing.js.map +1 -1
  19. package/build/lib/tools/apk-utils.d.ts.map +1 -1
  20. package/build/lib/tools/apk-utils.js +19 -38
  21. package/build/lib/tools/apk-utils.js.map +1 -1
  22. package/build/lib/tools/apks-utils.d.ts.map +1 -1
  23. package/build/lib/tools/apks-utils.js +3 -3
  24. package/build/lib/tools/apks-utils.js.map +1 -1
  25. package/build/lib/tools/app-commands.d.ts.map +1 -1
  26. package/build/lib/tools/app-commands.js +11 -15
  27. package/build/lib/tools/app-commands.js.map +1 -1
  28. package/build/lib/tools/device-settings.d.ts.map +1 -1
  29. package/build/lib/tools/device-settings.js +6 -17
  30. package/build/lib/tools/device-settings.js.map +1 -1
  31. package/build/lib/tools/emulator-commands.d.ts.map +1 -1
  32. package/build/lib/tools/emulator-commands.js +6 -8
  33. package/build/lib/tools/emulator-commands.js.map +1 -1
  34. package/build/lib/tools/fs-commands.d.ts +1 -1
  35. package/build/lib/tools/fs-commands.d.ts.map +1 -1
  36. package/build/lib/tools/fs-commands.js.map +1 -1
  37. package/build/lib/tools/general-commands.d.ts.map +1 -1
  38. package/build/lib/tools/general-commands.js +3 -5
  39. package/build/lib/tools/general-commands.js.map +1 -1
  40. package/build/lib/tools/keyboard-commands.d.ts.map +1 -1
  41. package/build/lib/tools/keyboard-commands.js +1 -1
  42. package/build/lib/tools/keyboard-commands.js.map +1 -1
  43. package/build/lib/tools/lockmgmt.d.ts.map +1 -1
  44. package/build/lib/tools/lockmgmt.js +4 -10
  45. package/build/lib/tools/lockmgmt.js.map +1 -1
  46. package/build/lib/tools/logcat-commands.d.ts.map +1 -1
  47. package/build/lib/tools/logcat-commands.js.map +1 -1
  48. package/build/lib/tools/network-commands.d.ts.map +1 -1
  49. package/build/lib/tools/network-commands.js.map +1 -1
  50. package/build/lib/tools/process-commands.d.ts.map +1 -1
  51. package/build/lib/tools/process-commands.js +1 -1
  52. package/build/lib/tools/process-commands.js.map +1 -1
  53. package/build/lib/tools/system-calls.d.ts.map +1 -1
  54. package/build/lib/tools/system-calls.js +15 -11
  55. package/build/lib/tools/system-calls.js.map +1 -1
  56. package/build/lib/tools/types.d.ts.map +1 -1
  57. package/build/lib/utils/helpers/index.d.ts +1 -1
  58. package/build/lib/utils/helpers/index.d.ts.map +1 -1
  59. package/build/lib/utils/helpers/index.js +1 -1
  60. package/build/lib/utils/helpers/index.js.map +1 -1
  61. package/build/lib/utils/helpers/install.d.ts.map +1 -1
  62. package/build/lib/utils/helpers/install.js.map +1 -1
  63. package/build/lib/utils/helpers/manifest.d.ts.map +1 -1
  64. package/build/lib/utils/helpers/manifest.js.map +1 -1
  65. package/build/lib/utils/helpers/resource.d.ts.map +1 -1
  66. package/build/lib/utils/helpers/resource.js +1 -2
  67. package/build/lib/utils/helpers/resource.js.map +1 -1
  68. package/build/lib/utils/helpers/sdk.d.ts.map +1 -1
  69. package/build/lib/utils/helpers/sdk.js +1 -1
  70. package/build/lib/utils/helpers/sdk.js.map +1 -1
  71. package/build/lib/utils/index.d.ts +1 -1
  72. package/build/lib/utils/index.d.ts.map +1 -1
  73. package/build/lib/utils/index.js +1 -1
  74. package/build/lib/utils/index.js.map +1 -1
  75. package/build/lib/utils/lodash/core.d.ts.map +1 -1
  76. package/build/lib/utils/lodash/core.js.map +1 -1
  77. package/lib/adb.ts +14 -13
  78. package/lib/logcat.ts +9 -23
  79. package/lib/tools/aab-utils.ts +9 -15
  80. package/lib/tools/android-manifest.ts +12 -28
  81. package/lib/tools/apk-signing.ts +16 -41
  82. package/lib/tools/apk-utils.ts +27 -82
  83. package/lib/tools/apks-utils.ts +10 -21
  84. package/lib/tools/app-commands.ts +31 -95
  85. package/lib/tools/device-settings.ts +15 -48
  86. package/lib/tools/emulator-commands.ts +13 -38
  87. package/lib/tools/fs-commands.ts +3 -1
  88. package/lib/tools/general-commands.ts +6 -13
  89. package/lib/tools/keyboard-commands.ts +2 -1
  90. package/lib/tools/lockmgmt.ts +12 -42
  91. package/lib/tools/logcat-commands.ts +1 -1
  92. package/lib/tools/network-commands.ts +4 -11
  93. package/lib/tools/process-commands.ts +4 -11
  94. package/lib/tools/system-calls.ts +59 -137
  95. package/lib/tools/types.ts +4 -8
  96. package/lib/utils/helpers/index.ts +1 -6
  97. package/lib/utils/helpers/install.ts +2 -4
  98. package/lib/utils/helpers/manifest.ts +4 -11
  99. package/lib/utils/helpers/resource.ts +5 -9
  100. package/lib/utils/helpers/sdk.ts +5 -9
  101. package/lib/utils/index.ts +2 -1
  102. package/lib/utils/lodash/core.ts +3 -9
  103. package/package.json +36 -50
@@ -1,6 +1,7 @@
1
- import {fs, system, util} from '@appium/support';
2
1
  import path from 'node:path';
3
2
 
3
+ import {fs, system, util} from '@appium/support';
4
+
4
5
  /**
5
6
  * Gets Android SDK root from environment variables.
6
7
  *
@@ -18,17 +19,12 @@ export function getSdkRootFromEnv(): string | undefined {
18
19
  */
19
20
  export async function requireSdkRoot(customRoot: string | null = null): Promise<string> {
20
21
  const sdkRoot = customRoot || getSdkRootFromEnv();
21
- const docMsg =
22
- 'Read https://developer.android.com/studio/command-line/variables for more details';
22
+ const docMsg = 'Read https://developer.android.com/studio/command-line/variables for more details';
23
23
  if (!sdkRoot || util.isEmpty(sdkRoot)) {
24
- throw new Error(
25
- `Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. ${docMsg}`,
26
- );
24
+ throw new Error(`Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. ${docMsg}`);
27
25
  }
28
26
  if (!(await fs.exists(sdkRoot))) {
29
- throw new Error(
30
- `The Android SDK root folder '${sdkRoot}' does not exist on the local file system. ${docMsg}`,
31
- );
27
+ throw new Error(`The Android SDK root folder '${sdkRoot}' does not exist on the local file system. ${docMsg}`);
32
28
  }
33
29
 
34
30
  const stats = await fs.stat(sdkRoot);
@@ -1,6 +1,7 @@
1
+ import {util} from '@appium/support';
2
+
1
3
  import * as helpers from './helpers/index.js';
2
4
  import * as lodash from './lodash/index.js';
3
- import {util} from '@appium/support';
4
5
 
5
6
  export const APKS_EXTENSION = helpers.APKS_EXTENSION;
6
7
  export const APK_INSTALL_TIMEOUT = helpers.APK_INSTALL_TIMEOUT;
@@ -42,15 +42,9 @@ const _defaultsDeep = (target: AnyObject, ...sources: AnyObject[]): AnyObject =>
42
42
  return target;
43
43
  };
44
44
 
45
- export const intersectionWith = <T>(
46
- first: T[],
47
- second: T[],
48
- comparator: (left: T, right: T) => boolean,
49
- ): T[] => first.filter((item) => second.some((other) => comparator(item, other)));
50
- export const zip = <A, B>(
51
- arrA: readonly A[],
52
- arrB: readonly B[],
53
- ): Array<[A | undefined, B | undefined]> => {
45
+ export const intersectionWith = <T>(first: T[], second: T[], comparator: (left: T, right: T) => boolean): T[] =>
46
+ first.filter((item) => second.some((other) => comparator(item, other)));
47
+ export const zip = <A, B>(arrA: readonly A[], arrB: readonly B[]): Array<[A | undefined, B | undefined]> => {
54
48
  const length = Math.max(arrA.length, arrB.length);
55
49
  return Array.from({length}, (_, idx) => [arrA[idx], arrB[idx]]);
56
50
  };
package/package.json CHANGED
@@ -1,50 +1,50 @@
1
1
  {
2
2
  "name": "appium-adb",
3
- "version": "16.0.0",
3
+ "version": "16.0.2",
4
4
  "description": "Android Debug Bridge interface",
5
- "main": "./build/lib/index.js",
6
- "scripts": {
7
- "build": "tsc -b",
8
- "clean": "npm run build -- --clean",
9
- "dev": "npm run build -- --watch",
10
- "lint": "eslint .",
11
- "lint:fix": "npm run lint -- --fix",
12
- "prepare": "npm run rebuild",
13
- "rebuild": "npm run clean && npm run build",
14
- "format": "prettier -w ./lib ./test",
15
- "format:check": "prettier --check ./lib ./test",
16
- "test": "node --enable-source-maps --test --test-force-exit --test-timeout=60000 \"./build/test/unit/**/*.spec.js\"",
17
- "e2e-test": "node --enable-source-maps --test --test-force-exit --test-concurrency=1 --test-timeout=300000 \"./build/test/functional/**/*.spec.js\""
5
+ "homepage": "https://github.com/appium/appium-adb",
6
+ "bugs": {
7
+ "url": "https://github.com/appium/appium-adb/issues"
18
8
  },
9
+ "license": "Apache-2.0",
10
+ "author": "Appium Contributors",
19
11
  "repository": {
20
12
  "type": "git",
21
13
  "url": "https://github.com/appium/appium-adb.git"
22
14
  },
23
- "author": "Appium Contributors",
24
- "license": "Apache-2.0",
25
- "bugs": {
26
- "url": "https://github.com/appium/appium-adb/issues"
27
- },
28
- "engines": {
29
- "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
30
- "npm": ">=10"
31
- },
32
15
  "bin": {},
33
16
  "directories": {
34
17
  "lib": "lib"
35
18
  },
36
- "prettier": {
37
- "bracketSpacing": false,
38
- "printWidth": 100,
39
- "singleQuote": true
40
- },
41
19
  "files": [
42
20
  "keys",
43
21
  "lib",
44
22
  "build/lib",
45
23
  "CHANGELOG.md"
46
24
  ],
47
- "homepage": "https://github.com/appium/appium-adb",
25
+ "type": "module",
26
+ "main": "./build/lib/index.js",
27
+ "types": "./build/lib/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./build/lib/index.d.ts",
31
+ "import": "./build/lib/index.js"
32
+ },
33
+ "./package.json": "./package.json"
34
+ },
35
+ "scripts": {
36
+ "build": "tsc -b",
37
+ "clean": "npm run build -- --clean",
38
+ "dev": "npm run build -- --watch",
39
+ "lint": "oxlint -c oxlint.config.mjs .",
40
+ "lint:fix": "oxlint -c oxlint.config.mjs --fix .",
41
+ "prepare": "npm run rebuild",
42
+ "rebuild": "npm run clean && npm run build",
43
+ "format": "oxfmt -c oxfmt.config.mjs .",
44
+ "format:check": "oxfmt -c oxfmt.config.mjs --check .",
45
+ "test": "node --enable-source-maps --test --test-force-exit --test-timeout=60000 \"./build/test/unit/**/*.spec.js\"",
46
+ "e2e-test": "node --enable-source-maps --test --test-force-exit --test-concurrency=1 --test-timeout=300000 \"./build/test/functional/**/*.spec.js\""
47
+ },
48
48
  "dependencies": {
49
49
  "@appium/support": "^7.2.2",
50
50
  "async-lock": "^1.0.0",
@@ -55,34 +55,20 @@
55
55
  "teen_process": "^4.0.4"
56
56
  },
57
57
  "devDependencies": {
58
- "@appium/eslint-config-appium-ts": "^3.0.0",
59
- "@appium/tsconfig": "^1.0.0-rc.1",
58
+ "@appium/oxc-config": "^1.1.0",
59
+ "@appium/semantic-release-config": "^1.1.0",
60
+ "@appium/tsconfig": "^1.2.0",
60
61
  "@appium/types": "^1.0.0-rc.1",
61
- "@semantic-release/changelog": "^6.0.1",
62
- "@semantic-release/git": "^10.0.1",
63
62
  "@types/async-lock": "^1.4.0",
64
- "@types/chai": "^5.2.3",
65
- "@types/chai-as-promised": "^8.0.2",
66
63
  "@types/ini": "^4.1.0",
67
64
  "@types/node": "^26.0.0",
68
65
  "@types/semver": "^7.5.0",
69
66
  "@types/sinon": "^22.0.0",
70
- "chai": "^6.0.0",
71
- "chai-as-promised": "^8.0.0",
72
- "conventional-changelog-conventionalcommits": "^9.3.1",
73
67
  "esmock": "^2.7.6",
74
- "prettier": "^3.0.0",
75
- "semantic-release": "^25.0.2",
76
- "sinon": "^22.0.0",
77
- "typescript": "^6.0.2"
68
+ "sinon": "^22.0.0"
78
69
  },
79
- "types": "./build/lib/index.d.ts",
80
- "type": "module",
81
- "exports": {
82
- ".": {
83
- "types": "./build/lib/index.d.ts",
84
- "import": "./build/lib/index.js"
85
- },
86
- "./package.json": "./package.json"
70
+ "engines": {
71
+ "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
72
+ "npm": ">=10"
87
73
  }
88
74
  }