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.
Files changed (125) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/build/lib/commands/actions.d.ts +1 -1
  3. package/build/lib/commands/actions.d.ts.map +1 -1
  4. package/build/lib/commands/actions.js +1 -4
  5. package/build/lib/commands/actions.js.map +1 -1
  6. package/build/lib/commands/app-install.d.ts +1 -1
  7. package/build/lib/commands/app-install.d.ts.map +1 -1
  8. package/build/lib/commands/app-install.js +31 -41
  9. package/build/lib/commands/app-install.js.map +1 -1
  10. package/build/lib/commands/app-management.d.ts +1 -1
  11. package/build/lib/commands/app-management.d.ts.map +1 -1
  12. package/build/lib/commands/app-management.js +8 -12
  13. package/build/lib/commands/app-management.js.map +1 -1
  14. package/build/lib/commands/clipboard.d.ts +1 -1
  15. package/build/lib/commands/clipboard.d.ts.map +1 -1
  16. package/build/lib/commands/clipboard.js +2 -6
  17. package/build/lib/commands/clipboard.js.map +1 -1
  18. package/build/lib/commands/context.d.ts +1 -1
  19. package/build/lib/commands/context.d.ts.map +1 -1
  20. package/build/lib/commands/context.js +2 -6
  21. package/build/lib/commands/context.js.map +1 -1
  22. package/build/lib/commands/element.d.ts +1 -1
  23. package/build/lib/commands/element.d.ts.map +1 -1
  24. package/build/lib/commands/element.js +17 -30
  25. package/build/lib/commands/element.js.map +1 -1
  26. package/build/lib/commands/idling-resources.d.ts +1 -1
  27. package/build/lib/commands/idling-resources.d.ts.map +1 -1
  28. package/build/lib/commands/idling-resources.js +4 -10
  29. package/build/lib/commands/idling-resources.js.map +1 -1
  30. package/build/lib/commands/misc.d.ts +2 -2
  31. package/build/lib/commands/misc.d.ts.map +1 -1
  32. package/build/lib/commands/misc.js +14 -25
  33. package/build/lib/commands/misc.js.map +1 -1
  34. package/build/lib/commands/screenshot.d.ts +2 -2
  35. package/build/lib/commands/screenshot.d.ts.map +1 -1
  36. package/build/lib/commands/screenshot.js +2 -6
  37. package/build/lib/commands/screenshot.js.map +1 -1
  38. package/build/lib/commands/server/builder.js +24 -33
  39. package/build/lib/commands/server/builder.js.map +1 -1
  40. package/build/lib/commands/server/constants.js +5 -8
  41. package/build/lib/commands/server/constants.js.map +1 -1
  42. package/build/lib/commands/server/index.d.ts +4 -4
  43. package/build/lib/commands/server/index.d.ts.map +1 -1
  44. package/build/lib/commands/server/index.js +4 -16
  45. package/build/lib/commands/server/index.js.map +1 -1
  46. package/build/lib/commands/server/runner.d.ts +2 -2
  47. package/build/lib/commands/server/runner.d.ts.map +1 -1
  48. package/build/lib/commands/server/runner.js +59 -98
  49. package/build/lib/commands/server/runner.js.map +1 -1
  50. package/build/lib/commands/server/startup.d.ts +1 -1
  51. package/build/lib/commands/server/startup.d.ts.map +1 -1
  52. package/build/lib/commands/server/startup.js +16 -22
  53. package/build/lib/commands/server/startup.js.map +1 -1
  54. package/build/lib/commands/services.d.ts +1 -1
  55. package/build/lib/commands/services.d.ts.map +1 -1
  56. package/build/lib/commands/services.js +2 -6
  57. package/build/lib/commands/services.js.map +1 -1
  58. package/build/lib/commands/types.js +1 -2
  59. package/build/lib/constraints.js +3 -6
  60. package/build/lib/constraints.js.map +1 -1
  61. package/build/lib/doctor/optional-checks.js +3 -6
  62. package/build/lib/doctor/optional-checks.js.map +1 -1
  63. package/build/lib/doctor/required-checks.js +18 -25
  64. package/build/lib/doctor/required-checks.js.map +1 -1
  65. package/build/lib/driver.d.ts +12 -12
  66. package/build/lib/driver.d.ts.map +1 -1
  67. package/build/lib/driver.js +36 -73
  68. package/build/lib/driver.js.map +1 -1
  69. package/build/lib/execute-method-map.js +3 -6
  70. package/build/lib/execute-method-map.js.map +1 -1
  71. package/build/lib/index.d.ts +1 -1
  72. package/build/lib/index.d.ts.map +1 -1
  73. package/build/lib/index.js +3 -6
  74. package/build/lib/index.js.map +1 -1
  75. package/build/lib/logger.js +2 -5
  76. package/build/lib/logger.js.map +1 -1
  77. package/build/lib/method-map.js +3 -6
  78. package/build/lib/method-map.js.map +1 -1
  79. package/build/lib/types.d.ts +1 -1
  80. package/build/lib/types.d.ts.map +1 -1
  81. package/build/lib/types.js +1 -2
  82. package/build/lib/utils/app.js +1 -4
  83. package/build/lib/utils/app.js.map +1 -1
  84. package/build/lib/utils/index.d.ts +3 -3
  85. package/build/lib/utils/index.d.ts.map +1 -1
  86. package/build/lib/utils/index.js +3 -12
  87. package/build/lib/utils/index.js.map +1 -1
  88. package/build/lib/utils/package.d.ts.map +1 -1
  89. package/build/lib/utils/package.js +19 -24
  90. package/build/lib/utils/package.js.map +1 -1
  91. package/build/lib/utils/predicates.js +3 -8
  92. package/build/lib/utils/predicates.js.map +1 -1
  93. package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
  94. package/espresso-server/buildSrc/.gradle/{9.6.0 → 9.6.1}/executionHistory/executionHistory.bin +0 -0
  95. package/espresso-server/buildSrc/.gradle/9.6.1/executionHistory/executionHistory.lock +0 -0
  96. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  97. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +2 -2
  98. package/espresso-server/buildSrc/.gradle/file-system.probe +0 -0
  99. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
  100. package/espresso-server/gradle/wrapper/gradle-wrapper.properties +1 -1
  101. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
  102. package/lib/commands/actions.ts +1 -1
  103. package/lib/commands/app-install.ts +4 -4
  104. package/lib/commands/app-management.ts +3 -3
  105. package/lib/commands/clipboard.ts +1 -1
  106. package/lib/commands/context.ts +1 -1
  107. package/lib/commands/element.ts +3 -3
  108. package/lib/commands/idling-resources.ts +1 -1
  109. package/lib/commands/misc.ts +4 -4
  110. package/lib/commands/screenshot.ts +2 -2
  111. package/lib/commands/server/builder.ts +2 -2
  112. package/lib/commands/server/index.ts +4 -4
  113. package/lib/commands/server/runner.ts +8 -6
  114. package/lib/commands/server/startup.ts +4 -4
  115. package/lib/commands/services.ts +1 -1
  116. package/lib/doctor/required-checks.ts +1 -1
  117. package/lib/driver.ts +19 -19
  118. package/lib/index.ts +1 -1
  119. package/lib/logger.ts +1 -1
  120. package/lib/types.ts +1 -1
  121. package/lib/utils/index.ts +3 -3
  122. package/lib/utils/package.ts +5 -3
  123. package/npm-shrinkwrap.json +120 -86
  124. package/package.json +15 -8
  125. 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":"AAOA;;;;;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
