appium-uiautomator2-driver 7.2.3 → 7.4.0

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 (66) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/app-management.d.ts.map +1 -1
  3. package/build/lib/commands/app-management.js +1 -5
  4. package/build/lib/commands/app-management.js.map +1 -1
  5. package/build/lib/commands/element.d.ts.map +1 -1
  6. package/build/lib/commands/element.js +2 -6
  7. package/build/lib/commands/element.js.map +1 -1
  8. package/build/lib/commands/gestures.d.ts.map +1 -1
  9. package/build/lib/commands/gestures.js +2 -6
  10. package/build/lib/commands/gestures.js.map +1 -1
  11. package/build/lib/commands/keyboard.d.ts.map +1 -1
  12. package/build/lib/commands/keyboard.js +0 -8
  13. package/build/lib/commands/keyboard.js.map +1 -1
  14. package/build/lib/commands/screenshot.js +7 -8
  15. package/build/lib/commands/screenshot.js.map +1 -1
  16. package/build/lib/commands/types.d.ts +1 -1
  17. package/build/lib/commands/types.d.ts.map +1 -1
  18. package/build/lib/css-converter.js +9 -12
  19. package/build/lib/css-converter.js.map +1 -1
  20. package/build/lib/driver.d.ts +31 -30
  21. package/build/lib/driver.d.ts.map +1 -1
  22. package/build/lib/driver.js +72 -43
  23. package/build/lib/driver.js.map +1 -1
  24. package/build/lib/uiautomator2.d.ts.map +1 -1
  25. package/build/lib/uiautomator2.js +1 -2
  26. package/build/lib/uiautomator2.js.map +1 -1
  27. package/build/lib/{helpers.d.ts → utils/app.d.ts} +1 -1
  28. package/build/lib/utils/app.d.ts.map +1 -0
  29. package/build/lib/{helpers.js → utils/app.js} +1 -1
  30. package/build/lib/utils/app.js.map +1 -0
  31. package/build/lib/utils/index.d.ts +5 -0
  32. package/build/lib/utils/index.d.ts.map +1 -0
  33. package/build/lib/utils/index.js +21 -0
  34. package/build/lib/utils/index.js.map +1 -0
  35. package/build/lib/utils/lang.d.ts +15 -0
  36. package/build/lib/utils/lang.d.ts.map +1 -0
  37. package/build/lib/utils/lang.js +37 -0
  38. package/build/lib/utils/lang.js.map +1 -0
  39. package/build/lib/utils/memoize.d.ts +11 -0
  40. package/build/lib/utils/memoize.d.ts.map +1 -0
  41. package/build/lib/utils/memoize.js +26 -0
  42. package/build/lib/utils/memoize.js.map +1 -0
  43. package/build/lib/utils/object.d.ts +6 -0
  44. package/build/lib/utils/object.d.ts.map +1 -0
  45. package/build/lib/utils/object.js +15 -0
  46. package/build/lib/utils/object.js.map +1 -0
  47. package/lib/commands/app-management.ts +1 -2
  48. package/lib/commands/element.ts +2 -3
  49. package/lib/commands/gestures.ts +2 -3
  50. package/lib/commands/keyboard.ts +0 -5
  51. package/lib/commands/screenshot.ts +7 -7
  52. package/lib/commands/types.ts +1 -1
  53. package/lib/constraints.ts +1 -1
  54. package/lib/css-converter.ts +9 -9
  55. package/lib/driver.ts +124 -91
  56. package/lib/execute-method-map.ts +1 -1
  57. package/lib/uiautomator2.ts +5 -6
  58. package/lib/utils/index.ts +4 -0
  59. package/lib/utils/lang.ts +34 -0
  60. package/lib/utils/memoize.ts +26 -0
  61. package/lib/utils/object.ts +14 -0
  62. package/npm-shrinkwrap.json +95 -29
  63. package/package.json +7 -5
  64. package/build/lib/helpers.d.ts.map +0 -1
  65. package/build/lib/helpers.js.map +0 -1
  66. /package/lib/{helpers.ts → utils/app.ts} +0 -0
