appium 3.4.2 → 3.5.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 (196) hide show
  1. package/build/lib/appium.d.ts +3 -0
  2. package/build/lib/appium.d.ts.map +1 -1
  3. package/build/lib/appium.js +73 -51
  4. package/build/lib/appium.js.map +1 -1
  5. package/build/lib/bidi-commands.d.ts.map +1 -1
  6. package/build/lib/bidi-commands.js +36 -31
  7. package/build/lib/bidi-commands.js.map +1 -1
  8. package/build/lib/bootstrap/appium-initializer.d.ts.map +1 -1
  9. package/build/lib/bootstrap/appium-initializer.js +13 -13
  10. package/build/lib/bootstrap/appium-initializer.js.map +1 -1
  11. package/build/lib/bootstrap/appium-main-runner.d.ts.map +1 -1
  12. package/build/lib/bootstrap/appium-main-runner.js +2 -2
  13. package/build/lib/bootstrap/appium-main-runner.js.map +1 -1
  14. package/build/lib/bootstrap/config-file.d.ts.map +1 -1
  15. package/build/lib/bootstrap/config-file.js +11 -11
  16. package/build/lib/bootstrap/config-file.js.map +1 -1
  17. package/build/lib/bootstrap/grid-v3-register.d.ts.map +1 -1
  18. package/build/lib/bootstrap/grid-v3-register.js +9 -6
  19. package/build/lib/bootstrap/grid-v3-register.js.map +1 -1
  20. package/build/lib/bootstrap/main-helpers.d.ts +1 -1
  21. package/build/lib/bootstrap/main-helpers.d.ts.map +1 -1
  22. package/build/lib/bootstrap/main-helpers.js +19 -20
  23. package/build/lib/bootstrap/main-helpers.js.map +1 -1
  24. package/build/lib/bootstrap/node-helpers.d.ts +1 -1
  25. package/build/lib/bootstrap/node-helpers.d.ts.map +1 -1
  26. package/build/lib/bootstrap/node-helpers.js +8 -16
  27. package/build/lib/bootstrap/node-helpers.js.map +1 -1
  28. package/build/lib/bootstrap/startup-config.d.ts.map +1 -1
  29. package/build/lib/bootstrap/startup-config.js +32 -30
  30. package/build/lib/bootstrap/startup-config.js.map +1 -1
  31. package/build/lib/cli/args.d.ts +3 -2
  32. package/build/lib/cli/args.d.ts.map +1 -1
  33. package/build/lib/cli/args.js +2 -5
  34. package/build/lib/cli/args.js.map +1 -1
  35. package/build/lib/cli/driver-command.d.ts +1 -2
  36. package/build/lib/cli/driver-command.d.ts.map +1 -1
  37. package/build/lib/cli/driver-command.js +7 -8
  38. package/build/lib/cli/driver-command.js.map +1 -1
  39. package/build/lib/cli/extension-command.d.ts +2 -2
  40. package/build/lib/cli/extension-command.d.ts.map +1 -1
  41. package/build/lib/cli/extension-command.js +105 -71
  42. package/build/lib/cli/extension-command.js.map +1 -1
  43. package/build/lib/cli/extension.d.ts.map +1 -1
  44. package/build/lib/cli/extension.js.map +1 -1
  45. package/build/lib/cli/parser.d.ts.map +1 -1
  46. package/build/lib/cli/parser.js +21 -14
  47. package/build/lib/cli/parser.js.map +1 -1
  48. package/build/lib/cli/plugin-command.d.ts +1 -1
  49. package/build/lib/cli/plugin-command.d.ts.map +1 -1
  50. package/build/lib/cli/plugin-command.js +5 -5
  51. package/build/lib/cli/plugin-command.js.map +1 -1
  52. package/build/lib/cli/setup-command.d.ts +1 -1
  53. package/build/lib/cli/setup-command.d.ts.map +1 -1
  54. package/build/lib/cli/setup-command.js +14 -19
  55. package/build/lib/cli/setup-command.js.map +1 -1
  56. package/build/lib/cli/utils.d.ts.map +1 -1
  57. package/build/lib/cli/utils.js +3 -2
  58. package/build/lib/cli/utils.js.map +1 -1
  59. package/build/lib/doctor/doctor.d.ts +0 -1
  60. package/build/lib/doctor/doctor.d.ts.map +1 -1
  61. package/build/lib/doctor/doctor.js +12 -17
  62. package/build/lib/doctor/doctor.js.map +1 -1
  63. package/build/lib/extension/driver-config.d.ts.map +1 -1
  64. package/build/lib/extension/driver-config.js +11 -12
  65. package/build/lib/extension/driver-config.js.map +1 -1
  66. package/build/lib/extension/extension-config.d.ts.map +1 -1
  67. package/build/lib/extension/extension-config.js +30 -30
  68. package/build/lib/extension/extension-config.js.map +1 -1
  69. package/build/lib/extension/index.d.ts.map +1 -1
  70. package/build/lib/extension/index.js +28 -41
  71. package/build/lib/extension/index.js.map +1 -1
  72. package/build/lib/extension/manifest.d.ts +3 -2
  73. package/build/lib/extension/manifest.d.ts.map +1 -1
  74. package/build/lib/extension/manifest.js +20 -24
  75. package/build/lib/extension/manifest.js.map +1 -1
  76. package/build/lib/extension/plugin-config.d.ts.map +1 -1
  77. package/build/lib/extension/plugin-config.js +7 -9
  78. package/build/lib/extension/plugin-config.js.map +1 -1
  79. package/build/lib/helpers/build.d.ts +0 -1
  80. package/build/lib/helpers/build.d.ts.map +1 -1
  81. package/build/lib/helpers/build.js +2 -4
  82. package/build/lib/helpers/build.js.map +1 -1
  83. package/build/lib/helpers/capability.d.ts.map +1 -1
  84. package/build/lib/helpers/capability.js +27 -22
  85. package/build/lib/helpers/capability.js.map +1 -1
  86. package/build/lib/helpers/network.d.ts.map +1 -1
  87. package/build/lib/helpers/network.js +4 -3
  88. package/build/lib/helpers/network.js.map +1 -1
  89. package/build/lib/insecure-features.d.ts.map +1 -1
  90. package/build/lib/insecure-features.js +9 -13
  91. package/build/lib/insecure-features.js.map +1 -1
  92. package/build/lib/inspector-commands.d.ts.map +1 -1
  93. package/build/lib/inspector-commands.js +29 -28
  94. package/build/lib/inspector-commands.js.map +1 -1
  95. package/build/lib/logsink.d.ts.map +1 -1
  96. package/build/lib/logsink.js +8 -7
  97. package/build/lib/logsink.js.map +1 -1
  98. package/build/lib/schema/arg-spec.d.ts.map +1 -1
  99. package/build/lib/schema/arg-spec.js +5 -8
  100. package/build/lib/schema/arg-spec.js.map +1 -1
  101. package/build/lib/schema/cli-args.d.ts.map +1 -1
  102. package/build/lib/schema/cli-args.js +20 -19
  103. package/build/lib/schema/cli-args.js.map +1 -1
  104. package/build/lib/schema/cli-transformers.d.ts.map +1 -1
  105. package/build/lib/schema/cli-transformers.js.map +1 -1
  106. package/build/lib/schema/schema.d.ts.map +1 -1
  107. package/build/lib/schema/schema.js +28 -21
  108. package/build/lib/schema/schema.js.map +1 -1
  109. package/build/lib/utils/hash.d.ts +5 -0
  110. package/build/lib/utils/hash.d.ts.map +1 -0
  111. package/build/lib/{utils.js → utils/hash.js} +3 -21
  112. package/build/lib/utils/hash.js.map +1 -0
  113. package/build/lib/utils/index.d.ts +8 -0
  114. package/build/lib/utils/index.d.ts.map +1 -0
  115. package/build/lib/utils/index.js +31 -0
  116. package/build/lib/utils/index.js.map +1 -0
  117. package/build/lib/utils/is-package-changed.d.ts +16 -0
  118. package/build/lib/utils/is-package-changed.d.ts.map +1 -0
  119. package/build/lib/utils/is-package-changed.js +62 -0
  120. package/build/lib/utils/is-package-changed.js.map +1 -0
  121. package/build/lib/utils/object.d.ts +120 -0
  122. package/build/lib/utils/object.d.ts.map +1 -0
  123. package/build/lib/utils/object.js +288 -0
  124. package/build/lib/utils/object.js.map +1 -0
  125. package/build/lib/{extension → utils}/package-changed.d.ts +0 -1
  126. package/build/lib/utils/package-changed.d.ts.map +1 -0
  127. package/build/lib/{extension → utils}/package-changed.js +3 -4
  128. package/build/lib/utils/package-changed.js.map +1 -0
  129. package/build/lib/utils/package-json.d.ts +9 -0
  130. package/build/lib/utils/package-json.d.ts.map +1 -0
  131. package/build/lib/utils/package-json.js +32 -0
  132. package/build/lib/utils/package-json.js.map +1 -0
  133. package/build/lib/utils/resolve-from.d.ts +11 -0
  134. package/build/lib/utils/resolve-from.d.ts.map +1 -0
  135. package/build/lib/utils/resolve-from.js +41 -0
  136. package/build/lib/utils/resolve-from.js.map +1 -0
  137. package/build/types/cli.d.ts.map +1 -1
  138. package/build/types/index.d.ts.map +1 -1
  139. package/build/types/manifest/base.d.ts.map +1 -1
  140. package/build/types/manifest/v3.d.ts.map +1 -1
  141. package/build/types/manifest/v4.d.ts.map +1 -1
  142. package/lib/appium.ts +96 -61
  143. package/lib/bidi-commands.ts +107 -61
  144. package/lib/bootstrap/appium-initializer.ts +27 -19
  145. package/lib/bootstrap/appium-main-runner.ts +8 -4
  146. package/lib/bootstrap/config-file.ts +33 -16
  147. package/lib/bootstrap/grid-v3-register.ts +26 -19
  148. package/lib/bootstrap/main-helpers.ts +25 -19
  149. package/lib/bootstrap/node-helpers.ts +20 -24
  150. package/lib/bootstrap/startup-config.ts +42 -39
  151. package/lib/cli/args.ts +3 -4
  152. package/lib/cli/driver-command.ts +19 -13
  153. package/lib/cli/extension-command.ts +214 -149
  154. package/lib/cli/extension.ts +4 -6
  155. package/lib/cli/parser.ts +32 -30
  156. package/lib/cli/plugin-command.ts +20 -9
  157. package/lib/cli/setup-command.ts +54 -39
  158. package/lib/cli/utils.ts +4 -3
  159. package/lib/doctor/doctor.ts +15 -17
  160. package/lib/extension/driver-config.ts +22 -17
  161. package/lib/extension/extension-config.ts +76 -69
  162. package/lib/extension/index.ts +60 -51
  163. package/lib/extension/manifest.ts +35 -33
  164. package/lib/extension/plugin-config.ts +15 -10
  165. package/lib/helpers/build.ts +6 -5
  166. package/lib/helpers/capability.ts +40 -35
  167. package/lib/helpers/network.ts +6 -5
  168. package/lib/insecure-features.ts +16 -14
  169. package/lib/inspector-commands.ts +72 -40
  170. package/lib/logsink.ts +22 -26
  171. package/lib/schema/arg-spec.ts +9 -8
  172. package/lib/schema/cli-args-guards.ts +4 -4
  173. package/lib/schema/cli-args.ts +25 -21
  174. package/lib/schema/cli-transformers.ts +6 -2
  175. package/lib/schema/format-errors.ts +1 -1
  176. package/lib/schema/schema.ts +52 -38
  177. package/lib/{utils.ts → utils/hash.ts} +2 -19
  178. package/lib/utils/index.ts +23 -0
  179. package/lib/utils/is-package-changed.ts +78 -0
  180. package/lib/utils/object.ts +312 -0
  181. package/lib/{extension → utils}/package-changed.ts +6 -7
  182. package/lib/utils/package-json.ts +36 -0
  183. package/lib/utils/resolve-from.ts +40 -0
  184. package/package.json +16 -19
  185. package/scripts/autoinstall-extensions.js +8 -13
  186. package/tsconfig.json +8 -2
  187. package/types/cli.ts +18 -18
  188. package/types/index.ts +2 -2
  189. package/types/manifest/base.ts +2 -2
  190. package/types/manifest/v3.ts +2 -2
  191. package/types/manifest/v4.ts +2 -2
  192. package/build/lib/extension/package-changed.d.ts.map +0 -1
  193. package/build/lib/extension/package-changed.js.map +0 -1
  194. package/build/lib/utils.d.ts +0 -13
  195. package/build/lib/utils.d.ts.map +0 -1
  196. package/build/lib/utils.js.map +0 -1