+ {"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
- "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.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 = node_path_1.default.dirname(node_path_1.default.resolve(__filename));
18
+ let currentDir = path.dirname(FILENAME);
24
19
  let isAtFsRoot = false;
25
20
  while (!isAtFsRoot) {
26
- const manifestPath = node_path_1.default.join(currentDir, 'package.json');
21
+ const manifestPath = path.join(currentDir, 'package.json');
27
22
  try {
28
- if (await support_1.fs.exists(manifestPath)) {
29
- const manifestPayload = JSON.parse(await support_1.fs.readFile(manifestPath, 'utf8'));
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 = node_path_1.default.dirname(currentDir);
41
- isAtFsRoot = currentDir.length <= node_path_1.default.dirname(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 = node_path_1.default.dirname(node_path_1.default.resolve(__filename));
50
+ let currentDir = path.dirname(FILENAME);
56
51
  let isAtFsRoot = false;
57
52
  while (!isAtFsRoot) {
58
- const manifestPath = node_path_1.default.join(currentDir, 'package.json');
53
+ const manifestPath = path.join(currentDir, 'package.json');
59
54
  try {
60
- if (node_fs_1.default.existsSync(manifestPath)) {
61
- const manifestPayload = JSON.parse(node_fs_1.default.readFileSync(manifestPath, 'utf8'));
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 = node_path_1.default.dirname(currentDir);
73
- isAtFsRoot = currentDir.length <= node_path_1.default.dirname(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":";;;;;AAaA,wCA4BC;AAQD,gDAyBC;AA1ED,4CAAkC;AAClC,0DAA6B;AAC7B,sDAA0B;AAE1B,IAAI,YAAY,GAAwE,IAAI,CAAC;AAC7F,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAE7C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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":";;AACA,sCAMC;AAGD,oCAcC;AAGD,oCAEC;AA7BD,iDAAiD;AACjD,SAAgB,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,SAAgB,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,SAAgB,YAAY,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,E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fri Jun 19 14:23:10 UTC 2026
2
- gradle.version=9.6.0
1
+ #Wed Jul 01 17:18:49 UTC 2026
2
+ gradle.version=9.6.1
@@ -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.0-bin.zip
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
@@ -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 = "8.6.2"
5
+ private const val VERSION = "9.0.1"
6
6
 
7
7
  fun getEspressoServerVersion() = VERSION
@@ -1,4 +1,4 @@
1
- import type {EspressoDriver} from '../driver';
1
+ import type {EspressoDriver} from '../driver.js';
2
2
  import type {StringRecord} from '@appium/types';
3
3
 
4
4
  /**
@@ -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.
@@ -1,4 +1,4 @@
1
- import type {EspressoDriver} from '../driver';
1
+ import type {EspressoDriver} from '../driver.js';
2
2
 
3
3
  /**
4
4
  * Gets the clipboard content from the device.
@@ -1,4 +1,4 @@
1
- import type {EspressoDriver} from '../driver';
1
+ import type {EspressoDriver} from '../driver.js';
2
2
  import type {StringRecord} from '@appium/types';
3
3
 
4
4
  /**
@@ -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.
@@ -1,4 +1,4 @@
1
- import type {EspressoDriver} from '../driver';
1
+ import type {EspressoDriver} from '../driver.js';
2
2
 
3
3
  /**
4
4
  * Registers one or more idling resources
@@ -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 {fs, node, util, timing} from 'appium/support';
5
- import {getPackageInfoSync, getPackageInfo, isPlainObject} from '../../utils';
6
- import {ServerBuilder, buildServerSigningConfig, type ServerSigningConfig} from './builder';
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, __filename);
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.
@@ -1,4 +1,4 @@
1
- import type {EspressoDriver} from '../driver';
1
+ import type {EspressoDriver} from '../driver.js';
2
2
 
3
3
  /**
4
4
  * Starts the given service intent.
@@ -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
@@ -1,4 +1,4 @@
1
- import {EspressoDriver} from './driver';
1
+ import {EspressoDriver} from './driver.js';
2
2
 
3
3
  export {EspressoDriver};
4
4
  export default EspressoDriver;
package/lib/logger.ts CHANGED
@@ -1,3 +1,3 @@
1
- import {logger} from 'appium/support';
1
+ import {logger} from 'appium/support.js';
2
2
 
3
3
  export const log = logger.getLogger('Espresso');
package/lib/types.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type {DriverCaps, DriverOpts, W3CDriverCaps} from '@appium/types';
2
- import type {EspressoConstraints} from './constraints';
2
+ import type {EspressoConstraints} from './constraints.js';
3
3
 
4
4
  export type EspressoDriverOpts = DriverOpts<EspressoConstraints>;
5
5
 
@@ -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';
@@ -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(path.resolve(__filename));
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(path.resolve(__filename));
57
+ let currentDir = path.dirname(FILENAME);
56
58
  let isAtFsRoot = false;
57
59
  while (!isAtFsRoot) {
58
60
  const manifestPath = path.join(currentDir, 'package.json');