@@ -1,22 +1,21 @@
1
1
  {
2
2
  "name": "appium-uiautomator2-driver",
3
- "version": "7.2.3",
3
+ "version": "7.4.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-uiautomator2-driver",
9
- "version": "7.2.3",
9
+ "version": "7.4.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "appium-adb": "^14.0.0",
13
13
  "appium-android-driver": "^13.1.1",
14
- "appium-uiautomator2-server": "^10.0.1",
14
+ "appium-uiautomator2-server": "^10.1.0",
15
15
  "asyncbox": "^6.0.1",
16
- "axios": "^1.13.5",
16
+ "axios": "^1.16.0",
17
17
  "css-selector-parser": "^3.0.0",
18
18
  "io.appium.settings": "^7.0.1",
19
- "lodash": "^4.17.4",
20
19
  "portscanner": "^2.2.0",
21
20
  "teen_process": "^4.0.4"
22
21
  },
@@ -28,11 +27,14 @@
28
27
  "@appium/types": "^1.0.0-rc.1",
29
28
  "@semantic-release/changelog": "^6.0.1",
30
29
  "@semantic-release/git": "^10.0.1",
31
- "@types/lodash": "^4.14.194",
30
+ "@types/chai": "^5.2.3",
31
+ "@types/chai-as-promised": "^8.0.2",
32
32
  "@types/mocha": "^10.0.1",
33
33
  "@types/node": "^25.0.3",
34
34
  "@types/portscanner": "^2.1.1",
35
35
  "@types/semver": "^7.5.0",
36
+ "@types/sinon": "^21.0.1",
37
+ "@types/unzipper": "^0.10.11",
36
38
  "@types/ws": "^8.5.4",
37
39
  "@xmldom/xmldom": "^0.x",
38
40
  "chai": "^6.0.0",
@@ -103,6 +105,17 @@
103
105
  "npm": ">=10"
104
106
  }
105
107
  },
108
+ "node_modules/@appium/base-driver/node_modules/axios": {
109
+ "version": "1.16.0",
110
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.0.tgz",
111
+ "integrity": "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==",
112
+ "license": "MIT",
113
+ "dependencies": {
114
+ "follow-redirects": "^1.16.0",
115
+ "form-data": "^4.0.5",
116
+ "proxy-from-env": "^2.1.0"
117
+ }
118
+ },
106
119
  "node_modules/@appium/docutils": {
107
120
  "version": "2.4.2",
108
121
  "resolved": "https://registry.npmjs.org/@appium/docutils/-/docutils-2.4.2.tgz",
@@ -220,6 +233,17 @@
220
233
  "npm": ">=10"
221
234
  }
222
235
  },
236
+ "node_modules/@appium/support/node_modules/axios": {
237
+ "version": "1.16.0",
238
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.0.tgz",
239
+ "integrity": "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==",
240
+ "license": "MIT",
241
+ "dependencies": {
242
+ "follow-redirects": "^1.16.0",
243
+ "form-data": "^4.0.5",
244
+ "proxy-from-env": "^2.1.0"
245
+ }
246
+ },
223
247
  "node_modules/@appium/tsconfig": {
224
248
  "version": "1.1.2",
225
249
  "resolved": "https://registry.npmjs.org/@appium/tsconfig/-/tsconfig-1.1.2.tgz",
@@ -491,6 +515,18 @@
491
515
  "node": ">= 0.6"
492
516
  }
493
517
  },
518
+ "node_modules/agent-base": {
519
+ "version": "6.0.2",
520
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
521
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
522
+ "license": "MIT",
523
+ "dependencies": {
524
+ "debug": "4"
525
+ },
526
+ "engines": {
527
+ "node": ">= 6.0.0"
528
+ }
529
+ },
494
530
  "node_modules/ansi-regex": {
495
531
  "version": "6.2.2",
496
532
  "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
@@ -568,19 +604,18 @@
568
604
  }
569
605
  },
570
606
  "node_modules/appium-chromedriver": {
571
- "version": "8.3.1",
572
- "resolved": "https://registry.npmjs.org/appium-chromedriver/-/appium-chromedriver-8.3.1.tgz",
573
- "integrity": "sha512-LJ4y94gMaWb8NMLWi8sGTQxVu2r4ePqboz0Xew13aTd/fNiQipYmqHoTAxwzZb5Zpw5Grwbr5fXAmDnipRZeoA==",
607
+ "version": "8.4.1",
608
+ "resolved": "https://registry.npmjs.org/appium-chromedriver/-/appium-chromedriver-8.4.1.tgz",
609
+ "integrity": "sha512-GGftJvpu2L6wJFNZ/WbRDhRZhP5AUchYoQnokDL0gLQVwsAcil/6AMPI1YUv+AJzjEnCtBSlGyTgSo+AuoeQ2A==",
574
610
  "license": "Apache-2.0",
575
611
  "dependencies": {
576
612
  "@appium/base-driver": "^10.0.0-rc.2",
577
- "@appium/support": "^7.0.0-rc.1",
613
+ "@appium/support": "^7.2.2",
578
614
  "@xmldom/xmldom": "^0.x",
579
615
  "appium-adb": "^14.0.0",
580
616
  "asyncbox": "^6.0.1",
581
- "axios": "^1.6.5",
617
+ "axios": "^1.16.0",
582
618
  "compare-versions": "^6.0.0",
583
- "lodash": "^4.17.4",
584
619
  "semver": "^7.0.0",
585
620
  "teen_process": "^4.0.4",
586
621
  "xpath": "^0.x"
@@ -591,9 +626,9 @@
591
626
  }
592
627
  },
