appium-uiautomator2-driver 2.33.0 → 2.34.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/lib/driver.ts CHANGED
@@ -176,13 +176,8 @@ class AndroidUiautomator2Driver
176
176
 
177
177
  uiautomator2: UiAutomator2Server;
178
178
 
179
- /**
180
- * @privateRemarks moved from `this.opts`
181
- */
182
179
  systemPort: number | undefined;
183
180
 
184
- _hasSystemPortInCaps: boolean | undefined;
185
-
186
181
  _originalIme: string | null;
187
182
 
188
183
  mjpegStream?: mjpeg.MJpegStream;
@@ -368,8 +363,8 @@ class AndroidUiautomator2Driver
368
363
  await this.adb!.forwardPort(localPort, DEVICE_PORT);
369
364
  };
370
365
 
371
- if (this.systemPort) {
372
- this._hasSystemPortInCaps = true;
366
+ if (this.opts.systemPort) {
367
+ this.systemPort = this.opts.systemPort;
373
368
  return await forwardPort(this.systemPort);
374
369
  }
375
370
 
@@ -395,7 +390,9 @@ class AndroidUiautomator2Driver
395
390
  return;
396
391
  }
397
392
 
398
- if (this._hasSystemPortInCaps) {
393
+ if (this.opts.systemPort) {
394
+ // We assume if the systemPort is provided manually then it must be unique,
395
+ // so there is no need for the explicit synchronization
399
396
  await this.adb.removePortForward(this.systemPort);
400
397
  } else {
401
398
  await DEVICE_PORT_ALLOCATION_GUARD(
@@ -562,20 +562,31 @@ export const executeMethodMap = {
562
562
  optional: ['opts'],
563
563
  },
564
564
  },
565
-
566
565
  'mobile: getActionHistory': {
567
566
  command: 'mobileGetActionHistory',
568
567
  params: {
569
568
  optional: ['opts'],
570
569
  },
571
570
  },
572
-
573
571
  'mobile: unscheduleAction': {
574
572
  command: 'mobileUnscheduleAction',
575
573
  params: {
576
574
  optional: ['opts'],
577
575
  },
578
576
  },
577
+
578
+ 'mobile: getUiMode': {
579
+ command: 'mobileGetUiMode',
580
+ params: {
581
+ optional: ['opts'],
582
+ },
583
+ },
584
+ 'mobile: setUiMode': {
585
+ command: 'mobileSetUiMode',
586
+ params: {
587
+ optional: ['opts'],
588
+ },
589
+ },
579
590
  } as const;
580
591
 
581
592
  export type Uiautomator2ExecuteMethodMap = typeof executeMethodMap;
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "appium-uiautomator2-driver",
3
- "version": "2.33.0",
3
+ "version": "2.34.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-uiautomator2-driver",
9
- "version": "2.33.0",
9
+ "version": "2.34.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "appium-adb": "^11.0.1",
13
- "appium-android-driver": "^7.2.1",
13
+ "appium-android-driver": "^7.3.0",
14
14
  "appium-chromedriver": "^5.6.5",
15
15
  "appium-uiautomator2-server": "^5.12.2",
16
- "asyncbox": "^2.3.1",
16
+ "asyncbox": "^3.0.0",
17
17
  "axios": "^1.x",
18
18
  "bluebird": "^3.5.1",
19
19
  "css-selector-parser": "^3.0.0",
@@ -125,6 +125,20 @@
125
125
  "spdy": "4.0.2"
126
126
  }
127
127
  },
128
+ "node_modules/@appium/base-driver/node_modules/asyncbox": {
129
+ "version": "2.9.4",
130
+ "license": "Apache-2.0",
131
+ "dependencies": {
132
+ "@babel/runtime": "^7.0.0",
133
+ "@types/bluebird": "^3.5.37",
134
+ "bluebird": "^3.5.1",
135
+ "lodash": "^4.17.4",
136
+ "source-map-support": "^0.5.5"
137
+ },
138
+ "engines": {
139
+ "node": ">=10"
140
+ }
141
+ },
128
142
  "node_modules/@appium/base-driver/node_modules/axios": {
129
143
  "version": "1.5.1",
130
144
  "license": "MIT",
@@ -927,7 +941,7 @@
927
941
  }
928
942
  },
929
943
  "node_modules/@types/node": {
930
- "version": "20.8.9",
944
+ "version": "20.8.10",
931
945
  "license": "MIT",
932
946
  "dependencies": {
933
947
  "undici-types": "~5.26.4"
@@ -1128,13 +1142,13 @@
1128
1142
  }
1129
1143
  },