@@ -1,15 +1,14 @@
1
1
  import {fs} from '@appium/support';
2
- import {isPackageChanged} from 'package-changed';
3
2
  import path from 'node:path';
4
3
  import {PKG_HASHFILE_RELATIVE_PATH} from '../constants';
5
4
  import {log} from '../logger';
5
+ import {isPackageChanged} from './is-package-changed';
6
6
 
7
7
  /**
8
8
  * Determines if extensions have changed, and updates a hash the `package.json` in `appiumHome` if so.
9
9
  *
10
10
  * If they have, we need to sync them with the `extensions.yaml` manifest.
11
11
  *
12
- * _Warning: this makes a blocking call to `writeFileSync`._
13
12
  */
14
13
  export async function packageDidChange(appiumHome: string): Promise<boolean> {
15
14
  const hashFilename = path.join(appiumHome, PKG_HASHFILE_RELATIVE_PATH);
@@ -21,12 +20,12 @@ export async function packageDidChange(appiumHome: string): Promise<boolean> {
21
20
  } catch (err: any) {
22
21
  throw new Error(
23
22
  `Appium could not create the directory for hash file: ${hashFilenameDir}. Original error: ${err.message}`,
24
- {cause: err}
23
+ {cause: err},
25
24
  );
26
25
  }
27
26
 
28
27
  let isChanged: boolean;
29
- let writeHash: () => void;
28
+ let writeHash: () => Promise<void>;
30
29
  let oldHash: string | undefined;
31
30
  let hash: string;
32
31
  try {
@@ -41,14 +40,14 @@ export async function packageDidChange(appiumHome: string): Promise<boolean> {
41
40
 
42
41
  if (isChanged) {
43
42
  try {
44
- writeHash();
43
+ await writeHash();
45
44
  log.debug(
46
- `Updated hash of ${appiumHome}/package.json from: ${oldHash ?? '(none)'} to: ${hash}`
45
+ `Updated hash of ${appiumHome}/package.json from: ${oldHash ?? '(none)'} to: ${hash}`,
47
46
  );
48
47
  } catch (err: any) {
49
48
  throw new Error(
50
49
  `Appium could not write hash file: ${hashFilenameDir}. Original error: ${err.message}`,
51
- {cause: err}
50
+ {cause: err},
52
51
  );
53
52
  }
54
53
  }
@@ -0,0 +1,36 @@
1
+ import nodeFs from 'node:fs';
2
+ import path from 'node:path';
3
+ import type {PackageJson} from 'type-fest';
4
+
5
+ type AppiumPackageJson = PackageJson & {
6
+ name: string;
7
+ version: string;
8
+ };
9
+
10
+ function readPackageJsonSync(): {pkgRoot: string; pkg: AppiumPackageJson} {
11
+ let current = path.resolve(__dirname);
12
+ const root = path.parse(current).root;
13
+ let pkgRoot: string;
14
+ while (true) {
15
+ if (nodeFs.existsSync(path.join(current, 'package.json'))) {
16
+ pkgRoot = current;
17
+ break;
18
+ }
19
+ if (current === root) {
20
+ throw new Error(`Could not find \`package.json\` from ${__dirname}`);
21
+ }
22
+ current = path.dirname(current);
23
+ }
24
+ const pkg = JSON.parse(
25
+ nodeFs.readFileSync(path.join(pkgRoot, 'package.json'), 'utf8'),
26
+ ) as PackageJson;
27
+ if (typeof pkg.name !== 'string' || typeof pkg.version !== 'string') {
28
+ throw new Error(`Invalid \`package.json\` near ${__dirname}`);
29
+ }
30
+ return {pkgRoot, pkg: pkg as AppiumPackageJson};
31
+ }
32
+
33
+ const {pkg, pkgRoot} = readPackageJsonSync();
34
+
35
+ export const npmPackage = pkg;
36
+ export const appiumPackageRoot = pkgRoot;
@@ -0,0 +1,40 @@
1
+ import {realpath} from 'node:fs/promises';
2
+ import Module from 'node:module';
3
+ import path from 'node:path';
4
+
5
+ /**
6
+ * Resolves `moduleId` using Node's module resolution from `fromDirectory`.
7
+ *
8
+ * @param fromDirectory - Directory to resolve from (typically a project or `APPIUM_HOME` root)
9
+ * @param moduleId - Module id or path to resolve (e.g. `semver/package.json`)
10
+ * @returns Resolved module id. Package paths are typically absolute filesystem paths; built-in
11
+ * modules may resolve to non-absolute ids (e.g. `node:fs`, `fs`).
12
+ * @throws `Error` if Node cannot resolve `moduleId` from `fromDirectory`
13
+ */
14
+ export async function resolveFrom(fromDirectory: string, moduleId: string): Promise<string> {
15
+ let resolvedFromDirectory: string;
16
+ try {
17
+ resolvedFromDirectory = await realpath(fromDirectory);
18
+ } catch (error) {
19
+ const err = error as NodeJS.ErrnoException;
20
+ if (err.code === 'ENOENT') {
21
+ resolvedFromDirectory = path.resolve(fromDirectory);
22
+ } else {
23
+ throw error;
24
+ }
25
+ }
26
+
27
+ const fromFile = path.join(resolvedFromDirectory, 'noop.js');
28
+ const nodeModule = Module as typeof Module & {
29
+ _resolveFilename: (
30
+ id: string,
31
+ parent: {id: string; filename: string; paths: string[]},
32
+ ) => string;
33
+ _nodeModulePaths: (from: string) => string[];
34
+ };
35
+ return nodeModule._resolveFilename(moduleId, {
36
+ id: fromFile,
37
+ filename: fromFile,
38
+ paths: nodeModule._nodeModulePaths(resolvedFromDirectory),
39
+ });
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium",
3
- "version": "3.4.2",
3
+ "version": "3.5.1",
4
4
  "description": "Automation for Apps.",
5
5
  "keywords": [
6
6
  "automation",
@@ -60,31 +60,28 @@
60
60
  "test:unit": "mocha \"./test/unit/**/*.spec.ts\""
61
61
  },
62
62
  "dependencies": {
63
- "@appium/base-driver": "10.5.2",
64
- "@appium/base-plugin": "3.2.4",
65
- "@appium/docutils": "2.4.2",
66
- "@appium/logger": "2.0.7",
67
- "@appium/schema": "1.1.1",
68
- "@appium/support": "7.2.2",
69
- "@appium/types": "1.4.0",
63
+ "@appium/base-driver": "10.7.0",
64
+ "@appium/base-plugin": "3.3.1",
65
+ "@appium/docutils": "2.5.0",
66
+ "@appium/logger": "2.0.9",
67
+ "@appium/schema": "1.2.1",
68
+ "@appium/support": "7.2.4",
69
+ "@appium/types": "1.5.1",
70
70
  "@sidvind/better-ajv-errors": "5.0.0",
71
71
  "ajv": "8.20.0",
72
72
  "ajv-formats": "3.0.1",
73
73
  "argparse": "2.0.1",
74
- "axios": "1.16.0",
75
- "bluebird": "3.7.2",
74
+ "asyncbox": "6.3.0",
75
+ "axios": "1.17.0",
76
76
  "lilconfig": "3.1.3",
77
- "lodash": "4.18.1",
78
- "lru-cache": "11.3.5",
77
+ "lru-cache": "11.5.1",
79
78
  "ora": "5.4.1",
80
- "package-changed": "3.0.0",
81
- "resolve-from": "5.0.0",
82
- "semver": "7.7.4",
79
+ "semver": "7.8.4",
83
80
  "teen_process": "4.1.3",
84
- "type-fest": "5.6.0",
81
+ "type-fest": "5.7.0",
85
82
  "winston": "3.19.0",
86
- "ws": "8.20.0",
87
- "yaml": "2.8.4"
83
+ "ws": "8.21.0",
84
+ "yaml": "2.9.0"
88
85
  },
89
86
  "engines": {
90
87
  "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
@@ -93,5 +90,5 @@
93
90
  "publishConfig": {
94
91
  "access": "public"
95
92
  },
96
- "gitHead": "f5369c65a8dfe5f9a590c31d38b12b33e6e58fde"
93
+ "gitHead": "213efd0fa400bdd0156b00ad2c45f8ef005a01ca"
97
94
  }
@@ -21,14 +21,9 @@
21
21
  * `npm install -g appium --drivers=uiautomator2,xcuitest --plugins=images`
22
22
  */
23
23
 
24
- const B = require('bluebird');
25
24
  const path = require('node:path');
26
25
  const {realpath} = require('node:fs/promises');
27
26
 
28
- B.config({
29
- cancellation: true,
30
- });
31
-
32
27
  /** @type {typeof import('../lib/cli/extension').runExtensionCommand} */
33
28
  let runExtensionCommand;
34
29
  /** @type {typeof import('../lib/constants').DRIVER_TYPE} */
@@ -118,9 +113,9 @@ async function main() {
118
113
  spinner.succeed('No drivers or plugins to automatically install.');
119
114
  log(
120
115
  'If desired, provide the argument "--drivers=<driver_name>[,<driver_name>...]" and/or ' +
121
- '"--plugins=<plugin_name>[,<plugin_name>...]" to the "npm install appium" command. ' +
122
- 'The specified extensions will be installed automatically alongside Appium. ' +
123
- 'For a list of known extensions, run "appium <driver|plugin> list".'
116
+ '"--plugins=<plugin_name>[,<plugin_name>...]" to the "npm install appium" command. ' +
117
+ 'The specified extensions will be installed automatically alongside Appium. ' +
118
+ 'For a list of known extensions, run "appium <driver|plugin> list".',
124
119
  );
125
120
  return;
126
121
  }
@@ -170,11 +165,11 @@ async function main() {
170
165
  spinner.succeed(
171
166
  `Done. ${installedStats[DRIVER_TYPE]} ${util.pluralize(
172
167
  'driver',
173
- installedStats[DRIVER_TYPE]
168
+ installedStats[DRIVER_TYPE],
174
169
  )} and ${installedStats[PLUGIN_TYPE]} ${util.pluralize(
175
170
  'plugin',
176
- installedStats[PLUGIN_TYPE]
177
- )} are installed.`
171
+ installedStats[PLUGIN_TYPE],
172
+ )} are installed.`,
178
173
  );
179
174
  }
180
175
 
@@ -201,7 +196,7 @@ async function checkAndInstallExtension({
201
196
  showInstalled: true,
202
197
  suppressOutput: true,
203
198
  },
204
- type === DRIVER_TYPE ? driverConfig : pluginConfig
199
+ type === DRIVER_TYPE ? driverConfig : pluginConfig,
205
200
  );
206
201
  if (extList[ext]) {
207
202
  spinner.info(`The ${type} "${ext}" is already installed.`);
@@ -217,7 +212,7 @@ async function checkAndInstallExtension({
217
212
  suppressOutput: true,
218
213
  [type]: ext,
219
214
  },
220
- type === DRIVER_TYPE ? driverConfig : pluginConfig
215
+ type === DRIVER_TYPE ? driverConfig : pluginConfig,
221
216
  );
222
217
  spinner.succeed(`Installed ${type} "${ext}".`);
223
218
  }
package/tsconfig.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "extends": "@appium/tsconfig/tsconfig.json",
3
+ "ts-node": {
4
+ "transpileOnly": true,
5
+ "compilerOptions": {
6
+ "rootDir": "."
7
+ }
8
+ },
3
9
  "compilerOptions": {
4
10
  "rootDir": ".",
5
11
  "outDir": "build",
12
+ "strict": true,
6
13
  "paths": {
7
14
  "@appium/support": ["../support"],
8
15
  "@appium/base-driver": ["../base-driver"],
@@ -22,7 +29,6 @@
22
29
  {"path": "../support"},
23
30
  {"path": "../base-driver"},
24
31
  {"path": "../base-plugin"},
25
- {"path": "../fake-driver"},
26
- {"path": "../test-support"}
32
+ {"path": "../fake-driver"}
27
33
  ]
28
34
  }
package/types/cli.ts CHANGED
@@ -153,47 +153,47 @@ export interface BaseExtArgs<Cmd extends CliExtensionCommand> {
153
153
  */
154
154
  export type ExtArgs<
155
155
  Cmd extends CliExtensionCommand,
156
- SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand
156
+ SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand,
157
157
  > = BaseExtArgs<Cmd> &
158
158
  (Cmd extends CliCommandSetup
159
159
  ? SetupArgs
160
160
  : Cmd extends CliCommandDriver
161
- ? DriverExtArgs
162
- : Cmd extends CliCommandPlugin
163
- ? PluginExtArgs
164
- : never) &
161
+ ? DriverExtArgs
162
+ : Cmd extends CliCommandPlugin
163
+ ? PluginExtArgs
164
+ : never) &
165
165
  (SubCmd extends 'install'
166
166
  ? CliExtensionSubcommandInstallArgs
167
167
  : SubCmd extends 'list'
168
- ? CliExtensionSubcommandListArgs
169
- : SubCmd extends 'update'
170
- ? CliExtensionSubcommandUpdateArgs
171
- : never);
168
+ ? CliExtensionSubcommandListArgs
169
+ : SubCmd extends 'update'
170
+ ? CliExtensionSubcommandUpdateArgs
171
+ : never);
172
172
 
173
173
  /**
174
174
  * Some generic bits of arguments; should not be used outside this declaration
175
175
  */
176
176
  export type CommonArgs<
177
177
  Cmd extends CliCommand = CliCommandServer,
178
- SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void
178
+ SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void,
179
179
  > = MoreArgs &
180
180
  ProgrammaticArgs &
181
181
  (Cmd extends CliCommandServer
182
182
  ? ServerArgs
183
183
  : Cmd extends CliCommandSetup
184
- ? SetupArgs
185
- : Cmd extends CliExtensionCommand
186
- ? SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand
187
- ? ExtArgs<Cmd, SubCmd>
188
- : never
189
- : never);
184
+ ? SetupArgs
185
+ : Cmd extends CliExtensionCommand
186
+ ? SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand
187
+ ? ExtArgs<Cmd, SubCmd>
188
+ : never
189
+ : never);
190
190
 
191
191
  /**
192
192
  * Fully-parsed arguments, containing defaults, computed args, and config file values.
193
193
  */
194
194
  export type ParsedArgs<
195
195
  Cmd extends CliCommand = CliCommandServer,
196
- SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void
196
+ SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void,
197
197
  > = CommonArgs<Cmd, SubCmd>;
198
198
 
199
199
  /**
@@ -203,7 +203,7 @@ export type ParsedArgs<
203
203
  */
204
204
  export type Args<
205
205
  Cmd extends CliCommand = CliCommandServer,
206
- SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void
206
+ SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void,
207
207
  > = Cmd extends CliCommandServer
208
208
  ? SetOptional<CommonArgs<Cmd>, keyof ServerArgs>
209
209
  : ParsedArgs<Cmd, SubCmd>;
package/types/index.ts CHANGED
@@ -16,5 +16,5 @@ export interface AppiumEnv extends NodeJS.ProcessEnv {
16
16
  export type ExtClass<ExtType extends ExtensionType> = ExtType extends DriverType
17
17
  ? DriverClass
18
18
  : ExtType extends PluginType
19
- ? PluginClass
20
- : never;
19
+ ? PluginClass
20
+ : never;
@@ -100,8 +100,8 @@ export interface PluginMetadata {
100
100
  export type ExtMetadata<ExtType extends ExtensionType> = (ExtType extends DriverType
101
101
  ? DriverMetadata
102
102
  : ExtType extends PluginType
103
- ? PluginMetadata
104
- : never) &
103
+ ? PluginMetadata
104
+ : never) &
105
105
  CommonExtMetadata;
106
106
 
107
107
  /**
@@ -103,8 +103,8 @@ export interface PluginMetadata {
103
103
  export type ExtMetadata<ExtType extends ExtensionType> = (ExtType extends DriverType
104
104
  ? DriverMetadata
105
105
  : ExtType extends PluginType
106
- ? PluginMetadata
107
- : never) &
106
+ ? PluginMetadata
107
+ : never) &
108
108
  CommonExtMetadata;
109
109
 
110
110
  /**
@@ -103,8 +103,8 @@ export interface PluginMetadata {
103
103
  export type ExtMetadata<ExtType extends ExtensionType> = (ExtType extends DriverType
104
104
  ? DriverMetadata
105
105
  : ExtType extends PluginType
106
- ? PluginMetadata
107
- : never) &
106
+ ? PluginMetadata
107
+ : never) &
108
108
  CommonExtMetadata;
109
109
 
110
110
  /**
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-changed.d.ts","sourceRoot":"","sources":["../../../lib/extension/package-changed.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA2C3E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-changed.js","sourceRoot":"","sources":["../../../lib/extension/package-changed.ts"],"names":[],"mappings":";;;;;AAaA,4CA2CC;AAxDD,6CAAmC;AACnC,qDAAiD;AACjD,0DAA6B;AAC7B,4CAAwD;AACxD,sCAA8B;AAE9B;;;;;;GAMG;AACI,KAAK,UAAU,gBAAgB,CAAC,UAAkB;IACvD,MAAM,YAAY,GAAG,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,sCAA0B,CAAC,CAAC;IAEvE,MAAM,eAAe,GAAG,mBAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACnD,YAAG,CAAC,KAAK,CAAC,iCAAiC,eAAe,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC;QACH,MAAM,YAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,wDAAwD,eAAe,qBAAqB,GAAG,CAAC,OAAO,EAAE,EACzG,EAAC,KAAK,EAAE,GAAG,EAAC,CACb,CAAC;IACJ,CAAC;IAED,IAAI,SAAkB,CAAC;IACvB,IAAI,SAAqB,CAAC;IAC1B,IAAI,OAA2B,CAAC;IAChC,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QACH,CAAC,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAC,GAAG,MAAM,IAAA,kCAAgB,EAAC;YAC9D,GAAG,EAAE,UAAU;YACf,YAAY,EAAE,sCAA0B;SACzC,CAAC,CAAC,CAAC;IACN,CAAC;IAAC,MAAM,CAAC;QACP,kFAAkF;QAClF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,CAAC;YACH,SAAS,EAAE,CAAC;YACZ,YAAG,CAAC,KAAK,CACP,mBAAmB,UAAU,uBAAuB,OAAO,IAAI,QAAQ,QAAQ,IAAI,EAAE,CACtF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CACb,qCAAqC,eAAe,qBAAqB,GAAG,CAAC,OAAO,EAAE,EACtF,EAAC,KAAK,EAAE,GAAG,EAAC,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,13 +0,0 @@
1
- import _ from 'lodash';
2
- export declare const npmPackage: import("read-pkg", { with: { "resolution-mode": "import" } }).NormalizedPackageJson;
3
- /**
4
- * Returns the root directory of the Appium module (memoized).
5
- *
6
- * @throws {Error} If the appium module root cannot be determined.
7
- */
8
- export declare const getAppiumModuleRoot: (() => string) & _.MemoizedFunction;
9
- /**
10
- * Adler-32 checksum (see https://github.com/SheetJS/js-adler32).
11
- */
12
- export declare function adler32(str: string, seed?: number | null): number;
13
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAGvB,eAAO,MAAM,UAAU,qFAAoC,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,SAA6C,MAAM,sBAMjF,CAAC;AAEH;;GAEG;AACH,wBAAgB,OAAO,CAAC,GAA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