appium 2.0.0-beta.18 → 2.0.0-beta.21

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 (54) hide show
  1. package/build/lib/appium-config.schema.json +0 -0
  2. package/build/lib/appium.js +84 -69
  3. package/build/lib/cli/argparse-actions.js +1 -1
  4. package/build/lib/cli/args.js +87 -223
  5. package/build/lib/cli/extension-command.js +2 -2
  6. package/build/lib/cli/extension.js +14 -6
  7. package/build/lib/cli/parser.js +142 -106
  8. package/build/lib/cli/utils.js +1 -1
  9. package/build/lib/config-file.js +141 -0
  10. package/build/lib/config.js +42 -64
  11. package/build/lib/driver-config.js +41 -20
  12. package/build/lib/drivers.js +1 -1
  13. package/build/lib/ext-config-io.js +165 -0
  14. package/build/lib/extension-config.js +110 -60
  15. package/build/lib/grid-register.js +19 -21
  16. package/build/lib/logsink.js +1 -1
  17. package/build/lib/main.js +135 -72
  18. package/build/lib/plugin-config.js +17 -8
  19. package/build/lib/schema/appium-config-schema.js +252 -0
  20. package/build/lib/schema/arg-spec.js +120 -0
  21. package/build/lib/schema/cli-args.js +173 -0
  22. package/build/lib/schema/cli-transformers.js +76 -0
  23. package/build/lib/schema/index.js +36 -0
  24. package/build/lib/schema/keywords.js +62 -0
  25. package/build/lib/schema/schema.js +357 -0
  26. package/build/lib/utils.js +26 -35
  27. package/lib/appium-config.schema.json +277 -0
  28. package/lib/appium.js +99 -75
  29. package/lib/cli/args.js +138 -335
  30. package/lib/cli/extension-command.js +7 -6
  31. package/lib/cli/extension.js +12 -4
  32. package/lib/cli/parser.js +248 -96
  33. package/lib/config-file.js +227 -0
  34. package/lib/config.js +71 -61
  35. package/lib/driver-config.js +66 -11
  36. package/lib/ext-config-io.js +287 -0
  37. package/lib/extension-config.js +209 -66
  38. package/lib/grid-register.js +24 -21
  39. package/lib/main.js +139 -68
  40. package/lib/plugin-config.js +32 -2
  41. package/lib/schema/appium-config-schema.js +286 -0
  42. package/lib/schema/arg-spec.js +218 -0
  43. package/lib/schema/cli-args.js +273 -0
  44. package/lib/schema/cli-transformers.js +123 -0
  45. package/lib/schema/index.js +2 -0
  46. package/lib/schema/keywords.js +119 -0
  47. package/lib/schema/schema.js +577 -0
  48. package/lib/utils.js +29 -52
  49. package/package.json +17 -11
  50. package/types/appium-config.d.ts +197 -0
  51. package/types/types.d.ts +201 -0
  52. package/LICENSE +0 -201
  53. package/build/lib/cli/parser-helpers.js +0 -106
  54. package/lib/cli/parser-helpers.js +0 -106
package/lib/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _ from 'lodash';
2
2
  import logger from './logger';
3
- import { processCapabilities, PROTOCOLS, validateCaps as validateArgs } from '@appium/base-driver';
3
+ import { processCapabilities, PROTOCOLS } from '@appium/base-driver';
4
4
  import { fs } from '@appium/support';
5
5
 
6
6
  const W3C_APPIUM_PREFIX = 'appium';
@@ -33,55 +33,6 @@ function inspectObject (args) {
33
33
  }
34
34
  }
35
35
 
