appium 3.5.0 → 3.5.2
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/build/lib/appium.d.ts.map +1 -1
- package/build/lib/appium.js +43 -45
- package/build/lib/appium.js.map +1 -1
- package/build/lib/bidi-commands.d.ts.map +1 -1
- package/build/lib/bidi-commands.js +34 -29
- package/build/lib/bidi-commands.js.map +1 -1
- package/build/lib/bootstrap/appium-initializer.d.ts.map +1 -1
- package/build/lib/bootstrap/appium-initializer.js +13 -13
- package/build/lib/bootstrap/appium-initializer.js.map +1 -1
- package/build/lib/bootstrap/appium-main-runner.d.ts.map +1 -1
- package/build/lib/bootstrap/appium-main-runner.js +2 -2
- package/build/lib/bootstrap/appium-main-runner.js.map +1 -1
- package/build/lib/bootstrap/config-file.d.ts.map +1 -1
- package/build/lib/bootstrap/config-file.js +11 -11
- package/build/lib/bootstrap/config-file.js.map +1 -1
- package/build/lib/bootstrap/grid-v3-register.d.ts.map +1 -1
- package/build/lib/bootstrap/grid-v3-register.js +9 -6
- package/build/lib/bootstrap/grid-v3-register.js.map +1 -1
- package/build/lib/bootstrap/main-helpers.d.ts +1 -1
- package/build/lib/bootstrap/main-helpers.d.ts.map +1 -1
- package/build/lib/bootstrap/main-helpers.js +19 -20
- package/build/lib/bootstrap/main-helpers.js.map +1 -1
- package/build/lib/bootstrap/node-helpers.d.ts +1 -1
- package/build/lib/bootstrap/node-helpers.d.ts.map +1 -1
- package/build/lib/bootstrap/node-helpers.js +7 -14
- package/build/lib/bootstrap/node-helpers.js.map +1 -1
- package/build/lib/bootstrap/startup-config.d.ts.map +1 -1
- package/build/lib/bootstrap/startup-config.js +32 -30
- package/build/lib/bootstrap/startup-config.js.map +1 -1
- package/build/lib/cli/args.d.ts +3 -2
- package/build/lib/cli/args.d.ts.map +1 -1
- package/build/lib/cli/args.js +2 -5
- package/build/lib/cli/args.js.map +1 -1
- package/build/lib/cli/driver-command.d.ts +1 -2
- package/build/lib/cli/driver-command.d.ts.map +1 -1
- package/build/lib/cli/driver-command.js +7 -8
- package/build/lib/cli/driver-command.js.map +1 -1
- package/build/lib/cli/extension-command.d.ts +2 -2
- package/build/lib/cli/extension-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.js +100 -66
- package/build/lib/cli/extension-command.js.map +1 -1
- package/build/lib/cli/extension.d.ts.map +1 -1
- package/build/lib/cli/extension.js.map +1 -1
- package/build/lib/cli/parser.d.ts.map +1 -1
- package/build/lib/cli/parser.js +21 -14
- package/build/lib/cli/parser.js.map +1 -1
- package/build/lib/cli/plugin-command.d.ts +1 -1
- package/build/lib/cli/plugin-command.d.ts.map +1 -1
- package/build/lib/cli/plugin-command.js +5 -5
- package/build/lib/cli/plugin-command.js.map +1 -1
- package/build/lib/cli/setup-command.d.ts +1 -1
- package/build/lib/cli/setup-command.d.ts.map +1 -1
- package/build/lib/cli/setup-command.js +14 -19
- package/build/lib/cli/setup-command.js.map +1 -1
- package/build/lib/cli/utils.d.ts.map +1 -1
- package/build/lib/cli/utils.js +3 -2
- package/build/lib/cli/utils.js.map +1 -1
- package/build/lib/doctor/doctor.d.ts +0 -1
- package/build/lib/doctor/doctor.d.ts.map +1 -1
- package/build/lib/doctor/doctor.js +12 -17
- package/build/lib/doctor/doctor.js.map +1 -1
- package/build/lib/extension/driver-config.d.ts.map +1 -1
- package/build/lib/extension/driver-config.js +11 -12
- package/build/lib/extension/driver-config.js.map +1 -1
- package/build/lib/extension/extension-config.d.ts.map +1 -1
- package/build/lib/extension/extension-config.js +28 -27
- package/build/lib/extension/extension-config.js.map +1 -1
- package/build/lib/extension/index.d.ts.map +1 -1
- package/build/lib/extension/index.js +13 -16
- package/build/lib/extension/index.js.map +1 -1
- package/build/lib/extension/manifest.d.ts +3 -2
- package/build/lib/extension/manifest.d.ts.map +1 -1
- package/build/lib/extension/manifest.js +19 -22
- package/build/lib/extension/manifest.js.map +1 -1
- package/build/lib/extension/plugin-config.d.ts.map +1 -1
- package/build/lib/extension/plugin-config.js +7 -9
- package/build/lib/extension/plugin-config.js.map +1 -1
- package/build/lib/helpers/build.d.ts +0 -1
- package/build/lib/helpers/build.d.ts.map +1 -1
- package/build/lib/helpers/build.js +2 -4
- package/build/lib/helpers/build.js.map +1 -1
- package/build/lib/helpers/capability.d.ts.map +1 -1
- package/build/lib/helpers/capability.js +27 -22
- package/build/lib/helpers/capability.js.map +1 -1
- package/build/lib/helpers/network.d.ts.map +1 -1
- package/build/lib/helpers/network.js +4 -3
- package/build/lib/helpers/network.js.map +1 -1
- package/build/lib/insecure-features.d.ts.map +1 -1
- package/build/lib/insecure-features.js +9 -13
- package/build/lib/insecure-features.js.map +1 -1
- package/build/lib/inspector-commands.d.ts.map +1 -1
- package/build/lib/inspector-commands.js +29 -28
- package/build/lib/inspector-commands.js.map +1 -1
- package/build/lib/logsink.d.ts.map +1 -1
- package/build/lib/logsink.js +8 -7
- package/build/lib/logsink.js.map +1 -1
- package/build/lib/schema/arg-spec.d.ts.map +1 -1
- package/build/lib/schema/arg-spec.js +5 -8
- package/build/lib/schema/arg-spec.js.map +1 -1
- package/build/lib/schema/cli-args.d.ts.map +1 -1
- package/build/lib/schema/cli-args.js +20 -19
- package/build/lib/schema/cli-args.js.map +1 -1
- package/build/lib/schema/cli-transformers.d.ts.map +1 -1
- package/build/lib/schema/cli-transformers.js.map +1 -1
- package/build/lib/schema/schema.d.ts.map +1 -1
- package/build/lib/schema/schema.js +28 -21
- package/build/lib/schema/schema.js.map +1 -1
- package/build/lib/utils/hash.d.ts +5 -0
- package/build/lib/utils/hash.d.ts.map +1 -0
- package/build/lib/{utils.js → utils/hash.js} +3 -21
- package/build/lib/utils/hash.js.map +1 -0
- package/build/lib/utils/index.d.ts +8 -0
- package/build/lib/utils/index.d.ts.map +1 -0
- package/build/lib/utils/index.js +31 -0
- package/build/lib/utils/index.js.map +1 -0
- package/build/lib/utils/is-package-changed.d.ts +16 -0
- package/build/lib/utils/is-package-changed.d.ts.map +1 -0
- package/build/lib/utils/is-package-changed.js +62 -0
- package/build/lib/utils/is-package-changed.js.map +1 -0
- package/build/lib/utils/object.d.ts +120 -0
- package/build/lib/utils/object.d.ts.map +1 -0
- package/build/lib/utils/object.js +288 -0
- package/build/lib/utils/object.js.map +1 -0
- package/build/lib/{extension → utils}/package-changed.d.ts +0 -1
- package/build/lib/utils/package-changed.d.ts.map +1 -0
- package/build/lib/{extension → utils}/package-changed.js +3 -4
- package/build/lib/utils/package-changed.js.map +1 -0
- package/build/lib/utils/package-json.d.ts +9 -0
- package/build/lib/utils/package-json.d.ts.map +1 -0
- package/build/lib/utils/package-json.js +32 -0
- package/build/lib/utils/package-json.js.map +1 -0
- package/build/lib/utils/resolve-from.d.ts +11 -0
- package/build/lib/utils/resolve-from.d.ts.map +1 -0
- package/build/lib/utils/resolve-from.js +41 -0
- package/build/lib/utils/resolve-from.js.map +1 -0
- package/build/types/cli.d.ts.map +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/manifest/base.d.ts.map +1 -1
- package/build/types/manifest/v3.d.ts.map +1 -1
- package/build/types/manifest/v4.d.ts.map +1 -1
- package/lib/appium.ts +59 -55
- package/lib/bidi-commands.ts +106 -60
- package/lib/bootstrap/appium-initializer.ts +27 -19
- package/lib/bootstrap/appium-main-runner.ts +8 -4
- package/lib/bootstrap/config-file.ts +33 -16
- package/lib/bootstrap/grid-v3-register.ts +26 -19
- package/lib/bootstrap/main-helpers.ts +25 -19
- package/lib/bootstrap/node-helpers.ts +19 -22
- package/lib/bootstrap/startup-config.ts +42 -39
- package/lib/cli/args.ts +3 -4
- package/lib/cli/driver-command.ts +19 -13
- package/lib/cli/extension-command.ts +208 -143
- package/lib/cli/extension.ts +4 -6
- package/lib/cli/parser.ts +32 -30
- package/lib/cli/plugin-command.ts +20 -9
- package/lib/cli/setup-command.ts +54 -39
- package/lib/cli/utils.ts +4 -3
- package/lib/doctor/doctor.ts +15 -17
- package/lib/extension/driver-config.ts +22 -17
- package/lib/extension/extension-config.ts +74 -66
- package/lib/extension/index.ts +42 -25
- package/lib/extension/manifest.ts +34 -31
- package/lib/extension/plugin-config.ts +15 -10
- package/lib/helpers/build.ts +6 -5
- package/lib/helpers/capability.ts +40 -35
- package/lib/helpers/network.ts +6 -5
- package/lib/insecure-features.ts +16 -14
- package/lib/inspector-commands.ts +72 -40
- package/lib/logsink.ts +22 -26
- package/lib/schema/arg-spec.ts +9 -8
- package/lib/schema/cli-args-guards.ts +4 -4
- package/lib/schema/cli-args.ts +25 -21
- package/lib/schema/cli-transformers.ts +6 -2
- package/lib/schema/format-errors.ts +1 -1
- package/lib/schema/schema.ts +52 -38
- package/lib/{utils.ts → utils/hash.ts} +2 -19
- package/lib/utils/index.ts +23 -0
- package/lib/utils/is-package-changed.ts +78 -0
- package/lib/utils/object.ts +312 -0
- package/lib/{extension → utils}/package-changed.ts +6 -7
- package/lib/utils/package-json.ts +36 -0
- package/lib/utils/resolve-from.ts +40 -0
- package/package.json +13 -16
- package/scripts/autoinstall-extensions.js +8 -8
- package/tsconfig.json +8 -2
- package/types/cli.ts +18 -18
- package/types/index.ts +2 -2
- package/types/manifest/base.ts +2 -2
- package/types/manifest/v3.ts +2 -2
- package/types/manifest/v4.ts +2 -2
- package/build/lib/extension/package-changed.d.ts.map +0 -1
- package/build/lib/extension/package-changed.js.map +0 -1
- package/build/lib/utils.d.ts +0 -13
- package/build/lib/utils.d.ts.map +0 -1
- package/build/lib/utils.js.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
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.appiumPackageRoot = exports.npmPackage = void 0;
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
function readPackageJsonSync() {
|
|
10
|
+
let current = node_path_1.default.resolve(__dirname);
|
|
11
|
+
const root = node_path_1.default.parse(current).root;
|
|
12
|
+
let pkgRoot;
|
|
13
|
+
while (true) {
|
|
14
|
+
if (node_fs_1.default.existsSync(node_path_1.default.join(current, 'package.json'))) {
|
|
15
|
+
pkgRoot = current;
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
if (current === root) {
|
|
19
|
+
throw new Error(`Could not find \`package.json\` from ${__dirname}`);
|
|
20
|
+
}
|
|
21
|
+
current = node_path_1.default.dirname(current);
|
|
22
|
+
}
|
|
23
|
+
const pkg = JSON.parse(node_fs_1.default.readFileSync(node_path_1.default.join(pkgRoot, 'package.json'), 'utf8'));
|
|
24
|
+
if (typeof pkg.name !== 'string' || typeof pkg.version !== 'string') {
|
|
25
|
+
throw new Error(`Invalid \`package.json\` near ${__dirname}`);
|
|
26
|
+
}
|
|
27
|
+
return { pkgRoot, pkg: pkg };
|
|
28
|
+
}
|
|
29
|
+
const { pkg, pkgRoot } = readPackageJsonSync();
|
|
30
|
+
exports.npmPackage = pkg;
|
|
31
|
+
exports.appiumPackageRoot = pkgRoot;
|
|
32
|
+
//# sourceMappingURL=package-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-json.js","sourceRoot":"","sources":["../../../lib/utils/package-json.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6B;AAC7B,0DAA6B;AAQ7B,SAAS,mBAAmB;IAC1B,IAAI,OAAO,GAAG,mBAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,mBAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;IACtC,IAAI,OAAe,CAAC;IACpB,OAAO,IAAI,EAAE,CAAC;QACZ,IAAI,iBAAM,CAAC,UAAU,CAAC,mBAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YAC1D,OAAO,GAAG,OAAO,CAAC;YAClB,MAAM;QACR,CAAC;QACD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,wCAAwC,SAAS,EAAE,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,GAAG,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,iBAAM,CAAC,YAAY,CAAC,mBAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CACjD,CAAC;IACjB,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,EAAC,OAAO,EAAE,GAAG,EAAE,GAAwB,EAAC,CAAC;AAClD,CAAC;AAED,MAAM,EAAC,GAAG,EAAE,OAAO,EAAC,GAAG,mBAAmB,EAAE,CAAC;AAEhC,QAAA,UAAU,GAAG,GAAG,CAAC;AACjB,QAAA,iBAAiB,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves `moduleId` using Node's module resolution from `fromDirectory`.
|
|
3
|
+
*
|
|
4
|
+
* @param fromDirectory - Directory to resolve from (typically a project or `APPIUM_HOME` root)
|
|
5
|
+
* @param moduleId - Module id or path to resolve (e.g. `semver/package.json`)
|
|
6
|
+
* @returns Resolved module id. Package paths are typically absolute filesystem paths; built-in
|
|
7
|
+
* modules may resolve to non-absolute ids (e.g. `node:fs`, `fs`).
|
|
8
|
+
* @throws `Error` if Node cannot resolve `moduleId` from `fromDirectory`
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveFrom(fromDirectory: string, moduleId: string): Promise<string>;
|
|
11
|
+
//# sourceMappingURL=resolve-from.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-from.d.ts","sourceRoot":"","sources":["../../../lib/utils/resolve-from.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0B1F"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
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.resolveFrom = resolveFrom;
|
|
7
|
+
const promises_1 = require("node:fs/promises");
|
|
8
|
+
const node_module_1 = __importDefault(require("node:module"));
|
|
9
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
+
/**
|
|
11
|
+
* Resolves `moduleId` using Node's module resolution from `fromDirectory`.
|
|
12
|
+
*
|
|
13
|
+
* @param fromDirectory - Directory to resolve from (typically a project or `APPIUM_HOME` root)
|
|
14
|
+
* @param moduleId - Module id or path to resolve (e.g. `semver/package.json`)
|
|
15
|
+
* @returns Resolved module id. Package paths are typically absolute filesystem paths; built-in
|
|
16
|
+
* modules may resolve to non-absolute ids (e.g. `node:fs`, `fs`).
|
|
17
|
+
* @throws `Error` if Node cannot resolve `moduleId` from `fromDirectory`
|
|
18
|
+
*/
|
|
19
|
+
async function resolveFrom(fromDirectory, moduleId) {
|
|
20
|
+
let resolvedFromDirectory;
|
|
21
|
+
try {
|
|
22
|
+
resolvedFromDirectory = await (0, promises_1.realpath)(fromDirectory);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
const err = error;
|
|
26
|
+
if (err.code === 'ENOENT') {
|
|
27
|
+
resolvedFromDirectory = node_path_1.default.resolve(fromDirectory);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const fromFile = node_path_1.default.join(resolvedFromDirectory, 'noop.js');
|
|
34
|
+
const nodeModule = node_module_1.default;
|
|
35
|
+
return nodeModule._resolveFilename(moduleId, {
|
|
36
|
+
id: fromFile,
|
|
37
|
+
filename: fromFile,
|
|
38
|
+
paths: nodeModule._nodeModulePaths(resolvedFromDirectory),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=resolve-from.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-from.js","sourceRoot":"","sources":["../../../lib/utils/resolve-from.ts"],"names":[],"mappings":";;;;;AAaA,kCA0BC;AAvCD,+CAA0C;AAC1C,8DAAiC;AACjC,0DAA6B;AAE7B;;;;;;;;GAQG;AACI,KAAK,UAAU,WAAW,CAAC,aAAqB,EAAE,QAAgB;IACvE,IAAI,qBAA6B,CAAC;IAClC,IAAI,CAAC;QACH,qBAAqB,GAAG,MAAM,IAAA,mBAAQ,EAAC,aAAa,CAAC,CAAC;IACxD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,KAA8B,CAAC;QAC3C,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC1B,qBAAqB,GAAG,mBAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,mBAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;IAC7D,MAAM,UAAU,GAAG,qBAMlB,CAAC;IACF,OAAO,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE;QAC3C,EAAE,EAAE,QAAQ;QACZ,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,UAAU,CAAC,gBAAgB,CA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EG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAEnG,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,UAAU;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,OAAO,SAAS,aAAa,IAAI,OAAO,SAAS,UAAU,GAC5E,WAAW,GACX,OAAO,SAAS,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAEnG,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,UAAU;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,OAAO,SAAS,aAAa,IAAI,OAAO,SAAS,UAAU,GAC5E,WAAW,GACX,OAAO,SAAS,UAAU,GACxB,WAAW,GACX,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../types/manifest/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,U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Ac,CAAC,OAAO,SAAS,aAAa,IAAI,WAAW,CACrE,WAAW,EACX,MAAM,GAAG,SAAS,CACnB,GAAG;IACF,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,gBAAgB,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC;CAC3D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,aAAa,IAAI,WAAW,CAAC,OAAO,CAAC,GACjF,gBAAgB,CAAC"}
|
package/lib/appium.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _ from 'lodash';
|
|
2
1
|
import type WebSocket from 'ws';
|
|
3
2
|
import type {
|
|
4
3
|
AppiumServer,
|
|
@@ -48,6 +47,7 @@ import * as insecureFeatures from './insecure-features';
|
|
|
48
47
|
import * as inspectorCommands from './inspector-commands';
|
|
49
48
|
import type {DriverConfig} from './extension/driver-config';
|
|
50
49
|
import {AppiumIpc} from '@appium/base-driver';
|
|
50
|
+
import {compact, pickBy, pull} from './utils';
|
|
51
51
|
|
|
52
52
|
const desiredCapabilityConstraints = {
|
|
53
53
|
automationName: {
|
|
@@ -191,7 +191,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
191
191
|
};
|
|
192
192
|
return {
|
|
193
193
|
...statusObj,
|
|
194
|
-
build:
|
|
194
|
+
build: structuredClone(getBuildInfo()),
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -210,7 +210,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
210
210
|
*/
|
|
211
211
|
async getAppiumSessions(): Promise<TimestampedMultiSessionData[]> {
|
|
212
212
|
this.assertFeatureEnabled(SESSION_DISCOVERY_FEATURE);
|
|
213
|
-
return
|
|
213
|
+
return Object.entries(this.sessions).map(([id, driver]) => ({
|
|
214
214
|
id,
|
|
215
215
|
created: driver.sessionCreationTimestampMs,
|
|
216
216
|
capabilities: driver.caps as DriverCaps<AppiumDriverConstraints>,
|
|
@@ -221,7 +221,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
221
221
|
printNewSessionAnnouncement(
|
|
222
222
|
driverName: string,
|
|
223
223
|
driverVersion?: string,
|
|
224
|
-
driverBaseVersion?: string
|
|
224
|
+
driverBaseVersion?: string,
|
|
225
225
|
): void {
|
|
226
226
|
this.log.info(
|
|
227
227
|
driverVersion
|
|
@@ -255,15 +255,18 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
255
255
|
*/
|
|
256
256
|
getCliArgsForDriver(extName: string): StringRecord | undefined {
|
|
257
257
|
const allCliArgsForExt = this.args.driver?.[extName] as StringRecord | undefined;
|
|
258
|
-
if (
|
|
258
|
+
if (util.isEmpty(allCliArgsForExt)) {
|
|
259
259
|
return undefined;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
const defaults = getDefaultsForExtension(DRIVER_TYPE, extName);
|
|
263
|
-
const cliArgs =
|
|
263
|
+
const cliArgs = util.isEmpty(defaults)
|
|
264
264
|
? allCliArgsForExt
|
|
265
|
-
:
|
|
266
|
-
|
|
265
|
+
: pickBy(
|
|
266
|
+
allCliArgsForExt as Record<string, unknown>,
|
|
267
|
+
(value, key) => !util.isEqual(defaults[key as string], value),
|
|
268
|
+
);
|
|
269
|
+
return util.isEmpty(cliArgs) ? undefined : (cliArgs as StringRecord);
|
|
267
270
|
}
|
|
268
271
|
|
|
269
272
|
/**
|
|
@@ -274,12 +277,12 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
274
277
|
async createSession(
|
|
275
278
|
w3cCapabilities1: W3CAppiumDriverCaps,
|
|
276
279
|
w3cCapabilities2?: W3CAppiumDriverCaps,
|
|
277
|
-
w3cCapabilities3?: W3CAppiumDriverCaps
|
|
280
|
+
w3cCapabilities3?: W3CAppiumDriverCaps,
|
|
278
281
|
): Promise<SessionHandlerCreateResult> {
|
|
279
|
-
const defaultCapabilities =
|
|
282
|
+
const defaultCapabilities = structuredClone(this.args.defaultCapabilities);
|
|
280
283
|
const defaultSettings = pullSettings((defaultCapabilities ?? {}) as StringRecord);
|
|
281
|
-
const w3cCapabilities =
|
|
282
|
-
[w3cCapabilities3, w3cCapabilities2, w3cCapabilities1].find(isW3cCaps)
|
|
284
|
+
const w3cCapabilities = structuredClone(
|
|
285
|
+
[w3cCapabilities3, w3cCapabilities2, w3cCapabilities1].find(isW3cCaps),
|
|
283
286
|
);
|
|
284
287
|
if (!w3cCapabilities) {
|
|
285
288
|
throw makeNonW3cCapsError();
|
|
@@ -300,7 +303,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
300
303
|
const parsedCaps = parseCapsForInnerDriver<AppiumDriverConstraints>(
|
|
301
304
|
promoteAppiumOptions(w3cCapabilities),
|
|
302
305
|
this.desiredCapConstraints,
|
|
303
|
-
defaultCapabilities ? promoteAppiumOptionsForObject(defaultCapabilities) : undefined
|
|
306
|
+
defaultCapabilities ? promoteAppiumOptionsForObject(defaultCapabilities) : undefined,
|
|
304
307
|
);
|
|
305
308
|
|
|
306
309
|
if ('error' in parsedCaps && parsedCaps.error) {
|
|
@@ -330,14 +333,14 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
330
333
|
// We also want to assign any new Bidi Commands that the driver has specified, including all
|
|
331
334
|
// the standard bidi commands. But add a method existence guard since some old driver class
|
|
332
335
|
// instances might not have this method
|
|
333
|
-
if (
|
|
336
|
+
if (typeof driverInstance.updateBidiCommands === 'function') {
|
|
334
337
|
driverInstance.updateBidiCommands(InnerDriver.newBidiCommands ?? {});
|
|
335
338
|
}
|
|
336
339
|
|
|
337
340
|
// Likewise, any driver-specific CLI args that were passed in should be assigned directly to
|
|
338
341
|
// the driver so that they cannot be mimicked by a malicious user sending in capabilities
|
|
339
342
|
const cliArgs = this.getCliArgsForDriver(driverName);
|
|
340
|
-
if (
|
|
343
|
+
if (cliArgs !== undefined) {
|
|
341
344
|
(driverInstance as ExternalDriver & {cliArgs?: StringRecord}).cliArgs = cliArgs;
|
|
342
345
|
}
|
|
343
346
|
|
|
@@ -357,7 +360,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
357
360
|
throw new errors.SessionNotCreatedError(msg);
|
|
358
361
|
}
|
|
359
362
|
this.pendingDrivers[InnerDriver.name] = this.pendingDrivers[InnerDriver.name] || [];
|
|
360
|
-
otherPendingDriversData =
|
|
363
|
+
otherPendingDriversData = compact(
|
|
361
364
|
this.pendingDrivers[InnerDriver.name].map((drv) => drv.driverData),
|
|
362
365
|
);
|
|
363
366
|
this.pendingDrivers[InnerDriver.name].push(driverInstance);
|
|
@@ -367,7 +370,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
367
370
|
processedW3CCapabilities as never,
|
|
368
371
|
processedW3CCapabilities,
|
|
369
372
|
processedW3CCapabilities,
|
|
370
|
-
[...runningDriversData, ...otherPendingDriversData]
|
|
373
|
+
[...runningDriversData, ...otherPendingDriversData],
|
|
371
374
|
)) as [string, DriverCaps<AppiumDriverConstraints> & {webSocketUrl?: string | boolean}];
|
|
372
375
|
this.sessions[innerSessionId] = driverInstance;
|
|
373
376
|
// create an IPC channel for the driver and all plugins on this session
|
|
@@ -377,12 +380,12 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
377
380
|
log: driverInstance.log,
|
|
378
381
|
});
|
|
379
382
|
const extDriver = driverInstance as unknown as IpcAssignable;
|
|
380
|
-
if (
|
|
383
|
+
if (typeof extDriver.assignIpc === 'function') {
|
|
381
384
|
// TODO remove this existence guard as a breaking change in Appium 3
|
|
382
385
|
await extDriver.assignIpc(this.sessionIpcs[innerSessionId]);
|
|
383
386
|
}
|
|
384
387
|
} finally {
|
|
385
|
-
|
|
388
|
+
pull(this.pendingDrivers[InnerDriver.name], driverInstance);
|
|
386
389
|
}
|
|
387
390
|
|
|
388
391
|
this.attachUnexpectedShutdownHandler(driverInstance, innerSessionId);
|
|
@@ -396,7 +399,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
396
399
|
await driverInstance.startNewCommandTimeout();
|
|
397
400
|
|
|
398
401
|
// apply initial values to Appium settings (if provided)
|
|
399
|
-
if (driverInstance.isW3CProtocol() && !
|
|
402
|
+
if (driverInstance.isW3CProtocol() && !util.isEmpty(w3cSettings)) {
|
|
400
403
|
this.log.info(
|
|
401
404
|
`Applying the initial values to Appium settings parsed from W3C caps: ` +
|
|
402
405
|
JSON.stringify(w3cSettings),
|
|
@@ -414,7 +417,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
414
417
|
const bidiUrl = `${scheme}://${host}:${port}${basePath}${BIDI_BASE_PATH}/${innerSessionId}`;
|
|
415
418
|
this.log.info(
|
|
416
419
|
`Upstream driver responded with webSocketUrl ${dCaps.webSocketUrl}, will rewrite to ` +
|
|
417
|
-
|
|
420
|
+
`${bidiUrl} for response to client`,
|
|
418
421
|
);
|
|
419
422
|
// @ts-ignore webSocketUrl gets sent by the client as a boolean, but then it is supposed
|
|
420
423
|
// to come back from the server as a string. TODO figure out how to express this in our
|
|
@@ -444,7 +447,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
444
447
|
|
|
445
448
|
if (this.sessionPlugins[innerSessionId]) {
|
|
446
449
|
for (const plugin of this.sessionPlugins[innerSessionId]) {
|
|
447
|
-
if (
|
|
450
|
+
if (typeof plugin.onUnexpectedShutdown === 'function') {
|
|
448
451
|
this.log.debug(
|
|
449
452
|
`Plugin ${plugin.name} defines an unexpected shutdown handler; calling it now`,
|
|
450
453
|
);
|
|
@@ -465,7 +468,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
465
468
|
this.deleteLinkedSessionObjects(innerSessionId);
|
|
466
469
|
};
|
|
467
470
|
|
|
468
|
-
if (
|
|
471
|
+
if (typeof driver.onUnexpectedShutdown === 'function') {
|
|
469
472
|
driver.onUnexpectedShutdown(onShutdown);
|
|
470
473
|
} else {
|
|
471
474
|
this.log.warn(
|
|
@@ -481,8 +484,8 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
481
484
|
* @remarks `InnerDriver` is expected to be the driver class; only `.name` is read.
|
|
482
485
|
*/
|
|
483
486
|
async curSessionDataForDriver(InnerDriver: {name: string}): Promise<DriverData[]> {
|
|
484
|
-
const data =
|
|
485
|
-
|
|
487
|
+
const data = compact(
|
|
488
|
+
Object.values(this.sessions)
|
|
486
489
|
.filter((s) => s.constructor.name === InnerDriver.name)
|
|
487
490
|
.map((s) => s.driverData),
|
|
488
491
|
);
|
|
@@ -508,7 +511,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
508
511
|
let dstSession: ExternalDriver | undefined;
|
|
509
512
|
if (this.sessions[sessionId]) {
|
|
510
513
|
const curConstructorName = this.sessions[sessionId].constructor.name;
|
|
511
|
-
otherSessionsData =
|
|
514
|
+
otherSessionsData = Object.entries(this.sessions)
|
|
512
515
|
.filter(
|
|
513
516
|
([key, value]) => value.constructor.name === curConstructorName && key !== sessionId,
|
|
514
517
|
)
|
|
@@ -548,7 +551,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
548
551
|
* when `force` is true.
|
|
549
552
|
*/
|
|
550
553
|
async deleteAllSessions(opts: {force?: boolean; reason?: string} = {}): Promise<void> {
|
|
551
|
-
const sessionsCount =
|
|
554
|
+
const sessionsCount = Object.keys(this.sessions).length;
|
|
552
555
|
if (0 === sessionsCount) {
|
|
553
556
|
this.log.debug('There are no active sessions for cleanup');
|
|
554
557
|
return;
|
|
@@ -557,10 +560,10 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
557
560
|
const {force = false, reason} = opts;
|
|
558
561
|
this.log.debug(`Cleaning up ${util.pluralize('active session', sessionsCount, true)}`);
|
|
559
562
|
const cleanupPromises = force
|
|
560
|
-
?
|
|
563
|
+
? Object.values(this.sessions).map((drv) =>
|
|
561
564
|
drv.startUnexpectedShutdown(reason ? new Error(reason) : undefined),
|
|
562
565
|
)
|
|
563
|
-
:
|
|
566
|
+
: Object.keys(this.sessions).map((id) => this.deleteSession(id));
|
|
564
567
|
for (const cleanupPromise of cleanupPromises) {
|
|
565
568
|
try {
|
|
566
569
|
await cleanupPromise;
|
|
@@ -589,7 +592,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
589
592
|
));
|
|
590
593
|
}
|
|
591
594
|
|
|
592
|
-
if (
|
|
595
|
+
if (util.isEmpty(this.sessionlessPlugins)) {
|
|
593
596
|
this.sessionlessPlugins = this.createPluginInstances();
|
|
594
597
|
}
|
|
595
598
|
return this.sessionlessPlugins;
|
|
@@ -602,9 +605,10 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
602
605
|
pluginsToHandleCmd(cmd: string, sessionId: string | null = null): Plugin[] {
|
|
603
606
|
// to handle a given command, a plugin should either implement that command as a plugin
|
|
604
607
|
// instance method or it should implement a generic 'handle' method
|
|
605
|
-
return this.pluginsForSession(sessionId).filter(
|
|
606
|
-
(p
|
|
607
|
-
|
|
608
|
+
return this.pluginsForSession(sessionId).filter((p) => {
|
|
609
|
+
const pluginMethod = (p as Plugin & Record<string, unknown>)[cmd];
|
|
610
|
+
return typeof pluginMethod === 'function' || typeof p.handle === 'function';
|
|
611
|
+
});
|
|
608
612
|
}
|
|
609
613
|
|
|
610
614
|
/**
|
|
@@ -617,7 +621,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
617
621
|
const cliArgs = this.getCliArgsForPlugin(name);
|
|
618
622
|
const plugin = new PluginClass(name, cliArgs, driverId);
|
|
619
623
|
const extPlugin = plugin as Plugin & ExtensionCore;
|
|
620
|
-
if (
|
|
624
|
+
if (typeof extPlugin.updateBidiCommands === 'function') {
|
|
621
625
|
extPlugin.updateBidiCommands(PluginClass.newBidiCommands ?? {});
|
|
622
626
|
}
|
|
623
627
|
pluginInstances.push(plugin);
|
|
@@ -646,7 +650,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
646
650
|
// if a plugin override proxying for this command and that is why we are here instead of just
|
|
647
651
|
// letting the protocol proxy the command entirely, determine that, get the request object for
|
|
648
652
|
// use later on, then clean up the args
|
|
649
|
-
const reqForProxy =
|
|
653
|
+
const reqForProxy = args.at(-1)?.reqForProxy;
|
|
650
654
|
if (reqForProxy) {
|
|
651
655
|
args.pop();
|
|
652
656
|
}
|
|
@@ -659,7 +663,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
659
663
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
660
664
|
let driver: this | ExternalDriver = this;
|
|
661
665
|
if (isSessionCmd) {
|
|
662
|
-
sessionId =
|
|
666
|
+
sessionId = args.at(-1) as string;
|
|
663
667
|
dstSession = this.sessions[sessionId] ?? null;
|
|
664
668
|
if (!dstSession) {
|
|
665
669
|
throw new Error(`The session with id '${sessionId}' does not exist`);
|
|
@@ -773,7 +777,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
773
777
|
// previously sessionless to use the new sessionId, so that plugins can share state between
|
|
774
778
|
// their createSession method and other instance methods
|
|
775
779
|
if (cmd === CREATE_SESSION_COMMAND && this.sessionlessPlugins.length && !res.error) {
|
|
776
|
-
const newSessionId =
|
|
780
|
+
const newSessionId = (res.value as unknown[])[0] as string;
|
|
777
781
|
this.log.info(
|
|
778
782
|
`Promoting ${this.sessionlessPlugins.length} sessionless plugins to be attached ` +
|
|
779
783
|
`to session ID ${newSessionId}`,
|
|
@@ -781,14 +785,14 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
781
785
|
this.sessionPlugins[newSessionId] = this.sessionlessPlugins;
|
|
782
786
|
const promoted = this.sessionPlugins[newSessionId] as (Plugin & ExtensionCore)[];
|
|
783
787
|
for (const p of promoted) {
|
|
784
|
-
if (
|
|
788
|
+
if (typeof p.updateLogPrefix === 'function') {
|
|
785
789
|
p.updateLogPrefix(
|
|
786
|
-
`${generateDriverLogPrefix(p)} <${generateDriverLogPrefix(this.sessions[newSessionId])}
|
|
790
|
+
`${generateDriverLogPrefix(p)} <${generateDriverLogPrefix(this.sessions[newSessionId])}>`,
|
|
787
791
|
);
|
|
788
792
|
}
|
|
789
793
|
// we also want to assign the IPC channel for this session to the plugins
|
|
790
794
|
const extPlugin = p as unknown as IpcAssignable;
|
|
791
|
-
if (
|
|
795
|
+
if (typeof extPlugin.assignIpc === 'function') {
|
|
792
796
|
// TODO remove this existence guard as a breaking change in Appium 4
|
|
793
797
|
await extPlugin.assignIpc(this.sessionIpcs[newSessionId]);
|
|
794
798
|
}
|
|
@@ -831,7 +835,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
831
835
|
cmdHandledBy[plugin.name] = true; // if we make it here, this plugin has attempted to handle cmd
|
|
832
836
|
// first attempt to handle the command via a command-specific handler on the plugin
|
|
833
837
|
const cmdHandler = (plugin as Plugin & Record<string, unknown>)[cmd];
|
|
834
|
-
if (
|
|
838
|
+
if (typeof cmdHandler === 'function') {
|
|
835
839
|
// Command methods must run with plugin as `this` (detached property access drops binding).
|
|
836
840
|
return await (cmdHandler as PluginCommand).call(
|
|
837
841
|
plugin,
|
|
@@ -840,7 +844,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
840
844
|
...args,
|
|
841
845
|
);
|
|
842
846
|
}
|
|
843
|
-
if (
|
|
847
|
+
if (typeof plugin.handle !== 'function') {
|
|
844
848
|
throw new Error(`Plugin ${plugin.name} cannot handle command '${cmd}'`);
|
|
845
849
|
}
|
|
846
850
|
return await plugin.handle(_next, driver as ExternalDriver, cmd, ...args);
|
|
@@ -853,7 +857,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
853
857
|
/** After a command with plugins, logs which handlers ran vs. were skipped (debugging aid). */
|
|
854
858
|
logPluginHandlerReport(
|
|
855
859
|
plugins: Plugin[],
|
|
856
|
-
{cmd, cmdHandledBy}: {cmd: string; cmdHandledBy: Record<string, boolean>}
|
|
860
|
+
{cmd, cmdHandledBy}: {cmd: string; cmdHandledBy: Record<string, boolean>},
|
|
857
861
|
): void {
|
|
858
862
|
if (!plugins.length) {
|
|
859
863
|
return;
|
|
@@ -899,7 +903,7 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
899
903
|
// Sadly, we don't know exactly what kind of object will be returned. It will either be a bare
|
|
900
904
|
// object, or a protocol-aware object with protocol and error/value keys. So we need to sniff
|
|
901
905
|
// it and make sure we don't double-wrap it if it's the latter kind.
|
|
902
|
-
if (
|
|
906
|
+
if (util.isPlainObject(cmdRes) && 'protocol' in cmdRes) {
|
|
903
907
|
Object.assign(res, cmdRes);
|
|
904
908
|
} else {
|
|
905
909
|
res.value = cmdRes;
|
|
@@ -912,19 +916,21 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
912
916
|
/** Whether the inner session driver is actively proxying for this session id. */
|
|
913
917
|
override proxyActive(sessionId: string): boolean {
|
|
914
918
|
const dstSession = this.sessions[sessionId];
|
|
915
|
-
return
|
|
919
|
+
return typeof dstSession?.proxyActive === 'function' && dstSession.proxyActive(sessionId);
|
|
916
920
|
}
|
|
917
921
|
|
|
918
922
|
/** URL patterns the session driver does not want proxied; empty if no session or no list. */
|
|
919
923
|
override getProxyAvoidList(sessionId: string): RouteMatcher[] {
|
|
920
924
|
const dstSession = this.sessions[sessionId];
|
|
921
|
-
return
|
|
925
|
+
return typeof dstSession?.getProxyAvoidList === 'function'
|
|
926
|
+
? dstSession.getProxyAvoidList()
|
|
927
|
+
: [];
|
|
922
928
|
}
|
|
923
929
|
|
|
924
930
|
/** Whether the session driver supports proxying for this session. */
|
|
925
931
|
override canProxy(sessionId: string): boolean {
|
|
926
932
|
const dstSession = this.sessions[sessionId];
|
|
927
|
-
return
|
|
933
|
+
return typeof dstSession?.canProxy === 'function' && dstSession.canProxy(sessionId);
|
|
928
934
|
}
|
|
929
935
|
|
|
930
936
|
private deleteLinkedSessionObjects(sessionId: string): void {
|
|
@@ -932,7 +938,6 @@ export class AppiumDriver extends DriverCore<AppiumDriverConstraints> {
|
|
|
932
938
|
delete this.sessionPlugins[sessionId];
|
|
933
939
|
delete this.sessionIpcs[sessionId];
|
|
934
940
|
}
|
|
935
|
-
|
|
936
941
|
}
|
|
937
942
|
|
|
938
943
|
/**
|
|
@@ -954,11 +959,10 @@ export class NoDriverProxyCommandError extends Error {
|
|
|
954
959
|
|
|
955
960
|
/** True if `cmd` should run on the umbrella driver instead of only on the session’s inner driver. */
|
|
956
961
|
function isAppiumDriverCommand(cmd: string): boolean {
|
|
957
|
-
return
|
|
958
|
-
||
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
962
|
+
return (
|
|
963
|
+
!isSessionCommand(cmd) ||
|
|
964
|
+
[DELETE_SESSION_COMMAND, LIST_DRIVER_COMMANDS_COMMAND, LIST_DRIVER_EXTENSIONS_COMMAND].includes(
|
|
965
|
+
cmd,
|
|
966
|
+
)
|
|
967
|
+
);
|
|
963
968
|
}
|
|
964
|
-
|