appium-xcuitest-driver 10.14.12 → 10.14.13

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 (37) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/lib/device/real-device-management.d.ts +3 -2
  3. package/build/lib/device/real-device-management.d.ts.map +1 -1
  4. package/build/lib/device/real-device-management.js +3 -2
  5. package/build/lib/device/real-device-management.js.map +1 -1
  6. package/build/scripts/build-wda.d.mts +2 -0
  7. package/build/scripts/build-wda.d.mts.map +1 -0
  8. package/build/scripts/build-wda.mjs +36 -0
  9. package/build/scripts/build-wda.mjs.map +1 -0
  10. package/build/scripts/download-wda-sim.d.mts +2 -0
  11. package/build/scripts/download-wda-sim.d.mts.map +1 -0
  12. package/build/scripts/download-wda-sim.mjs +62 -0
  13. package/build/scripts/download-wda-sim.mjs.map +1 -0
  14. package/build/scripts/image-mounter.d.mts +3 -0
  15. package/build/scripts/image-mounter.d.mts.map +1 -0
  16. package/build/scripts/image-mounter.mjs +189 -0
  17. package/build/scripts/image-mounter.mjs.map +1 -0
  18. package/build/scripts/open-wda.d.mts +2 -0
  19. package/build/scripts/open-wda.d.mts.map +1 -0
  20. package/build/scripts/open-wda.mjs +13 -0
  21. package/build/scripts/open-wda.mjs.map +1 -0
  22. package/build/scripts/tunnel-creation.d.mts +3 -0
  23. package/build/scripts/tunnel-creation.d.mts.map +1 -0
  24. package/build/scripts/tunnel-creation.mjs +297 -0
  25. package/build/scripts/tunnel-creation.mjs.map +1 -0
  26. package/build/scripts/utils.d.ts +8 -0
  27. package/build/scripts/utils.d.ts.map +1 -0
  28. package/build/scripts/utils.js +20 -0
  29. package/build/scripts/utils.js.map +1 -0
  30. package/build/tsconfig.tsbuildinfo +1 -1
  31. package/lib/device/real-device-management.ts +3 -2
  32. package/npm-shrinkwrap.json +5 -5
  33. package/package.json +1 -1
  34. package/scripts/build-wda.mjs +7 -0
  35. package/scripts/download-wda-sim.mjs +7 -3
  36. package/scripts/tunnel-creation.mjs +7 -2
  37. package/scripts/build-docs.js +0 -56
@@ -565,10 +565,11 @@ export class RealDevice {
565
565
  }
566
566
 
567
567
  /**
568
- * @param bundleName The name of CFBundleName in Info.plist
568
+ * ! This method is used by appium-webdriveragent package
569
569
  *
570
+ * @param bundleName The name of CFBundleName in Info.plist
570
571
  * @returns A list of User level apps' bundle ids which has
571
- * 'CFBundleName' attribute as 'bundleName'.
572
+ * 'CFBundleName' attribute as 'bundleName'.
572
573
  */
573
574
  async getUserInstalledBundleIdsByBundleName(bundleName: string): Promise<string[]> {
574
575
  const service = await services.startInstallationProxyService(this.udid);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "appium-xcuitest-driver",
3
- "version": "10.14.12",
3
+ "version": "10.14.13",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-xcuitest-driver",
9
- "version": "10.14.12",
9
+ "version": "10.14.13",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@appium/strongbox": "^1.0.0-rc.1",
@@ -692,9 +692,9 @@
692
692
  }
693
693
  },