36
- /**
37
- * Given a set of CLI args and the name of a driver or plugin, extract those args for that plugin
38
- * @param {Object} extensionArgs - arguments of the form {[extName]: {[argName]: [argValue]}}
39
- * @param {string} extensionName - the name of the extension
40
- * @return {Object} the arg object for that extension alone
41
- */
42
- function getExtensionArgs (extensionArgs, extensionName) {
43
- if (!_.has(extensionArgs, extensionName)) {
44
- return {};
45
- }
46
- if (!_.isPlainObject(extensionArgs[extensionName])) {
47
- throw new TypeError(`Driver or plugin arguments must be plain objects`);
48
- }
49
- return extensionArgs[extensionName];
50
- }
51
-
52
-
53
- /**
54
- * Given a set of args and a set of constraints, throw an error if any args are not mentioned in
55
- * the set of constraints
56
- * @param {Object} extensionArgs the args
57
- * @param {Object} argsConstraints the constraints object
58
- * @throws {Error} if any args were not recognized
59
- */
60
- function ensureNoUnknownArgs (extensionArgs, argsConstraints) {
61
- const knownArgNames = Object.keys(argsConstraints);
62
- const unknownArgs = _.difference(Object.keys(extensionArgs), knownArgNames);
63
- if (unknownArgs.length > 0) {
64
- throw new Error(`Some arguments were not recognized: ${JSON.stringify(unknownArgs)}. ` +
65
- `Are you sure they are in the list of supported args? ${JSON.stringify(knownArgNames)}`);
66
- }
67
- }
68
-
69
- /**
70
- * Takes in a set of driver/plugin args passed in by user, and arg constraints
71
- * and throws an error if any arg is unknown or of the incorrect type
72
- *
73
- * @param {object} extensionArgs - Driver or Plugin specific args
74
- * @param {object} argsConstraints - Constraints for arguments
75
- * @throws {Error} if any args are not recognized or are of an invalid type
76
- */
77
- function validateExtensionArgs (extensionArgs, argsConstraints) {
78
- if (!_.isEmpty(extensionArgs) && !_.isEmpty(argsConstraints)) {
79
- ensureNoUnknownArgs(extensionArgs, argsConstraints);
80
- validateArgs(extensionArgs, argsConstraints);
81
- }
82
- }
83
-
84
-
85
36
  /**
86
37
  * Takes the caps that were provided in the request and translates them
87
38
  * into caps that can be used by the inner drivers.
@@ -267,8 +218,34 @@ function pullSettings (caps) {
267
218
 
268
219
  const rootDir = fs.findRoot(__dirname);
269
220
 
221
+
222
+ /**
223
+ * A Map where you can set properties, but only once. And you can't remove anything. So there.
224
+ * @template K,V
225
+ * @extends {Map<K,V>}
226
+ */
227
+ class ReadonlyMap extends Map {
228
+ /**
229
+ * @param {K} key
230
+ * @param {V} value
231
+ */
232
+ set (key, value) {
233
+ if (this.has(key)) {
234
+ throw new Error(`${key} is already set`);
235
+ }
236
+ return super.set(key, value);
237
+ }
238
+
239
+ delete (key) {
240
+ throw new Error(`${key} cannot be deleted`);
241
+ }
242
+
243
+ clear () {
244
+ throw new Error(`Cannot clear ReadonlyMap`);
245
+ }
246
+ }
247
+
270
248
  export {
271
249
  inspectObject, parseCapsForInnerDriver, insertAppiumPrefixes, rootDir,
272
- getPackageVersion, pullSettings, removeAppiumPrefixes, getExtensionArgs,
273
- validateExtensionArgs
250
+ getPackageVersion, pullSettings, removeAppiumPrefixes, ReadonlyMap
274
251
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium",
3
- "version": "2.0.0-beta.18",
3
+ "version": "2.0.0-beta.21",
4
4
  "description": "Automation for Apps.",
5
5
  "keywords": [
6
6
  "automation",
@@ -32,7 +32,8 @@
32
32
  "bin",
33
33
  "lib",
34
34
  "build/lib",
35
- "postinstall.js"
35
+ "postinstall.js",
36
+ "types"
36
37
  ],
37
38
  "scripts": {
38
39
  "generate-docs": "gulp transpile && node ./build/commands-yml/parse.js",
@@ -43,21 +44,26 @@
43
44
  "zip-and-upload": "npm run zip && npm run upload"
44
45
  },
45
46
  "dependencies": {
46
- "@appium/base-driver": "^8.1.1",
47
- "@appium/base-plugin": "1.7.2",
48
- "@appium/support": "^2.54.2",
49
- "@babel/runtime": "7.15.4",
47
+ "@appium/base-driver": "^8.2.0",
48
+ "@appium/base-plugin": "1.8.0",
49
+ "@appium/support": "^2.55.1",
50
+ "@babel/runtime": "7.16.3",
51
+ "@sidvind/better-ajv-errors": "0.9.2",
52
+ "ajv": "8.8.0",
53
+ "ajv-formats": "2.1.1",
50
54
  "argparse": "2.0.1",
51
55
  "async-lock": "1.3.0",
52
- "asyncbox": "2.9.1",
53
- "axios": "0.21.4",
56
+ "asyncbox": "2.9.2",
57
+ "axios": "0.24.0",
54
58
  "bluebird": "3.7.2",
55
59
  "continuation-local-storage": "3.2.1",
56
60
  "find-up": "5.0.0",
61
+ "lilconfig": "2.0.4",
57
62
  "lodash": "4.17.21",
58
63
  "longjohn": "0.2.12",
59
64
  "npmlog": "5.0.1",
60
65
  "ora": "5.4.1",
66
+ "resolve-from": "5.0.0",
61
67
  "semver": "7.3.5",
62
68
  "source-map-support": "0.5.20",
63
69
  "teen_process": "1.16.0",
@@ -66,8 +72,8 @@
66
72
  "yaml": "1.10.2"
67
73
  },
68
74
  "devDependencies": {
69
- "@appium/fake-driver": "^3.0.5",
70
- "@appium/gulp-plugins": "^5.5.3"
75
+ "@appium/fake-driver": "^3.2.0",
76
+ "@appium/gulp-plugins": "^5.5.5"
71
77
  },
72
78
  "engines": {
73
79
  "node": ">=12",
@@ -78,5 +84,5 @@
78
84
  "tag": "next"
79
85
  },
80
86
  "homepage": "https://appium.io",
81
- "gitHead": "01dd42ee1778509664d422a0c26e7061bae8402e"
87
+ "gitHead": "ec6a90a797d2dadb407922426be16efaec9def07"
82
88
  }