593
628
  "node_modules/appium-uiautomator2-server": {
594
- "version": "10.0.1",
595
- "resolved": "https://registry.npmjs.org/appium-uiautomator2-server/-/appium-uiautomator2-server-10.0.1.tgz",
596
- "integrity": "sha512-DJlF+loUOEoiSs1n3kgl+OsExulisXJJXHg9w90E11DxaIXpZIifs3D7yDjVDBSw8Vcy0ccDcc331OtS7+ZBpg==",
629
+ "version": "10.1.0",
630
+ "resolved": "https://registry.npmjs.org/appium-uiautomator2-server/-/appium-uiautomator2-server-10.1.0.tgz",
631
+ "integrity": "sha512-4YvWcyTTn1UtWvB3giNtGCo0yaji2c+7mcDwsOyk6dMoQ1JO0noxJ3rqpqTD7Kq14cXGcuR2OXwaVz5RGruXFg==",
597
632
  "license": "Apache-2.0",
598
633
  "engines": {
599
634
  "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
@@ -748,13 +783,14 @@
748
783
  "license": "MIT"
749
784
  },
750
785
  "node_modules/axios": {
751
- "version": "1.16.0",
752
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.0.tgz",
753
- "integrity": "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==",
786
+ "version": "1.16.1",
787
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.1.tgz",
788
+ "integrity": "sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A==",
754
789
  "license": "MIT",
755
790
  "dependencies": {
756
791
  "follow-redirects": "^1.16.0",
757
792
  "form-data": "^4.0.5",
793
+ "https-proxy-agent": "^5.0.1",
758
794
  "proxy-from-env": "^2.1.0"
759
795
  }
760
796
  },
@@ -782,9 +818,9 @@
782
818
  }
783
819
  },
784
820
  "node_modules/bare-events": {
785
- "version": "2.8.2",
786
- "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz",
787
- "integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==",
821
+ "version": "2.8.3",
822
+ "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.3.tgz",
823
+ "integrity": "sha512-HdUm8EMQBLaJvGUdidNNbqpA1kYkwNcb+MYxkxCLAPJGQzlv9J0C24h8V65Z4c5GLd/JEALDvpFCQgpLJqc0zw==",
788
824
  "license": "Apache-2.0",
789
825
  "peerDependencies": {
790
826
  "bare-abort-controller": "*"
@@ -2003,6 +2039,19 @@
2003
2039
  "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==",
2004
2040
  "license": "MIT"
2005
2041
  },
2042
+ "node_modules/https-proxy-agent": {
2043
+ "version": "5.0.1",
2044
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
2045
+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
2046
+ "license": "MIT",
2047
+ "dependencies": {
2048
+ "agent-base": "6",
2049
+ "debug": "4"
2050
+ },
2051
+ "engines": {
2052
+ "node": ">= 6"
2053
+ }
2054
+ },
2006
2055
  "node_modules/iconv-lite": {
2007
2056
  "version": "0.7.2",
2008
2057
  "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
@@ -2067,9 +2116,9 @@
2067
2116
  }
2068
2117
  },
2069
2118
  "node_modules/io.appium.settings": {
2070
- "version": "7.1.0",
2071
- "resolved": "https://registry.npmjs.org/io.appium.settings/-/io.appium.settings-7.1.0.tgz",
2072
- "integrity": "sha512-UoMBFRp2oDth68blFx68IDqF8fJjnJdpQoeJMAKQZpus8/8HN3Jb4aR2Zk5SpFh5ii6Pk+4Z/qCl9/ESIw4e8A==",
2119
+ "version": "7.1.1",
2120
+ "resolved": "https://registry.npmjs.org/io.appium.settings/-/io.appium.settings-7.1.1.tgz",
2121
+ "integrity": "sha512-C4iA0a50jGwUuUSwk+Gu0oXKHBur5XZHn20+cHMgtlscrAl+K+7JyySuUzkpxq9MDjRsQD309c89k95MpcNgDw==",
2073
2122
  "license": "Apache-2.0",
2074
2123
  "dependencies": {
2075
2124
  "@appium/logger": "^2.0.0-rc.1",
@@ -3622,17 +3671,34 @@
3622
3671
  }
3623
3672
  },
