appium 3.2.2 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/appium.d.ts +147 -205
- package/build/lib/appium.d.ts.map +1 -1
- package/build/lib/appium.js +169 -282
- package/build/lib/appium.js.map +1 -1
- package/build/lib/bidi-commands.d.ts.map +1 -1
- package/build/lib/bidi-commands.js +11 -11
- package/build/lib/bidi-commands.js.map +1 -1
- package/build/lib/bootstrap/appium-initializer.d.ts +21 -0
- package/build/lib/bootstrap/appium-initializer.d.ts.map +1 -0
- package/build/lib/bootstrap/appium-initializer.js +146 -0
- package/build/lib/bootstrap/appium-initializer.js.map +1 -0
- package/build/lib/bootstrap/appium-main-runner.d.ts +22 -0
- package/build/lib/bootstrap/appium-main-runner.d.ts.map +1 -0
- package/build/lib/bootstrap/appium-main-runner.js +109 -0
- package/build/lib/bootstrap/appium-main-runner.js.map +1 -0
- package/build/lib/bootstrap/config-file.d.ts +37 -0
- package/build/lib/bootstrap/config-file.d.ts.map +1 -0
- package/build/lib/{config-file.js → bootstrap/config-file.js} +62 -138
- package/build/lib/bootstrap/config-file.js.map +1 -0
- package/build/lib/bootstrap/grid-v3-register.d.ts +20 -0
- package/build/lib/bootstrap/grid-v3-register.d.ts.map +1 -0
- package/build/lib/bootstrap/grid-v3-register.js +185 -0
- package/build/lib/bootstrap/grid-v3-register.js.map +1 -0
- package/build/lib/bootstrap/init-types.d.ts +16 -0
- package/build/lib/bootstrap/init-types.d.ts.map +1 -0
- package/build/lib/bootstrap/init-types.js +3 -0
- package/build/lib/bootstrap/init-types.js.map +1 -0
- package/build/lib/bootstrap/main-helpers.d.ts +55 -0
- package/build/lib/bootstrap/main-helpers.d.ts.map +1 -0
- package/build/lib/bootstrap/main-helpers.js +187 -0
- package/build/lib/bootstrap/main-helpers.js.map +1 -0
- package/build/lib/bootstrap/node-helpers.d.ts +32 -0
- package/build/lib/bootstrap/node-helpers.d.ts.map +1 -0
- package/build/lib/bootstrap/node-helpers.js +201 -0
- package/build/lib/bootstrap/node-helpers.js.map +1 -0
- package/build/lib/bootstrap/startup-config.d.ts +22 -0
- package/build/lib/bootstrap/startup-config.d.ts.map +1 -0
- package/build/lib/bootstrap/startup-config.js +111 -0
- package/build/lib/bootstrap/startup-config.js.map +1 -0
- package/build/lib/cli/args.d.ts +16 -12
- package/build/lib/cli/args.d.ts.map +1 -1
- package/build/lib/cli/args.js +20 -40
- package/build/lib/cli/args.js.map +1 -1
- package/build/lib/cli/driver-command.d.ts +51 -93
- package/build/lib/cli/driver-command.d.ts.map +1 -1
- package/build/lib/cli/driver-command.js +11 -66
- package/build/lib/cli/driver-command.js.map +1 -1
- package/build/lib/cli/extension-command.d.ts +173 -377
- package/build/lib/cli/extension-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.js +387 -656
- package/build/lib/cli/extension-command.js.map +1 -1
- package/build/lib/cli/extension.d.ts +10 -15
- package/build/lib/cli/extension.d.ts.map +1 -1
- package/build/lib/cli/extension.js +15 -33
- package/build/lib/cli/extension.js.map +1 -1
- package/build/lib/cli/parser.d.ts +37 -66
- package/build/lib/cli/parser.d.ts.map +1 -1
- package/build/lib/cli/parser.js +69 -104
- package/build/lib/cli/parser.js.map +1 -1
- package/build/lib/cli/plugin-command.d.ts +50 -90
- package/build/lib/cli/plugin-command.d.ts.map +1 -1
- package/build/lib/cli/plugin-command.js +11 -63
- package/build/lib/cli/plugin-command.js.map +1 -1
- package/build/lib/cli/setup-command.d.ts +21 -26
- package/build/lib/cli/setup-command.d.ts.map +1 -1
- package/build/lib/cli/setup-command.js +19 -61
- package/build/lib/cli/setup-command.js.map +1 -1
- package/build/lib/cli/utils.d.ts +33 -35
- package/build/lib/cli/utils.d.ts.map +1 -1
- package/build/lib/cli/utils.js +48 -50
- package/build/lib/cli/utils.js.map +1 -1
- package/build/lib/constants.d.ts +23 -23
- package/build/lib/constants.d.ts.map +1 -1
- package/build/lib/constants.js +10 -15
- package/build/lib/constants.js.map +1 -1
- package/build/lib/doctor/doctor.d.ts +40 -57
- package/build/lib/doctor/doctor.d.ts.map +1 -1
- package/build/lib/doctor/doctor.js +31 -62
- package/build/lib/doctor/doctor.js.map +1 -1
- package/build/lib/extension/driver-config.d.ts +18 -77
- package/build/lib/extension/driver-config.d.ts.map +1 -1
- package/build/lib/extension/driver-config.js +37 -125
- package/build/lib/extension/driver-config.js.map +1 -1
- package/build/lib/extension/extension-config.d.ts +103 -210
- package/build/lib/extension/extension-config.d.ts.map +1 -1
- package/build/lib/extension/extension-config.js +180 -342
- package/build/lib/extension/extension-config.js.map +1 -1
- package/build/lib/extension/index.d.ts +12 -29
- package/build/lib/extension/index.d.ts.map +1 -1
- package/build/lib/extension/index.js +33 -75
- package/build/lib/extension/index.js.map +1 -1
- package/build/lib/extension/manifest-migrations.d.ts +3 -20
- package/build/lib/extension/manifest-migrations.d.ts.map +1 -1
- package/build/lib/extension/manifest-migrations.js +20 -101
- package/build/lib/extension/manifest-migrations.js.map +1 -1
- package/build/lib/extension/manifest.d.ts +61 -107
- package/build/lib/extension/manifest.d.ts.map +1 -1
- package/build/lib/extension/manifest.js +181 -356
- package/build/lib/extension/manifest.js.map +1 -1
- package/build/lib/extension/package-changed.d.ts +1 -3
- package/build/lib/extension/package-changed.d.ts.map +1 -1
- package/build/lib/extension/package-changed.js +8 -15
- package/build/lib/extension/package-changed.js.map +1 -1
- package/build/lib/extension/plugin-config.d.ts +10 -52
- package/build/lib/extension/plugin-config.d.ts.map +1 -1
- package/build/lib/extension/plugin-config.js +11 -63
- package/build/lib/extension/plugin-config.js.map +1 -1
- package/build/lib/helpers/build.d.ts +22 -0
- package/build/lib/helpers/build.d.ts.map +1 -0
- package/build/lib/helpers/build.js +109 -0
- package/build/lib/helpers/build.js.map +1 -0
- package/build/lib/helpers/capability.d.ts +38 -0
- package/build/lib/helpers/capability.d.ts.map +1 -0
- package/build/lib/helpers/capability.js +128 -0
- package/build/lib/helpers/capability.js.map +1 -0
- package/build/lib/helpers/network.d.ts +14 -0
- package/build/lib/helpers/network.d.ts.map +1 -0
- package/build/lib/helpers/network.js +35 -0
- package/build/lib/helpers/network.js.map +1 -0
- package/build/lib/insecure-features.js +6 -6
- package/build/lib/insecure-features.js.map +1 -1
- package/build/lib/inspector-commands.d.ts +6 -0
- package/build/lib/inspector-commands.d.ts.map +1 -1
- package/build/lib/inspector-commands.js +6 -0
- package/build/lib/inspector-commands.js.map +1 -1
- package/build/lib/logger.d.ts +2 -3
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +2 -3
- package/build/lib/logger.js.map +1 -1
- package/build/lib/logsink.d.ts +13 -22
- package/build/lib/logsink.d.ts.map +1 -1
- package/build/lib/logsink.js +48 -103
- package/build/lib/logsink.js.map +1 -1
- package/build/lib/main.d.ts +15 -58
- package/build/lib/main.d.ts.map +1 -1
- package/build/lib/main.js +25 -425
- package/build/lib/main.js.map +1 -1
- package/build/lib/schema/arg-spec.d.ts +32 -107
- package/build/lib/schema/arg-spec.d.ts.map +1 -1
- package/build/lib/schema/arg-spec.js +11 -107
- package/build/lib/schema/arg-spec.js.map +1 -1
- package/build/lib/schema/cli-args-guards.d.ts +34 -0
- package/build/lib/schema/cli-args-guards.d.ts.map +1 -0
- package/build/lib/schema/cli-args-guards.js +49 -0
- package/build/lib/schema/cli-args-guards.js.map +1 -0
- package/build/lib/schema/cli-args.d.ts +3 -15
- package/build/lib/schema/cli-args.d.ts.map +1 -1
- package/build/lib/schema/cli-args.js +17 -107
- package/build/lib/schema/cli-args.js.map +1 -1
- package/build/lib/schema/cli-transformers.d.ts +15 -12
- package/build/lib/schema/cli-transformers.d.ts.map +1 -1
- package/build/lib/schema/cli-transformers.js +15 -45
- package/build/lib/schema/cli-transformers.js.map +1 -1
- package/build/lib/schema/format-errors.d.ts +28 -0
- package/build/lib/schema/format-errors.d.ts.map +1 -0
- package/build/lib/schema/format-errors.js +29 -0
- package/build/lib/schema/format-errors.js.map +1 -0
- package/build/lib/schema/index.d.ts +4 -2
- package/build/lib/schema/index.d.ts.map +1 -1
- package/build/lib/schema/index.js +2 -0
- package/build/lib/schema/index.js.map +1 -1
- package/build/lib/schema/keywords.d.ts +12 -20
- package/build/lib/schema/keywords.d.ts.map +1 -1
- package/build/lib/schema/keywords.js +6 -51
- package/build/lib/schema/keywords.js.map +1 -1
- package/build/lib/schema/schema.d.ts +106 -231
- package/build/lib/schema/schema.d.ts.map +1 -1
- package/build/lib/schema/schema.js +88 -358
- package/build/lib/schema/schema.js.map +1 -1
- package/build/lib/utils.d.ts +7 -267
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +10 -409
- package/build/lib/utils.js.map +1 -1
- package/lib/{appium.js → appium.ts} +297 -341
- package/lib/bidi-commands.ts +10 -14
- package/lib/bootstrap/appium-initializer.ts +212 -0
- package/lib/bootstrap/appium-main-runner.ts +172 -0
- package/lib/bootstrap/config-file.ts +178 -0
- package/lib/bootstrap/grid-v3-register.ts +250 -0
- package/lib/bootstrap/init-types.ts +31 -0
- package/lib/bootstrap/main-helpers.ts +223 -0
- package/lib/bootstrap/node-helpers.ts +180 -0
- package/lib/bootstrap/startup-config.ts +143 -0
- package/lib/cli/{args.js → args.ts} +45 -56
- package/lib/cli/driver-command.ts +122 -0
- package/lib/cli/{extension-command.js → extension-command.ts} +827 -906
- package/lib/cli/extension.ts +65 -0
- package/lib/cli/{parser.js → parser.ts} +93 -116
- package/lib/cli/plugin-command.ts +117 -0
- package/lib/cli/{setup-command.js → setup-command.ts} +59 -74
- package/lib/cli/utils.ts +97 -0
- package/lib/{constants.js → constants.ts} +30 -41
- package/lib/doctor/{doctor.js → doctor.ts} +82 -92
- package/lib/extension/driver-config.ts +165 -0
- package/lib/extension/{extension-config.js → extension-config.ts} +291 -405
- package/lib/extension/index.ts +143 -0
- package/lib/extension/manifest-migrations.ts +57 -0
- package/lib/extension/manifest.ts +369 -0
- package/lib/extension/{package-changed.js → package-changed.ts} +9 -18
- package/lib/extension/plugin-config.ts +62 -0
- package/lib/helpers/build.ts +111 -0
- package/lib/helpers/capability.ts +171 -0
- package/lib/helpers/network.ts +30 -0
- package/lib/insecure-features.ts +1 -1
- package/lib/inspector-commands.ts +6 -1
- package/lib/{logger.js → logger.ts} +1 -2
- package/lib/{logsink.js → logsink.ts} +91 -137
- package/lib/main.ts +60 -0
- package/lib/schema/arg-spec.ts +131 -0
- package/lib/schema/cli-args-guards.ts +67 -0
- package/lib/schema/cli-args.ts +171 -0
- package/lib/schema/cli-transformers.ts +83 -0
- package/lib/schema/format-errors.ts +43 -0
- package/lib/schema/index.ts +4 -0
- package/lib/schema/keywords.ts +96 -0
- package/lib/schema/schema.ts +448 -0
- package/lib/utils.ts +73 -0
- package/package.json +17 -18
- package/scripts/autoinstall-extensions.js +3 -0
- package/build/lib/config-file.d.ts +0 -100
- package/build/lib/config-file.d.ts.map +0 -1
- package/build/lib/config-file.js.map +0 -1
- package/build/lib/config.d.ts +0 -70
- package/build/lib/config.d.ts.map +0 -1
- package/build/lib/config.js +0 -390
- package/build/lib/config.js.map +0 -1
- package/build/lib/grid-register.d.ts +0 -10
- package/build/lib/grid-register.d.ts.map +0 -1
- package/build/lib/grid-register.js +0 -134
- package/build/lib/grid-register.js.map +0 -1
- package/lib/cli/driver-command.js +0 -174
- package/lib/cli/extension.js +0 -74
- package/lib/cli/plugin-command.js +0 -164
- package/lib/cli/utils.js +0 -91
- package/lib/config-file.js +0 -228
- package/lib/config.js +0 -389
- package/lib/extension/driver-config.js +0 -245
- package/lib/extension/index.js +0 -169
- package/lib/extension/manifest-migrations.js +0 -136
- package/lib/extension/manifest.js +0 -550
- package/lib/extension/plugin-config.js +0 -112
- package/lib/grid-register.js +0 -146
- package/lib/main.js +0 -545
- package/lib/schema/arg-spec.js +0 -229
- package/lib/schema/cli-args.js +0 -254
- package/lib/schema/cli-transformers.js +0 -113
- package/lib/schema/index.js +0 -2
- package/lib/schema/keywords.js +0 -136
- package/lib/schema/schema.js +0 -725
- package/lib/utils.js +0 -512
|
@@ -1,445 +1,241 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* @param {ExtensionConfig<ExtensionType>} driverConfig
|
|
6
|
-
* @param {ExtensionConfig<ExtensionType>} pluginConfig
|
|
7
|
-
* @param {import('@appium/types').AppiumLogger} logger
|
|
8
|
-
*/
|
|
9
|
-
export function injectAppiumSymlinks(driverConfig: ExtensionConfig<ExtensionType>, pluginConfig: ExtensionConfig<ExtensionType>, logger: import("@appium/types").AppiumLogger): Promise<void>;
|
|
10
|
-
export default ExtensionCliCommand;
|
|
11
|
-
export { ExtensionCliCommand as ExtensionCommand };
|
|
1
|
+
import type { AppiumLogger, ExtensionType } from '@appium/types';
|
|
2
|
+
import type { ExtInstallReceipt as AppiumExtInstallReceipt, ExtManifest as AppiumExtManifest, ExtMetadata as AppiumExtMetadata, ExtPackageJson as AppiumExtPackageJson, ExtRecord as AppiumExtRecord, InstallType } from 'appium/types';
|
|
3
|
+
import type { ExtensionConfig as BaseExtensionConfig } from '../extension/extension-config';
|
|
12
4
|
/**
|
|
13
5
|
* Options for the {@linkcode ExtensionCliCommand} constructor
|
|
14
6
|
*/
|
|
15
|
-
export type ExtensionCommandOptions<ExtType extends ExtensionType> = {
|
|
16
|
-
/**
|
|
17
|
-
* - the `DriverConfig` or `PluginConfig` instance used for this command
|
|
18
|
-
*/
|
|
7
|
+
export type ExtensionCommandOptions<ExtType extends ExtensionType = ExtensionType> = {
|
|
19
8
|
config: ExtensionConfig<ExtType>;
|
|
20
|
-
/**
|
|
21
|
-
* - whether the output of this command should be JSON or text
|
|
22
|
-
*/
|
|
23
9
|
json: boolean;
|
|
24
10
|
};
|
|
11
|
+
export type ExtensionConfig<ExtType extends ExtensionType = ExtensionType> = BaseExtensionConfig<ExtType>;
|
|
12
|
+
export type ExtRecord<ExtType extends ExtensionType = ExtensionType> = AppiumExtRecord<ExtType>;
|
|
13
|
+
export type ExtMetadata<ExtType extends ExtensionType = ExtensionType> = AppiumExtMetadata<ExtType>;
|
|
14
|
+
export type ExtManifest<ExtType extends ExtensionType = ExtensionType> = AppiumExtManifest<ExtType>;
|
|
15
|
+
export type ExtPackageJson<ExtType extends ExtensionType = ExtensionType> = AppiumExtPackageJson<ExtType>;
|
|
16
|
+
export type ExtInstallReceipt<ExtType extends ExtensionType = ExtensionType> = AppiumExtInstallReceipt<ExtType>;
|
|
25
17
|
/**
|
|
26
18
|
* Extra stuff about extensions; used indirectly by {@linkcode ExtensionCliCommand.list}.
|
|
27
19
|
*/
|
|
28
20
|
export type ExtensionListMetadata = {
|
|
29
|
-
/**
|
|
30
|
-
* - If `true`, the extension is installed
|
|
31
|
-
*/
|
|
32
21
|
installed: boolean;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*/
|
|
40
|
-
updateVersion: string | null;
|
|
41
|
-
/**
|
|
42
|
-
* - Same as above, but a major version bump
|
|
43
|
-
*/
|
|
44
|
-
unsafeUpdateVersion: string | null;
|
|
45
|
-
/**
|
|
46
|
-
* - Update check error message (if present)
|
|
47
|
-
*/
|
|
48
|
-
updateError?: string | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* - If Appium is run from an extension's working copy
|
|
51
|
-
*/
|
|
52
|
-
devMode?: boolean | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* - Repository URL for the extension (if available)
|
|
55
|
-
*/
|
|
56
|
-
repositoryUrl?: string | undefined;
|
|
22
|
+
upToDate?: boolean;
|
|
23
|
+
updateVersion?: string | null;
|
|
24
|
+
unsafeUpdateVersion?: string | null;
|
|
25
|
+
updateError?: string;
|
|
26
|
+
devMode?: boolean;
|
|
27
|
+
repositoryUrl?: string;
|
|
57
28
|
};
|
|
58
|
-
export type ExtensionType = import("@appium/types").ExtensionType;
|
|
59
|
-
export type DriverType = import("@appium/types").DriverType;
|
|
60
|
-
export type PluginType = import("@appium/types").PluginType;
|
|
61
|
-
export type ExtRecord<ExtType extends ExtensionType> = import("appium/types").ExtRecord<ExtType>;
|
|
62
|
-
export type ExtensionConfig<ExtType extends ExtensionType> = import("../extension/extension-config").ExtensionConfig<ExtType>;
|
|
63
|
-
export type ExtMetadata<ExtType extends ExtensionType> = import("appium/types").ExtMetadata<ExtType>;
|
|
64
|
-
export type ExtManifest<ExtType extends ExtensionType> = import("appium/types").ExtManifest<ExtType>;
|
|
65
|
-
export type ExtPackageJson<ExtType extends ExtensionType> = import("appium/types").ExtPackageJson<ExtType>;
|
|
66
|
-
export type ExtInstallReceipt<ExtType extends ExtensionType> = import("appium/types").ExtInstallReceipt<ExtType>;
|
|
67
29
|
/**
|
|
68
30
|
* Possible return value for {@linkcode ExtensionCliCommand.list}
|
|
69
31
|
*/
|
|
70
|
-
export type ExtensionListData<ExtType extends ExtensionType> = Partial<ExtManifest<ExtType>> & Partial<ExtensionListMetadata>;
|
|
71
|
-
export type InstalledExtensionListData<ExtType extends ExtensionType> = ExtManifest<ExtType> & ExtensionListMetadata;
|
|
32
|
+
export type ExtensionListData<ExtType extends ExtensionType = ExtensionType> = Partial<ExtManifest<ExtType>> & Partial<ExtensionListMetadata>;
|
|
33
|
+
export type InstalledExtensionListData<ExtType extends ExtensionType = ExtensionType> = ExtManifest<ExtType> & ExtensionListMetadata;
|
|
72
34
|
/**
|
|
73
35
|
* Return value of {@linkcode ExtensionCliCommand.list}.
|
|
74
36
|
*/
|
|
75
|
-
export type ExtensionList<ExtType extends ExtensionType> = Record<string, ExtensionListData<ExtType>>;
|
|
76
|
-
/**
|
|
77
|
-
* Options for {@linkcode ExtensionCliCommand._run}.
|
|
78
|
-
*/
|
|
79
|
-
export type RunOptions = {
|
|
80
|
-
/**
|
|
81
|
-
* - name of the extension to run a script from
|
|
82
|
-
*/
|
|
83
|
-
installSpec: string;
|
|
84
|
-
/**
|
|
85
|
-
* - name of the script to run. If not provided
|
|
86
|
-
* then all available script names will be printed
|
|
87
|
-
*/
|
|
88
|
-
scriptName?: string | undefined;
|
|
89
|
-
/**
|
|
90
|
-
* - arguments to pass to the script
|
|
91
|
-
*/
|
|
92
|
-
extraArgs?: string[] | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* - if true, will buffer the output of the script and return it
|
|
95
|
-
*/
|
|
96
|
-
bufferOutput?: boolean | undefined;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Options for {@linkcode ExtensionCliCommand.doctor}.
|
|
100
|
-
*/
|
|
101
|
-
export type DoctorOptions = {
|
|
102
|
-
/**
|
|
103
|
-
* - name of the extension to run doctor checks for
|
|
104
|
-
*/
|
|
105
|
-
installSpec: string;
|
|
106
|
-
};
|
|
37
|
+
export type ExtensionList<ExtType extends ExtensionType = ExtensionType> = Record<string, ExtensionListData<ExtType>>;
|
|
107
38
|
/**
|
|
108
39
|
* Return value of {@linkcode ExtensionCliCommand._run}
|
|
109
40
|
*/
|
|
110
41
|
export type RunOutput = {
|
|
111
|
-
|
|
112
|
-
* - script output if `bufferOutput` was `true` in {@linkcode RunOptions}
|
|
113
|
-
*/
|
|
114
|
-
output?: string[] | undefined;
|
|
42
|
+
output?: string[];
|
|
115
43
|
};
|
|
116
44
|
/**
|
|
117
|
-
*
|
|
45
|
+
* Return type of {@linkcode ExtensionCliCommand.getPostInstallText}.
|
|
118
46
|
*/
|
|
119
|
-
export type
|
|
120
|
-
/**
|
|
121
|
-
* - the name of the extension to update
|
|
122
|
-
*/
|
|
123
|
-
installSpec: string;
|
|
124
|
-
/**
|
|
125
|
-
* - if true, will perform unsafe updates past major revision boundaries
|
|
126
|
-
*/
|
|
127
|
-
unsafe: boolean;
|
|
128
|
-
};
|
|
47
|
+
export type PostInstallText = string;
|
|
129
48
|
/**
|
|
130
49
|
* Return value of {@linkcode ExtensionCliCommand._update}.
|
|
131
50
|
*/
|
|
132
51
|
export type ExtensionUpdateResult = {
|
|
133
|
-
/**
|
|
134
|
-
* - map of ext names to error objects
|
|
135
|
-
*/
|
|
136
52
|
errors: Record<string, Error>;
|
|
137
|
-
/**
|
|
138
|
-
* - map of ext names to {@linkcode UpdateReport}s
|
|
139
|
-
*/
|
|
140
53
|
updates: Record<string, UpdateReport>;
|
|
141
54
|
};
|
|
142
55
|
/**
|
|
143
|
-
*
|
|
56
|
+
* Used by {@linkcode ExtensionCliCommand.getPostInstallText}
|
|
144
57
|
*/
|
|
145
|
-
export type
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
*/
|
|
149
|
-
from: string;
|
|
150
|
-
/**
|
|
151
|
-
* - version the extension was updated to
|
|
152
|
-
*/
|
|
153
|
-
to: string;
|
|
58
|
+
export type ExtensionArgs<ExtType extends ExtensionType = ExtensionType> = {
|
|
59
|
+
extName: string;
|
|
60
|
+
extData: ExtInstallReceipt<ExtType>;
|
|
154
61
|
};
|
|
155
62
|
/**
|
|
156
|
-
* Options for {@linkcode ExtensionCliCommand.
|
|
63
|
+
* Options for {@linkcode ExtensionCliCommand._run}.
|
|
157
64
|
*/
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* - the name or spec of an extension to uninstall
|
|
161
|
-
*/
|
|
65
|
+
type RunOptions = {
|
|
162
66
|
installSpec: string;
|
|
67
|
+
scriptName?: string;
|
|
68
|
+
extraArgs?: string[];
|
|
69
|
+
bufferOutput?: boolean;
|
|
163
70
|
};
|
|
164
71
|
/**
|
|
165
|
-
*
|
|
72
|
+
* Options for {@linkcode ExtensionCliCommand.doctor}.
|
|
166
73
|
*/
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
* - the name of an extension
|
|
170
|
-
*/
|
|
171
|
-
extName: string;
|
|
172
|
-
/**
|
|
173
|
-
* - the data for an installed extension
|
|
174
|
-
*/
|
|
175
|
-
extData: object;
|
|
74
|
+
type DoctorOptions = {
|
|
75
|
+
installSpec: string;
|
|
176
76
|
};
|
|
177
77
|
/**
|
|
178
|
-
* Options for {@linkcode ExtensionCliCommand.
|
|
78
|
+
* Options for {@linkcode ExtensionCliCommand._update}.
|
|
179
79
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
80
|
+
type ExtensionUpdateOpts = {
|
|
81
|
+
installSpec: string;
|
|
82
|
+
unsafe: boolean;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Part of result of {@linkcode ExtensionCliCommand._update}.
|
|
86
|
+
*/
|
|
87
|
+
type UpdateReport = {
|
|
88
|
+
from: string;
|
|
89
|
+
to: string | null;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Options for {@linkcode ExtensionCliCommand._uninstall}.
|
|
93
|
+
*/
|
|
94
|
+
type UninstallOpts = {
|
|
184
95
|
installSpec: string;
|
|
185
|
-
/**
|
|
186
|
-
* - the NPM package name of the extension
|
|
187
|
-
*/
|
|
188
|
-
pkgName: string;
|
|
189
|
-
/**
|
|
190
|
-
* - type of install
|
|
191
|
-
*/
|
|
192
|
-
installType: import("appium/types").InstallType;
|
|
193
|
-
/**
|
|
194
|
-
* - the specific version of the NPM package
|
|
195
|
-
*/
|
|
196
|
-
pkgVer?: string | undefined;
|
|
197
96
|
};
|
|
198
97
|
/**
|
|
199
98
|
* Object returned by {@linkcode ExtensionCliCommand.checkForExtensionUpdate}
|
|
200
99
|
*/
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* - current version
|
|
204
|
-
*/
|
|
100
|
+
type PossibleUpdates = {
|
|
205
101
|
current: string;
|
|
206
|
-
/**
|
|
207
|
-
* - version we can safely update to if it exists, or null
|
|
208
|
-
*/
|
|
209
102
|
safeUpdate: string | null;
|
|
210
|
-
/**
|
|
211
|
-
* - version we can unsafely update to if it exists, or null
|
|
212
|
-
*/
|
|
213
103
|
unsafeUpdate: string | null;
|
|
214
104
|
};
|
|
215
105
|
/**
|
|
216
106
|
* Options for {@linkcode ExtensionCliCommand._install}
|
|
217
107
|
*/
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* - the name or spec of an extension to install
|
|
221
|
-
*/
|
|
108
|
+
type InstallOpts = {
|
|
222
109
|
installSpec: string;
|
|
223
|
-
/**
|
|
224
|
-
* - how to install this extension. One of the INSTALL_TYPES
|
|
225
|
-
*/
|
|
226
110
|
installType: InstallType;
|
|
227
|
-
|
|
228
|
-
* - for git/github installs, the extension node package name
|
|
229
|
-
*/
|
|
230
|
-
packageName?: string | undefined;
|
|
111
|
+
packageName?: string;
|
|
231
112
|
};
|
|
232
|
-
|
|
233
|
-
export type ListOptions = {
|
|
234
|
-
/**
|
|
235
|
-
* - whether should show only installed extensions
|
|
236
|
-
*/
|
|
113
|
+
type ListOptions = {
|
|
237
114
|
showInstalled: boolean;
|
|
238
|
-
/**
|
|
239
|
-
* - whether should show available updates
|
|
240
|
-
*/
|
|
241
115
|
showUpdates: boolean;
|
|
242
|
-
|
|
243
|
-
* - whether to show additional data from the extension
|
|
244
|
-
*/
|
|
245
|
-
verbose?: boolean | undefined;
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* Opts for {@linkcode ExtensionCliCommand.getInstallationReceipt}
|
|
249
|
-
*/
|
|
250
|
-
export type GetInstallationReceiptOpts<ExtType extends ExtensionType> = {
|
|
251
|
-
installPath: string;
|
|
252
|
-
installSpec: string;
|
|
253
|
-
pkg: ExtPackageJson<ExtType>;
|
|
254
|
-
installType: InstallType;
|
|
116
|
+
verbose?: boolean;
|
|
255
117
|
};
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* @template {ExtensionType} ExtType
|
|
259
|
-
*/
|
|
260
|
-
declare class ExtensionCliCommand<ExtType extends ExtensionType> {
|
|
261
|
-
/**
|
|
262
|
-
* Build an ExtensionCommand
|
|
263
|
-
* @param {ExtensionCommandOptions<ExtType>} opts
|
|
264
|
-
*/
|
|
265
|
-
constructor({ config, json }: ExtensionCommandOptions<ExtType>);
|
|
118
|
+
declare abstract class ExtensionCliCommand<ExtType extends ExtensionType = ExtensionType> {
|
|
266
119
|
/**
|
|
267
120
|
* This is the `DriverConfig` or `PluginConfig`, depending on `ExtType`.
|
|
268
|
-
* @type {ExtensionConfig<ExtType>}
|
|
269
121
|
*/
|
|
270
|
-
config: ExtensionConfig<ExtType>;
|
|
122
|
+
protected readonly config: ExtensionConfig<ExtType>;
|
|
271
123
|
/**
|
|
272
124
|
* {@linkcode Record} of official plugins or drivers.
|
|
273
|
-
* @type {KnownExtensions<ExtType>}
|
|
274
125
|
*/
|
|
275
|
-
knownExtensions:
|
|
126
|
+
protected knownExtensions: Record<string, string>;
|
|
276
127
|
/**
|
|
277
128
|
* If `true`, command output has been requested as JSON.
|
|
278
|
-
* @type {boolean}
|
|
279
|
-
*/
|
|
280
|
-
isJsonOutput: boolean;
|
|
281
|
-
log: console.CliConsole;
|
|
282
|
-
/**
|
|
283
|
-
* `driver` or `plugin`, depending on the `ExtensionConfig`.
|
|
284
129
|
*/
|
|
285
|
-
|
|
130
|
+
protected readonly isJsonOutput: boolean;
|
|
131
|
+
protected readonly log: any;
|
|
286
132
|
/**
|
|
287
|
-
*
|
|
133
|
+
* Creates an extension command instance.
|
|
288
134
|
*
|
|
289
|
-
*
|
|
290
|
-
* in other words, _calling_ a function which is guaranteed to throw an exception is not enough--
|
|
291
|
-
* nor is something like `@returns {never}` which does not imply a thrown exception.
|
|
292
|
-
*
|
|
293
|
-
* @param {string} message
|
|
294
|
-
* @protected
|
|
295
|
-
* @throws {Error}
|
|
135
|
+
* @param opts - constructor options containing extension config and JSON mode
|
|
296
136
|
*/
|
|
297
|
-
|
|
137
|
+
constructor({ config, json }: ExtensionCommandOptions<ExtType>);
|
|
298
138
|
/**
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
* @param {object} args - a key/value object with CLI flags and values
|
|
302
|
-
* @return {Promise<object>} the result of the specific command which is executed
|
|
139
|
+
* `driver` or `plugin`, depending on the `ExtensionConfig`.
|
|
303
140
|
*/
|
|
304
|
-
|
|
141
|
+
get type(): ExtensionType;
|
|
305
142
|
/**
|
|
306
|
-
*
|
|
143
|
+
* Executes an extension subcommand from parsed CLI args.
|
|
307
144
|
*
|
|
308
|
-
* @
|
|
309
|
-
* @
|
|
310
|
-
* @return {Promise<ExtensionList<ExtType>>} map of extension names to extension data
|
|
145
|
+
* @param args - parsed CLI argument object
|
|
146
|
+
* @returns result of the executed extension subcommand
|
|
311
147
|
*/
|
|
312
|
-
|
|
148
|
+
execute(args: Record<string, any>): Promise<unknown>;
|
|
313
149
|
/**
|
|
314
|
-
*
|
|
150
|
+
* Lists available/installed extensions and optional update metadata.
|
|
315
151
|
*
|
|
316
|
-
* @
|
|
317
|
-
* @
|
|
318
|
-
* @returns {ExtensionList<ExtType>}
|
|
319
|
-
* @private
|
|
152
|
+
* @param opts - list command options
|
|
153
|
+
* @returns map of extension names to list data
|
|
320
154
|
*/
|
|
321
|
-
|
|
155
|
+
list({ showInstalled, showUpdates, verbose }: ListOptions): Promise<ExtensionList>;
|
|
322
156
|
/**
|
|
323
|
-
*
|
|
157
|
+
* Logs a message and returns an {@linkcode Error} to throw.
|
|
324
158
|
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
* @param {string} lsMsg
|
|
329
|
-
* @returns {Promise<void>}
|
|
330
|
-
* @private
|
|
331
|
-
*/
|
|
332
|
-
private _checkForUpdates;
|
|
333
|
-
/**
|
|
334
|
-
* Add repository URLs to list data for all extensions
|
|
159
|
+
* For TS to understand that a function throws an exception, it must actually throw an exception--
|
|
160
|
+
* in other words, _calling_ a function which is guaranteed to throw an exception is not enough--
|
|
161
|
+
* nor is something like a `never` return annotation, which does not imply a thrown exception.
|
|
335
162
|
*
|
|
336
|
-
* @
|
|
337
|
-
* @param {ExtensionList<ExtType>} listData
|
|
338
|
-
* @returns {Promise<void>}
|
|
339
|
-
* @private
|
|
163
|
+
* @throws {Error}
|
|
340
164
|
*/
|
|
341
|
-
|
|
165
|
+
protected _createFatalError(message: string): Error;
|
|
342
166
|
/**
|
|
343
|
-
*
|
|
167
|
+
* Build the initial list data structure from installed and known extensions
|
|
344
168
|
*
|
|
345
|
-
* @template {ExtensionType} ExtType
|
|
346
|
-
* @param {ExtensionList<ExtType>} listData
|
|
347
|
-
* @param {boolean} showUpdates
|
|
348
|
-
* @returns {Promise<ExtensionList<ExtType>>}
|
|
349
|
-
* @private
|
|
350
169
|
*/
|
|
351
|
-
|
|
170
|
+
protected _install({ installSpec, installType, packageName }: InstallOpts): Promise<Record<string, any>>;
|
|
352
171
|
/**
|
|
353
|
-
*
|
|
172
|
+
* Uninstall an extension.
|
|
354
173
|
*
|
|
355
|
-
*
|
|
356
|
-
* @param {string} name
|
|
357
|
-
* @param {ExtensionListData<ExtType>} data
|
|
358
|
-
* @param {boolean} showUpdates
|
|
359
|
-
* @returns {Promise<string>}
|
|
360
|
-
* @private
|
|
361
|
-
*/
|
|
362
|
-
private _formatExtensionLine;
|
|
363
|
-
/**
|
|
364
|
-
* Format installation status text
|
|
174
|
+
* First tries to do this via `npm uninstall`, but if that fails, just `rm -rf`'s the extension dir.
|
|
365
175
|
*
|
|
366
|
-
*
|
|
367
|
-
* @param {InstalledExtensionListData<ExtType>} data
|
|
368
|
-
* @returns {string}
|
|
369
|
-
* @private
|
|
370
|
-
*/
|
|
371
|
-
private _formatInstallText;
|
|
372
|
-
/**
|
|
373
|
-
* Format update information text
|
|
176
|
+
* Will only remove the extension from the manifest if it has been successfully removed.
|
|
374
177
|
*
|
|
375
|
-
* @
|
|
376
|
-
* @param {InstalledExtensionListData<ExtType>} data
|
|
377
|
-
* @returns {string}
|
|
378
|
-
* @private
|
|
178
|
+
* @return map of all installed extension names to extension data (without the extension just uninstalled)
|
|
379
179
|
*/
|
|
380
|
-
|
|
180
|
+
protected _uninstall({ installSpec }: UninstallOpts): Promise<Record<string, any>>;
|
|
381
181
|
/**
|
|
382
|
-
*
|
|
182
|
+
* Attempt to update one or more drivers using NPM
|
|
383
183
|
*
|
|
384
|
-
* @template {ExtensionType} ExtType
|
|
385
|
-
* @param {ExtensionListData<ExtType>} data
|
|
386
|
-
* @returns {Promise<string|null>}
|
|
387
|
-
* @private
|
|
388
184
|
*/
|
|
389
|
-
|
|
185
|
+
protected _update({ installSpec, unsafe }: ExtensionUpdateOpts): Promise<ExtensionUpdateResult>;
|
|
390
186
|
/**
|
|
391
|
-
*
|
|
187
|
+
* Given an extension name, figure out what its highest possible version upgrade is, and also the
|
|
188
|
+
* highest possible safe upgrade.
|
|
392
189
|
*
|
|
393
|
-
* @
|
|
394
|
-
* @param {InstalledExtensionListData<ExtType>} data
|
|
395
|
-
* @returns {Promise<string|null>}
|
|
396
|
-
* @private
|
|
190
|
+
* @param ext - name of extension
|
|
397
191
|
*/
|
|
398
|
-
|
|
192
|
+
protected checkForExtensionUpdate(ext: string): Promise<PossibleUpdates>;
|
|
399
193
|
/**
|
|
400
|
-
*
|
|
194
|
+
* Runs doctor checks for the given extension.
|
|
401
195
|
*
|
|
402
|
-
* @
|
|
403
|
-
*
|
|
404
|
-
* @
|
|
196
|
+
* @returns The amount of Doctor checks that were
|
|
197
|
+
* successfully loaded and executed for the given extension
|
|
198
|
+
* @throws {Error} If any of the mandatory Doctor checks fails.
|
|
405
199
|
*/
|
|
406
|
-
|
|
200
|
+
protected _doctor({ installSpec }: DoctorOptions): Promise<number>;
|
|
407
201
|
/**
|
|
408
|
-
*
|
|
202
|
+
* Runs a script cached inside the `scripts` field under `appium`
|
|
203
|
+
* inside of the extension's `package.json` file. Will throw
|
|
204
|
+
* an error if the driver/plugin does not contain a `scripts` field
|
|
205
|
+
* underneath the `appium` field in its `package.json`, if the
|
|
206
|
+
* `scripts` field is not a plain object, or if the `scriptName` is
|
|
207
|
+
* not found within `scripts` object.
|
|
409
208
|
*
|
|
410
|
-
* @param {InstallViaNpmArgs} installViaNpmOpts
|
|
411
|
-
* @returns {Promise<void>}
|
|
412
209
|
*/
|
|
413
|
-
|
|
210
|
+
protected _run({ installSpec, scriptName, extraArgs, bufferOutput, }: RunOptions): Promise<RunOutput>;
|
|
211
|
+
private _buildListData;
|
|
414
212
|
/**
|
|
415
|
-
* Install an extension
|
|
213
|
+
* Install an extension via NPM
|
|
416
214
|
*
|
|
417
|
-
* @param {InstallOpts} opts
|
|
418
|
-
* @return {Promise<ExtRecord<ExtType>>} map of all installed extension names to extension data
|
|
419
215
|
*/
|
|
420
|
-
|
|
216
|
+
private installViaNpm;
|
|
421
217
|
/**
|
|
422
|
-
*
|
|
218
|
+
* Actually update an extension installed by NPM, using the NPM cli. And update the installation
|
|
219
|
+
* manifest.
|
|
423
220
|
*
|
|
424
|
-
* @param
|
|
425
|
-
* @
|
|
221
|
+
* @param installSpec - name of extension to update
|
|
222
|
+
* @param version - version string identifier to update extension to
|
|
426
223
|
*/
|
|
427
|
-
|
|
224
|
+
private updateExtension;
|
|
428
225
|
/**
|
|
429
|
-
*
|
|
430
|
-
* is designed to be overridden by drivers/plugins with their own particular text.
|
|
226
|
+
* Just wraps {@linkcode child_process.spawn} with some default options
|
|
431
227
|
*
|
|
432
|
-
* @param
|
|
433
|
-
* @
|
|
228
|
+
* @param cwd - CWD
|
|
229
|
+
* @param script - Path to script
|
|
230
|
+
* @param args - Extra args for script
|
|
231
|
+
* @param opts - Options
|
|
434
232
|
*/
|
|
435
|
-
|
|
233
|
+
private _runUnbuffered;
|
|
436
234
|
/**
|
|
437
235
|
* Once a package is installed on-disk, this gathers some necessary metadata for validation.
|
|
438
236
|
*
|
|
439
|
-
* @param {GetInstallationReceiptOpts<ExtType>} opts
|
|
440
|
-
* @returns {ExtInstallReceipt<ExtType>}
|
|
441
237
|
*/
|
|
442
|
-
getInstallationReceipt
|
|
238
|
+
private getInstallationReceipt;
|
|
443
239
|
/**
|
|
444
240
|
* Validates the _required_ root fields of an extension's `package.json` file.
|
|
445
241
|
*
|
|
@@ -447,87 +243,87 @@ declare class ExtensionCliCommand<ExtType extends ExtensionType> {
|
|
|
447
243
|
* - `name`
|
|
448
244
|
* - `version`
|
|
449
245
|
* - `appium`
|
|
450
|
-
* @param
|
|
451
|
-
* @param
|
|
246
|
+
* @param pkg - `package.json` of extension
|
|
247
|
+
* @param installSpec - Extension name/spec
|
|
452
248
|
* @throws {ReferenceError} If `package.json` has a missing or invalid field
|
|
453
|
-
* @returns {pkg is ExtPackageJson<ExtType>}
|
|
454
249
|
*/
|
|
455
|
-
validatePackageJson
|
|
250
|
+
private validatePackageJson;
|
|
456
251
|
/**
|
|
457
|
-
*
|
|
458
|
-
* presence and form of those fields on the `package.json` data, throwing an error if anything is
|
|
459
|
-
* amiss.
|
|
252
|
+
* Check for available updates for installed extensions
|
|
460
253
|
*
|
|
461
|
-
* @param {ExtMetadata<ExtType>} extMetadata - the data in the "appium" field of `package.json` for an extension
|
|
462
|
-
* @param {string} installSpec - Extension name/spec
|
|
463
254
|
*/
|
|
464
|
-
|
|
255
|
+
private _checkForUpdates;
|
|
465
256
|
/**
|
|
466
|
-
*
|
|
257
|
+
* Add repository URLs to list data for all extensions
|
|
467
258
|
*
|
|
468
|
-
|
|
259
|
+
*/
|
|
260
|
+
private _addRepositoryUrlsToListData;
|
|
261
|
+
/**
|
|
262
|
+
* Display normal formatted output
|
|
469
263
|
*
|
|
470
|
-
|
|
264
|
+
*/
|
|
265
|
+
private _displayNormalListOutput;
|
|
266
|
+
/**
|
|
267
|
+
* Format a single extension line for display
|
|
471
268
|
*
|
|
472
|
-
* @param {UninstallOpts} opts
|
|
473
|
-
* @return {Promise<ExtRecord<ExtType>>} map of all installed extension names to extension data (without the extension just uninstalled)
|
|
474
269
|
*/
|
|
475
|
-
|
|
270
|
+
private _formatExtensionLine;
|
|
476
271
|
/**
|
|
477
|
-
*
|
|
272
|
+
* Format installation status text
|
|
478
273
|
*
|
|
479
|
-
* @param {ExtensionUpdateOpts} updateSpec
|
|
480
|
-
* @return {Promise<ExtensionUpdateResult>}
|
|
481
274
|
*/
|
|
482
|
-
|
|
275
|
+
private _formatInstallText;
|
|
483
276
|
/**
|
|
484
|
-
*
|
|
485
|
-
* highest possible safe upgrade.
|
|
277
|
+
* Format update information text
|
|
486
278
|
*
|
|
487
|
-
* @param {string} ext - name of extension
|
|
488
|
-
* @return {Promise<PossibleUpdates>}
|
|
489
279
|
*/
|
|
490
|
-
|
|
280
|
+
private _formatUpdateText;
|
|
491
281
|
/**
|
|
492
|
-
*
|
|
493
|
-
* manifest.
|
|
282
|
+
* Get repository URL from package data
|
|
494
283
|
*
|
|
495
|
-
* @param {string} installSpec - name of extension to update
|
|
496
|
-
* @param {string} version - version string identifier to update extension to
|
|
497
|
-
* @returns {Promise<void>}
|
|
498
284
|
*/
|
|
499
|
-
|
|
285
|
+
private _getRepositoryUrl;
|
|
500
286
|
/**
|
|
501
|
-
*
|
|
287
|
+
* Get repository URL from installed extension's package.json
|
|
502
288
|
*
|
|
503
|
-
* @param {string} cwd - CWD
|
|
504
|
-
* @param {string} script - Path to script
|
|
505
|
-
* @param {string[]} args - Extra args for script
|
|
506
|
-
* @param {import('child_process').SpawnOptions} opts - Options
|
|
507
|
-
* @returns {import('node:child_process').ChildProcess}
|
|
508
289
|
*/
|
|
509
|
-
|
|
290
|
+
private _getRepositoryUrlFromInstalled;
|
|
510
291
|
/**
|
|
511
|
-
*
|
|
292
|
+
* Get repository URL from npm for a package name
|
|
512
293
|
*
|
|
513
|
-
* @param {DoctorOptions} opts
|
|
514
|
-
* @returns {Promise<number>} The amount of Doctor checks that were
|
|
515
|
-
* successfully loaded and executed for the given extension
|
|
516
|
-
* @throws {Error} If any of the mandatory Doctor checks fails.
|
|
517
294
|
*/
|
|
518
|
-
|
|
295
|
+
private _getRepositoryUrlFromNpm;
|
|
519
296
|
/**
|
|
520
|
-
*
|
|
521
|
-
*
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
*
|
|
297
|
+
* Checks whether the given extension is compatible with the currently installed server
|
|
298
|
+
*
|
|
299
|
+
*/
|
|
300
|
+
private _checkInstallCompatibility;
|
|
301
|
+
/**
|
|
302
|
+
* For any `package.json` fields which a particular type of extension requires, validate the
|
|
303
|
+
* presence and form of those fields on the `package.json` data, throwing an error if anything is
|
|
304
|
+
* amiss.
|
|
305
|
+
*
|
|
306
|
+
* @param extMetadata - the data in the "appium" field of `package.json` for an extension
|
|
307
|
+
* @param installSpec - Extension name/spec
|
|
308
|
+
*/
|
|
309
|
+
protected abstract validateExtensionFields(extMetadata: ExtMetadata<ExtType>, installSpec: string): void;
|
|
310
|
+
/**
|
|
311
|
+
* Get the text which should be displayed to the user after an extension has been installed. This
|
|
312
|
+
* is designed to be overridden by drivers/plugins with their own particular text.
|
|
526
313
|
*
|
|
527
|
-
* @param {RunOptions} opts
|
|
528
|
-
* @return {Promise<RunOutput>}
|
|
529
314
|
*/
|
|
530
|
-
|
|
315
|
+
protected abstract getPostInstallText(args: ExtensionArgs<ExtType>): PostInstallText;
|
|
531
316
|
}
|
|
532
|
-
|
|
317
|
+
/**
|
|
318
|
+
* This is needed to ensure proper module resolution for installed extensions,
|
|
319
|
+
* especially ESM ones.
|
|
320
|
+
*
|
|
321
|
+
* @param driverConfig - active driver extension config
|
|
322
|
+
* @param pluginConfig - active plugin extension config
|
|
323
|
+
* @param logger - logger instance used for non-fatal symlink errors
|
|
324
|
+
* @returns resolves when symlink injection has completed for all extensions
|
|
325
|
+
*/
|
|
326
|
+
export declare function injectAppiumSymlinks(driverConfig: ExtensionConfig<any>, pluginConfig: ExtensionConfig<any>, logger: AppiumLogger): Promise<void>;
|
|
327
|
+
export default ExtensionCliCommand;
|
|
328
|
+
export { ExtensionCliCommand as ExtensionCommand };
|
|
533
329
|
//# sourceMappingURL=extension-command.d.ts.map
|