1130
1144
  "node_modules/appium-adb": {
1131
- "version": "11.0.4",
1145
+ "version": "11.0.5",
1132
1146
  "license": "Apache-2.0",
1133
1147
  "dependencies": {
1134
1148
  "@appium/support": "^4.0.0",
1135
1149
  "adbkit-apkreader": "^3.1.2",
1136
1150
  "async-lock": "^1.0.0",
1137
- "asyncbox": "^2.6.0",
1151
+ "asyncbox": "^3.0.0",
1138
1152
  "bluebird": "^3.4.7",
1139
1153
  "ini": "^4.1.1",
1140
1154
  "lodash": "^4.0.0",
@@ -1149,12 +1163,12 @@
1149
1163
  }
1150
1164
  },
1151
1165
  "node_modules/appium-android-driver": {
1152
- "version": "7.2.1",
1166
+ "version": "7.3.0",
1153
1167
  "license": "Apache-2.0",
1154
1168
  "dependencies": {
1155
1169
  "appium-adb": "^11.0.1",
1156
1170
  "appium-chromedriver": "^5.5.1",
1157
- "asyncbox": "^2.8.0",
1171
+ "asyncbox": "^3.0.0",
1158
1172
  "axios": "^1.x",
1159
1173
  "bluebird": "^3.4.7",
1160
1174
  "io.appium.settings": "^5.2.0",
@@ -1178,7 +1192,7 @@
1178
1192
  }
1179
1193
  },
1180
1194
  "node_modules/appium-chromedriver": {
1181
- "version": "5.6.20",
1195
+ "version": "5.6.22",
1182
1196
  "hasInstallScript": true,
1183
1197
  "license": "Apache-2.0",
1184
1198
  "dependencies": {
@@ -1186,7 +1200,7 @@
1186
1200
  "@appium/support": "^4.0.0",
1187
1201
  "@xmldom/xmldom": "^0.x",
1188
1202
  "appium-adb": "^11.0.1",
1189
- "asyncbox": "^2.0.2",
1203
+ "asyncbox": "^3.0.0",
1190
1204
  "axios": "^1.x",
1191
1205
  "bluebird": "^3.5.1",
1192
1206
  "compare-versions": "^6.0.0",
@@ -1203,7 +1217,7 @@
1203
1217
  }
1204
1218
  },
1205
1219
  "node_modules/appium-uiautomator2-server": {
1206
- "version": "5.12.15",
1220
+ "version": "5.12.16",
1207
1221
  "license": "Apache-2.0",
1208
1222
  "engines": {
1209
1223
  "node": ">=14",
@@ -1349,17 +1363,15 @@
1349
1363
  "license": "MIT"
1350
1364
  },
1351
1365
  "node_modules/asyncbox": {
1352
- "version": "2.9.4",
1366
+ "version": "3.0.0",
1353
1367
  "license": "Apache-2.0",
1354
1368
  "dependencies": {
1355
- "@babel/runtime": "^7.0.0",
1356
- "@types/bluebird": "^3.5.37",
1357
1369
  "bluebird": "^3.5.1",
1358
1370
  "lodash": "^4.17.4",
1359
- "source-map-support": "^0.5.5"
1371
+ "source-map-support": "^0.x"
1360
1372
  },
1361
1373
  "engines": {
1362
- "node": ">=10"
1374
+ "node": ">=16"
1363
1375
  }
1364
1376
  },
1365
1377
  "node_modules/asynckit": {
@@ -3637,7 +3649,7 @@
3637
3649
  }
3638
3650
  },
3639
3651
  "node_modules/punycode": {
3640
- "version": "2.3.0",
3652
+ "version": "2.3.1",
3641
3653
  "extraneous": true,
3642
3654
  "license": "MIT",
3643
3655
  "engines": {
@@ -4341,7 +4353,7 @@
4341
4353
  }
4342
4354
  },
4343
4355
  "node_modules/teen_process": {
4344
- "version": "2.0.68",
4356
+ "version": "2.0.72",
4345
4357
  "license": "Apache-2.0",
4346
4358
  "dependencies": {
4347
4359
  "bluebird": "3.7.2",
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "automated testing",
8
8
  "android"
9
9
  ],
10
- "version": "2.33.0",
10
+ "version": "2.34.0",
11
11
  "bugs": {
12
12
  "url": "https://github.com/appium/appium-uiautomator2-driver/issues"
13
13
  },
@@ -63,10 +63,10 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "appium-adb": "^11.0.1",
66
- "appium-android-driver": "^7.2.1",
66
+ "appium-android-driver": "^7.3.0",
67
67
  "appium-chromedriver": "^5.6.5",
68
68
  "appium-uiautomator2-server": "^5.12.2",
69
- "asyncbox": "^2.3.1",
69
+ "asyncbox": "^3.0.0",
70
70
  "axios": "^1.x",
71
71
  "bluebird": "^3.5.1",
72
72
  "css-selector-parser": "^3.0.0",