appium 2.0.0-beta.5 → 2.0.0-beta.53

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 (199) hide show
  1. package/README.md +156 -63
  2. package/build/lib/appium.d.ts +226 -0
  3. package/build/lib/appium.d.ts.map +1 -0
  4. package/build/lib/appium.js +694 -439
  5. package/build/lib/appium.js.map +1 -0
  6. package/build/lib/cli/args.d.ts +17 -0
  7. package/build/lib/cli/args.d.ts.map +1 -0
  8. package/build/lib/cli/args.js +253 -319
  9. package/build/lib/cli/args.js.map +1 -0
  10. package/build/lib/cli/driver-command.d.ts +102 -0
  11. package/build/lib/cli/driver-command.d.ts.map +1 -0
  12. package/build/lib/cli/driver-command.js +126 -81
  13. package/build/lib/cli/driver-command.js.map +1 -0
  14. package/build/lib/cli/extension-command.d.ts +385 -0
  15. package/build/lib/cli/extension-command.d.ts.map +1 -0
  16. package/build/lib/cli/extension-command.js +731 -383
  17. package/build/lib/cli/extension-command.js.map +1 -0
  18. package/build/lib/cli/extension.d.ts +23 -0
  19. package/build/lib/cli/extension.d.ts.map +1 -0
  20. package/build/lib/cli/extension.js +71 -54
  21. package/build/lib/cli/extension.js.map +1 -0
  22. package/build/lib/cli/parser.d.ts +84 -0
  23. package/build/lib/cli/parser.d.ts.map +1 -0
  24. package/build/lib/cli/parser.js +240 -128
  25. package/build/lib/cli/parser.js.map +1 -0
  26. package/build/lib/cli/plugin-command.d.ts +99 -0
  27. package/build/lib/cli/plugin-command.d.ts.map +1 -0
  28. package/build/lib/cli/plugin-command.js +120 -81
  29. package/build/lib/cli/plugin-command.js.map +1 -0
  30. package/build/lib/cli/utils.d.ts +29 -0
  31. package/build/lib/cli/utils.d.ts.map +1 -0
  32. package/build/lib/cli/utils.js +72 -51
  33. package/build/lib/cli/utils.js.map +1 -0
  34. package/build/lib/config-file.d.ts +100 -0
  35. package/build/lib/config-file.d.ts.map +1 -0
  36. package/build/lib/config-file.js +207 -0
  37. package/build/lib/config-file.js.map +1 -0
  38. package/build/lib/config.d.ts +49 -0
  39. package/build/lib/config.d.ts.map +1 -0
  40. package/build/lib/config.js +265 -201
  41. package/build/lib/config.js.map +1 -0
  42. package/build/lib/constants.d.ts +49 -0
  43. package/build/lib/constants.d.ts.map +1 -0
  44. package/build/lib/constants.js +66 -0
  45. package/build/lib/constants.js.map +1 -0
  46. package/build/lib/extension/driver-config.d.ts +82 -0
  47. package/build/lib/extension/driver-config.d.ts.map +1 -0
  48. package/build/lib/extension/driver-config.js +212 -0
  49. package/build/lib/extension/driver-config.js.map +1 -0
  50. package/build/lib/extension/extension-config.d.ts +249 -0
  51. package/build/lib/extension/extension-config.d.ts.map +1 -0
  52. package/build/lib/extension/extension-config.js +581 -0
  53. package/build/lib/extension/extension-config.js.map +1 -0
  54. package/build/lib/extension/index.d.ts +48 -0
  55. package/build/lib/extension/index.d.ts.map +1 -0
  56. package/build/lib/extension/index.js +105 -0
  57. package/build/lib/extension/index.js.map +1 -0
  58. package/build/lib/extension/manifest-migrations.d.ts +27 -0
  59. package/build/lib/extension/manifest-migrations.d.ts.map +1 -0
  60. package/build/lib/extension/manifest-migrations.js +118 -0
  61. package/build/lib/extension/manifest-migrations.js.map +1 -0
  62. package/build/lib/extension/manifest.d.ts +145 -0
  63. package/build/lib/extension/manifest.d.ts.map +1 -0
  64. package/build/lib/extension/manifest.js +521 -0
  65. package/build/lib/extension/manifest.js.map +1 -0
  66. package/build/lib/extension/package-changed.d.ts +11 -0
  67. package/build/lib/extension/package-changed.d.ts.map +1 -0
  68. package/build/lib/extension/package-changed.js +62 -0
  69. package/build/lib/extension/package-changed.js.map +1 -0
  70. package/build/lib/extension/plugin-config.d.ts +56 -0
  71. package/build/lib/extension/plugin-config.d.ts.map +1 -0
  72. package/build/lib/extension/plugin-config.js +102 -0
  73. package/build/lib/extension/plugin-config.js.map +1 -0
  74. package/build/lib/grid-register.d.ts +10 -0
  75. package/build/lib/grid-register.d.ts.map +1 -0
  76. package/build/lib/grid-register.js +122 -144
  77. package/build/lib/grid-register.js.map +1 -0
  78. package/build/lib/logger.d.ts +3 -0
  79. package/build/lib/logger.d.ts.map +1 -0
  80. package/build/lib/logger.js +5 -17
  81. package/build/lib/logger.js.map +1 -0
  82. package/build/lib/logsink.d.ts +4 -0
  83. package/build/lib/logsink.d.ts.map +1 -0
  84. package/build/lib/logsink.js +190 -187
  85. package/build/lib/logsink.js.map +1 -0
  86. package/build/lib/main.d.ts +62 -0
  87. package/build/lib/main.d.ts.map +1 -0
  88. package/build/lib/main.js +348 -228
  89. package/build/lib/main.js.map +1 -0
  90. package/build/lib/schema/arg-spec.d.ts +143 -0
  91. package/build/lib/schema/arg-spec.d.ts.map +1 -0
  92. package/build/lib/schema/arg-spec.js +164 -0
  93. package/build/lib/schema/arg-spec.js.map +1 -0
  94. package/build/lib/schema/cli-args.d.ts +19 -0
  95. package/build/lib/schema/cli-args.d.ts.map +1 -0
  96. package/build/lib/schema/cli-args.js +217 -0
  97. package/build/lib/schema/cli-args.js.map +1 -0
  98. package/build/lib/schema/cli-transformers.d.ts +5 -0
  99. package/build/lib/schema/cli-transformers.d.ts.map +1 -0
  100. package/build/lib/schema/cli-transformers.js +124 -0
  101. package/build/lib/schema/cli-transformers.js.map +1 -0
  102. package/build/lib/schema/index.d.ts +3 -0
  103. package/build/lib/schema/index.d.ts.map +1 -0
  104. package/build/lib/schema/index.js +19 -0
  105. package/build/lib/schema/index.js.map +1 -0
  106. package/build/lib/schema/keywords.d.ts +24 -0
  107. package/build/lib/schema/keywords.d.ts.map +1 -0
  108. package/build/lib/schema/keywords.js +128 -0
  109. package/build/lib/schema/keywords.js.map +1 -0
  110. package/build/lib/schema/schema.d.ts +259 -0
  111. package/build/lib/schema/schema.d.ts.map +1 -0
  112. package/build/lib/schema/schema.js +615 -0
  113. package/build/lib/schema/schema.js.map +1 -0
  114. package/build/lib/utils.d.ts +121 -0
  115. package/build/lib/utils.d.ts.map +1 -0
  116. package/build/lib/utils.js +351 -273
  117. package/build/lib/utils.js.map +1 -0
  118. package/build/tsconfig.tsbuildinfo +1 -0
  119. package/build/types/cli.d.ts +134 -0
  120. package/build/types/cli.d.ts.map +1 -0
  121. package/build/types/cli.js +3 -0
  122. package/build/types/cli.js.map +1 -0
  123. package/build/types/index.d.ts +15 -0
  124. package/build/types/index.d.ts.map +1 -0
  125. package/build/types/index.js +19 -0
  126. package/build/types/index.js.map +1 -0
  127. package/build/types/manifest/base.d.ts +135 -0
  128. package/build/types/manifest/base.d.ts.map +1 -0
  129. package/build/types/manifest/base.js +3 -0
  130. package/build/types/manifest/base.js.map +1 -0
  131. package/build/types/manifest/index.d.ts +19 -0
  132. package/build/types/manifest/index.d.ts.map +1 -0
  133. package/build/types/manifest/index.js +40 -0
  134. package/build/types/manifest/index.js.map +1 -0
  135. package/build/types/manifest/v3.d.ts +139 -0
  136. package/build/types/manifest/v3.d.ts.map +1 -0
  137. package/build/types/manifest/v3.js +3 -0
  138. package/build/types/manifest/v3.js.map +1 -0
  139. package/driver.d.ts +1 -0
  140. package/driver.js +14 -0
  141. package/index.js +11 -0
  142. package/lib/appium.js +535 -186
  143. package/lib/cli/args.js +267 -422
  144. package/lib/cli/driver-command.js +126 -23
  145. package/lib/cli/extension-command.js +679 -271
  146. package/lib/cli/extension.js +48 -17
  147. package/lib/cli/parser.js +263 -83
  148. package/lib/cli/plugin-command.js +115 -20
  149. package/lib/cli/utils.js +24 -10
  150. package/lib/config-file.js +220 -0
  151. package/lib/config.js +244 -110
  152. package/lib/constants.js +71 -0
  153. package/lib/extension/driver-config.js +250 -0
  154. package/lib/extension/extension-config.js +682 -0
  155. package/lib/extension/index.js +116 -0
  156. package/lib/extension/manifest-migrations.js +120 -0
  157. package/lib/extension/manifest.js +573 -0
  158. package/lib/extension/package-changed.js +64 -0
  159. package/lib/extension/plugin-config.js +112 -0
  160. package/lib/grid-register.js +49 -35
  161. package/lib/logger.js +1 -2
  162. package/lib/logsink.js +64 -38
  163. package/lib/main.js +321 -101
  164. package/lib/schema/arg-spec.js +229 -0
  165. package/lib/schema/cli-args.js +238 -0
  166. package/lib/schema/cli-transformers.js +119 -0
  167. package/lib/schema/index.js +2 -0
  168. package/lib/schema/keywords.js +136 -0
  169. package/lib/schema/schema.js +722 -0
  170. package/lib/utils.js +291 -167
  171. package/package.json +83 -84
  172. package/plugin.d.ts +1 -0
  173. package/plugin.js +13 -0
  174. package/scripts/autoinstall-extensions.js +237 -0
  175. package/support.d.ts +1 -0
  176. package/support.js +13 -0
  177. package/tsconfig.json +25 -0
  178. package/types/cli.ts +193 -0
  179. package/types/index.ts +20 -0
  180. package/types/manifest/README.md +30 -0
  181. package/types/manifest/base.ts +158 -0
  182. package/types/manifest/index.ts +27 -0
  183. package/types/manifest/v3.ts +161 -0
  184. package/CHANGELOG.md +0 -3515
  185. package/bin/ios-webkit-debug-proxy-launcher.js +0 -71
  186. package/build/lib/cli/npm.js +0 -208
  187. package/build/lib/cli/parser-helpers.js +0 -82
  188. package/build/lib/driver-config.js +0 -77
  189. package/build/lib/drivers.js +0 -96
  190. package/build/lib/extension-config.js +0 -253
  191. package/build/lib/plugin-config.js +0 -59
  192. package/build/lib/plugins.js +0 -14
  193. package/lib/cli/npm.js +0 -184
  194. package/lib/cli/parser-helpers.js +0 -79
  195. package/lib/driver-config.js +0 -46
  196. package/lib/drivers.js +0 -81
  197. package/lib/extension-config.js +0 -209
  198. package/lib/plugin-config.js +0 -34
  199. package/lib/plugins.js +0 -10
