appium-espresso-driver 7.1.1 → 7.2.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [7.2.0](https://github.com/appium/appium-espresso-driver/compare/v7.1.2...v7.2.0) (2026-04-08)
2
+
3
+ ### Features
4
+
5
+ * Migrate scripts to mjs/ESM format ([#1149](https://github.com/appium/appium-espresso-driver/issues/1149)) ([cffd424](https://github.com/appium/appium-espresso-driver/commit/cffd424917938f83beaea2752ccd9fd73ab67d3f))
6
+
7
+ ## [7.1.2](https://github.com/appium/appium-espresso-driver/compare/v7.1.1...v7.1.2) (2026-04-08)
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * Make wdio dependency more flexible ([e53646d](https://github.com/appium/appium-espresso-driver/commit/e53646d83a62e135fcca4a2287986ab94d55f5f8))
12
+
1
13
  ## [7.1.1](https://github.com/appium/appium-espresso-driver/compare/v7.1.0...v7.1.1) (2026-03-25)
2
14
 
3
15
  ### Miscellaneous Chores
@@ -2,6 +2,6 @@ package io.appium.espressoserver.lib.helpers
2
2
 
3
3
  // This value is updated automatically by the NPM versioning script
4
4
  // It should be in sync with the NPM module version from package.json
5
- private const val VERSION = "7.1.1"
5
+ private const val VERSION = "7.2.0"
6
6
 
7
7
  fun getEspressoServerVersion() = VERSION
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "appium-espresso-driver",
3
- "version": "7.1.1",
3
+ "version": "7.2.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-espresso-driver",
9
- "version": "7.1.1",
9
+ "version": "7.2.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "appium-adb": "^14.0.0",
@@ -14,6 +14,7 @@
14
14
  "asyncbox": "^6.1.0",
15
15
  "axios": "^1.12.2",
16
16
  "bluebird": "^3.5.0",
17
+ "commander": "^14.0.1",
17
18
  "io.appium.settings": "^7.0.1",
18
19
  "lodash": "^4.17.11",
19
20
  "portscanner": "^2.2.0",
@@ -46,7 +47,7 @@
46
47
  "sinon": "^21.0.0",
47
48
  "ts-node": "^10.9.1",
48
49
  "typescript": "^5.4.2",
49
- "webdriverio": "9.26.0",
50
+ "webdriverio": "^9.26.0",
50
51
  "xpath": "^0.x"
51
52
  },
52
53
  "engines": {
@@ -90,6 +91,29 @@
90
91
  "spdy": "4.0.2"
91
92
  }
92
93
  },
94
+ "node_modules/@appium/base-driver/node_modules/axios": {
95
+ "version": "1.13.6",
96
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz",
97
+ "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==",
98
+ "license": "MIT",
99
+ "dependencies": {
100
+ "follow-redirects": "^1.15.11",
101
+ "form-data": "^4.0.5",
102
+ "proxy-from-env": "^1.1.0"
103
+ }
104
+ },
105
+ "node_modules/@appium/base-driver/node_modules/lodash": {
106
+ "version": "4.17.23",
107
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
108
+ "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
109
+ "license": "MIT"
110
+ },
111
+ "node_modules/@appium/base-driver/node_modules/proxy-from-env": {
112
+ "version": "1.1.0",
113
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
114
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
115
+ "license": "MIT"
116
+ },
93
117
  "node_modules/@appium/logger": {
94
118
  "version": "2.0.5",
95
119
  "resolved": "https://registry.npmjs.org/@appium/logger/-/logger-2.0.5.tgz",
@@ -106,6 +130,12 @@
106
130
  "npm": ">=10"
107
131
  }
108
132
  },
133
+ "node_modules/@appium/logger/node_modules/lodash": {
134
+ "version": "4.17.23",
135
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
136
+ "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
137
+ "license": "MIT"
138
+ },
109
139
  "node_modules/@appium/schema": {
110
140
  "version": "1.1.0",
111
141
  "resolved": "https://registry.npmjs.org/@appium/schema/-/schema-1.1.0.tgz",
@@ -168,6 +198,29 @@
168
198
  "sharp": "0.34.5"
169
199
  }
170
200
  },
201
+ "node_modules/@appium/support/node_modules/axios": {
202
+ "version": "1.13.6",
203
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz",
204
+ "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==",
205
+ "license": "MIT",
206
+ "dependencies": {
207
+ "follow-redirects": "^1.15.11",
208
+ "form-data": "^4.0.5",
209
+ "proxy-from-env": "^1.1.0"
210
+ }
211
+ },
212
+ "node_modules/@appium/support/node_modules/lodash": {
213
+ "version": "4.17.23",
214
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
215
+ "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
216
+ "license": "MIT"
217
+ },
218
+ "node_modules/@appium/support/node_modules/proxy-from-env": {
219
+ "version": "1.1.0",
220
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
221
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
222
+ "license": "MIT"
223
+ },
171
224
  "node_modules/@appium/support/node_modules/teen_process": {
172
225
  "version": "4.0.10",
173
226
  "resolved": "https://registry.npmjs.org/teen_process/-/teen_process-4.0.10.tgz",
@@ -244,9 +297,9 @@
244
297
  }
245
298
  },