@@ -0,0 +1,197 @@
1
+ /* tslint:disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * IP address to listen on
10
+ */
11
+ export type AddressConfig = string;
12
+ /**
13
+ * Whether the Appium server should allow web browser connections from any host
14
+ */
15
+ export type AllowCorsConfig = boolean;
16
+ /**
17
+ * Set which insecure features are allowed to run in this server's sessions. Features are defined on a driver level; see documentation for more details. Note that features defined via "deny-insecure" will be disabled, even if also listed here. If string, a path to a text file containing policy or a comma-delimited list.
18
+ */
19
+ export type AllowInsecureConfig = string[];
20
+ /**
21
+ * Base path to use as the prefix for all webdriver routes running on the server
22
+ */
23
+ export type BasePathConfig = string;
24
+ /**
25
+ * Callback IP address (default: same as "address")
26
+ */
27
+ export type CallbackAddressConfig = string;
28
+ /**
29
+ * Callback port (default: same as "port")
30
+ */
31
+ export type CallbackPortConfig = number;
32
+ /**
33
+ * Add exaggerated spacing in logs to help with visual inspection
34
+ */
35
+ export type DebugLogSpacingConfig = boolean;
36
+ /**
37
+ * Set which insecure features are not allowed to run in this server's sessions. Features are defined on a driver level; see documentation for more details. Features listed here will not be enabled even if also listed in "allow-insecure", and even if "relaxed-security" is enabled. If string, a path to a text file containing policy or a comma-delimited list.
38
+ */
39
+ export type DenyInsecureConfig = string[];
40
+ /**
41
+ * Number of seconds the Appium server should apply as both the keep-alive timeout and the connection timeout for all requests. A value of 0 disables the timeout.
42
+ */
43
+ export type KeepAliveTimeoutConfig = number;
44
+ /**
45
+ * Use local timezone for timestamps
46
+ */
47
+ export type LocalTimezoneConfig = boolean;
48
+ /**
49
+ * Also send log output to this file
50
+ */
51
+ export type LogConfig = string;
52
+ /**
53
+ * One or more log filtering rules
54
+ */
55
+ export type LogFiltersConfig = string[];
56
+ /**
57
+ * Log level (console[:file])
58
+ */
59
+ export type LogLevelConfig =
60
+ | "info"
61
+ | "info:debug"
62
+ | "info:info"
63
+ | "info:warn"
64
+ | "info:error"
65
+ | "warn"
66
+ | "warn:debug"
67
+ | "warn:info"
68
+ | "warn:warn"
69
+ | "warn:error"
70
+ | "error"
71
+ | "error:debug"
72
+ | "error:info"
73
+ | "error:warn"
74
+ | "error:error"
75
+ | "debug"
76
+ | "debug:debug"
77
+ | "debug:info"
78
+ | "debug:warn"
79
+ | "debug:error";
80
+ /**
81
+ * Do not use color in console output
82
+ */
83
+ export type LogNoColorsConfig = boolean;
84
+ /**
85
+ * Show timestamps in console output
86
+ */
87
+ export type LogTimestampConfig = boolean;
88
+ /**
89
+ * Add long stack traces to log entries. Recommended for debugging only.
90
+ */
91
+ export type LongStacktraceConfig = boolean;
92
+ /**
93
+ * Do not check that needed files are readable and/or writable
94
+ */
95
+ export type NoPermsCheckConfig = boolean;
96
+ /**
97
+ * Port to listen on
98
+ */
99
+ export type PortConfig = number;
100
+ /**
101
+ * Disable additional security checks, so it is possible to use some advanced features, provided by drivers supporting this option. Only enable it if all the clients are in the trusted network and it's not the case if a client could potentially break out of the session sandbox. Specific features can be overridden by using "deny-insecure"
102
+ */
103
+ export type RelaxedSecurityConfig = boolean;
104
+ /**
105
+ * Enables session override (clobbering)
106
+ */
107
+ export type SessionOverrideConfig = boolean;
108
+ /**
109
+ * Cause sessions to fail if desired caps are sent in that Appium does not recognize as valid for the selected device
110
+ */
111
+ export type StrictCapsConfig = boolean;
112
+ /**
113
+ * Absolute path to directory Appium can use to manage temp files. Defaults to C:\Windows\Temp on Windows and /tmp otherwise.
114
+ */
115
+ export type TmpConfig = string;
116
+ /**
117
+ * Absolute path to directory Appium can use to save iOS instrument traces; defaults to <tmp>/appium-instruments
118
+ */
119
+ export type TraceDirConfig = string;
120
+ /**
121
+ * A list of drivers to activate. By default, all installed drivers will be activated.
122
+ */
123
+ export type UseDriversConfig = string[];
124
+ /**
125
+ * A list of plugins to activate. To activate all plugins, the value should be an array with a single item "all".
126
+ */
127
+ export type UsePluginsConfig = string[];
128
+ /**
129
+ * Also send log output to this http listener
130
+ */
131
+ export type WebhookConfig = string;
132
+
133
+ /**
134
+ * A schema for Appium configuration files
135
+ */
136
+ export interface AppiumConfiguration {
137
+ server?: ServerConfig;
138
+ }
139
+ /**
140
+ * Configuration when running Appium as a server
141
+ */
142
+ export interface ServerConfig {
143
+ address?: AddressConfig;
144
+ "allow-cors"?: AllowCorsConfig;
145
+ "allow-insecure"?: AllowInsecureConfig;
146
+ "base-path"?: BasePathConfig;
147
+ "callback-address"?: CallbackAddressConfig;
148
+ "callback-port"?: CallbackPortConfig;
149
+ "debug-log-spacing"?: DebugLogSpacingConfig;
150
+ "default-capabilities"?: DefaultCapabilitiesConfig;
151
+ "deny-insecure"?: DenyInsecureConfig;
152
+ driver?: DriverConfig;
153
+ "keep-alive-timeout"?: KeepAliveTimeoutConfig;
154
+ "local-timezone"?: LocalTimezoneConfig;
155
+ log?: LogConfig;
156
+ "log-filters"?: LogFiltersConfig;
157
+ "log-level"?: LogLevelConfig;
158
+ "log-no-colors"?: LogNoColorsConfig;
159
+ "log-timestamp"?: LogTimestampConfig;
160
+ "long-stacktrace"?: LongStacktraceConfig;
161
+ "no-perms-check"?: NoPermsCheckConfig;
162
+ nodeconfig?: NodeconfigConfig;
163
+ plugin?: PluginConfig;
164
+ port?: PortConfig;
165
+ "relaxed-security"?: RelaxedSecurityConfig;
166
+ "session-override"?: SessionOverrideConfig;
167
+ "strict-caps"?: StrictCapsConfig;
168
+ tmp?: TmpConfig;
169
+ "trace-dir"?: TraceDirConfig;
170
+ "use-drivers"?: UseDriversConfig;
171
+ "use-plugins"?: UsePluginsConfig;
172
+ webhook?: WebhookConfig;
173
+ }
174
+ /**
175
+ * Set the default desired capabilities, which will be set on each session unless overridden by received capabilities. If a string, a path to a JSON file containing the capabilities, or raw JSON.
176
+ */
177
+ export interface DefaultCapabilitiesConfig {
178
+ [k: string]: unknown;
179
+ }
180
+ /**
181
+ * Driver-specific configuration. Keys should correspond to driver package names
182
+ */
183
+ export interface DriverConfig {
184
+ [k: string]: unknown;
185
+ }
186
+ /**
187
+ * Path to configuration JSON file to register Appium as a node with Selenium Grid 3; otherwise the configuration itself
188
+ */
189
+ export interface NodeconfigConfig {
190
+ [k: string]: unknown;
191
+ }
192
+ /**
193
+ * Plugin-specific configuration. Keys should correspond to plugin package names
194
+ */
195
+ export interface PluginConfig {
196
+ [k: string]: unknown;
197
+ }
@@ -0,0 +1,201 @@
1
+ import {transformers} from '../lib/schema/cli-transformers';
2
+ import {SERVER_SUBCOMMAND} from '../lib/cli/parser';
3
+ import {
4
+ DRIVER_TYPE as DRIVER_SUBCOMMAND,
5
+ PLUGIN_TYPE as PLUGIN_SUBCOMMAND,
6
+ } from '../lib/ext-config-io';
7
+ import appiumConfigSchema from '../lib/schema/appium-config-schema';
8
+ import {AppiumConfiguration, ServerConfig} from './appium-config';
9
+
10
+ /**
11
+ * Converts a kebab-cased string into a camel-cased string.
12
+ */
13
+ export type KebabToCamel<S extends string> =
14
+ S extends `${infer P1}-${infer P2}${infer P3}`
15
+ ? `${Lowercase<P1>}${Uppercase<P2>}${KebabToCamel<P3>}`
16
+ : Lowercase<S>;
17
+
18
+ /**
19
+ * Converts an object with kebab-cased keys into camel-cased keys.
20
+ */
21
+ type ObjectToCamel<T> = {
22
+ [K in keyof T as KebabToCamel<string & K>]: T[K] extends Record<string, any>
23
+ ? KeysToCamelCase<T[K]>
24
+ : T[K];
25
+ };
26
+
27
+ /**
28
+ * Converts an object or array to have camel-cased keys.
29
+ */
30
+ export type KeysToCamelCase<T> = {
31
+ [K in keyof T as KebabToCamel<string & K>]: T[K] extends Array<any>
32
+ ? KeysToCamelCase<T[K][number]>[]
33
+ : ObjectToCamel<T[K]>;
34
+ };
35
+
36
+ /**
37
+ * The Appium configuration as it would be in a configuration file.
38
+ */
39
+ export type AppiumConfig = Partial<AppiumConfiguration>;
40
+
41
+ /**
42
+ * Certain properties have an `appiumCliDest` prop, which affects the shape of
43
+ * {@link ParsedArgs}. This type helps recognize these properties.
44
+ *
45
+ * See `../lib/schema/keywords` for definition of `appiumCliDest`.
46
+ */
47
+ interface WithDest {
48
+ appiumCliDest: string;
49
+ }
50
+
51
+ /**
52
+ * Some properties have a `default` prop, which means practically they will not
53
+ * be `undefined` upon parsing.
54
+ *
55
+ * We use this to ensure that the {@link ParsedArgs} makes guarantees
56
+ * about the presence of properties.
57
+ */
58
+ interface WithDefault {
59
+ default: any;
60
+ }
61
+
62
+ interface WithCliTransformer {
63
+ appiumCliTransformer: keyof typeof transformers;
64
+ }
65
+
66
+ interface WithTypeArray {
67
+ type: 'array';
68
+ }
69
+ interface WithTypeObject {
70
+ type: 'object';
71
+ }
72
+ type WithTransformer = WithCliTransformer | WithTypeArray | WithTypeObject;
73
+
74
+ /**
75
+ * Derive the "constant" type of the server properties from the schema.
76
+ */
77
+ type AppiumServerSchema =
78
+ typeof appiumConfigSchema['properties']['server']['properties'];
79
+
80
+ /**
81
+ * Properties of `T` with keys `appiumCliDest` prop _or_ just camel-cased.
82
+ */
83
+ type NormalizedServerConfig = {
84
+ [Prop in keyof ServerConfigMapping as AppiumServerSchema[Prop] extends WithDest
85
+ ? AppiumServerSchema[Prop]['appiumCliDest']
86
+ : KebabToCamel<Prop>]: ServerConfig[Prop];
87
+ };
88
+
89
+ /**
90
+ * "Normalized" config, which is like the flattened config (camel-cased keys),
91
+ * but not flattened.
92
+ */
93
+ export type NormalizedAppiumConfig = {
94
+ server: NormalizedServerConfig;
95
+ };
96
+
97
+ /**
98
+ * Utility type to associate {@link AppiumServerSchema} with
99
+ * {@link ServerConfig}.
100
+ */
101
+ type ServerConfigMapping = {
102
+ [Prop in keyof Required<ServerConfig>]: AppiumServerSchema[Prop];
103
+ };
104
+
105
+ /**
106
+ * This type checks if `appiumCliDest` is present in the object via
107
+ * {@link WithDest}, and uses the _value_ of that property for the key name;
108
+ * otherwise uses the camel-cased value of the key name.
109
+ */
110
+ type SetKeyForProp<Prop extends keyof ServerConfigMapping> =
111
+ AppiumServerSchema[Prop] extends WithDest
112
+ ? AppiumServerSchema[Prop]['appiumCliDest']
113
+ : KebabToCamel<Prop>;
114
+
115
+ /**
116
+ * Checks for the existence of default values, and ensures those properties will
117
+ * be defined (eliminate `| undefined` from the type).
118
+ */
119
+ type DefaultForProp<Prop extends keyof ServerConfigMapping> =
120
+ AppiumServerSchema[Prop] extends WithDefault
121
+ ? NonNullable<ServerConfig[Prop]>
122
+ : ServerConfig[Prop];
123
+
124
+ /**
125
+ * The final shape of the parsed CLI arguments.
126
+ */
127
+ type ParsedArgsFromConfig = {
128
+ [Prop in keyof ServerConfigMapping as SetKeyForProp<Prop>]: DefaultForProp<Prop>;
129
+ };
130
+
131
+ /**
132
+ * Possible subcommands for the `appium` CLI.
133
+ */
134
+ type CliSubCommands =
135
+ | typeof SERVER_SUBCOMMAND
136
+ | typeof DRIVER_SUBCOMMAND
137
+ | typeof PLUGIN_SUBCOMMAND;
138
+
139
+ /**
140
+ * Possible subcommands of {@link DRIVER_SUBCOMMAND} or
141
+ * {@link PLUGIN_SUBCOMMAND}.
142
+ */
143
+ type CliExtensionSubcommands =
144
+ | 'list'
145
+ | 'install'
146
+ | 'uninstall'
147
+ | 'update'
148
+ | 'run';
149
+
150
+ /**
151
+ * Random stuff that may appear in the parsed args which has no equivalent in a
152
+ * config file.
153
+ */
154
+ interface MoreArgs {
155
+ /**
156
+ * Path to config file, if any
157
+ */
158
+ configFile: string;
159
+
160
+ /**
161
+ * If true, show the build info and exit
162
+ */
163
+ showConfig: boolean;
164
+
165
+ /**
166
+ * If true, open a REPL
167
+ */
168
+ shell: boolean;
169
+
170
+ /**
171
+ * If true, throw on error instead of exit. Not supported via CLI, but rather
172
+ * only programmatic usage.
173
+ */
174
+ throwInsteadOfExit: boolean;
175
+
176
+ /**
177
+ * Possible subcommands
178
+ */
179
+ subcommand:
180
+ | typeof DRIVER_SUBCOMMAND
181
+ | typeof PLUGIN_SUBCOMMAND
182
+ | typeof SERVER_SUBCOMMAND;
183
+
184
+ /**
185
+ * Subcommands of `driver` subcommand
186
+ */
187
+ driverCommand: CliExtensionSubcommands;
188
+
189
+ /**
190
+ * Subcommands of `plugin` subcommand
191
+ */
192
+ pluginCommand: CliExtensionSubcommands;
193
+ }
194
+
195
+ /**
196
+ * The Appium configuration as a flattened object, parsed via CLI args _and_ any
197
+ * CLI args unsupported by the config file.
198
+ * @todo Does not make any assumptions about property names derived from
199
+ * extensions.
200
+ */
201
+ export type ParsedArgs = ParsedArgsFromConfig & Partial<MoreArgs>;