@@ -0,0 +1,385 @@
1
+ export default ExtensionCommand;
2
+ /**
3
+ * Options for the {@linkcode ExtensionCommand } constructor
4
+ */
5
+ export type ExtensionCommandOptions<ExtType extends import("@appium/types").ExtensionType> = {
6
+ /**
7
+ * - the `DriverConfig` or `PluginConfig` instance used for this command
8
+ */
9
+ config: ExtensionConfig<ExtType>;
10
+ /**
11
+ * - whether the output of this command should be JSON or text
12
+ */
13
+ json: boolean;
14
+ };
15
+ /**
16
+ * Extra stuff about extensions; used indirectly by {@linkcode ExtensionCommand.list }.
17
+ */
18
+ export type ExtensionMetadata = {
19
+ /**
20
+ * - If `true`, the extension is installed
21
+ */
22
+ installed: boolean;
23
+ /**
24
+ * - If the extension is installed, the version it can be updated to
25
+ */
26
+ updateVersion: string | null;
27
+ /**
28
+ * - Same as above, but a major version bump
29
+ */
30
+ unsafeUpdateVersion: string | null;
31
+ /**
32
+ * - If the extension is installed and the latest
33
+ */
34
+ upToDate: boolean;
35
+ /**
36
+ * - Update check error message (if present)
37
+ */
38
+ updateError: string | null;
39
+ };
40
+ export type ExtensionType = import('@appium/types').ExtensionType;
41
+ export type DriverType = import('@appium/types').DriverType;
42
+ export type PluginType = import('@appium/types').PluginType;
43
+ export type ExtRecord<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtRecord<ExtType>;
44
+ export type ExtensionConfig<ExtType extends import("@appium/types").ExtensionType> = import('../extension/extension-config').ExtensionConfig<ExtType>;
45
+ export type ExtMetadata<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtMetadata<ExtType>;
46
+ export type ExtManifest<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtManifest<ExtType>;
47
+ export type ExtPackageJson<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtPackageJson<ExtType>;
48
+ export type ExtInstallReceipt<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtInstallReceipt<ExtType>;
49
+ /**
50
+ * Possible return value for {@linkcode ExtensionCommand.list }
51
+ */
52
+ export type UninstalledExtensionListData = Partial<InstalledExtensionListData> & {
53
+ pkgName: string;
54
+ installed: false;
55
+ };
56
+ /**
57
+ * Possible return value for {@linkcode ExtensionCommand.list }
58
+ */
59
+ export type InstalledExtensionListData = import('appium/types').InternalMetadata & ExtensionMetadata;
60
+ /**
61
+ * Return value of {@linkcode ExtensionCommand.list }.
62
+ */
63
+ export type ExtensionListData = Record<string, InstalledExtensionListData | UninstalledExtensionListData>;
64
+ /**
65
+ * Options for {@linkcode ExtensionCommand._run }.
66
+ */
67
+ export type RunOptions = {
68
+ /**
69
+ * - name of the extension to run a script from
70
+ */
71
+ installSpec: string;
72
+ /**
73
+ * - name of the script to run
74
+ */
75
+ scriptName: string;
76
+ /**
77
+ * - arguments to pass to the script
78
+ */
79
+ extraArgs?: string[] | undefined;
80
+ };
81
+ /**
82
+ * Return value of {@linkcode ExtensionCommand._run }
83
+ */
84
+ export type RunOutput = {
85
+ /**
86
+ * - error message if script ran unsuccessfully, otherwise undefined
87
+ */
88
+ error?: string | undefined;
89
+ /**
90
+ * - script output
91
+ */
92
+ output: string[];
93
+ };
94
+ /**
95
+ * Options for {@linkcode ExtensionCommand._update }.
96
+ */
97
+ export type ExtensionUpdateOpts = {
98
+ /**
99
+ * - the name of the extension to update
100
+ */
101
+ installSpec: string;
102
+ /**
103
+ * - if true, will perform unsafe updates past major revision boundaries
104
+ */
105
+ unsafe: boolean;
106
+ };
107
+ /**
108
+ * Return value of {@linkcode ExtensionCommand._update }.
109
+ */
110
+ export type ExtensionUpdateResult = {
111
+ /**
112
+ * - map of ext names to error objects
113
+ */
114
+ errors: Record<string, Error>;
115
+ /**
116
+ * - map of ext names to {@linkcode UpdateReport }s
117
+ */
118
+ updates: Record<string, UpdateReport>;
119
+ };
120
+ /**
121
+ * Part of result of {@linkcode ExtensionCommand._update }.
122
+ */
123
+ export type UpdateReport = {
124
+ /**
125
+ * - version the extension was updated from
126
+ */
127
+ from: string;
128
+ /**
129
+ * - version the extension was updated to
130
+ */
131
+ to: string;
132
+ };
133
+ /**
134
+ * Options for {@linkcode ExtensionCommand._uninstall }.
135
+ */
136
+ export type UninstallOpts = {
137
+ /**
138
+ * - the name or spec of an extension to uninstall
139
+ */
140
+ installSpec: string;
141
+ };
142
+ /**
143
+ * Used by {@linkcode ExtensionCommand.getPostInstallText }
144
+ */
145
+ export type ExtensionArgs = {
146
+ /**
147
+ * - the name of an extension
148
+ */
149
+ extName: string;
150
+ /**
151
+ * - the data for an installed extension
152
+ */
153
+ extData: object;
154
+ };
155
+ /**
156
+ * Options for {@linkcode ExtensionCommand.installViaNpm }
157
+ */
158
+ export type InstallViaNpmArgs = {
159
+ /**
160
+ * - the name or spec of an extension to install
161
+ */
162
+ installSpec: string;
163
+ /**
164
+ * - the NPM package name of the extension
165
+ */
166
+ pkgName: string;
167
+ /**
168
+ * - type of install
169
+ */
170
+ installType: import('appium/types').InstallType;
171
+ /**
172
+ * - the specific version of the NPM package
173
+ */
174
+ pkgVer?: string | undefined;
175
+ };
176
+ /**
177
+ * Object returned by {@linkcode ExtensionCommand.checkForExtensionUpdate }
178
+ */
179
+ export type PossibleUpdates = {
180
+ /**
181
+ * - current version
182
+ */
183
+ current: string;
184
+ /**
185
+ * - version we can safely update to if it exists, or null
186
+ */
187
+ safeUpdate: string | null;
188
+ /**
189
+ * - version we can unsafely update to if it exists, or null
190
+ */
191
+ unsafeUpdate: string | null;
192
+ };
193
+ /**
194
+ * Options for {@linkcode ExtensionCommand._install }
195
+ */
196
+ export type InstallOpts = {
197
+ /**
198
+ * - the name or spec of an extension to install
199
+ */
200
+ installSpec: string;
201
+ /**
202
+ * - how to install this extension. One of the INSTALL_TYPES
203
+ */
204
+ installType: InstallType;
205
+ /**
206
+ * - for git/github installs, the extension node package name
207
+ */
208
+ packageName?: string | undefined;
209
+ };
210
+ export type KnownExtensions<ExtType extends import("@appium/types").ExtensionType> = ExtType extends DriverType ? typeof import('../constants').KNOWN_DRIVERS : ExtType extends PluginType ? typeof import('../constants').KNOWN_PLUGINS : never;
211
+ export type ListOptions = {
212
+ /**
213
+ * - whether should show only installed extensions
214
+ */
215
+ showInstalled: boolean;
216
+ /**
217
+ * - whether should show available updates
218
+ */
219
+ showUpdates: boolean;
220
+ };
221
+ /**
222
+ * Opts for {@linkcode ExtensionCommand.getInstallationReceipt }
223
+ */
224
+ export type GetInstallationReceiptOpts<ExtType extends import("@appium/types").ExtensionType> = {
225
+ installPath: string;
226
+ installSpec: string;
227
+ pkg: ExtPackageJson<ExtType>;
228
+ installType: InstallType;
229
+ };
230
+ export type InstallType = import('appium/types').InstallType;
231
+ /**
232
+ * @template {ExtensionType} ExtType
233
+ */
234
+ export class ExtensionCommand<ExtType extends import("@appium/types").ExtensionType> {
235
+ /**
236
+ * Build an ExtensionCommand
237
+ * @param {ExtensionCommandOptions<ExtType>} opts
238
+ */
239
+ constructor({ config, json }: ExtensionCommandOptions<ExtType>);
240
+ /**
241
+ * This is the `DriverConfig` or `PluginConfig`, depending on `ExtType`.
242
+ * @type {ExtensionConfig<ExtType>}
243
+ */
244
+ config: ExtensionConfig<ExtType>;
245
+ /**
246
+ * {@linkcode Record} of official plugins or drivers.
247
+ * @type {KnownExtensions<ExtType>}
248
+ */
249
+ knownExtensions: KnownExtensions<ExtType>;
250
+ /**
251
+ * If `true`, command output has been requested as JSON.
252
+ * @type {boolean}
253
+ */
254
+ isJsonOutput: boolean;
255
+ log: console.CliConsole;
256
+ /**
257
+ * `driver` or `plugin`, depending on the `ExtensionConfig`.
258
+ */
259
+ get type(): ExtType;
260
+ /**
261
+ * Logs a message and returns an {@linkcode Error} to throw.
262
+ *
263
+ * For TS to understand that a function throws an exception, it must actually throw an exception--
264
+ * in other words, _calling_ a function which is guaranteed to throw an exception is not enough--
265
+ * nor is something like `@returns {never}` which does not imply a thrown exception.
266
+ * @param {string} message
267
+ * @protected
268
+ * @throws {Error}
269
+ */
270
+ protected _createFatalError(message: string): Error;
271
+ /**
272
+ * Take a CLI parse and run an extension command based on its type
273
+ *
274
+ * @param {object} args - a key/value object with CLI flags and values
275
+ * @return {Promise<object>} the result of the specific command which is executed
276
+ */
277
+ execute(args: object): Promise<object>;
278
+ /**
279
+ * List extensions
280
+ *
281
+ * @param {ListOptions} opts
282
+ * @return {Promise<ExtensionListData>} map of extension names to extension data
283
+ */
284
+ list({ showInstalled, showUpdates }: ListOptions): Promise<ExtensionListData>;
285
+ /**
286
+ * Install an extension
287
+ *
288
+ * @param {InstallOpts} opts
289
+ * @return {Promise<ExtRecord<ExtType>>} map of all installed extension names to extension data
290
+ */
291
+ _install({ installSpec, installType, packageName }: InstallOpts): Promise<ExtRecord<ExtType>>;
292
+ /**
293
+ * Install an extension via NPM
294
+ *
295
+ * @param {InstallViaNpmArgs} args
296
+ * @returns {Promise<ExtInstallReceipt<ExtType>>}
297
+ */
298
+ installViaNpm({ installSpec, pkgName, pkgVer, installType }: InstallViaNpmArgs): Promise<ExtInstallReceipt<ExtType>>;
299
+ /**
300
+ * Get the text which should be displayed to the user after an extension has been installed. This
301
+ * is designed to be overridden by drivers/plugins with their own particular text.
302
+ *
303
+ * @param {ExtensionArgs} args
304
+ * @returns {string}
305
+ */
306
+ getPostInstallText(args: ExtensionArgs): string;
307
+ /**
308
+ * Once a package is installed on-disk, this gathers some necessary metadata for validation.
309
+ *
310
+ * @param {GetInstallationReceiptOpts<ExtType>} opts
311
+ * @returns {ExtInstallReceipt<ExtType>}
312
+ */
313
+ getInstallationReceipt({ pkg, installPath, installType, installSpec }: GetInstallationReceiptOpts<ExtType>): ExtInstallReceipt<ExtType>;
314
+ /**
315
+ * Validates the _required_ root fields of an extension's `package.json` file.
316
+ *
317
+ * These required fields are:
318
+ * - `name`
319
+ * - `version`
320
+ * - `appium`
321
+ * @param {import('type-fest').PackageJson} pkg - `package.json` of extension
322
+ * @param {string} installSpec - Extension name/spec
323
+ * @throws {ReferenceError} If `package.json` has a missing or invalid field
324
+ * @returns {pkg is ExtPackageJson<ExtType>}
325
+ */
326
+ validatePackageJson(pkg: import('type-fest').PackageJson, installSpec: string): pkg is ExtPackageJson<ExtType>;
327
+ /**
328
+ * For any `package.json` fields which a particular type of extension requires, validate the
329
+ * presence and form of those fields on the `package.json` data, throwing an error if anything is
330
+ * amiss.
331
+ *
332
+ * @param {ExtMetadata<ExtType>} extMetadata - the data in the "appium" field of `package.json` for an extension
333
+ * @param {string} installSpec - Extension name/spec
334
+ */
335
+ validateExtensionFields(extMetadata: ExtMetadata<ExtType>, installSpec: string): void;
336
+ /**
337
+ * Uninstall an extension.
338
+ *
339
+ * First tries to do this via `npm uninstall`, but if that fails, just `rm -rf`'s the extension dir.
340
+ *
341
+ * Will only remove the extension from the manifest if it has been successfully removed.
342
+ *
343
+ * @param {UninstallOpts} opts
344
+ * @return {Promise<ExtRecord<ExtType>>} map of all installed extension names to extension data (without the extension just uninstalled)
345
+ */
346
+ _uninstall({ installSpec }: UninstallOpts): Promise<ExtRecord<ExtType>>;
347
+ /**
348
+ * Attempt to update one or more drivers using NPM
349
+ *
350
+ * @param {ExtensionUpdateOpts} updateSpec
351
+ * @return {Promise<ExtensionUpdateResult>}
352
+ */
353
+ _update({ installSpec, unsafe }: ExtensionUpdateOpts): Promise<ExtensionUpdateResult>;
354
+ /**
355
+ * Given an extension name, figure out what its highest possible version upgrade is, and also the
356
+ * highest possible safe upgrade.
357
+ *
358
+ * @param {string} ext - name of extension
359
+ * @return {Promise<PossibleUpdates>}
360
+ */
361
+ checkForExtensionUpdate(ext: string): Promise<PossibleUpdates>;
362
+ /**
363
+ * Actually update an extension installed by NPM, using the NPM cli. And update the installation
364
+ * manifest.
365
+ *
366
+ * @param {string} installSpec - name of extension to update
367
+ * @param {string} version - version string identifier to update extension to
368
+ * @returns {Promise<void>}
369
+ */
370
+ updateExtension(installSpec: string, version: string): Promise<void>;
371
+ /**
372
+ * Runs a script cached inside the "scripts" field under "appium"
373
+ * inside of the driver/plugins "package.json" file. Will throw
374
+ * an error if the driver/plugin does not contain a "scripts" field
375
+ * underneath the "appium" field in its package.json, if the
376
+ * "scripts" field is not a plain object, or if the scriptName is
377
+ * not found within "scripts" object.
378
+ *
379
+ * @param {RunOptions} opts
380
+ * @return {Promise<RunOutput>}
381
+ */
382
+ _run({ installSpec, scriptName, extraArgs }: RunOptions): Promise<RunOutput>;
383
+ }
384
+ import { console } from "@appium/support";
385
+ //# sourceMappingURL=extension-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-command.d.ts","sourceRoot":"","sources":["../../../lib/cli/extension-command.js"],"names":[],"mappings":";;;;;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