appium-espresso-driver 8.6.2 → 9.0.1
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 +16 -0
- package/build/lib/commands/actions.d.ts +1 -1
- package/build/lib/commands/actions.d.ts.map +1 -1
- package/build/lib/commands/actions.js +1 -4
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/app-install.d.ts +1 -1
- package/build/lib/commands/app-install.d.ts.map +1 -1
- package/build/lib/commands/app-install.js +31 -41
- package/build/lib/commands/app-install.js.map +1 -1
- package/build/lib/commands/app-management.d.ts +1 -1
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +8 -12
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/clipboard.d.ts +1 -1
- package/build/lib/commands/clipboard.d.ts.map +1 -1
- package/build/lib/commands/clipboard.js +2 -6
- package/build/lib/commands/clipboard.js.map +1 -1
- package/build/lib/commands/context.d.ts +1 -1
- package/build/lib/commands/context.d.ts.map +1 -1
- package/build/lib/commands/context.js +2 -6
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/element.d.ts +1 -1
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +17 -30
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/idling-resources.d.ts +1 -1
- package/build/lib/commands/idling-resources.d.ts.map +1 -1
- package/build/lib/commands/idling-resources.js +4 -10
- package/build/lib/commands/idling-resources.js.map +1 -1
- package/build/lib/commands/misc.d.ts +2 -2
- package/build/lib/commands/misc.d.ts.map +1 -1
- package/build/lib/commands/misc.js +14 -25
- package/build/lib/commands/misc.js.map +1 -1
- package/build/lib/commands/screenshot.d.ts +2 -2
- package/build/lib/commands/screenshot.d.ts.map +1 -1
- package/build/lib/commands/screenshot.js +2 -6
- package/build/lib/commands/screenshot.js.map +1 -1
- package/build/lib/commands/server/builder.js +24 -33
- package/build/lib/commands/server/builder.js.map +1 -1
- package/build/lib/commands/server/constants.js +5 -8
- package/build/lib/commands/server/constants.js.map +1 -1
- package/build/lib/commands/server/index.d.ts +4 -4
- package/build/lib/commands/server/index.d.ts.map +1 -1
- package/build/lib/commands/server/index.js +4 -16
- package/build/lib/commands/server/index.js.map +1 -1
- package/build/lib/commands/server/runner.d.ts +2 -2
- package/build/lib/commands/server/runner.d.ts.map +1 -1
- package/build/lib/commands/server/runner.js +59 -98
- package/build/lib/commands/server/runner.js.map +1 -1
- package/build/lib/commands/server/startup.d.ts +1 -1
- package/build/lib/commands/server/startup.d.ts.map +1 -1
- package/build/lib/commands/server/startup.js +16 -22
- package/build/lib/commands/server/startup.js.map +1 -1
- package/build/lib/commands/services.d.ts +1 -1
- package/build/lib/commands/services.d.ts.map +1 -1
- package/build/lib/commands/services.js +2 -6
- package/build/lib/commands/services.js.map +1 -1
- package/build/lib/commands/types.js +1 -2
- package/build/lib/constraints.js +3 -6
- package/build/lib/constraints.js.map +1 -1
- package/build/lib/doctor/optional-checks.js +3 -6
- package/build/lib/doctor/optional-checks.js.map +1 -1
- package/build/lib/doctor/required-checks.js +18 -25
- package/build/lib/doctor/required-checks.js.map +1 -1
- package/build/lib/driver.d.ts +12 -12
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +36 -73
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.js +3 -6
- package/build/lib/execute-method-map.js.map +1 -1
- package/build/lib/index.d.ts +1 -1
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +3 -6
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.js +2 -5
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.js +3 -6
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/types.d.ts +1 -1
- package/build/lib/types.d.ts.map +1 -1
- package/build/lib/types.js +1 -2
- package/build/lib/utils/app.js +1 -4
- package/build/lib/utils/app.js.map +1 -1
- package/build/lib/utils/index.d.ts +3 -3
- package/build/lib/utils/index.d.ts.map +1 -1
- package/build/lib/utils/index.js +3 -12
- package/build/lib/utils/index.js.map +1 -1
- package/build/lib/utils/package.d.ts.map +1 -1
- package/build/lib/utils/package.js +19 -24
- package/build/lib/utils/package.js.map +1 -1
- package/build/lib/utils/predicates.js +3 -8
- package/build/lib/utils/predicates.js.map +1 -1
- package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
- package/espresso-server/buildSrc/.gradle/{9.6.0 → 9.6.1}/executionHistory/executionHistory.bin +0 -0
- package/espresso-server/buildSrc/.gradle/9.6.1/executionHistory/executionHistory.lock +0 -0
- package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/espresso-server/buildSrc/.gradle/file-system.probe +0 -0
- package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
- package/espresso-server/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
- package/lib/commands/actions.ts +1 -1
- package/lib/commands/app-install.ts +4 -4
- package/lib/commands/app-management.ts +3 -3
- package/lib/commands/clipboard.ts +1 -1
- package/lib/commands/context.ts +1 -1
- package/lib/commands/element.ts +3 -3
- package/lib/commands/idling-resources.ts +1 -1
- package/lib/commands/misc.ts +4 -4
- package/lib/commands/screenshot.ts +2 -2
- package/lib/commands/server/builder.ts +2 -2
- package/lib/commands/server/index.ts +4 -4
- package/lib/commands/server/runner.ts +8 -6
- package/lib/commands/server/startup.ts +4 -4
- package/lib/commands/services.ts +1 -1
- package/lib/doctor/required-checks.ts +1 -1
- package/lib/driver.ts +19 -19
- package/lib/index.ts +1 -1
- package/lib/logger.ts +1 -1
- package/lib/types.ts +1 -1
- package/lib/utils/index.ts +3 -3
- package/lib/utils/package.ts +5 -3
- package/npm-shrinkwrap.json +120 -86
- package/package.json +15 -8
- package/espresso-server/buildSrc/.gradle/9.6.0/executionHistory/executionHistory.lock +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../lib/utils/package.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../lib/utils/package.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC,CAAC,CAyBD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAC,CAyBjG"}
|
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getPackageInfo = getPackageInfo;
|
|
7
|
-
exports.getPackageInfoSync = getPackageInfoSync;
|
|
8
|
-
const support_1 = require("appium/support");
|
|
9
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
-
const node_fs_1 = __importDefault(require("node:fs"));
|
|
1
|
+
import { fs } from 'appium/support.js';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import _fs from 'node:fs';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
11
5
|
let PACKAGE_INFO = null;
|
|
12
6
|
const MODULE_NAME = 'appium-espresso-driver';
|
|
7
|
+
const FILENAME = fileURLToPath(import.meta.url);
|
|
13
8
|
/**
|
|
14
9
|
* Fetches the module info from package.json
|
|
15
10
|
*
|
|
16
11
|
* @returns {Promise<Record<string, any>>} The full path to module's package.json and its payload
|
|
17
12
|
* @throws {Error} If package.json cannot be found
|
|
18
13
|
*/
|
|
19
|
-
async function getPackageInfo() {
|
|
14
|
+
export async function getPackageInfo() {
|
|
20
15
|
if (PACKAGE_INFO) {
|
|
21
16
|
return PACKAGE_INFO;
|
|
22
17
|
}
|
|
23
|
-
let currentDir =
|
|
18
|
+
let currentDir = path.dirname(FILENAME);
|
|
24
19
|
let isAtFsRoot = false;
|
|
25
20
|
while (!isAtFsRoot) {
|
|
26
|
-
const manifestPath =
|
|
21
|
+
const manifestPath = path.join(currentDir, 'package.json');
|
|
27
22
|
try {
|
|
28
|
-
if (await
|
|
29
|
-
const manifestPayload = JSON.parse(await
|
|
23
|
+
if (await fs.exists(manifestPath)) {
|
|
24
|
+
const manifestPayload = JSON.parse(await fs.readFile(manifestPath, 'utf8'));
|
|
30
25
|
if (manifestPayload.name === MODULE_NAME) {
|
|
31
26
|
PACKAGE_INFO = {
|
|
32
27
|
manifestPath,
|
|
@@ -37,8 +32,8 @@ async function getPackageInfo() {
|
|
|
37
32
|
}
|
|
38
33
|
}
|
|
39
34
|
catch { }
|
|
40
|
-
currentDir =
|
|
41
|
-
isAtFsRoot = currentDir.length <=
|
|
35
|
+
currentDir = path.dirname(currentDir);
|
|
36
|
+
isAtFsRoot = currentDir.length <= path.dirname(currentDir).length;
|
|
42
37
|
}
|
|
43
38
|
throw new Error(`Cannot find the root folder of the ${MODULE_NAME} Node.js module`);
|
|
44
39
|
}
|
|
@@ -48,17 +43,17 @@ async function getPackageInfo() {
|
|
|
48
43
|
* @returns {Record<string, any>} The full path to module's package.json and its payload
|
|
49
44
|
* @throws {Error} If package.json cannot be found
|
|
50
45
|
*/
|
|
51
|
-
function getPackageInfoSync() {
|
|
46
|
+
export function getPackageInfoSync() {
|
|
52
47
|
if (PACKAGE_INFO) {
|
|
53
48
|
return PACKAGE_INFO;
|
|
54
49
|
}
|
|
55
|
-
let currentDir =
|
|
50
|
+
let currentDir = path.dirname(FILENAME);
|
|
56
51
|
let isAtFsRoot = false;
|
|
57
52
|
while (!isAtFsRoot) {
|
|
58
|
-
const manifestPath =
|
|
53
|
+
const manifestPath = path.join(currentDir, 'package.json');
|
|
59
54
|
try {
|
|
60
|
-
if (
|
|
61
|
-
const manifestPayload = JSON.parse(
|
|
55
|
+
if (_fs.existsSync(manifestPath)) {
|
|
56
|
+
const manifestPayload = JSON.parse(_fs.readFileSync(manifestPath, 'utf8'));
|
|
62
57
|
if (manifestPayload.name === MODULE_NAME) {
|
|
63
58
|
PACKAGE_INFO = {
|
|
64
59
|
manifestPath,
|
|
@@ -69,8 +64,8 @@ function getPackageInfoSync() {
|
|
|
69
64
|
}
|
|
70
65
|
}
|
|
71
66
|
catch { }
|
|
72
|
-
currentDir =
|
|
73
|
-
isAtFsRoot = currentDir.length <=
|
|
67
|
+
currentDir = path.dirname(currentDir);
|
|
68
|
+
isAtFsRoot = currentDir.length <= path.dirname(currentDir).length;
|
|
74
69
|
}
|
|
75
70
|
throw new Error(`Cannot find the root folder of the ${MODULE_NAME} Node.js module`);
|
|
76
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../../lib/utils/package.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../../lib/utils/package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,mBAAmB,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,GAAG,MAAM,SAAS,CAAC;AAC1B,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,IAAI,YAAY,GAAwE,IAAI,CAAC;AAC7F,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAC7C,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc;IAIlC,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,OAAO,CAAC,UAAU,EAAE,CAAC;QACnB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3D,IAAI,CAAC;YACH,IAAI,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;gBAClC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;gBAC5E,IAAI,eAAe,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;oBACzC,YAAY,GAAG;wBACb,YAAY;wBACZ,eAAe;qBAChB,CAAC;oBACF,OAAO,YAAY,CAAC;gBACtB,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QACV,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACtC,UAAU,GAAG,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC;IACpE,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,sCAAsC,WAAW,iBAAiB,CAAC,CAAC;AACtF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;IAChC,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,OAAO,CAAC,UAAU,EAAE,CAAC;QACnB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3D,IAAI,CAAC;YACH,IAAI,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;gBACjC,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;gBAC3E,IAAI,eAAe,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;oBACzC,YAAY,GAAG;wBACb,YAAY;wBACZ,eAAe;qBAChB,CAAC;oBACF,OAAO,YAAY,CAAC;gBACtB,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QACV,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACtC,UAAU,GAAG,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC;IACpE,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,sCAAsC,WAAW,iBAAiB,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPlainObject = isPlainObject;
|
|
4
|
-
exports.isEmptyValue = isEmptyValue;
|
|
5
|
-
exports.escapeRegExp = escapeRegExp;
|
|
6
1
|
/** Returns true when value is a plain object. */
|
|
7
|
-
function isPlainObject(value) {
|
|
2
|
+
export function isPlainObject(value) {
|
|
8
3
|
if (value === null || typeof value !== 'object') {
|
|
9
4
|
return false;
|
|
10
5
|
}
|
|
@@ -12,7 +7,7 @@ function isPlainObject(value) {
|
|
|
12
7
|
return prototype === null || prototype === Object.prototype;
|
|
13
8
|
}
|
|
14
9
|
/** Generic emptiness check for nullish, strings, arrays, and plain objects. */
|
|
15
|
-
function isEmptyValue(value) {
|
|
10
|
+
export function isEmptyValue(value) {
|
|
16
11
|
if (value == null) {
|
|
17
12
|
return true;
|
|
18
13
|
}
|
|
@@ -28,7 +23,7 @@ function isEmptyValue(value) {
|
|
|
28
23
|
return true;
|
|
29
24
|
}
|
|
30
25
|
/** Escapes RegExp special characters in a string. */
|
|
31
|
-
function escapeRegExp(value) {
|
|
26
|
+
export function escapeRegExp(value) {
|
|
32
27
|
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
33
28
|
}
|
|
34
29
|
//# sourceMappingURL=predicates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicates.js","sourceRoot":"","sources":["../../../lib/utils/predicates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"predicates.js","sourceRoot":"","sources":["../../../lib/utils/predicates.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,MAAM,CAAC,SAAS,CAAC;AAC9D,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAChF,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IAC5B,CAAC;IACD,IAAI,KAAK,YAAY,GAAG,IAAI,KAAK,YAAY,GAAG,EAAE,CAAC;QACjD,OAAO,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;QAC7D,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC"}
|
|
Binary file
|
package/espresso-server/buildSrc/.gradle/{9.6.0 → 9.6.1}/executionHistory/executionHistory.bin
RENAMED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
2
|
-
gradle.version=9.6.
|
|
1
|
+
#Wed Jul 01 17:18:49 UTC 2026
|
|
2
|
+
gradle.version=9.6.1
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
retries=0
|
|
6
6
|
retryBackOffMs=500
|
package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt
CHANGED
|
@@ -2,6 +2,6 @@ package io.appium.espressoserver.lib.helpers
|
|
|
2
2
|
|
|
3
3
|
// This value is updated automatically by the NPM versioning script
|
|
4
4
|
// It should be in sync with the NPM module version from package.json
|
|
5
|
-
private const val VERSION = "
|
|
5
|
+
private const val VERSION = "9.0.1"
|
|
6
6
|
|
|
7
7
|
fun getEspressoServerVersion() = VERSION
|
package/lib/commands/actions.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type {PostProcessOptions, PostProcessResult, CachedAppInfo} from '@appium/types';
|
|
2
2
|
import {utils} from 'appium-android-driver';
|
|
3
|
-
import {fs, tempDir, zip} from 'appium/support';
|
|
3
|
+
import {fs, tempDir, zip} from 'appium/support.js';
|
|
4
4
|
import {SETTINGS_HELPER_ID} from 'io.appium.settings';
|
|
5
5
|
import path from 'node:path';
|
|
6
|
-
import type {EspressoDriver} from '../driver';
|
|
7
|
-
import {TEST_APK_PKG} from './server';
|
|
8
|
-
import {isPlainObject} from '../utils';
|
|
6
|
+
import type {EspressoDriver} from '../driver.js';
|
|
7
|
+
import {TEST_APK_PKG} from './server/index.js';
|
|
8
|
+
import {isPlainObject} from '../utils/index.js';
|
|
9
9
|
|
|
10
10
|
export const APK_EXT = '.apk';
|
|
11
11
|
export const AAB_EXT = '.aab';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {EspressoDriver} from '../driver';
|
|
2
|
-
import {errors} from 'appium/driver';
|
|
3
|
-
import {qualifyActivityName} from '../utils';
|
|
1
|
+
import type {EspressoDriver} from '../driver.js';
|
|
2
|
+
import {errors} from 'appium/driver.js';
|
|
3
|
+
import {qualifyActivityName} from '../utils/index.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Starts the given activity with intent options, activity options and locale.
|
package/lib/commands/context.ts
CHANGED
package/lib/commands/element.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {errors} from 'appium/driver';
|
|
2
|
-
import {util} from 'appium/support';
|
|
3
|
-
import type {EspressoDriver} from '../driver';
|
|
1
|
+
import {errors} from 'appium/driver.js';
|
|
2
|
+
import {util} from 'appium/support.js';
|
|
3
|
+
import type {EspressoDriver} from '../driver.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Flash the element with given id.
|
package/lib/commands/misc.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {util} from 'appium/support';
|
|
2
|
-
import {errors} from 'appium/driver';
|
|
1
|
+
import {util} from 'appium/support.js';
|
|
2
|
+
import {errors} from 'appium/driver.js';
|
|
3
3
|
import type {StringRecord} from '@appium/types';
|
|
4
|
-
import type {EspressoDriver} from '../driver';
|
|
5
|
-
import type {DeviceInfo} from '../types';
|
|
4
|
+
import type {EspressoDriver} from '../driver.js';
|
|
5
|
+
import type {DeviceInfo} from '../types.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Settings parameters that are available in
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {EspressoDriver} from '../driver';
|
|
2
|
-
import type {ScreenshotsInfo} from './types';
|
|
1
|
+
import type {EspressoDriver} from '../driver.js';
|
|
2
|
+
import type {ScreenshotsInfo} from './types.js';
|
|
3
3
|
|
|
4
4
|
// Display 4619827259835644672 (HWC display 0): port=0 pnpId=GGL displayName="EMU_display_0"
|
|
5
5
|
const DISPLAY_PATTERN = /^Display\s+(\d+)\s+\(.+display\s+(\d+)\).+displayName="([^"]*)/gm;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {SubProcess} from 'teen_process';
|
|
2
|
-
import {fs, system} from 'appium/support';
|
|
2
|
+
import {fs, system} from 'appium/support.js';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import {EOL} from 'node:os';
|
|
5
|
-
import {escapeRegExp} from '../../utils';
|
|
5
|
+
import {escapeRegExp} from '../../utils/index.js';
|
|
6
6
|
import type {AppiumLogger} from '@appium/types';
|
|
7
7
|
|
|
8
8
|
const GRADLE_VERSION_KEY = 'gradle';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {SYSTEM_PORT_RANGE, TEST_APK_PKG} from './constants';
|
|
1
|
+
export {SYSTEM_PORT_RANGE, TEST_APK_PKG} from './constants.js';
|
|
2
2
|
export {
|
|
3
3
|
ServerBuilder,
|
|
4
4
|
buildServerSigningConfig,
|
|
@@ -6,6 +6,6 @@ export {
|
|
|
6
6
|
type EspressoBuildConfiguration,
|
|
7
7
|
type ServerBuilderOptions,
|
|
8
8
|
type ServerSigningConfig,
|
|
9
|
-
} from './builder';
|
|
10
|
-
export {EspressoRunner, type EspressoRunnerOptions} from './runner';
|
|
11
|
-
export {initServer, removePortForward, startSession, teardown} from './startup';
|
|
9
|
+
} from './builder.js';
|
|
10
|
+
export {EspressoRunner, type EspressoRunnerOptions} from './runner.js';
|
|
11
|
+
export {initServer, removePortForward, startSession, teardown} from './startup.js';
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {JWProxy, errors} from 'appium/driver';
|
|
1
|
+
import {JWProxy, errors} from 'appium/driver.js';
|
|
2
2
|
import {sleep, waitForCondition} from 'asyncbox';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import {fileURLToPath} from 'node:url';
|
|
5
|
+
import {fs, node, util, timing} from 'appium/support.js';
|
|
6
|
+
import {getPackageInfoSync, getPackageInfo, isPlainObject} from '../../utils/index.js';
|
|
7
|
+
import {ServerBuilder, buildServerSigningConfig, type ServerSigningConfig} from './builder.js';
|
|
7
8
|
import {
|
|
8
9
|
ESPRESSO_SERVER_LAUNCH_TIMEOUT_MS,
|
|
9
10
|
TARGET_PACKAGE_CONTAINER,
|
|
10
11
|
TEST_APK_PKG,
|
|
11
|
-
} from './constants';
|
|
12
|
+
} from './constants.js';
|
|
12
13
|
import axios from 'axios';
|
|
13
14
|
import * as semver from 'semver';
|
|
14
15
|
import type {
|
|
@@ -534,6 +535,7 @@ function requireOption<K extends keyof EspressoRunnerOptions>(
|
|
|
534
535
|
}
|
|
535
536
|
|
|
536
537
|
const MODULE_NAME = 'appium-espresso-driver';
|
|
538
|
+
const FILENAME = fileURLToPath(import.meta.url);
|
|
537
539
|
|
|
538
540
|
let testServerRoot: string | undefined;
|
|
539
541
|
|
|
@@ -568,7 +570,7 @@ export async function copyGradleProjectRecursively(
|
|
|
568
570
|
/** Root path of the bundled Espresso server Gradle project. */
|
|
569
571
|
function getTestServerRoot(): string {
|
|
570
572
|
if (testServerRoot === undefined) {
|
|
571
|
-
const moduleRoot = node.getModuleRootSync(MODULE_NAME,
|
|
573
|
+
const moduleRoot = node.getModuleRootSync(MODULE_NAME, FILENAME);
|
|
572
574
|
if (!moduleRoot) {
|
|
573
575
|
throw new Error(`Cannot find the root folder of the ${MODULE_NAME} Node.js module`);
|
|
574
576
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {EspressoDriver} from '../../driver';
|
|
2
|
-
import {qualifyActivityName, getPackageInfo} from '../../utils';
|
|
3
|
-
import {DEVICE_PORT} from './constants';
|
|
4
|
-
import {EspressoRunner} from './runner';
|
|
1
|
+
import type {EspressoDriver} from '../../driver.js';
|
|
2
|
+
import {qualifyActivityName, getPackageInfo} from '../../utils/index.js';
|
|
3
|
+
import {DEVICE_PORT} from './constants.js';
|
|
4
|
+
import {EspressoRunner} from './runner.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Start an Espresso session: device setup, server install, and session launch.
|
package/lib/commands/services.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {doctor as doctorCommon} from 'appium-android-driver';
|
|
2
2
|
import {exec} from 'teen_process';
|
|
3
|
-
import {fs, system, doctor} from 'appium/support';
|
|
3
|
+
import {fs, system, doctor} from 'appium/support.js';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import type {AppiumLogger, IDoctorCheck} from '@appium/types';
|
|
6
6
|
|
package/lib/driver.ts
CHANGED
|
@@ -8,29 +8,29 @@ import type {
|
|
|
8
8
|
SingularSessionData,
|
|
9
9
|
SessionCapabilities,
|
|
10
10
|
} from '@appium/types';
|
|
11
|
-
import type {EspressoConstraints} from './constraints';
|
|
12
|
-
import {errors, isErrorType, DeviceSettings, BaseDriver} from 'appium/driver';
|
|
13
|
-
import * as serverCmds from './commands/server';
|
|
14
|
-
import type {EspressoRunner} from './commands/server';
|
|
15
|
-
import * as appManagementCmds from './commands/app-management';
|
|
16
|
-
import * as contextCmds from './commands/context';
|
|
17
|
-
import * as elementCmds from './commands/element';
|
|
18
|
-
import * as miscCmds from './commands/misc';
|
|
19
|
-
import * as servicesCmds from './commands/services';
|
|
20
|
-
import * as screenshotCmds from './commands/screenshot';
|
|
21
|
-
import * as idlingResourcesCmds from './commands/idling-resources';
|
|
22
|
-
import * as actionsCmds from './commands/actions';
|
|
23
|
-
import * as clipboardCmds from './commands/clipboard';
|
|
24
|
-
import * as appInstallCmds from './commands/app-install';
|
|
11
|
+
import type {EspressoConstraints} from './constraints.js';
|
|
12
|
+
import {errors, isErrorType, DeviceSettings, BaseDriver} from 'appium/driver.js';
|
|
13
|
+
import * as serverCmds from './commands/server/index.js';
|
|
14
|
+
import type {EspressoRunner} from './commands/server/index.js';
|
|
15
|
+
import * as appManagementCmds from './commands/app-management.js';
|
|
16
|
+
import * as contextCmds from './commands/context.js';
|
|
17
|
+
import * as elementCmds from './commands/element.js';
|
|
18
|
+
import * as miscCmds from './commands/misc.js';
|
|
19
|
+
import * as servicesCmds from './commands/services.js';
|
|
20
|
+
import * as screenshotCmds from './commands/screenshot.js';
|
|
21
|
+
import * as idlingResourcesCmds from './commands/idling-resources.js';
|
|
22
|
+
import * as actionsCmds from './commands/actions.js';
|
|
23
|
+
import * as clipboardCmds from './commands/clipboard.js';
|
|
24
|
+
import * as appInstallCmds from './commands/app-install.js';
|
|
25
25
|
import {DEFAULT_ADB_PORT} from 'appium-adb';
|
|
26
26
|
import {AndroidDriver} from 'appium-android-driver';
|
|
27
|
-
import {ESPRESSO_CONSTRAINTS} from './constraints';
|
|
27
|
+
import {ESPRESSO_CONSTRAINTS} from './constraints.js';
|
|
28
28
|
import {findAPortNotInUse} from 'portscanner';
|
|
29
29
|
import {retryInterval} from 'asyncbox';
|
|
30
|
-
import {isEmptyValue} from './utils';
|
|
31
|
-
import {newMethodMap} from './method-map';
|
|
32
|
-
import type {EspressoDriverCaps, EspressoDriverOpts, W3CEspressoDriverCaps} from './types';
|
|
33
|
-
import {executeMethodMap} from './execute-method-map';
|
|
30
|
+
import {isEmptyValue} from './utils/index.js';
|
|
31
|
+
import {newMethodMap} from './method-map.js';
|
|
32
|
+
import type {EspressoDriverCaps, EspressoDriverOpts, W3CEspressoDriverCaps} from './types.js';
|
|
33
|
+
import {executeMethodMap} from './execute-method-map.js';
|
|
34
34
|
|
|
35
35
|
// NO_PROXY contains the paths that we never want to proxy to espresso server.
|
|
36
36
|
// TODO: Add the list of paths that we never want to proxy to espresso server.
|
package/lib/index.ts
CHANGED
package/lib/logger.ts
CHANGED
package/lib/types.ts
CHANGED
package/lib/utils/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {qualifyActivityName} from './app';
|
|
2
|
-
export {getPackageInfo, getPackageInfoSync} from './package';
|
|
3
|
-
export {isPlainObject, isEmptyValue, escapeRegExp} from './predicates';
|
|
1
|
+
export {qualifyActivityName} from './app.js';
|
|
2
|
+
export {getPackageInfo, getPackageInfoSync} from './package.js';
|
|
3
|
+
export {isPlainObject, isEmptyValue, escapeRegExp} from './predicates.js';
|
package/lib/utils/package.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {fs} from 'appium/support';
|
|
1
|
+
import {fs} from 'appium/support.js';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import _fs from 'node:fs';
|
|
4
|
+
import {fileURLToPath} from 'node:url';
|
|
4
5
|
|
|
5
6
|
let PACKAGE_INFO: {manifestPath: string; manifestPayload: Record<string, any>} | null = null;
|
|
6
7
|
const MODULE_NAME = 'appium-espresso-driver';
|
|
8
|
+
const FILENAME = fileURLToPath(import.meta.url);
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* Fetches the module info from package.json
|
|
@@ -19,7 +21,7 @@ export async function getPackageInfo(): Promise<{
|
|
|
19
21
|
return PACKAGE_INFO;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
|
-
let currentDir = path.dirname(
|
|
24
|
+
let currentDir = path.dirname(FILENAME);
|
|
23
25
|
let isAtFsRoot = false;
|
|
24
26
|
while (!isAtFsRoot) {
|
|
25
27
|
const manifestPath = path.join(currentDir, 'package.json');
|
|
@@ -52,7 +54,7 @@ export function getPackageInfoSync(): {manifestPath: string; manifestPayload: Re
|
|
|
52
54
|
return PACKAGE_INFO;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
let currentDir = path.dirname(
|
|
57
|
+
let currentDir = path.dirname(FILENAME);
|
|
56
58
|
let isAtFsRoot = false;
|
|
57
59
|
while (!isAtFsRoot) {
|
|
58
60
|
const manifestPath = path.join(currentDir, 'package.json');
|