3624
3673
  "node_modules/type-is": {
3625
- "version": "2.0.1",
3626
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
3627
- "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
3674
+ "version": "2.1.0",
3675
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz",
3676
+ "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",
3628
3677
  "license": "MIT",
3629
3678
  "dependencies": {
3630
- "content-type": "^1.0.5",
3679
+ "content-type": "^2.0.0",
3631
3680
  "media-typer": "^1.1.0",
3632
3681
  "mime-types": "^3.0.0"
3633
3682
  },
3634
3683
  "engines": {
3635
- "node": ">= 0.6"
3684
+ "node": ">= 18"
3685
+ },
3686
+ "funding": {
3687
+ "type": "opencollective",
3688
+ "url": "https://opencollective.com/express"
3689
+ }
3690
+ },
3691
+ "node_modules/type-is/node_modules/content-type": {
3692
+ "version": "2.0.0",
3693
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",
3694
+ "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",
3695
+ "license": "MIT",
3696
+ "engines": {
3697
+ "node": ">=18"
3698
+ },
3699
+ "funding": {
3700
+ "type": "opencollective",
3701
+ "url": "https://opencollective.com/express"
3636
3702
  }
3637
3703
  },
3638
3704
  "node_modules/unicorn-magic": {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "automated testing",
8
8
  "android"
9
9
  ],
10
- "version": "7.2.3",
10
+ "version": "7.4.0",
11
11
  "bugs": {
12
12
  "url": "https://github.com/appium/appium-uiautomator2-driver/issues"
13
13
  },
@@ -58,12 +58,11 @@
58
58
  "dependencies": {
59
59
  "appium-adb": "^14.0.0",
60
60
  "appium-android-driver": "^13.1.1",
61
- "appium-uiautomator2-server": "^10.0.1",
61
+ "appium-uiautomator2-server": "^10.1.0",
62
62
  "asyncbox": "^6.0.1",
63
- "axios": "^1.13.5",
63
+ "axios": "^1.16.0",
64
64
  "css-selector-parser": "^3.0.0",
65
65
  "io.appium.settings": "^7.0.1",
66
- "lodash": "^4.17.4",
67
66
  "portscanner": "^2.2.0",
68
67
  "teen_process": "^4.0.4"
69
68
  },
@@ -75,11 +74,14 @@
75
74
  "@appium/types": "^1.0.0-rc.1",
76
75
  "@semantic-release/changelog": "^6.0.1",
77
76
  "@semantic-release/git": "^10.0.1",
78
- "@types/lodash": "^4.14.194",
77
+ "@types/chai": "^5.2.3",
78
+ "@types/chai-as-promised": "^8.0.2",
79
79
  "@types/mocha": "^10.0.1",
80
80
  "@types/node": "^25.0.3",
81
81
  "@types/portscanner": "^2.1.1",
82
82
  "@types/semver": "^7.5.0",
83
+ "@types/sinon": "^21.0.1",
84
+ "@types/unzipper": "^0.10.11",
83
85
  "@types/ws": "^8.5.4",
84
86
  "@xmldom/xmldom": "^0.x",
85
87
  "chai": "^6.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,YAAY,CAAC;AAGpC;;;GAGG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAcpE;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAStE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":";;;;;AAQA,kCAcC;AAQD,0BASC;AAvCD,0DAA6B;AAE7B,4CAA0C;AAE1C;;;GAGG;AACI,KAAK,UAAU,WAAW,CAAC,QAAgB;IAChD,IAAI,CAAC;QACH,MAAM,YAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,gBAAM,CAAC,SAAS,EAAE,EAAE,CAAC;YACvB,0DAA0D;YAC1D,6DAA6D;YAC7D,8EAA8E;YAC9E,mBAAmB;YACnB,MAAM,YAAE,CAAC,KAAK,CAAC,MAAM,YAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,OAAO,CAAC,GAAQ,EAAE,OAAe;IACrD,IAAI,CAAC,CAAC,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CACb,uBAAuB,OAAO,sBAAsB;YAClD,wEAAwE,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;YACjG,0DAA0D,CAC7D,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1B,CAAC"}
File without changes