246
299
  "node_modules/@emnapi/runtime": {
247
- "version": "1.9.1",
248
- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.1.tgz",
249
- "integrity": "sha512-VYi5+ZVLhpgK4hQ0TAjiQiZ6ol0oe4mBx7mVv7IflsiEp0OWoVsp/+f9Vc1hOhE0TtkORVrI1GvzyreqpgWtkA==",
300
+ "version": "1.9.2",
301
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.2.tgz",
302
+ "integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==",
250
303
  "extraneous": true,
251
304
  "license": "MIT",
252
305
  "dependencies": {
@@ -270,6 +323,9 @@
270
323
  "cpu": [
271
324
  "x64"
272
325
  ],
326
+ "libc": [
327
+ "glibc"
328
+ ],
273
329
  "license": "LGPL-3.0-or-later",
274
330
  "optional": true,
275
331
  "os": [
@@ -286,6 +342,9 @@
286
342
  "cpu": [
287
343
  "x64"
288
344
  ],
345
+ "libc": [
346
+ "glibc"
347
+ ],
289
348
  "license": "Apache-2.0",
290
349
  "optional": true,
291
350
  "os": [
@@ -414,12 +473,12 @@
414
473
  "license": "MIT"
415
474
  },
416
475
  "node_modules/@xmldom/xmldom": {
417
- "version": "0.8.11",
418
- "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
419
- "integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
476
+ "version": "0.9.9",
477
+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.9.tgz",
478
+ "integrity": "sha512-qycIHAucxy/LXAYIjmLmtQ8q9GPnMbnjG1KXhWm9o5sCr6pOYDATkMPiTNa6/v8eELyqOQ2FsEqeoFYmgv/gJg==",
420
479
  "license": "MIT",
421
480
  "engines": {
422
- "node": ">=10.0.0"
481
+ "node": ">=14.6"
423
482
  }
424
483
  },
425
484
  "node_modules/abort-controller": {
@@ -475,9 +534,9 @@
475
534
  }
476
535
  },
477
536
  "node_modules/appium-adb": {
478
- "version": "14.3.0",
479
- "resolved": "https://registry.npmjs.org/appium-adb/-/appium-adb-14.3.0.tgz",
480
- "integrity": "sha512-S1ZKK3R/nRlTMML+G5QliomDtbIYOxna6jOfJeX6X1fvN5Kg4dJo8GQW0+4Y6zHTA5cURWGiDpju+L7ohmJj6Q==",
537
+ "version": "14.3.1",
538
+ "resolved": "https://registry.npmjs.org/appium-adb/-/appium-adb-14.3.1.tgz",
539
+ "integrity": "sha512-Pv9Ti0jji0Q0QewBJfjPiECV5IO6ex5qK6YugZknxxjJ5QadLDjt/FW6z4/THGAQJdbYriwqrxTqLxB6+DwqBA==",
481
540
  "license": "Apache-2.0",
482
541
  "dependencies": {
483
542
  "@appium/support": "^7.0.0-rc.1",
@@ -527,9 +586,9 @@
527
586
  }
528
587
  },
529
588
  "node_modules/appium-chromedriver": {
530
- "version": "8.2.20",
531
- "resolved": "https://registry.npmjs.org/appium-chromedriver/-/appium-chromedriver-8.2.20.tgz",
532
- "integrity": "sha512-w9QVgn9EmQjmw30hgIRVwn5+iGwxJZDojl/pTt2bjBXugsw746ESH34WxqjI6hmdlLWt34+pukvTXCmnJ+DWxA==",
589
+ "version": "8.2.24",
590
+ "resolved": "https://registry.npmjs.org/appium-chromedriver/-/appium-chromedriver-8.2.24.tgz",
591
+ "integrity": "sha512-F7On2aGnzaBCo9AyyxmMDC6KPoNDA93EfGfkuru3rcrQA5UrRXvD3nidNsspbwF+7oQrTDm03EgUx1zkdVhbFw==",
533
592
  "license": "Apache-2.0",
534
593
  "dependencies": {
535
594
  "@appium/base-driver": "^10.0.0-rc.2",
@@ -587,9 +646,9 @@
587
646
  }
588
647
  },
589
648
  "node_modules/archiver-utils/node_modules/brace-expansion": {
590
- "version": "2.0.2",
591
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
592
- "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
649
+ "version": "2.0.3",
650
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz",
651
+ "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==",
593
652
  "license": "MIT",
594
653
  "dependencies": {
595
654
  "balanced-match": "^1.0.0"
@@ -692,14 +751,14 @@
692
751
  "license": "MIT"
693
752
  },
694
753
  "node_modules/axios": {
695
- "version": "1.13.6",
696
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz",
697
- "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==",
754
+ "version": "1.14.0",
755
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.14.0.tgz",
756
+ "integrity": "sha512-3Y8yrqLSwjuzpXuZ0oIYZ/XGgLwUIBU3uLvbcpb0pidD9ctpShJd43KSlEEkVQg6DS0G9NKyzOvBfUtDKEyHvQ==",
698
757
  "license": "MIT",
699
758
  "dependencies": {
700
759
  "follow-redirects": "^1.15.11",
701
760
  "form-data": "^4.0.5",
702
- "proxy-from-env": "^1.1.0"
761
+ "proxy-from-env": "^2.1.0"
703
762
  }
704
763
  },
705
764
  "node_modules/b4a": {
@@ -737,9 +796,9 @@
737
796
  }
738
797
  },
739
798
  "node_modules/bare-fs": {
740
- "version": "4.5.6",
741
- "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.5.6.tgz",
742
- "integrity": "sha512-1QovqDrR80Pmt5HPAsMsXTCFcDYr+NSUKW6nd6WO5v0JBmnItc/irNRzm2KOQ5oZ69P37y+AMujNyNtG+1Rggw==",
799
+ "version": "4.6.0",
800
+ "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.6.0.tgz",
801
+ "integrity": "sha512-2YkS7NuiJceSEbyEOdSNLE9tsGd+f4+f7C+Nik/MCk27SYdwIMPT/yRKvg++FZhQXgk0KWJKJyXX9RhVV0RGqA==",
743
802
  "license": "Apache-2.0",
744
803
  "dependencies": {
745
804
  "bare-events": "^2.5.4",
@@ -761,9 +820,9 @@
761
820
  }
762
821
  },
763
822
  "node_modules/bare-os": {
764
- "version": "3.8.0",
765
- "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.8.0.tgz",
766
- "integrity": "sha512-Dc9/SlwfxkXIGYhvMQNUtKaXCaGkZYGcd1vuNUUADVqzu4/vQfvnMkYYOUnt2VwQ2AqKr/8qAVFRtwETljgeFg==",
823
+ "version": "3.8.7",
824
+ "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.8.7.tgz",
825
+ "integrity": "sha512-G4Gr1UsGeEy2qtDTZwL7JFLo2wapUarz7iTMcYcMFdS89AIQuBoyjgXZz0Utv7uHs3xA9LckhVbeBi8lEQrC+w==",
767
826
  "license": "Apache-2.0",
768
827
  "engines": {
769
828
  "bare": ">=1.14.0"
@@ -779,19 +838,23 @@
779
838
  }
780
839
  },
781
840
  "node_modules/bare-stream": {
782
- "version": "2.10.0",
783
- "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.10.0.tgz",
784
- "integrity": "sha512-DOPZF/DDcDruKDA43cOw6e9Quq5daua7ygcAwJE/pKJsRWhgSSemi7qVNGE5kyDIxIeN1533G/zfbvWX7Wcb9w==",
841
+ "version": "2.12.0",
842
+ "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.12.0.tgz",
843
+ "integrity": "sha512-w28i8lkBgREV3rPXGbgK+BO66q+ZpKqRWrZLiCdmmUlLPrQ45CzkvRhN+7lnv00Gpi2zy5naRxnUFAxCECDm9g==",
785
844
  "license": "Apache-2.0",
786
845
  "dependencies": {
787
846
  "streamx": "^2.25.0",
788
847
  "teex": "^1.0.1"
789
848
  },
790
849
  "peerDependencies": {
850
+ "bare-abort-controller": "*",
791
851
  "bare-buffer": "*",
792
852
  "bare-events": "*"
793
853
  },
794
854
  "peerDependenciesMeta": {
855
+ "bare-abort-controller": {
856
+ "optional": true
857
+ },
795
858
  "bare-buffer": {
796
859
  "optional": true
797
860
  },
@@ -1070,6 +1133,15 @@
1070
1133
  "node": ">= 0.8"
1071
1134
  }
1072
1135
  },
1136
+ "node_modules/commander": {
1137
+ "version": "14.0.3",
1138
+ "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",
1139
+ "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==",
1140
+ "license": "MIT",
1141
+ "engines": {
1142
+ "node": ">=20"
1143
+ }
1144
+ },
1073
1145
  "node_modules/compare-versions": {
1074
1146
  "version": "6.1.1",
1075
1147
  "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz",
@@ -1099,9 +1171,9 @@
1099
1171
  "license": "ISC"
1100
1172
  },
1101
1173
  "node_modules/content-disposition": {
1102
- "version": "1.0.1",
1103
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
1104
- "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
1174
+ "version": "1.1.0",
1175
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",
1176
+ "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",
1105
1177
  "license": "MIT",
1106
1178
  "engines": {
1107
1179
  "node": ">=18"
@@ -1775,12 +1847,12 @@
1775
1847
  }
1776
1848
  },
1777
1849
  "node_modules/glob/node_modules/minimatch": {
1778
- "version": "10.2.4",
1779
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",
1780
- "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",
1850
+ "version": "10.2.5",
1851
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
1852
+ "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
1781
1853
  "license": "BlueOak-1.0.0",
1782
1854
  "dependencies": {
1783
- "brace-expansion": "^5.0.2"
1855
+ "brace-expansion": "^5.0.5"
1784
1856
  },
1785
1857
  "engines": {
1786
1858
  "node": "18 || 20 || >=22"
@@ -2208,9 +2280,9 @@
2208
2280
  }
2209
2281
  },
2210
2282
  "node_modules/lodash": {
2211
- "version": "4.17.23",
2212
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
2213
- "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
2283
+ "version": "4.18.1",
2284
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
2285
+ "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
2214
2286
  "license": "MIT"
2215
2287
  },
2216
2288
  "node_modules/lodash.isfinite": {
@@ -2683,6 +2755,15 @@
2683
2755
  "node": ">=10.4.0"
2684
2756
  }
2685
2757
  },
2758
+ "node_modules/plist/node_modules/@xmldom/xmldom": {
2759
+ "version": "0.8.12",
2760
+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.12.tgz",
2761
+ "integrity": "sha512-9k/gHF6n/pAi/9tqr3m3aqkuiNosYTurLLUtc7xQ9sxB/wm7WPygCv8GYa6mS0fLJEHhqMC1ATYhz++U/lRHqg==",
2762
+ "license": "MIT",
2763
+ "engines": {
2764
+ "node": ">=10.0.0"
2765
+ }
2766
+ },
2686
2767
  "node_modules/pluralize": {
2687
2768
  "version": "8.0.0",
2688
2769
  "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz",
@@ -2744,10 +2825,13 @@
2744
2825
  }
2745
2826
  },
