appium-webdriveragent 5.6.1 → 5.7.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 +14 -0
- package/build/index.js +39 -36
- package/build/lib/check-dependencies.d.ts +3 -0
- package/build/lib/check-dependencies.d.ts.map +1 -0
- package/build/lib/check-dependencies.js +38 -32
- package/build/lib/check-dependencies.js.map +1 -1
- package/build/lib/constants.d.ts +12 -0
- package/build/lib/constants.d.ts.map +1 -0
- package/build/lib/constants.js +8 -10
- package/build/lib/constants.js.map +1 -1
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +5 -11
- package/build/lib/logger.js.map +1 -1
- package/build/lib/no-session-proxy.d.ts +6 -0
- package/build/lib/no-session-proxy.d.ts.map +1 -0
- package/build/lib/no-session-proxy.js +22 -26
- package/build/lib/no-session-proxy.js.map +1 -1
- package/build/lib/utils.d.ts +127 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +347 -211
- package/build/lib/utils.js.map +1 -1
- package/build/lib/webdriveragent.d.ts +145 -0
- package/build/lib/webdriveragent.d.ts.map +1 -0
- package/build/lib/webdriveragent.js +478 -367
- package/build/lib/webdriveragent.js.map +1 -1
- package/build/lib/xcodebuild.d.ts +58 -0
- package/build/lib/xcodebuild.d.ts.map +1 -0
- package/build/lib/xcodebuild.js +367 -289
- package/build/lib/xcodebuild.js.map +1 -1
- package/lib/check-dependencies.js +3 -4
- package/lib/utils.js +10 -7
- package/lib/webdriveragent.js +14 -9
- package/lib/xcodebuild.js +39 -7
- package/package.json +28 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [5.7.0](https://github.com/appium/WebDriverAgent/compare/v5.6.2...v5.7.0) (2023-08-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Switch babel to typescript ([#753](https://github.com/appium/WebDriverAgent/issues/753)) ([76a4c7f](https://github.com/appium/WebDriverAgent/commit/76a4c7f066e1895acbb153ab035d6a08604277e4))
|
|
7
|
+
|
|
8
|
+
## [5.6.2](https://github.com/appium/WebDriverAgent/compare/v5.6.1...v5.6.2) (2023-08-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Miscellaneous Chores
|
|
12
|
+
|
|
13
|
+
* Remove unused glob dependency ([ee7655e](https://github.com/appium/WebDriverAgent/commit/ee7655e0a2aa39dd1f0c6d80d89065b4f34f264d))
|
|
14
|
+
|
|
1
15
|
## [5.6.1](https://github.com/appium/WebDriverAgent/compare/v5.6.0...v5.6.1) (2023-08-14)
|
|
2
16
|
|
|
3
17
|
|
package/build/index.js
CHANGED
|
@@ -1,43 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
5
17
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.WDA_BASE_URL = exports.PROJECT_FILE = exports.WDA_RUNNER_BUNDLE_ID = exports.BOOTSTRAP_PATH = exports.resetTestProcesses = exports.bundleWDASim = exports.checkForDependencies = exports.NoSessionProxy = exports.WebDriverAgent = void 0;
|
|
27
|
+
const dependencies = __importStar(require("./lib/check-dependencies"));
|
|
28
|
+
const proxies = __importStar(require("./lib/no-session-proxy"));
|
|
29
|
+
const driver = __importStar(require("./lib/webdriveragent"));
|
|
30
|
+
const constants = __importStar(require("./lib/constants"));
|
|
31
|
+
const utils = __importStar(require("./lib/utils"));
|
|
32
|
+
const { checkForDependencies, bundleWDASim } = dependencies;
|
|
20
33
|
exports.checkForDependencies = checkForDependencies;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = proxies;
|
|
34
|
+
exports.bundleWDASim = bundleWDASim;
|
|
35
|
+
const { NoSessionProxy } = proxies;
|
|
24
36
|
exports.NoSessionProxy = NoSessionProxy;
|
|
25
|
-
const {
|
|
26
|
-
WebDriverAgent
|
|
27
|
-
} = driver;
|
|
37
|
+
const { WebDriverAgent } = driver;
|
|
28
38
|
exports.WebDriverAgent = WebDriverAgent;
|
|
29
|
-
const {
|
|
30
|
-
WDA_BASE_URL,
|
|
31
|
-
WDA_RUNNER_BUNDLE_ID,
|
|
32
|
-
PROJECT_FILE
|
|
33
|
-
} = constants;
|
|
34
|
-
exports.PROJECT_FILE = PROJECT_FILE;
|
|
35
|
-
exports.WDA_RUNNER_BUNDLE_ID = WDA_RUNNER_BUNDLE_ID;
|
|
39
|
+
const { WDA_BASE_URL, WDA_RUNNER_BUNDLE_ID, PROJECT_FILE } = constants;
|
|
36
40
|
exports.WDA_BASE_URL = WDA_BASE_URL;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = utils;
|
|
41
|
-
exports.BOOTSTRAP_PATH = BOOTSTRAP_PATH;
|
|
41
|
+
exports.WDA_RUNNER_BUNDLE_ID = WDA_RUNNER_BUNDLE_ID;
|
|
42
|
+
exports.PROJECT_FILE = PROJECT_FILE;
|
|
43
|
+
const { resetTestProcesses, BOOTSTRAP_PATH } = utils;
|
|
42
44
|
exports.resetTestProcesses = resetTestProcesses;
|
|
43
|
-
|
|
45
|
+
exports.BOOTSTRAP_PATH = BOOTSTRAP_PATH;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-dependencies.d.ts","sourceRoot":"","sources":["../../lib/check-dependencies.js"],"names":[],"mappings":"AAwBA,yDAGC;AAED,+DAYC"}
|
|
@@ -1,39 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
require("
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _constants = require("./constants");
|
|
16
|
-
var _utils = require("./utils");
|
|
17
|
-
var _logger = _interopRequireDefault(require("./logger"));
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.bundleWDASim = exports.checkForDependencies = void 0;
|
|
7
|
+
const support_1 = require("@appium/support");
|
|
8
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
9
|
+
const teen_process_1 = require("teen_process");
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
|
+
const xcodebuild_1 = __importDefault(require("./xcodebuild"));
|
|
12
|
+
const constants_1 = require("./constants");
|
|
13
|
+
const utils_1 = require("./utils");
|
|
14
|
+
const logger_1 = __importDefault(require("./logger"));
|
|
18
15
|
async function buildWDASim() {
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const args = [
|
|
17
|
+
'-project', path_1.default.join(utils_1.BOOTSTRAP_PATH, 'WebDriverAgent.xcodeproj'),
|
|
18
|
+
'-scheme', constants_1.WDA_SCHEME,
|
|
19
|
+
'-sdk', constants_1.SDK_SIMULATOR,
|
|
20
|
+
'CODE_SIGN_IDENTITY=""',
|
|
21
|
+
'CODE_SIGNING_REQUIRED="NO"',
|
|
22
|
+
'GCC_TREAT_WARNINGS_AS_ERRORS=0',
|
|
23
|
+
];
|
|
24
|
+
await (0, teen_process_1.exec)('xcodebuild', args);
|
|
21
25
|
}
|
|
26
|
+
// eslint-disable-next-line require-await
|
|
22
27
|
async function checkForDependencies() {
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
logger_1.default.debug('Dependencies are up to date');
|
|
29
|
+
return false;
|
|
25
30
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
xcodebuild
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
exports.checkForDependencies = checkForDependencies;
|
|
32
|
+
async function bundleWDASim(xcodebuild) {
|
|
33
|
+
if (xcodebuild && !lodash_1.default.isFunction(xcodebuild.retrieveDerivedDataPath)) {
|
|
34
|
+
xcodebuild = new xcodebuild_1.default('', {});
|
|
35
|
+
}
|
|
36
|
+
const derivedDataPath = await xcodebuild.retrieveDerivedDataPath();
|
|
37
|
+
const wdaBundlePath = path_1.default.join(derivedDataPath, 'Build', 'Products', 'Debug-iphonesimulator', constants_1.WDA_RUNNER_APP);
|
|
38
|
+
if (await support_1.fs.exists(wdaBundlePath)) {
|
|
39
|
+
return wdaBundlePath;
|
|
40
|
+
}
|
|
41
|
+
await buildWDASim();
|
|
34
42
|
return wdaBundlePath;
|
|
35
|
-
}
|
|
36
|
-
await buildWDASim(xcodebuild, opts);
|
|
37
|
-
return wdaBundlePath;
|
|
38
43
|
}
|
|
39
|
-
|
|
44
|
+
exports.bundleWDASim = bundleWDASim;
|
|
45
|
+
//# sourceMappingURL=check-dependencies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-dependencies.js","
|
|
1
|
+
{"version":3,"file":"check-dependencies.js","sourceRoot":"","sources":["../../lib/check-dependencies.js"],"names":[],"mappings":";;;;;;AAAA,6CAAqC;AACrC,oDAAuB;AACvB,+CAAoC;AACpC,gDAAwB;AACxB,8DAAsC;AACtC,2CAEqB;AACrB,mCAAyC;AACzC,sDAA2B;AAE3B,KAAK,UAAU,WAAW;IACxB,MAAM,IAAI,GAAG;QACX,UAAU,EAAE,cAAI,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;AAED,yCAAyC;AACzC,KAAK,UAAU,oBAAoB;IACjC,gBAAG,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACzC,OAAO,KAAK,CAAC;AACf,CAAC;AAgBQ,oDAAoB;AAd7B,KAAK,UAAU,YAAY,CAAE,UAAU;IACrC,IAAI,UAAU,IAAI,CAAC,gBAAC,CAAC,UAAU,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE;QACnE,UAAU,GAAG,IAAI,oBAAU,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;KACrC;IAED,MAAM,eAAe,GAAG,MAAM,UAAU,CAAC,uBAAuB,EAAE,CAAC;IACnE,MAAM,aAAa,GAAG,cAAI,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;QAClC,OAAO,aAAa,CAAC;KACtB;IACD,MAAM,WAAW,EAAE,CAAC;IACpB,OAAO,aAAa,CAAC;AACvB,CAAC;AAE8B,oCAAY"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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: string;
|
|
12
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../lib/constants.js"],"names":[],"mappings":"AAEA,uEAAiE;AAEjE,+DAAyD;AAEzD,6CAAuC;AADvC,gDAA0C;AAI1C,wCAAkC;AAClC,sCAAgC;AAEhC,8CAAwC;AACxC,oCAA8B;AAN9B,8CAAwC;AAQxC,gDAA0F;AAZ1F,qDAA4E"}
|
package/build/lib/constants.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
require("source-map-support/register");
|
|
9
|
-
var _path = _interopRequireDefault(require("path"));
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
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"));
|
|
10
8
|
const WDA_RUNNER_BUNDLE_ID = 'com.facebook.WebDriverAgentRunner';
|
|
11
9
|
exports.WDA_RUNNER_BUNDLE_ID = WDA_RUNNER_BUNDLE_ID;
|
|
12
10
|
const WDA_RUNNER_BUNDLE_ID_FOR_XCTEST = `${WDA_RUNNER_BUNDLE_ID}.xctrunner`;
|
|
@@ -27,6 +25,6 @@ const SDK_SIMULATOR = 'iphonesimulator';
|
|
|
27
25
|
exports.SDK_SIMULATOR = SDK_SIMULATOR;
|
|
28
26
|
const SDK_DEVICE = 'iphoneos';
|
|
29
27
|
exports.SDK_DEVICE = SDK_DEVICE;
|
|
30
|
-
const WDA_UPGRADE_TIMESTAMP_PATH =
|
|
28
|
+
const WDA_UPGRADE_TIMESTAMP_PATH = path_1.default.join('.appium', 'webdriveragent', 'upgrade.time');
|
|
31
29
|
exports.WDA_UPGRADE_TIMESTAMP_PATH = WDA_UPGRADE_TIMESTAMP_PATH;
|
|
32
|
-
//# sourceMappingURL=
|
|
30
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../lib/constants.js"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,MAAM,oBAAoB,GAAG,mCAAmC,CAAC;AAgB/D,oDAAoB;AAftB,MAAM,+BAA+B,GAAG,GAAG,oBAAoB,YAAY,CAAC;AAkB1E,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";AAEA,wDAA+C"}
|
package/build/lib/logger.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require("source-map-support/register");
|
|
8
|
-
var _support = require("@appium/support");
|
|
9
|
-
const log = _support.logger.getLogger('WebDriverAgent');
|
|
10
|
-
var _default = log;
|
|
11
|
-
exports.default = _default;
|
|
12
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfc3VwcG9ydCIsInJlcXVpcmUiLCJsb2ciLCJsb2dnZXIiLCJnZXRMb2dnZXIiLCJfZGVmYXVsdCIsImV4cG9ydHMiLCJkZWZhdWx0Il0sInNvdXJjZXMiOlsiLi4vLi4vbGliL2xvZ2dlci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBsb2dnZXIgfSBmcm9tICdAYXBwaXVtL3N1cHBvcnQnO1xuXG5jb25zdCBsb2cgPSBsb2dnZXIuZ2V0TG9nZ2VyKCdXZWJEcml2ZXJBZ2VudCcpO1xuXG5leHBvcnQgZGVmYXVsdCBsb2c7XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQSxJQUFBQSxRQUFBLEdBQUFDLE9BQUE7QUFFQSxNQUFNQyxHQUFHLEdBQUdDLGVBQU0sQ0FBQ0MsU0FBUyxDQUFDLGdCQUFnQixDQUFDO0FBQUMsSUFBQUMsUUFBQSxHQUVoQ0gsR0FBRztBQUFBSSxPQUFBLENBQUFDLE9BQUEsR0FBQUYsUUFBQSJ9
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const support_1 = require("@appium/support");
|
|
4
|
+
const log = support_1.logger.getLogger('WebDriverAgent');
|
|
5
|
+
exports.default = log;
|
|
6
|
+
//# sourceMappingURL=logger.js.map
|
package/build/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-session-proxy.d.ts","sourceRoot":"","sources":["../../lib/no-session-proxy.js"],"names":[],"mappings":";AAGA;IAKE,iCAaC;CACF;wBAtBuB,qBAAqB"}
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _baseDriver = require("@appium/base-driver");
|
|
9
|
-
class NoSessionProxy extends _baseDriver.JWProxy {
|
|
10
|
-
constructor(opts = {}) {
|
|
11
|
-
super(opts);
|
|
12
|
-
}
|
|
13
|
-
getUrlForProxy(url) {
|
|
14
|
-
if (url === '') {
|
|
15
|
-
url = '/';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoSessionProxy = void 0;
|
|
4
|
+
const base_driver_1 = require("@appium/base-driver");
|
|
5
|
+
class NoSessionProxy extends base_driver_1.JWProxy {
|
|
6
|
+
constructor(opts = {}) {
|
|
7
|
+
super(opts);
|
|
16
8
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
getUrlForProxy(url) {
|
|
10
|
+
if (url === '') {
|
|
11
|
+
url = '/';
|
|
12
|
+
}
|
|
13
|
+
const proxyBase = `${this.scheme}://${this.server}:${this.port}${this.base}`;
|
|
14
|
+
let remainingUrl = '';
|
|
15
|
+
if ((new RegExp('^/')).test(url)) {
|
|
16
|
+
remainingUrl = url;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
throw new Error(`Did not know what to do with url '${url}'`);
|
|
20
|
+
}
|
|
21
|
+
remainingUrl = remainingUrl.replace(/\/$/, ''); // can't have trailing slashes
|
|
22
|
+
return proxyBase + remainingUrl;
|
|
23
23
|
}
|
|
24
|
-
remainingUrl = remainingUrl.replace(/\/$/, '');
|
|
25
|
-
return proxyBase + remainingUrl;
|
|
26
|
-
}
|
|
27
24
|
}
|
|
28
25
|
exports.NoSessionProxy = NoSessionProxy;
|
|
29
|
-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FPLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQztJQUM5QyxPQUFPVCxTQUFTLEdBQUdLLFlBQVk7RUFDakM7QUFDRjtBQUFDSyxPQUFBLENBQUFoQixjQUFBLEdBQUFBLGNBQUE7QUFBQSxJQUFBaUIsUUFBQSxHQUdjakIsY0FBYztBQUFBZ0IsT0FBQSxDQUFBRSxPQUFBLEdBQUFELFFBQUEifQ==
|
|
26
|
+
exports.default = NoSessionProxy;
|
|
27
|
+
//# sourceMappingURL=no-session-proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-session-proxy.js","
|
|
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;YACd,GAAG,GAAG,GAAG,CAAC;SACX;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;YAChC,YAAY,GAAG,GAAG,CAAC;SACpB;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,qCAAqC,GAAG,GAAG,CAAC,CAAC;SAC9D;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"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
export const BOOTSTRAP_PATH: string;
|
|
2
|
+
/**
|
|
3
|
+
* Information of the device under test
|
|
4
|
+
*/
|
|
5
|
+
export type DeviceInfo = {
|
|
6
|
+
/**
|
|
7
|
+
* - Equals to true if the current device is a real device
|
|
8
|
+
*/
|
|
9
|
+
isRealDevice: string;
|
|
10
|
+
/**
|
|
11
|
+
* - The device UDID.
|
|
12
|
+
*/
|
|
13
|
+
udid: string;
|
|
14
|
+
/**
|
|
15
|
+
* - The platform version of OS.
|
|
16
|
+
*/
|
|
17
|
+
platformVersion: string;
|
|
18
|
+
/**
|
|
19
|
+
* - The platform name of iOS, tvOS
|
|
20
|
+
*/
|
|
21
|
+
platformName: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Update WebDriverAgentRunner project bundle ID with newBundleId.
|
|
25
|
+
* This method assumes project file is in the correct state.
|
|
26
|
+
* @param {string} agentPath - Path to the .xcodeproj directory.
|
|
27
|
+
* @param {string} newBundleId the new bundle ID used to update.
|
|
28
|
+
*/
|
|
29
|
+
export function updateProjectFile(agentPath: string, newBundleId: string): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Reset WebDriverAgentRunner project bundle ID to correct state.
|
|
32
|
+
* @param {string} agentPath - Path to the .xcodeproj directory.
|
|
33
|
+
*/
|
|
34
|
+
export function resetProjectFile(agentPath: string): Promise<void>;
|
|
35
|
+
export function setRealDeviceSecurity(keychainPath: any, keychainPassword: any): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Return the WDA object which appends existing xctest runner content
|
|
38
|
+
* @param {string} platformName - The name of the platform
|
|
39
|
+
* @param {number|string} wdaRemotePort - The remote port number
|
|
40
|
+
* @return {object} returns a runner object which has USE_PORT
|
|
41
|
+
*/
|
|
42
|
+
export function getAdditionalRunContent(platformName: string, wdaRemotePort: number | string): object;
|
|
43
|
+
/**
|
|
44
|
+
* Return the name of xctestrun file
|
|
45
|
+
* @param {DeviceInfo} deviceInfo
|
|
46
|
+
* @param {string} version - The Xcode SDK version of OS.
|
|
47
|
+
* @return {string} returns xctestrunFilePath for given device
|
|
48
|
+
*/
|
|
49
|
+
export function getXctestrunFileName(deviceInfo: DeviceInfo, version: string): string;
|
|
50
|
+
export function generateXcodeConfigFile(orgId: any, signingId: any): Promise<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Information of the device under test
|
|
53
|
+
* @typedef {Object} DeviceInfo
|
|
54
|
+
* @property {string} isRealDevice - Equals to true if the current device is a real device
|
|
55
|
+
* @property {string} udid - The device UDID.
|
|
56
|
+
* @property {string} platformVersion - The platform version of OS.
|
|
57
|
+
* @property {string} platformName - The platform name of iOS, tvOS
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* Creates xctestrun file per device & platform version.
|
|
61
|
+
* We expects to have WebDriverAgentRunner_iphoneos${sdkVersion|platformVersion}-arm64.xctestrun for real device
|
|
62
|
+
* and WebDriverAgentRunner_iphonesimulator${sdkVersion|platformVersion}-x86_64.xctestrun for simulator located @bootstrapPath
|
|
63
|
+
* Newer Xcode (Xcode 10.0 at least) generate xctestrun file following sdkVersion.
|
|
64
|
+
* e.g. Xcode which has iOS SDK Version 12.2 generate WebDriverAgentRunner_iphonesimulator.2-x86_64.xctestrun
|
|
65
|
+
* even if the cap has platform version 11.4
|
|
66
|
+
*
|
|
67
|
+
* @param {DeviceInfo} deviceInfo
|
|
68
|
+
* @param {string} sdkVersion - The Xcode SDK version of OS.
|
|
69
|
+
* @param {string} bootstrapPath - The folder path containing xctestrun file.
|
|
70
|
+
* @param {number|string} wdaRemotePort - The remote port WDA is listening on.
|
|
71
|
+
* @return {Promise<string>} returns xctestrunFilePath for given device
|
|
72
|
+
* @throws if WebDriverAgentRunner_iphoneos${sdkVersion|platformVersion}-arm64.xctestrun for real device
|
|
73
|
+
* or WebDriverAgentRunner_iphonesimulator${sdkVersion|platformVersion}-x86_64.xctestrun for simulator is not found @bootstrapPath,
|
|
74
|
+
* then it will throw file not found exception
|
|
75
|
+
*/
|
|
76
|
+
export function setXctestrunFile(deviceInfo: DeviceInfo, sdkVersion: string, bootstrapPath: string, wdaRemotePort: number | string): Promise<string>;
|
|
77
|
+
/**
|
|
78
|
+
* Return the path of xctestrun if it exists
|
|
79
|
+
* @param {DeviceInfo} deviceInfo
|
|
80
|
+
* @param {string} sdkVersion - The Xcode SDK version of OS.
|
|
81
|
+
* @param {string} bootstrapPath - The folder path containing xctestrun file.
|
|
82
|
+
* @returns {Promise<string>}
|
|
83
|
+
*/
|
|
84
|
+
export function getXctestrunFilePath(deviceInfo: DeviceInfo, sdkVersion: string, bootstrapPath: string): Promise<string>;
|
|
85
|
+
export function killProcess(name: any, proc: any): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Generate a random integer.
|
|
88
|
+
*
|
|
89
|
+
* @return {number} A random integer number in range [low, hight). `low`` is inclusive and `high` is exclusive.
|
|
90
|
+
*/
|
|
91
|
+
export function randomInt(low: any, high: any): number;
|
|
92
|
+
/**
|
|
93
|
+
* Retrieves WDA upgrade timestamp
|
|
94
|
+
*
|
|
95
|
+
* @return {Promise<number?>} The UNIX timestamp of the package manifest. The manifest only gets modified on
|
|
96
|
+
* package upgrade.
|
|
97
|
+
*/
|
|
98
|
+
export function getWDAUpgradeTimestamp(): Promise<number | null>;
|
|
99
|
+
/**
|
|
100
|
+
* Kills running XCTest processes for the particular device.
|
|
101
|
+
*
|
|
102
|
+
* @param {string} udid - The device UDID.
|
|
103
|
+
* @param {boolean} isSimulator - Equals to true if the current device is a Simulator
|
|
104
|
+
*/
|
|
105
|
+
export function resetTestProcesses(udid: string, isSimulator: boolean): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Get the IDs of processes listening on the particular system port.
|
|
108
|
+
* It is also possible to apply additional filtering based on the
|
|
109
|
+
* process command line.
|
|
110
|
+
*
|
|
111
|
+
* @param {string|number} port - The port number.
|
|
112
|
+
* @param {?Function} filteringFunc - Optional lambda function, which
|
|
113
|
+
* receives command line string of the particular process
|
|
114
|
+
* listening on given port, and is expected to return
|
|
115
|
+
* either true or false to include/exclude the corresponding PID
|
|
116
|
+
* from the resulting array.
|
|
117
|
+
* @returns {Promise<string[]>} - the list of matched process ids.
|
|
118
|
+
*/
|
|
119
|
+
export function getPIDsListeningOnPort(port: string | number, filteringFunc?: Function | null): Promise<string[]>;
|
|
120
|
+
export function killAppUsingPattern(pgrepPattern: any): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Return true if the platformName is tvOS
|
|
123
|
+
* @param {string} platformName The name of the platorm
|
|
124
|
+
* @returns {boolean} Return true if the platformName is tvOS
|
|
125
|
+
*/
|
|
126
|
+
export function isTvOS(platformName: string): boolean;
|
|
127
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":"AAmCA,oCAA8C;;;;;;;;kBA2IhC,MAAM;;;;UACN,MAAM;;;;qBACN,MAAM;;;;kBACN,MAAM;;AAlEpB;;;;;GAKG;AACH,6CAHW,MAAM,eACN,MAAM,iBAchB;AAED;;;GAGG;AACH,4CAFW,MAAM,iBAiBhB;AAED,+FAKC;AAiDD;;;;;GAKG;AACH,sDAJW,MAAM,iBACN,MAAM,GAAC,MAAM,GACZ,MAAM,CAajB;AA4CD;;;;;GAKG;AACH,iDAJW,UAAU,WACV,MAAM,GACL,MAAM,CAMjB;AAtHD,qFAUC;AAED;;;;;;;EAOE;AACF;;;;;;;;;;;;;;;;GAgBG;AACH,6CATW,UAAU,cACV,MAAM,iBACN,MAAM,iBACN,MAAM,GAAC,MAAM,GACZ,QAAQ,MAAM,CAAC,CAa1B;AAqBD;;;;;;GAMG;AACH,iDALW,UAAU,cACV,MAAM,iBACN,MAAM,GACJ,QAAQ,MAAM,CAAC,CAkC3B;AAeD,iEA4BC;AAED;;;;GAIG;AACH,gDAFY,MAAM,CAIjB;AAED;;;;;GAKG;AACH,0CAHY,QAAQ,MAAM,QAAE,CAU3B;AAED;;;;;GAKG;AACH,yCAHW,MAAM,eACN,OAAO,iBAWjB;AAED;;;;;;;;;;;;GAYG;AACH,6CARW,MAAM,GAAC,MAAM,oCAMX,QAAQ,MAAM,EAAE,CAAC,CAgC7B;AAnVD,sEAqCC;AAED;;;;GAIG;AACH,qCAHW,MAAM,GACJ,OAAO,CAInB"}
|