694
694
  "node_modules/appium-ios-remotexpc": {
695
- "version": "0.25.1",
696
- "resolved": "https://registry.npmjs.org/appium-ios-remotexpc/-/appium-ios-remotexpc-0.25.1.tgz",
697
- "integrity": "sha512-wlCe1593QZYC72LOyyrdawKu4ZXhuDnOLyLiexmtKcbtG8liyHMq7o6QWsEUsQKZSW3O2gke3lR2Ooln89UmDQ==",
695
+ "version": "0.25.2",
696
+ "resolved": "https://registry.npmjs.org/appium-ios-remotexpc/-/appium-ios-remotexpc-0.25.2.tgz",
697
+ "integrity": "sha512-mRMVjorxf70Q8qsDxoF8O5tDQ5N0hBYELQ6dUDnIUNI8YljcT1/SzlBnGLLfgZYuTK6ImyJhw/jifMJKjHEkrw==",
698
698
  "license": "Apache-2.0",
699
699
  "optional": true,
700
700
  "dependencies": {
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "xcuitest",
9
9
  "xctest"
10
10
  ],
11
- "version": "10.14.12",
11
+ "version": "10.14.13",
12
12
  "author": "Appium Contributors",
13
13
  "license": "Apache-2.0",
14
14
  "repository": {
@@ -10,6 +10,13 @@ const log = logger.getLogger('WDA');
10
10
  async function build() {
11
11
  const customDevice = parseArgValue('name');
12
12
  const platformVersion = parseArgValue('sdk') || (await xcode.getMaxIOSSDK());
13
+
14
+ if (!platformVersion) {
15
+ throw new Error(
16
+ 'Cannot determine iOS SDK version to build for. Please specify --sdk=<version> or ensure Xcode and its command-line tools are installed (try `xcodebuild -showsdks` or `xcode-select --print-path`).'
17
+ );
18
+ }
19
+
13
20
  const iosDevices = await new Simctl().getDevices(platformVersion, 'iOS');
14
21
  const verifyDevicePresence = (info) => {
15
22
  if (!info) {
@@ -14,11 +14,15 @@ const destZip = (platform) => {
14
14
 
15
15
  /**
16
16
  * Return installed appium-webdriveragent package version
17
- * @returns {number}
17
+ * @returns {Promise<number>}
18
18
  */
19
19
  async function webdriveragentPkgVersion() {
20
+ const moduleRoot = node.getModuleRootSync('appium-xcuitest-driver', import.meta.url);
21
+ if (!moduleRoot) {
22
+ throw new Error('Cannot resolve module root for appium-xcuitest-driver');
23
+ }
20
24
  const pkgPath = path.join(
21
- node.getModuleRootSync('appium-xcuitest-driver', import.meta.url),
25
+ moduleRoot,
22
26
  'node_modules',
23
27
  'appium-webdriveragent',
24
28
  'package.json'
@@ -28,7 +32,7 @@ async function webdriveragentPkgVersion() {
28
32
 
29
33
  /**
30
34
  * Prepare the working root directory.
31
- * @returns {string} Root directory to download and unzip.
35
+ * @returns {Promise<string>} Root directory to download and unzip.
32
36
  */
33
37
  async function prepareRootDir() {
34
38
  const destDirRoot = parseArgValue('outdir');
@@ -52,7 +52,7 @@ class TunnelCreator {
52
52
 
53
53
  /**
54
54
  * Update tunnel registry with new tunnel information
55
- * @type {import('appium-ios-remotexpc').TunnelResult[]} results - Array of tunnel results
55
+ * @param {import('appium-ios-remotexpc').TunnelResult[]} results - Array of tunnel results
56
56
  * @returns {Promise<import('appium-ios-remotexpc').TunnelRegistry>} Updated tunnel registry
57
57
  */
58
58
  async updateTunnelRegistry(results) {
@@ -141,11 +141,12 @@ class TunnelCreator {
141
141
 
142
142
  /**
143
143
  * Create tunnel for a single device
144
- * @param {Device} device - Device object
144
+ * @param {import('appium-ios-remotexpc').UsbmuxDevice} device - Device object
145
145
  * @param {import('tls').ConnectionOptions} tlsOptions - TLS options
146
146
  * @returns {Promise<import('appium-ios-remotexpc').TunnelResult & { socket?: any; socketInfo?: import('appium-ios-remotexpc').SocketInfo }>} Tunnel result
147
147
  */
148
148
  async createTunnelForDevice(device, tlsOptions) {
149
+
149
150
  const udid = device.Properties.SerialNumber;
150
151
 
151
152
  log.info(`\n--- Processing device: ${udid} ---`);
@@ -330,6 +331,10 @@ async function main() {
330
331
  tunnelCreator.tunnelRegistryPort = parseInt(tunnelRegistryPort, 10);
331
332
  }
332
333
 
334
+ if (!BOOTSTRAP_PATH) {
335
+ throw new Error(`BOOTSTRAP_PATH is null`);
336
+ }
337
+
333
338
  const packageInfo = JSON.parse(
334
339
  fs.readFileSync(path.join(BOOTSTRAP_PATH, 'package.json'), 'utf8'),
335
340
  );
@@ -1,56 +0,0 @@
1
- // for simplicity this file is not transpiled and is run directly via an npm script
2
- /* eslint-disable promise/prefer-await-to-callbacks */
3
- /* eslint-disable promise/prefer-await-to-then */
4
-
5
- const {deploy} = require('@appium/docutils');
6
- const {logger} = require('appium/support');
7
- const path = require('path');
8
- const semver = require('semver');
9
- const {version} = require('../package.json');
10
-
11
- const log = logger.getLogger('Docs');
12
-
13
- const DOCS_REMOTE = 'origin';
14
- const DOCS_BRANCH = 'docs-site';
15
- const DOCS_PREFIX = false;
16
- const REPO_DIR = path.resolve(__dirname, '..');
17
- const LATEST_ALIAS = 'latest';
18
-
19
- const packageJson = require.resolve('../package.json');
20
-
21
- const branch = process.env.APPIUM_DOCS_BRANCH ?? DOCS_BRANCH;
22
- const deployPrefix = process.env.APPIUM_DOCS_PREFIX ?? DOCS_PREFIX;
23
- const remote = process.env.APPIUM_DOCS_REMOTE ?? DOCS_REMOTE;
24
-
25
- const push = Boolean(process.env.APPIUM_DOCS_PUBLISH);
26
-
27
- async function main() {
28
- log.info(`Building XCUI docs and committing to ${DOCS_BRANCH}`);
29
- const {major, minor} = semver.parse(version);
30
- const deployVersion = `${major}.${minor}`;
31
-
32
- const mkdocsYml = path.join(REPO_DIR, 'mkdocs.yml');
33
-
34
- log.info(`Building docs for version ${deployVersion}`);
35
- await deploy({
36
- mkDocsYml: mkdocsYml,
37
- push,
38
- branch,
39
- deployPrefix,
40
- remote,
41
- packageJson,
42
- deployVersion,
43
- message: `docs: auto-build docs for appium-xcuitest-driver@${deployVersion}`,
44
- alias: LATEST_ALIAS,
45
- });
46
- log.info(`Docs built`);
47
- }
48
-
49
- if (require.main === module) {
50
- main().catch((err) => {
51
- console.error(err); // eslint-disable-line no-console
52
- process.exitCode = 1;
53
- });
54
- }
55
-
56
- module.exports = main;