appium-webdriveragent 10.5.4 → 11.0.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 (69) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/Scripts/{build-webdriveragent.js → build-webdriveragent.mjs} +13 -7
  3. package/Scripts/{fetch-prebuilt-wda.js → fetch-prebuilt-wda.mjs} +17 -9
  4. package/Scripts/update-wda-version.mjs +42 -0
  5. package/WebDriverAgentLib/Info.plist +2 -2
  6. package/build/index.d.ts +1 -1
  7. package/build/index.d.ts.map +1 -1
  8. package/build/index.js +1 -2
  9. package/build/index.js.map +1 -1
  10. package/build/lib/check-dependencies.d.ts +2 -7
  11. package/build/lib/check-dependencies.d.ts.map +1 -1
  12. package/build/lib/check-dependencies.js +0 -11
  13. package/build/lib/check-dependencies.js.map +1 -1
  14. package/build/lib/constants.d.ts +12 -12
  15. package/build/lib/constants.d.ts.map +1 -1
  16. package/build/lib/constants.js +14 -26
  17. package/build/lib/constants.js.map +1 -1
  18. package/build/lib/logger.d.ts +1 -2
  19. package/build/lib/logger.d.ts.map +1 -1
  20. package/build/lib/logger.js +2 -2
  21. package/build/lib/logger.js.map +1 -1
  22. package/build/lib/no-session-proxy.d.ts +5 -5
  23. package/build/lib/no-session-proxy.d.ts.map +1 -1
  24. package/build/lib/no-session-proxy.js +0 -1
  25. package/build/lib/no-session-proxy.js.map +1 -1
  26. package/build/lib/utils.d.ts +53 -96
  27. package/build/lib/utils.d.ts.map +1 -1
  28. package/build/lib/utils.js +124 -110
  29. package/build/lib/utils.js.map +1 -1
  30. package/build/lib/webdriveragent.d.ts +123 -170
  31. package/build/lib/webdriveragent.d.ts.map +1 -1
  32. package/build/lib/webdriveragent.js +319 -349
  33. package/build/lib/webdriveragent.js.map +1 -1
  34. package/build/lib/xcodebuild.d.ts +66 -77
  35. package/build/lib/xcodebuild.d.ts.map +1 -1
  36. package/build/lib/xcodebuild.js +123 -92
  37. package/build/lib/xcodebuild.js.map +1 -1
  38. package/build/test/functional/desired.d.ts +3 -0
  39. package/build/test/functional/desired.d.ts.map +1 -0
  40. package/build/test/functional/desired.js +9 -0
  41. package/build/test/functional/desired.js.map +1 -0
  42. package/build/test/functional/helpers/simulator.d.ts +5 -0
  43. package/build/test/functional/helpers/simulator.d.ts.map +1 -0
  44. package/build/test/functional/helpers/simulator.js +39 -0
  45. package/build/test/functional/helpers/simulator.js.map +1 -0
  46. package/build/test/functional/webdriveragent-e2e-specs.d.ts +2 -0
  47. package/build/test/functional/webdriveragent-e2e-specs.d.ts.map +1 -0
  48. package/build/test/functional/webdriveragent-e2e-specs.js +133 -0
  49. package/build/test/functional/webdriveragent-e2e-specs.js.map +1 -0
  50. package/build/test/unit/utils-specs.d.ts +2 -0
  51. package/build/test/unit/utils-specs.d.ts.map +1 -0
  52. package/build/test/unit/utils-specs.js +161 -0
  53. package/build/test/unit/utils-specs.js.map +1 -0
  54. package/build/test/unit/webdriveragent-specs.d.ts +2 -0
  55. package/build/test/unit/webdriveragent-specs.d.ts.map +1 -0
  56. package/build/test/unit/webdriveragent-specs.js +424 -0
  57. package/build/test/unit/webdriveragent-specs.js.map +1 -0
  58. package/build/tsconfig.tsbuildinfo +1 -0
  59. package/index.ts +1 -1
  60. package/lib/{check-dependencies.js → check-dependencies.ts} +4 -13
  61. package/lib/constants.ts +18 -0
  62. package/lib/logger.ts +3 -0
  63. package/lib/{no-session-proxy.js → no-session-proxy.ts} +4 -5
  64. package/lib/{utils.js → utils.ts} +101 -111
  65. package/lib/{webdriveragent.js → webdriveragent.ts} +353 -390
  66. package/lib/{xcodebuild.js → xcodebuild.ts} +145 -114
  67. package/package.json +7 -9
  68. package/lib/constants.js +0 -24
  69. package/lib/logger.js +0 -5
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## [11.0.0](https://github.com/appium/WebDriverAgent/compare/v10.5.4...v11.0.0) (2025-12-21)
2
+
3
+ ### ⚠ BREAKING CHANGES
4
+
5
+ * Removed the deprecated xcodeVersion argument from WebDriverAgent constructor
6
+ * Removed the deprecated xcodeVersion argument from XcodeBuild constructor
7
+ * Removed the deprecated idb property from WebDriverAgent class
8
+ * Removed the noop checkForDependencies export from index
9
+
10
+ - All .js modules were migrated to TypeScript
11
+ - Module scripts were migrated to ESM/.mjs
12
+ - All private WebDriverAgent and XcodeBuild methods and properties were marked as such
13
+
14
+ ### Features
15
+
16
+ * Migrate the module to typescript ([#1096](https://github.com/appium/WebDriverAgent/issues/1096)) ([7d0a022](https://github.com/appium/WebDriverAgent/commit/7d0a022585ef70205dafe22d20736978d9e1cba3))
17
+
1
18
  ## [10.5.4](https://github.com/appium/WebDriverAgent/compare/v10.5.3...v10.5.4) (2025-12-19)
2
19
 
3
20
  ### Miscellaneous Chores
@@ -1,8 +1,13 @@
1
- const path = require('path');
2
- const { asyncify } = require('asyncbox');
3
- const { logger, fs } = require('@appium/support');
4
- const { exec } = require('teen_process');
5
- const xcode = require('appium-xcode');
1
+ import path from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+ import { asyncify } from 'asyncbox';
4
+ import { logger, fs } from '@appium/support';
5
+ import { exec } from 'teen_process';
6
+ import * as xcode from 'appium-xcode';
7
+
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+ const isMainModule = process.argv[1] && path.resolve(process.argv[1]) === __filename;
6
11
 
7
12
  const LOG = new logger.getLogger('WDABuild');
8
13
  const ROOT_DIR = path.resolve(__dirname, '..');
@@ -72,8 +77,9 @@ async function buildWebDriverAgent (xcodeVersion) {
72
77
  LOG.info(`Zip bundled at "${appBundleZipPath}"`);
73
78
  }
74
79
 
75
- if (require.main === module) {
80
+ if (isMainModule) {
76
81
  asyncify(buildWebDriverAgent);
77
82
  }
78
83
 
79
- module.exports = buildWebDriverAgent;
84
+ export default buildWebDriverAgent;
85
+
@@ -1,14 +1,21 @@
1
- const path = require('path');
2
- const axios = require('axios');
3
- const { asyncify } = require('asyncbox');
4
- const { logger, fs, mkdirp, net } = require('@appium/support');
5
- const _ = require('lodash');
6
- const B = require('bluebird');
1
+ import path from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+ import { readFileSync } from 'node:fs';
4
+ import axios from 'axios';
5
+ import { asyncify } from 'asyncbox';
6
+ import { logger, fs, mkdirp, net } from '@appium/support';
7
+ import _ from 'lodash';
8
+ import B from 'bluebird';
9
+
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = path.dirname(__filename);
12
+ const isMainModule = process.argv[1] && path.resolve(process.argv[1]) === __filename;
7
13
 
8
14
  const log = logger.getLogger('WDA');
9
15
 
10
16
  async function fetchPrebuiltWebDriverAgentAssets () {
11
- const tag = require('../package.json').version;
17
+ const packageJson = JSON.parse(readFileSync(path.resolve(__dirname, '..', 'package.json'), 'utf8'));
18
+ const tag = packageJson.version;
12
19
  log.info(`Getting links to webdriveragent release ${tag}`);
13
20
  const downloadUrl = `https://api.github.com/repos/appium/webdriveragent/releases/tags/v${tag}`;
14
21
  log.info(`Getting WDA release ${downloadUrl}`);
@@ -54,8 +61,9 @@ async function fetchPrebuiltWebDriverAgentAssets () {
54
61
  return await B.all(agentsDownloading);
55
62
  }
56
63
 
57
- if (require.main === module) {
64
+ if (isMainModule) {
58
65
  asyncify(fetchPrebuiltWebDriverAgentAssets);
59
66
  }
60
67
 
61
- module.exports = fetchPrebuiltWebDriverAgentAssets;
68
+ export default fetchPrebuiltWebDriverAgentAssets;
69
+
@@ -0,0 +1,42 @@
1
+ import {plist, logger} from '@appium/support';
2
+ import path from 'node:path';
3
+ import semver from 'semver';
4
+
5
+ const log = logger.getLogger('Versioner');
6
+
7
+ /**
8
+ * @param {string} argName
9
+ * @returns {string|null}
10
+ */
11
+ function parseArgValue (argName) {
12
+ const argNamePattern = new RegExp(`^--${argName}\\b`);
13
+ for (let i = 1; i < process.argv.length; ++i) {
14
+ const arg = process.argv[i];
15
+ if (argNamePattern.test(arg)) {
16
+ return arg.includes('=') ? arg.split('=')[1] : process.argv[i + 1];
17
+ }
18
+ }
19
+ return null;
20
+ }
21
+
22
+ async function updateWdaVersion() {
23
+ const newVersion = parseArgValue('package-version');
24
+ if (!newVersion) {
25
+ throw new Error('No package version argument (use `--package-version=xxx`)');
26
+ }
27
+ if (!semver.valid(newVersion)) {
28
+ throw new Error(
29
+ `Invalid version specified '${newVersion}'. Version should be in the form '1.2.3'`
30
+ );
31
+ }
32
+
33
+ const libManifest = path.resolve('WebDriverAgentLib', 'Info.plist');
34
+ log.info(`Updating the WebDriverAgent manifest at '${libManifest}' to version '${newVersion}'`);
35
+ await plist.updatePlistFile(libManifest, {
36
+ CFBundleShortVersionString: newVersion,
37
+ CFBundleVersion: newVersion,
38
+ }, false);
39
+ }
40
+
41
+ (async () => await updateWdaVersion())();
42
+
@@ -15,11 +15,11 @@
15
15
  <key>CFBundlePackageType</key>
16
16
  <string>FMWK</string>
17
17
  <key>CFBundleShortVersionString</key>
18
- <string>10.5.4</string>
18
+ <string>11.0.0</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>10.5.4</string>
22
+ <string>11.0.0</string>
23
23
  <key>NSPrincipalClass</key>
24
24
  <string/>
25
25
  </dict>
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { checkForDependencies, bundleWDASim } from './lib/check-dependencies';
1
+ export { bundleWDASim } from './lib/check-dependencies';
2
2
  export { NoSessionProxy } from './lib/no-session-proxy';
3
3
  export { WebDriverAgent } from './lib/webdriveragent';
4
4
  export { WDA_BASE_URL, WDA_RUNNER_BUNDLE_ID, PROJECT_FILE } from './lib/constants';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEjE,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEjE,cAAc,aAAa,CAAC"}
package/build/index.js CHANGED
@@ -14,9 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.BOOTSTRAP_PATH = exports.resetTestProcesses = exports.PROJECT_FILE = exports.WDA_RUNNER_BUNDLE_ID = exports.WDA_BASE_URL = exports.WebDriverAgent = exports.NoSessionProxy = exports.bundleWDASim = exports.checkForDependencies = void 0;
17
+ exports.BOOTSTRAP_PATH = exports.resetTestProcesses = exports.PROJECT_FILE = exports.WDA_RUNNER_BUNDLE_ID = exports.WDA_BASE_URL = exports.WebDriverAgent = exports.NoSessionProxy = exports.bundleWDASim = void 0;
18
18
  var check_dependencies_1 = require("./lib/check-dependencies");
19
- Object.defineProperty(exports, "checkForDependencies", { enumerable: true, get: function () { return check_dependencies_1.checkForDependencies; } });
20
19
  Object.defineProperty(exports, "bundleWDASim", { enumerable: true, get: function () { return check_dependencies_1.bundleWDASim; } });
21
20
  var no_session_proxy_1 = require("./lib/no-session-proxy");
22
21
  Object.defineProperty(exports, "NoSessionProxy", { enumerable: true, get: function () { return no_session_proxy_1.NoSessionProxy; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+DAA8E;AAArE,0HAAA,oBAAoB,OAAA;AAAE,kHAAA,YAAY,OAAA;AAC3C,2DAAwD;AAA/C,kHAAA,cAAc,OAAA;AACvB,uDAAsD;AAA7C,gHAAA,cAAc,OAAA;AACvB,6CAAmF;AAA1E,yGAAA,YAAY,OAAA;AAAE,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AACzD,qCAAiE;AAAxD,2GAAA,kBAAkB,OAAA;AAAE,uGAAA,cAAc,OAAA;AAE3C,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+DAAwD;AAA/C,kHAAA,YAAY,OAAA;AACrB,2DAAwD;AAA/C,kHAAA,cAAc,OAAA;AACvB,uDAAsD;AAA7C,gHAAA,cAAc,OAAA;AACvB,6CAAmF;AAA1E,yGAAA,YAAY,OAAA;AAAE,iHAAA,oBAAoB,OAAA;AAAE,yGAAA,YAAY,OAAA;AACzD,qCAAiE;AAAxD,2GAAA,kBAAkB,OAAA;AAAE,uGAAA,cAAc,OAAA;AAE3C,8CAA4B"}
@@ -1,8 +1,3 @@
1
- export function checkForDependencies(): Promise<boolean>;
2
- /**
3
- *
4
- * @param {import('./xcodebuild').XcodeBuild} xcodebuild
5
- * @returns {Promise<string>}
6
- */
7
- export function bundleWDASim(xcodebuild: import("./xcodebuild").XcodeBuild): Promise<string>;
1
+ import type { XcodeBuild } from './xcodebuild';
2
+ export declare function bundleWDASim(xcodebuild: XcodeBuild): Promise<string>;
8
3
  //# sourceMappingURL=check-dependencies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-dependencies.d.ts","sourceRoot":"","sources":["../../lib/check-dependencies.js"],"names":[],"mappings":"AAqBA,yDAGC;AAED;;;;GAIG;AACH,yCAHW,OAAO,cAAc,EAAE,UAAU,GAC/B,OAAO,CAAC,MAAM,CAAC,CAa3B"}
1
+ {"version":3,"file":"check-dependencies.d.ts","sourceRoot":"","sources":["../../lib/check-dependencies.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc/C,wBAAsB,YAAY,CAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAW3E"}
@@ -3,14 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.checkForDependencies = checkForDependencies;
7
6
  exports.bundleWDASim = bundleWDASim;
8
7
  const support_1 = require("@appium/support");
9
8
  const teen_process_1 = require("teen_process");
10
9
  const node_path_1 = __importDefault(require("node:path"));
11
10
  const constants_1 = require("./constants");
12
11
  const utils_1 = require("./utils");
13
- const logger_1 = __importDefault(require("./logger"));
14
12
  async function buildWDASim() {
15
13
  const args = [
16
14
  '-project', node_path_1.default.join(utils_1.BOOTSTRAP_PATH, 'WebDriverAgent.xcodeproj'),
@@ -22,15 +20,6 @@ async function buildWDASim() {
22
20
  ];
23
21
  await (0, teen_process_1.exec)('xcodebuild', args);
24
22
  }
25
- async function checkForDependencies() {
26
- logger_1.default.debug('Dependencies are up to date');
27
- return false;
28
- }
29
- /**
30
- *
31
- * @param {import('./xcodebuild').XcodeBuild} xcodebuild
32
- * @returns {Promise<string>}
33
- */
34
23
  async function bundleWDASim(xcodebuild) {
35
24
  const derivedDataPath = await xcodebuild.retrieveDerivedDataPath();
36
25
  if (!derivedDataPath) {
@@ -1 +1 @@
1
- {"version":3,"file":"check-dependencies.js","sourceRoot":"","sources":["../../lib/check-dependencies.js"],"names":[],"mappings":";;;;;AAqBA,oDAGC;AAOD,oCAWC;AA1CD,6CAAqC;AACrC,+CAAoC;AACpC,0DAA6B;AAC7B,2CAEqB;AACrB,mCAAyC;AACzC,sDAA2B;AAE3B,KAAK,UAAU,WAAW;IACxB,MAAM,IAAI,GAAG;QACX,UAAU,EAAE,mBAAI,CAAC,IAAI,CAAC,sBAAc,EAAE,0BAA0B,CAAC;QACjE,SAAS,EAAE,sBAAU;QACrB,MAAM,EAAE,yBAAa;QACrB,uBAAuB;QACvB,4BAA4B;QAC5B,gCAAgC;KACjC,CAAC;IACF,MAAM,IAAA,mBAAI,EAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AACjC,CAAC;AAEM,KAAK,UAAU,oBAAoB;IACxC,gBAAG,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACzC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAE,UAAU;IAC5C,MAAM,eAAe,GAAG,MAAM,UAAU,CAAC,uBAAuB,EAAE,CAAC;IACnE,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC/E,CAAC;IACD,MAAM,aAAa,GAAG,mBAAI,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,0BAAc,CAAC,CAAC;IAC/G,IAAI,MAAM,YAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACnC,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,MAAM,WAAW,EAAE,CAAC;IACpB,OAAO,aAAa,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"check-dependencies.js","sourceRoot":"","sources":["../../lib/check-dependencies.ts"],"names":[],"mappings":";;;;;AAqBA,oCAWC;AAhCD,6CAAqC;AACrC,+CAAoC;AACpC,0DAA6B;AAC7B,2CAEqB;AACrB,mCAAyC;AAGzC,KAAK,UAAU,WAAW;IACxB,MAAM,IAAI,GAAG;QACX,UAAU,EAAE,mBAAI,CAAC,IAAI,CAAC,sBAAc,EAAE,0BAA0B,CAAC;QACjE,SAAS,EAAE,sBAAU;QACrB,MAAM,EAAE,yBAAa;QACrB,uBAAuB;QACvB,4BAA4B;QAC5B,gCAAgC;KACjC,CAAC;IACF,MAAM,IAAA,mBAAI,EAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AACjC,CAAC;AAEM,KAAK,UAAU,YAAY,CAAE,UAAsB;IACxD,MAAM,eAAe,GAAG,MAAM,UAAU,CAAC,uBAAuB,EAAE,CAAC;IACnE,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC/E,CAAC;IACD,MAAM,aAAa,GAAG,mBAAI,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,0BAAc,CAAC,CAAC;IAC/G,IAAI,MAAM,YAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACnC,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,MAAM,WAAW,EAAE,CAAC;IACpB,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -1,13 +1,13 @@
1
- export const WDA_RUNNER_BUNDLE_ID: "com.facebook.WebDriverAgentRunner";
2
- export const WDA_RUNNER_APP: "WebDriverAgentRunner-Runner.app";
3
- export const PROJECT_FILE: "project.pbxproj";
4
- export const WDA_SCHEME: "WebDriverAgentRunner";
5
- export const PLATFORM_NAME_TVOS: "tvOS";
6
- export const PLATFORM_NAME_IOS: "iOS";
7
- export const SDK_SIMULATOR: "iphonesimulator";
8
- export const SDK_DEVICE: "iphoneos";
9
- export const WDA_BASE_URL: "http://127.0.0.1";
10
- export const WDA_UPGRADE_TIMESTAMP_PATH: string;
11
- export const WDA_RUNNER_BUNDLE_ID_FOR_XCTEST: "com.facebook.WebDriverAgentRunner.xctrunner";
12
- export const DEFAULT_TEST_BUNDLE_SUFFIX: ".xctrunner";
1
+ export declare const DEFAULT_TEST_BUNDLE_SUFFIX = ".xctrunner";
2
+ export declare const WDA_RUNNER_BUNDLE_ID = "com.facebook.WebDriverAgentRunner";
3
+ export declare const WDA_RUNNER_BUNDLE_ID_FOR_XCTEST = "com.facebook.WebDriverAgentRunner.xctrunner";
4
+ export declare const WDA_RUNNER_APP = "WebDriverAgentRunner-Runner.app";
5
+ export declare const WDA_SCHEME = "WebDriverAgentRunner";
6
+ export declare const PROJECT_FILE = "project.pbxproj";
7
+ export declare const WDA_BASE_URL = "http://127.0.0.1";
8
+ export declare const PLATFORM_NAME_TVOS = "tvOS";
9
+ export declare const PLATFORM_NAME_IOS = "iOS";
10
+ export declare const SDK_SIMULATOR = "iphonesimulator";
11
+ export declare const SDK_DEVICE = "iphoneos";
12
+ export declare const WDA_UPGRADE_TIMESTAMP_PATH: string;
13
13
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../lib/constants.js"],"names":[],"mappings":"AAGA,mCAA6B,mCAAmC,CAAC;AAEjE,6BAAuB,iCAAiC,CAAC;AAEzD,2BAAqB,iBAAiB,CAAC;AADvC,yBAAmB,sBAAsB,CAAC;AAI1C,iCAA2B,MAAM,CAAC;AAClC,gCAA0B,KAAK,CAAC;AAEhC,4BAAsB,iBAAiB,CAAC;AACxC,yBAAmB,UAAU,CAAC;AAN9B,2BAAqB,kBAAkB,CAAC;AAQxC,gDAA0F;AAZ1F,4FAA+F;AAF/F,yCAAmC,YAAY,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../lib/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,eAAe,CAAC;AACvD,eAAO,MAAM,oBAAoB,sCAAsC,CAAC;AACxE,eAAO,MAAM,+BAA+B,gDAAyD,CAAC;AACtG,eAAO,MAAM,cAAc,oCAAoC,CAAC;AAChE,eAAO,MAAM,UAAU,yBAAyB,CAAC;AACjD,eAAO,MAAM,YAAY,oBAAoB,CAAC;AAC9C,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAE/C,eAAO,MAAM,kBAAkB,SAAS,CAAC;AACzC,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAEvC,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,UAAU,aAAa,CAAC;AAErC,eAAO,MAAM,0BAA0B,QAAyD,CAAC"}
@@ -3,30 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DEFAULT_TEST_BUNDLE_SUFFIX = exports.WDA_RUNNER_BUNDLE_ID_FOR_XCTEST = exports.WDA_UPGRADE_TIMESTAMP_PATH = exports.WDA_BASE_URL = exports.SDK_DEVICE = exports.SDK_SIMULATOR = exports.PLATFORM_NAME_IOS = exports.PLATFORM_NAME_TVOS = exports.WDA_SCHEME = exports.PROJECT_FILE = exports.WDA_RUNNER_APP = exports.WDA_RUNNER_BUNDLE_ID = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const DEFAULT_TEST_BUNDLE_SUFFIX = '.xctrunner';
9
- exports.DEFAULT_TEST_BUNDLE_SUFFIX = DEFAULT_TEST_BUNDLE_SUFFIX;
10
- const WDA_RUNNER_BUNDLE_ID = 'com.facebook.WebDriverAgentRunner';
11
- exports.WDA_RUNNER_BUNDLE_ID = WDA_RUNNER_BUNDLE_ID;
12
- const WDA_RUNNER_BUNDLE_ID_FOR_XCTEST = `${WDA_RUNNER_BUNDLE_ID}${DEFAULT_TEST_BUNDLE_SUFFIX}`;
13
- exports.WDA_RUNNER_BUNDLE_ID_FOR_XCTEST = WDA_RUNNER_BUNDLE_ID_FOR_XCTEST;
14
- const WDA_RUNNER_APP = 'WebDriverAgentRunner-Runner.app';
15
- exports.WDA_RUNNER_APP = WDA_RUNNER_APP;
16
- const WDA_SCHEME = 'WebDriverAgentRunner';
17
- exports.WDA_SCHEME = WDA_SCHEME;
18
- const PROJECT_FILE = 'project.pbxproj';
19
- exports.PROJECT_FILE = PROJECT_FILE;
20
- const WDA_BASE_URL = 'http://127.0.0.1';
21
- exports.WDA_BASE_URL = WDA_BASE_URL;
22
- const PLATFORM_NAME_TVOS = 'tvOS';
23
- exports.PLATFORM_NAME_TVOS = PLATFORM_NAME_TVOS;
24
- const PLATFORM_NAME_IOS = 'iOS';
25
- exports.PLATFORM_NAME_IOS = PLATFORM_NAME_IOS;
26
- const SDK_SIMULATOR = 'iphonesimulator';
27
- exports.SDK_SIMULATOR = SDK_SIMULATOR;
28
- const SDK_DEVICE = 'iphoneos';
29
- exports.SDK_DEVICE = SDK_DEVICE;
30
- const WDA_UPGRADE_TIMESTAMP_PATH = path_1.default.join('.appium', 'webdriveragent', 'upgrade.time');
31
- exports.WDA_UPGRADE_TIMESTAMP_PATH = WDA_UPGRADE_TIMESTAMP_PATH;
6
+ exports.WDA_UPGRADE_TIMESTAMP_PATH = exports.SDK_DEVICE = exports.SDK_SIMULATOR = exports.PLATFORM_NAME_IOS = exports.PLATFORM_NAME_TVOS = exports.WDA_BASE_URL = exports.PROJECT_FILE = exports.WDA_SCHEME = exports.WDA_RUNNER_APP = exports.WDA_RUNNER_BUNDLE_ID_FOR_XCTEST = exports.WDA_RUNNER_BUNDLE_ID = exports.DEFAULT_TEST_BUNDLE_SUFFIX = void 0;
7
+ const node_path_1 = __importDefault(require("node:path"));
8
+ exports.DEFAULT_TEST_BUNDLE_SUFFIX = '.xctrunner';
9
+ exports.WDA_RUNNER_BUNDLE_ID = 'com.facebook.WebDriverAgentRunner';
10
+ exports.WDA_RUNNER_BUNDLE_ID_FOR_XCTEST = `${exports.WDA_RUNNER_BUNDLE_ID}${exports.DEFAULT_TEST_BUNDLE_SUFFIX}`;
11
+ exports.WDA_RUNNER_APP = 'WebDriverAgentRunner-Runner.app';
12
+ exports.WDA_SCHEME = 'WebDriverAgentRunner';
13
+ exports.PROJECT_FILE = 'project.pbxproj';
14
+ exports.WDA_BASE_URL = 'http://127.0.0.1';
15
+ exports.PLATFORM_NAME_TVOS = 'tvOS';
16
+ exports.PLATFORM_NAME_IOS = 'iOS';
17
+ exports.SDK_SIMULATOR = 'iphonesimulator';
18
+ exports.SDK_DEVICE = 'iphoneos';
19
+ exports.WDA_UPGRADE_TIMESTAMP_PATH = node_path_1.default.join('.appium', 'webdriveragent', 'upgrade.time');
32
20
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../lib/constants.js"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,MAAM,0BAA0B,GAAG,YAAY,CAAC;AAoBb,gEAA0B;AAnB7D,MAAM,oBAAoB,GAAG,mCAAmC,CAAC;AAgB/D,oDAAoB;AAftB,MAAM,+BAA+B,GAAG,GAAG,oBAAoB,GAAG,0BAA0B,EAAE,CAAC;AAkB7F,0EAA+B;AAjBjC,MAAM,cAAc,GAAG,iCAAiC,CAAC;AAcjC,wCAAc;AAbtC,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAcxC,gCAAU;AAbZ,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAYC,oCAAY;AAXpD,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAaX,oCAAY;AAXzC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAUpB,gDAAkB;AAThC,MAAM,iBAAiB,GAAG,KAAK,CAAC;AASE,8CAAiB;AAPnD,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAQtC,sCAAa;AAPf,MAAM,UAAU,GAAG,UAAU,CAAC;AAOb,gCAAU;AAL3B,MAAM,0BAA0B,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAK/C,gEAA0B"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../lib/constants.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA6B;AAEhB,QAAA,0BAA0B,GAAG,YAAY,CAAC;AAC1C,QAAA,oBAAoB,GAAG,mCAAmC,CAAC;AAC3D,QAAA,+BAA+B,GAAG,GAAG,4BAAoB,GAAG,kCAA0B,EAAE,CAAC;AACzF,QAAA,cAAc,GAAG,iCAAiC,CAAC;AACnD,QAAA,UAAU,GAAG,sBAAsB,CAAC;AACpC,QAAA,YAAY,GAAG,iBAAiB,CAAC;AACjC,QAAA,YAAY,GAAG,kBAAkB,CAAC;AAElC,QAAA,kBAAkB,GAAG,MAAM,CAAC;AAC5B,QAAA,iBAAiB,GAAG,KAAK,CAAC;AAE1B,QAAA,aAAa,GAAG,iBAAiB,CAAC;AAClC,QAAA,UAAU,GAAG,UAAU,CAAC;AAExB,QAAA,0BAA0B,GAAG,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC"}
@@ -1,3 +1,2 @@
1
- export default log;
2
- declare const log: import("@appium/types").AppiumLogger;
1
+ export declare const log: import("@appium/types").AppiumLogger;
3
2
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";AAEA,wDAA+C"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,sCAAqC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.log = void 0;
3
4
  const support_1 = require("@appium/support");
4
- const log = support_1.logger.getLogger('WebDriverAgent');
5
- exports.default = log;
5
+ exports.log = support_1.logger.getLogger('WebDriverAgent');
6
6
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";;AAAA,6CAAyC;AAEzC,MAAM,GAAG,GAAG,gBAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;AAE/C,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAE5B,QAAA,GAAG,GAAG,gBAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
- export default NoSessionProxy;
2
- export class NoSessionProxy extends JWProxy {
3
- constructor(opts?: {});
4
- getUrlForProxy(url: any): string;
5
- }
6
1
  import { JWProxy } from '@appium/base-driver';
2
+ import type { ProxyOptions } from '@appium/types';
3
+ export declare class NoSessionProxy extends JWProxy {
4
+ constructor(opts?: ProxyOptions);
5
+ getUrlForProxy(url: string): string;
6
+ }
7
7
  //# sourceMappingURL=no-session-proxy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-session-proxy.d.ts","sourceRoot":"","sources":["../../lib/no-session-proxy.js"],"names":[],"mappings":";AAGA;IACE,uBAEC;IAED,iCAaC;CACF;wBAtBuB,qBAAqB"}
1
+ {"version":3,"file":"no-session-proxy.d.ts","sourceRoot":"","sources":["../../lib/no-session-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,qBAAa,cAAe,SAAQ,OAAO;gBAC5B,IAAI,GAAE,YAAiB;IAI3B,cAAc,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM;CAc9C"}
@@ -23,5 +23,4 @@ class NoSessionProxy extends base_driver_1.JWProxy {
23
23
  }
24
24
  }
25
25
  exports.NoSessionProxy = NoSessionProxy;
26
- exports.default = NoSessionProxy;
27
26
  //# sourceMappingURL=no-session-proxy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-session-proxy.js","sourceRoot":"","sources":["../../lib/no-session-proxy.js"],"names":[],"mappings":";;;AAAA,qDAA8C;AAG9C,MAAM,cAAe,SAAQ,qBAAO;IAClC,YAAa,IAAI,GAAG,EAAE;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAED,cAAc,CAAE,GAAG;QACjB,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;YACf,GAAG,GAAG,GAAG,CAAC;QACZ,CAAC;QACD,MAAM,SAAS,GAAG,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC7E,IAAI,YAAY,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACjC,YAAY,GAAG,GAAG,CAAC;QACrB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,qCAAqC,GAAG,GAAG,CAAC,CAAC;QAC/D,CAAC;QACD,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,8BAA8B;QAC9E,OAAO,SAAS,GAAG,YAAY,CAAC;IAClC,CAAC;CACF;AAEQ,wCAAc;AACvB,kBAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"no-session-proxy.js","sourceRoot":"","sources":["../../lib/no-session-proxy.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAI9C,MAAa,cAAe,SAAQ,qBAAO;IACzC,YAAa,OAAqB,EAAE;QAClC,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEQ,cAAc,CAAE,GAAW;QAClC,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;YACf,GAAG,GAAG,GAAG,CAAC;QACZ,CAAC;QACD,MAAM,SAAS,GAAG,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC7E,IAAI,YAAY,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACjC,YAAY,GAAG,GAAG,CAAC;QACrB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,qCAAqC,GAAG,GAAG,CAAC,CAAC;QAC/D,CAAC;QACD,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,8BAA8B;QAC9E,OAAO,SAAS,GAAG,YAAY,CAAC;IAClC,CAAC;CACF;AAnBD,wCAmBC"}
@@ -1,74 +1,36 @@
1
- export const BOOTSTRAP_PATH: string;
1
+ import { SubProcess } from 'teen_process';
2
+ import type { DeviceInfo } from './types';
3
+ export declare const BOOTSTRAP_PATH: string;
4
+ export declare function killAppUsingPattern(pgrepPattern: string): Promise<void>;
2
5
  /**
3
- * Information of the device under test
6
+ * Return true if the platformName is tvOS
7
+ * @param platformName The name of the platorm
8
+ * @returns Return true if the platformName is tvOS
4
9
  */
5
- export type DeviceInfo = import("./types").DeviceInfo;
6
- /**
7
- * Arguments for setting xctestrun file
8
- */
9
- export type XctestrunFileArgs = {
10
- /**
11
- * - Information of the device under test
12
- */
13
- deviceInfo: DeviceInfo;
14
- /**
15
- * - The Xcode SDK version of OS.
16
- */
17
- sdkVersion: string;
18
- /**
19
- * - The folder path containing xctestrun file.
20
- */
21
- bootstrapPath: string;
22
- /**
23
- * - The remote port WDA is listening on.
24
- */
25
- wdaRemotePort: number | string;
26
- /**
27
- * - The IP address to bind to. If not given, it binds to all interfaces.
28
- */
29
- wdaBindingIP?: string | undefined;
30
- };
10
+ export declare function isTvOS(platformName: string): boolean;
31
11
  /**
32
12
  * Update WebDriverAgentRunner project bundle ID with newBundleId.
33
13
  * This method assumes project file is in the correct state.
34
- * @param {string} agentPath - Path to the .xcodeproj directory.
35
- * @param {string} newBundleId the new bundle ID used to update.
14
+ * @param agentPath - Path to the .xcodeproj directory.
15
+ * @param newBundleId the new bundle ID used to update.
36
16
  */
37
- export function updateProjectFile(agentPath: string, newBundleId: string): Promise<void>;
17
+ export declare function updateProjectFile(agentPath: string, newBundleId: string): Promise<void>;
38
18
  /**
39
19
  * Reset WebDriverAgentRunner project bundle ID to correct state.
40
- * @param {string} agentPath - Path to the .xcodeproj directory.
41
- */
42
- export function resetProjectFile(agentPath: string): Promise<void>;
43
- export function setRealDeviceSecurity(keychainPath: any, keychainPassword: any): Promise<void>;
44
- /**
45
- * Return the WDA object which appends existing xctest runner content
46
- * @param {string} platformName - The name of the platform
47
- * @param {number|string} wdaRemotePort - The remote port number
48
- * @param {string} [wdaBindingIP] - The IP address to bind to. If not given, it binds to all interfaces.
49
- * @return {object} returns a runner object which has USE_PORT and optionally USE_IP
50
- */
51
- export function getAdditionalRunContent(platformName: string, wdaRemotePort: number | string, wdaBindingIP?: string): object;
52
- /**
53
- * Return the name of xctestrun file
54
- * @param {DeviceInfo} deviceInfo
55
- * @param {string} version - The Xcode SDK version of OS.
56
- * @return {string} returns xctestrunFilePath for given device
57
- */
58
- export function getXctestrunFileName(deviceInfo: DeviceInfo, version: string): string;
59
- /**
60
- * Information of the device under test
61
- * @typedef {import('./types').DeviceInfo} DeviceInfo
20
+ * @param agentPath - Path to the .xcodeproj directory.
62
21
  */
22
+ export declare function resetProjectFile(agentPath: string): Promise<void>;
23
+ export declare function setRealDeviceSecurity(keychainPath: string, keychainPassword: string): Promise<void>;
63
24
  /**
64
25
  * Arguments for setting xctestrun file
65
- * @typedef {Object} XctestrunFileArgs
66
- * @property {DeviceInfo} deviceInfo - Information of the device under test
67
- * @property {string} sdkVersion - The Xcode SDK version of OS.
68
- * @property {string} bootstrapPath - The folder path containing xctestrun file.
69
- * @property {number|string} wdaRemotePort - The remote port WDA is listening on.
70
- * @property {string} [wdaBindingIP] - The IP address to bind to. If not given, it binds to all interfaces.
71
26
  */
27
+ export interface XctestrunFileArgs {
28
+ deviceInfo: DeviceInfo;
29
+ sdkVersion: string;
30
+ bootstrapPath: string;
31
+ wdaRemotePort: number | string;
32
+ wdaBindingIP?: string;
33
+ }
72
34
  /**
73
35
  * Creates xctestrun file per device & platform version.
74
36
  * We expects to have WebDriverAgentRunner_iphoneos${sdkVersion|platformVersion}-arm64.xctestrun for real device
@@ -77,68 +39,63 @@ export function getXctestrunFileName(deviceInfo: DeviceInfo, version: string): s
77
39
  * e.g. Xcode which has iOS SDK Version 12.2 on an intel Mac host machine generates WebDriverAgentRunner_iphonesimulator.2-x86_64.xctestrun
78
40
  * even if the cap has platform version 11.4
79
41
  *
80
- * @param {XctestrunFileArgs} args
81
- * @return {Promise<string>} returns xctestrunFilePath for given device
42
+ * @param args
43
+ * @return returns xctestrunFilePath for given device
82
44
  * @throws if WebDriverAgentRunner_iphoneos${sdkVersion|platformVersion}-arm64.xctestrun for real device
83
45
  * or WebDriverAgentRunner_iphonesimulator${sdkVersion|platformVersion}-x86_64.xctestrun for simulator is not found @bootstrapPath,
84
46
  * then it will throw a file not found exception
85
47
  */
86
- export function setXctestrunFile(args: XctestrunFileArgs): Promise<string>;
48
+ export declare function setXctestrunFile(args: XctestrunFileArgs): Promise<string>;
49
+ /**
50
+ * Return the WDA object which appends existing xctest runner content
51
+ * @param platformName - The name of the platform
52
+ * @param wdaRemotePort - The remote port number
53
+ * @param wdaBindingIP - The IP address to bind to. If not given, it binds to all interfaces.
54
+ * @return returns a runner object which has USE_PORT and optionally USE_IP
55
+ */
56
+ export declare function getAdditionalRunContent(platformName: string, wdaRemotePort: number | string, wdaBindingIP?: string): Record<string, any>;
87
57
  /**
88
58
  * Return the path of xctestrun if it exists
89
- * @param {DeviceInfo} deviceInfo
90
- * @param {string} sdkVersion - The Xcode SDK version of OS.
91
- * @param {string} bootstrapPath - The folder path containing xctestrun file.
92
- * @returns {Promise<string>}
59
+ * @param deviceInfo
60
+ * @param sdkVersion - The Xcode SDK version of OS.
61
+ * @param bootstrapPath - The folder path containing xctestrun file.
62
+ */
63
+ export declare function getXctestrunFilePath(deviceInfo: DeviceInfo, sdkVersion: string, bootstrapPath: string): Promise<string>;
64
+ /**
65
+ * Return the name of xctestrun file
66
+ * @param deviceInfo
67
+ * @param version - The Xcode SDK version of OS.
68
+ * @return returns xctestrunFilePath for given device
93
69
  */
94
- export function getXctestrunFilePath(deviceInfo: DeviceInfo, sdkVersion: string, bootstrapPath: string): Promise<string>;
70
+ export declare function getXctestrunFileName(deviceInfo: DeviceInfo, version: string): string;
95
71
  /**
96
72
  * Ensures the process is killed after the timeout
97
- *
98
- * @param {string} name
99
- * @param {import('teen_process').SubProcess} proc
100
- * @returns {Promise<void>}
101
73
  */
102
- export function killProcess(name: string, proc: any): Promise<void>;
74
+ export declare function killProcess(name: string, proc: SubProcess | null | undefined): Promise<void>;
103
75
  /**
104
- * Generate a random integer.
105
- *
106
- * @return {number} A random integer number in range [low, hight). `low`` is inclusive and `high` is exclusive.
76
+ * Generate a random integer in range [low, high). `low` is inclusive and `high` is exclusive.
107
77
  */
108
- export function randomInt(low: any, high: any): number;
78
+ export declare function randomInt(low: number, high: number): number;
109
79
  /**
110
- * Retrieves WDA upgrade timestamp
111
- *
112
- * @return {Promise<number?>} The UNIX timestamp of the package manifest. The manifest only gets modified on
113
- * package upgrade.
80
+ * Retrieves WDA upgrade timestamp. The manifest only gets modified on package upgrade.
114
81
  */
115
- export function getWDAUpgradeTimestamp(): Promise<number | null>;
82
+ export declare function getWDAUpgradeTimestamp(): Promise<number | null>;
116
83
  /**
117
84
  * Kills running XCTest processes for the particular device.
118
- *
119
- * @param {string} udid - The device UDID.
120
- * @param {boolean} isSimulator - Equals to true if the current device is a Simulator
121
85
  */
122
- export function resetTestProcesses(udid: string, isSimulator: boolean): Promise<void>;
86
+ export declare function resetTestProcesses(udid: string, isSimulator: boolean): Promise<void>;
123
87
  /**
124
88
  * Get the IDs of processes listening on the particular system port.
125
89
  * It is also possible to apply additional filtering based on the
126
90
  * process command line.
127
91
  *
128
- * @param {string|number} port - The port number.
129
- * @param {?Function} filteringFunc - Optional lambda function, which
92
+ * @param port - The port number.
93
+ * @param filteringFunc - Optional lambda function, which
130
94
  * receives command line string of the particular process
131
95
  * listening on given port, and is expected to return
132
96
  * either true or false to include/exclude the corresponding PID
133
97
  * from the resulting array.
134
- * @returns {Promise<string[]>} - the list of matched process ids.
135
- */
136
- export function getPIDsListeningOnPort(port: string | number, filteringFunc?: Function | null): Promise<string[]>;
137
- export function killAppUsingPattern(pgrepPattern: any): Promise<void>;
138
- /**
139
- * Return true if the platformName is tvOS
140
- * @param {string} platformName The name of the platorm
141
- * @returns {boolean} Return true if the platformName is tvOS
98
+ * @returns - the list of matched process ids.
142
99
  */
143
- export function isTvOS(platformName: string): boolean;
100
+ export declare function getPIDsListeningOnPort(port: string | number, filteringFunc?: ((cmdline: string) => boolean | Promise<boolean>) | null): Promise<string[]>;
144
101
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":"AAoCA,oCAA8C;;;;yBA8HjC,OAAO,SAAS,EAAE,UAAU;;;;;;;;gBAM3B,UAAU;;;;gBACV,MAAM;;;;mBACN,MAAM;;;;mBACN,MAAM,GAAC,MAAM;;;;;;AA3D3B;;;;;GAKG;AACH,6CAHW,MAAM,eACN,MAAM,iBAchB;AAED;;;GAGG;AACH,4CAFW,MAAM,iBAiBhB;AAED,+FAKC;AAyCD;;;;;;GAMG;AACH,sDALW,MAAM,iBACN,MAAM,GAAC,MAAM,iBACb,MAAM,GACL,MAAM,CAajB;AA4CD;;;;;GAKG;AACH,iDAJW,UAAU,WACV,MAAM,GACL,MAAM,CAOjB;AAhHD;;;GAGG;AAEH;;;;;;;;GAQG;AACH;;;;;;;;;;;;;GAaG;AACH,uCANW,iBAAiB,GAChB,OAAO,CAAC,MAAM,CAAC,CAc1B;AAsBD;;;;;;GAMG;AACH,iDALW,UAAU,cACV,MAAM,iBACN,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAkC3B;AAgBD;;;;;;GAMG;AACH,kCAJW,MAAM,cAEJ,OAAO,CAAC,IAAI,CAAC,CA8BzB;AAED;;;;GAIG;AACH,gDAFY,MAAM,CAIjB;AAED;;;;;GAKG;AACH,0CAHY,OAAO,CAAC,MAAM,OAAC,CAAC,CAU3B;AAED;;;;;GAKG;AACH,yCAHW,MAAM,eACN,OAAO,iBAWjB;AAED;;;;;;;;;;;;GAYG;AACH,6CARW,MAAM,GAAC,MAAM,kBACb,eAAS,GAKP,OAAO,CAAC,MAAM,EAAE,CAAC,CAgC7B;AApVD,sEAqCC;AAED;;;;GAIG;AACH,qCAHW,MAAM,GACJ,OAAO,CAInB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAE,MAAM,cAAc,CAAC;AAUhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAmC1C,eAAO,MAAM,cAAc,QAAkB,CAAC;AAE9C,wBAAsB,mBAAmB,CAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC9E;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAY9F;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAexE;AAED,wBAAsB,qBAAqB,CAAE,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK1G;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAShF;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAWzI;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgC9H;AAGD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrF;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BnG;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAsB,sBAAsB,IAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOtE;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAS3F;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,aAAa,GAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,IAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA8BtK"}