2746
2827
  "node_modules/proxy-from-env": {
2747
- "version": "1.1.0",
2748
- "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
2749
- "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
2750
- "license": "MIT"
2828
+ "version": "2.1.0",
2829
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz",
2830
+ "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==",
2831
+ "license": "MIT",
2832
+ "engines": {
2833
+ "node": ">=10"
2834
+ }
2751
2835
  },
2752
2836
  "node_modules/qs": {
2753
2837
  "version": "6.15.0",
@@ -2857,9 +2941,9 @@
2857
2941
  }
2858
2942
  },
2859
2943
  "node_modules/readdir-glob/node_modules/brace-expansion": {
2860
- "version": "2.0.2",
2861
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
2862
- "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
2944
+ "version": "2.0.3",
2945
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz",
2946
+ "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==",
2863
2947
  "license": "MIT",
2864
2948
  "dependencies": {
2865
2949
  "balanced-match": "^1.0.0"
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "automated testing",
8
8
  "android"
9
9
  ],
10
- "version": "7.1.1",
10
+ "version": "7.2.0",
11
11
  "author": "Appium Contributors",
12
12
  "license": "Apache-2.0",
13
13
  "repository": {
@@ -34,8 +34,8 @@
34
34
  ],
35
35
  "mainClass": "EspressoDriver",
36
36
  "scripts": {
37
- "print-espresso-path": "./scripts/print-espresso-path.js",
38
- "build-espresso": "./scripts/build-espresso.js"
37
+ "print-espresso-path": "./scripts/print-espresso-path.mjs",
38
+ "build-espresso": "./scripts/build-espresso.mjs"
39
39
  },
40
40
  "doctor": {
41
41
  "checks": [
@@ -78,6 +78,7 @@
78
78
  "asyncbox": "^6.1.0",
79
79
  "axios": "^1.12.2",
80
80
  "bluebird": "^3.5.0",
81
+ "commander": "^14.0.1",
81
82
  "io.appium.settings": "^7.0.1",
82
83
  "lodash": "^4.17.11",
83
84
  "portscanner": "^2.2.0",
@@ -100,7 +101,7 @@
100
101
  "format": "prettier -w ./lib ./test",
101
102
  "format:check": "prettier --check ./lib ./test",
102
103
  "prepare": "npm run rebuild",
103
- "sync-version": "node ./scripts/sync-version.js --package-version=${npm_package_version}",
104
+ "sync-version": "node ./scripts/sync-version.mjs --package-version=${npm_package_version}",
104
105
  "test": "npm run test:node",
105
106
  "test:node": "mocha --exit --timeout 1m \"./test/unit/**/*-specs.ts\"",
106
107
  "test:server": "cd espresso-server && ./gradlew test --stacktrace || cd ..",
@@ -136,7 +137,7 @@
136
137
  "semver": "^7.3.7",
137
138
  "ts-node": "^10.9.1",
138
139
  "typescript": "^5.4.2",
139
- "webdriverio": "9.26.0",
140
+ "webdriverio": "^9.26.0",
140
141
  "xpath": "^0.x"
141
142
  }
142
143
  }
@@ -0,0 +1,109 @@
1
+ import _ from 'lodash';
2
+ import path from 'node:path';
3
+ import {fileURLToPath} from 'node:url';
4
+ import {Command} from 'commander';
5
+ import {logger, fs} from 'appium/support.js';
6
+ import {ServerBuilder} from '../build/lib/server-builder.js';
7
+
8
+ const LOG = logger.getLogger('EspressoBuild');
9
+
10
+ const ROOT_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
11
+ const ESPRESSO_SERVER_ROOT = path.join(ROOT_DIR, 'espresso-server');
12
+ const ESPRESSO_SERVER_BUILD = path.join(ESPRESSO_SERVER_ROOT, 'app', 'build');
13
+
14
+ /**
15
+ * @param {BuildOptions} options
16
+ */
17
+ async function buildEspressoServer(options) {
18
+ LOG.info(`Building espresso server in '${ESPRESSO_SERVER_BUILD}'`);
19
+
20
+ const opts = {
21
+ serverPath: ESPRESSO_SERVER_ROOT,
22
+ showGradleLog: options.showGradleLog,
23
+ };
24
+
25
+ if (options.testAppPackage) {
26
+ opts.testAppPackage = options.testAppPackage;
27
+ }
28
+
29
+ if (options.buildConfig) {
30
+ if (!(await fs.exists(options.buildConfig))) {
31
+ throw new Error(
32
+ `Cannot find build config at '${options.buildConfig}'. Please provide a valid absolute path to it.`
33
+ );
34
+ }
35
+ try {
36
+ const buildConfigurationStr = await fs.readFile(options.buildConfig, 'utf8');
37
+ opts.buildConfiguration = JSON.parse(buildConfigurationStr);
38
+ LOG.info(`The espresso build config is ${JSON.stringify(opts.buildConfiguration)}`);
39
+ } catch (e) {
40
+ throw new Error(
41
+ `Failed to parse the build config at '${options.buildConfig}'. ` +
42
+ `Please make sure it is a valid JSON file.`, {cause: e}
43
+ );
44
+ }
45
+ }
46
+
47
+ const builder = new ServerBuilder(LOG, opts);
48
+ try {
49
+ await builder.build();
50
+ } catch (e) {
51
+ let errorMessage = `Failed to build the espresso server`;
52
+ if (!isGradleLogEnabled(options)) {
53
+ errorMessage += `. Set SHOW_GRADLE_LOG environment variable to true to check the gradle log.`;
54
+ }
55
+ throw new Error(errorMessage, {cause: e});
56
+ }
57
+
58
+ const dstPath = path.resolve(
59
+ ESPRESSO_SERVER_BUILD,
60
+ 'outputs',
61
+ 'apk',
62
+ 'androidTest',
63
+ 'debug',
64
+ 'app-debug-androidTest.apk',
65
+ );
66
+ if (await fs.exists(dstPath)) {
67
+ LOG.info(`Full path to the server APK: ${dstPath}`);
68
+ } else {
69
+ LOG.info(`Full path to the server build folder: ${ESPRESSO_SERVER_BUILD}`);
70
+ }
71
+ }
72
+
73
+ /**
74
+ * @param {BuildOptions} options
75
+ * @returns {boolean}
76
+ */
77
+ function isGradleLogEnabled(options) {
78
+ return Boolean(options.showGradleLog ||
79
+ !_.isEmpty(process.env.SHOW_GRADLE_LOG) && ['1', 'true'].includes(_.toLower(process.env.SHOW_GRADLE_LOG))
80
+ );
81
+ }
82
+
83
+ async function main() {
84
+ const program = new Command();
85
+ program
86
+ .name('appium driver run espresso build-espresso')
87
+ .description('Build the Espresso server APK')
88
+ .option('--show-gradle-log', 'Show Gradle logs during build')
89
+ .option('--test-app-package <package>', 'App package to target for test server build')
90
+ .option('--build-config <path>', 'Absolute path to a JSON build configuration file')
91
+ .action(async (options) => {
92
+ await buildEspressoServer({
93
+ showGradleLog: isGradleLogEnabled(options),
94
+ testAppPackage: options.testAppPackage ?? process.env.TEST_APP_PACKAGE,
95
+ buildConfig: options.buildConfig ?? process.env.ESPRESSO_BUILD_CONFIG,
96
+ });
97
+ });
98
+
99
+ await program.parseAsync(process.argv);
100
+ }
101
+
102
+ await main();
103
+
104
+ /**
105
+ * @typedef {Object} BuildOptions
106
+ * @property {boolean | undefined} showGradleLog
107
+ * @property {string | undefined} testAppPackage
108
+ * @property {string | undefined} buildConfig
109
+ */
@@ -0,0 +1,25 @@
1
+ import path from 'node:path';
2
+ import {fileURLToPath} from 'node:url';
3
+ import {Command} from 'commander';
4
+
5
+ /**
6
+ * @returns {void}
7
+ */
8
+ function printEspressoServerPath() {
9
+ const dstPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'espresso-server');
10
+ console.log(dstPath); // eslint-disable-line no-console
11
+ }
12
+
13
+ async function main() {
14
+ const program = new Command();
15
+ program
16
+ .name('appium driver run espresso print-espresso-path')
17
+ .description('Print the Espresso server path')
18
+ .action(() => {
19
+ printEspressoServerPath();
20
+ });
21
+
22
+ await program.parseAsync(process.argv);
23
+ }
24
+
25
+ await main();
@@ -0,0 +1,65 @@
1
+ import path from 'node:path';
2
+ import {fileURLToPath} from 'node:url';
3
+ import {Command} from 'commander';
4
+ import {logger, fs} from 'appium/support.js';
5
+ import semver from 'semver';
6
+
7
+ const LOG = logger.getLogger('VersionSync');
8
+
9
+ const ROOT_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
10
+ const ESPRESSO_SERVER_ROOT = path.join(ROOT_DIR, 'espresso-server');
11
+ const VERSION_FILE = path.join(
12
+ ESPRESSO_SERVER_ROOT,
13
+ 'library',
14
+ 'src',
15
+ 'main',
16
+ 'java',
17
+ 'io',
18
+ 'appium',
19
+ 'espressoserver',
20
+ 'lib',
21
+ 'helpers',
22
+ 'Version.kt'
23
+ );
24
+ const VERSION_PATTERN = /VERSION\s*=\s*"([0-9.]+)"/;
25
+
26
+ /**
27
+ * @param {string} packageVersion
28
+ * @returns {Promise<void>}
29
+ */
30
+ async function syncModuleVersion(packageVersion) {
31
+ const origContent = await fs.readFile(VERSION_FILE, 'utf8');
32
+ const espressoVersionMatch = VERSION_PATTERN.exec(origContent);
33
+ if (!espressoVersionMatch) {
34
+ throw new Error(`Could not parse Espresso module version from '${VERSION_FILE}'`);
35
+ }
36
+ const updatedContent = origContent.replace(espressoVersionMatch[1], packageVersion);
37
+ await fs.writeFile(VERSION_FILE, updatedContent, 'utf8');
38
+ LOG.info(`Synchronized module version '${packageVersion}' to '${VERSION_FILE}'`);
39
+ }
40
+
41
+ async function main() {
42
+ const program = new Command();
43
+ program
44
+ .name('node ./scripts/sync-version.mjs')
45
+ .description('Sync package version into Espresso server module source')
46
+ .requiredOption(
47
+ '--package-version <version>',
48
+ 'Package version to synchronize',
49
+ (value) => {
50
+ if (!semver.valid(value)) {
51
+ throw new Error(
52
+ `Invalid version specified '${value}'. The value must be a valid semver string like '1.2.3'`
53
+ );
54
+ }
55
+ return value;
56
+ }
57
+ )
58
+ .action(async (options) => {
59
+ await syncModuleVersion(options.packageVersion);
60
+ });
61
+
62
+ await program.parseAsync(process.argv);
63
+ }
64
+
65
+ await main();
@@ -1,56 +0,0 @@
1
- const _ = require('lodash');
2
- const path = require('node:path');
3
- const { logger, fs } = require('appium/support');
4
- const { ServerBuilder } = require('../build/lib/server-builder.js');
5
-
6
- const LOG = new logger.getLogger('EspressoBuild');
7
-
8
- const ROOT_DIR = path.resolve(__dirname, '..');
9
- const ESPRESSO_SERVER_ROOT = path.join(ROOT_DIR, 'espresso-server');
10
-
11
- const ESPRESSO_SERVER_BUILD = path.join(ESPRESSO_SERVER_ROOT, 'app', 'build');
12
-
13
- async function buildEspressoServer () {
14
-
15
- LOG.info(`Deleting the build directory ${ESPRESSO_SERVER_BUILD}`);
16
-
17
- const opts = {
18
- serverPath: ESPRESSO_SERVER_ROOT,
19
- showGradleLog: !_.isEmpty(process.env.SHOW_GRADLE_LOG) && ['1', 'true'].includes(_.toLower(process.env.SHOW_GRADLE_LOG))
20
- };
21
-
22
- if (process.env.TEST_APP_PACKAGE) {
23
- opts.testAppPackage = process.env.TEST_APP_PACKAGE;
24
- }
25
-
26
- if (process.env.ESPRESSO_BUILD_CONFIG) {
27
- if (!(await fs.exists(process.env.ESPRESSO_BUILD_CONFIG))) {
28
- throw new Error(`'${process.env.ESPRESSO_BUILD_CONFIG}' did not exist. Please set the path as an absolute path.`);
29
- }
30
- try {
31
- const buildConfigurationStr = await fs.readFile(process.env.ESPRESSO_BUILD_CONFIG, 'utf8');
32
- opts.buildConfiguration = JSON.parse(buildConfigurationStr);
33
- LOG.info(`The espresso build config is ${JSON.stringify(opts.buildConfiguration)}`);
34
- } catch (e) {
35
- throw new Error(`Failed to parse the ${process.env.ESPRESSO_BUILD_CONFIG}. ` +
36
- `Please make sure that the JSON is valid format. Error: ${e}`);
37
- }
38
- }
39
-
40
- const builder = new ServerBuilder(LOG, opts);
41
- try {
42
- await builder.build();
43
- } catch (e) {
44
- throw new Error(`Failed to build the espresso server. ` +
45
- `SHOW_GRADLE_LOG=true environment variable helps to check the gradle log. Error: ${e}`);
46
- }
47
-
48
- const dstPath = path.resolve(ESPRESSO_SERVER_ROOT, 'app', 'build', 'outputs', 'apk', 'androidTest', 'debug', 'app-debug-androidTest.apk');
49
- if (await fs.exists(dstPath)) {
50
- LOG.info(`Full path to the server APK: ${dstPath}`);
51
- } else {
52
- LOG.info(`Full path to the server build folder: ${ESPRESSO_SERVER_BUILD}`);
53
- }
54
- }
55
-
56
- (async () => await buildEspressoServer())();
@@ -1,8 +0,0 @@
1
- const path = require('node:path');
2
-
3
- function printEspressoServerPath () {
4
- const dstPath = path.resolve(__dirname, '..', 'espresso-server');
5
- console.log(dstPath); // eslint-disable-line no-console
6
- }
7
-
8
- printEspressoServerPath();
@@ -1,47 +0,0 @@
1
- const path = require('node:path');
2
- const { logger, fs } = require('appium/support');
3
- const semver = require('semver');
4
-
5
- const LOG = logger.getLogger('VersionSync');
6
-
7
- const ROOT_DIR = path.resolve(__dirname, '..');
8
- const ESPRESSO_SERVER_ROOT = path.join(ROOT_DIR, 'espresso-server');
9
- const VERSION_FILE = path.join(
10
- ESPRESSO_SERVER_ROOT, 'library', 'src', 'main', 'java',
11
- 'io', 'appium', 'espressoserver',
12
- 'lib', 'helpers', 'Version.kt'
13
- );
14
- const VERSION_PATTERN = /VERSION\s*=\s*"([0-9.]+)"/;
15
-
16
- function parseArgValue (argName) {
17
- const argNamePattern = new RegExp(`^--${argName}\\b`);
18
- for (let i = 1; i < process.argv.length; ++i) {
19
- const arg = process.argv[i];
20
- if (argNamePattern.test(arg)) {
21
- return arg.includes('=') ? arg.split('=')[1] : process.argv[i + 1];
22
- }
23
- }
24
- return null;
25
- }
26
-
27
- async function syncModuleVersion () {
28
- const origContent = await fs.readFile(VERSION_FILE, 'utf8');
29
- const espressoVersionMatch = VERSION_PATTERN.exec(origContent);
30
- if (!espressoVersionMatch) {
31
- throw new Error(`Could not parse Espresso module version from '${VERSION_FILE}'`);
32
- }
33
- const packageVersion = parseArgValue('package-version');
34
- if (!packageVersion) {
35
- throw new Error('No package version argument (use `--package-version=xxx`)');
36
- }
37
- if (!semver.valid(packageVersion)) {
38
- throw new Error(
39
- `Invalid version specified '${packageVersion}'. Version should be in the form '1.2.3'`
40
- );
41
- }
42
- const updatedContent = origContent.replace(espressoVersionMatch[1], packageVersion);
43
- await fs.writeFile(VERSION_FILE, updatedContent, 'utf8');
44
- LOG.info(`Synchronized module version '${packageVersion}' to '${VERSION_FILE}'`);
45
- }
46
-
47
- (async () => await syncModuleVersion())();