appium 2.0.0-beta.3 → 2.0.0-beta.34
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/README.md +10 -11
- package/build/lib/appium.d.ts +215 -0
- package/build/lib/appium.d.ts.map +1 -0
- package/build/lib/appium.js +241 -132
- package/build/lib/cli/args.d.ts +20 -0
- package/build/lib/cli/args.d.ts.map +1 -0
- package/build/lib/cli/args.js +96 -282
- package/build/lib/cli/driver-command.d.ts +36 -0
- package/build/lib/cli/driver-command.d.ts.map +1 -0
- package/build/lib/cli/driver-command.js +19 -12
- package/build/lib/cli/extension-command.d.ts +345 -0
- package/build/lib/cli/extension-command.d.ts.map +1 -0
- package/build/lib/cli/extension-command.js +171 -96
- package/build/lib/cli/extension.d.ts +14 -0
- package/build/lib/cli/extension.d.ts.map +1 -0
- package/build/lib/cli/extension.js +31 -16
- package/build/lib/cli/parser.d.ts +80 -0
- package/build/lib/cli/parser.d.ts.map +1 -0
- package/build/lib/cli/parser.js +152 -95
- package/build/lib/cli/plugin-command.d.ts +39 -0
- package/build/lib/cli/plugin-command.d.ts.map +1 -0
- package/build/lib/cli/plugin-command.js +18 -13
- package/build/lib/cli/utils.d.ts +29 -0
- package/build/lib/cli/utils.d.ts.map +1 -0
- package/build/lib/cli/utils.js +27 -3
- package/build/lib/config-file.d.ts +100 -0
- package/build/lib/config-file.d.ts.map +1 -0
- package/build/lib/config-file.js +136 -0
- package/build/lib/config.d.ts +41 -0
- package/build/lib/config.d.ts.map +1 -0
- package/build/lib/config.js +92 -67
- package/build/lib/constants.d.ts +48 -0
- package/build/lib/constants.d.ts.map +1 -0
- package/build/lib/constants.js +60 -0
- package/build/lib/extension/driver-config.d.ts +84 -0
- package/build/lib/extension/driver-config.d.ts.map +1 -0
- package/build/lib/extension/driver-config.js +190 -0
- package/build/lib/extension/extension-config.d.ts +170 -0
- package/build/lib/extension/extension-config.d.ts.map +1 -0
- package/build/lib/extension/extension-config.js +297 -0
- package/build/lib/extension/index.d.ts +39 -0
- package/build/lib/extension/index.d.ts.map +1 -0
- package/build/lib/extension/index.js +77 -0
- package/build/lib/extension/manifest.d.ts +174 -0
- package/build/lib/extension/manifest.d.ts.map +1 -0
- package/build/lib/extension/manifest.js +246 -0
- package/build/lib/extension/package-changed.d.ts +11 -0
- package/build/lib/extension/package-changed.d.ts.map +1 -0
- package/build/lib/extension/package-changed.js +68 -0
- package/build/lib/extension/plugin-config.d.ts +62 -0
- package/build/lib/extension/plugin-config.d.ts.map +1 -0
- package/build/lib/extension/plugin-config.js +87 -0
- package/build/lib/grid-register.d.ts +10 -0
- package/build/lib/grid-register.d.ts.map +1 -0
- package/build/lib/grid-register.js +21 -25
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +4 -6
- package/build/lib/logsink.d.ts +4 -0
- package/build/lib/logsink.d.ts.map +1 -0
- package/build/lib/logsink.js +12 -16
- package/build/lib/main.d.ts +54 -0
- package/build/lib/main.d.ts.map +1 -0
- package/build/lib/main.js +189 -90
- package/build/lib/schema/arg-spec.d.ts +143 -0
- package/build/lib/schema/arg-spec.d.ts.map +1 -0
- package/build/lib/schema/arg-spec.js +119 -0
- package/build/lib/schema/cli-args.d.ts +19 -0
- package/build/lib/schema/cli-args.d.ts.map +1 -0
- package/build/lib/schema/cli-args.js +180 -0
- package/build/lib/schema/cli-transformers.d.ts +5 -0
- package/build/lib/schema/cli-transformers.d.ts.map +1 -0
- package/build/lib/schema/cli-transformers.js +74 -0
- package/build/lib/schema/index.d.ts +3 -0
- package/build/lib/schema/index.d.ts.map +1 -0
- package/build/lib/schema/index.js +34 -0
- package/build/lib/schema/keywords.d.ts +24 -0
- package/build/lib/schema/keywords.d.ts.map +1 -0
- package/build/lib/schema/keywords.js +70 -0
- package/build/lib/schema/schema.d.ts +259 -0
- package/build/lib/schema/schema.d.ts.map +1 -0
- package/build/lib/schema/schema.js +452 -0
- package/build/lib/utils.d.ts +66 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +35 -139
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/types/appium-manifest.d.ts +40 -0
- package/build/types/appium-manifest.d.ts.map +1 -0
- package/build/types/cli.d.ts +112 -0
- package/build/types/cli.d.ts.map +1 -0
- package/build/types/extension.d.ts +43 -0
- package/build/types/extension.d.ts.map +1 -0
- package/build/types/external-manifest.d.ts +47 -0
- package/build/types/external-manifest.d.ts.map +1 -0
- package/build/types/index.d.ts +15 -0
- package/build/types/index.d.ts.map +1 -0
- package/index.js +11 -0
- package/lib/appium-config.schema.json +278 -0
- package/lib/appium.js +402 -155
- package/lib/cli/args.js +174 -377
- package/lib/cli/driver-command.js +22 -7
- package/lib/cli/extension-command.js +372 -177
- package/lib/cli/extension.js +32 -10
- package/lib/cli/parser.js +253 -83
- package/lib/cli/plugin-command.js +19 -6
- package/lib/cli/utils.js +22 -2
- package/lib/config-file.js +223 -0
- package/lib/config.js +170 -69
- package/lib/constants.js +78 -0
- package/lib/extension/driver-config.js +249 -0
- package/lib/extension/extension-config.js +458 -0
- package/lib/extension/index.js +102 -0
- package/lib/extension/manifest.js +484 -0
- package/lib/extension/package-changed.js +63 -0
- package/lib/extension/plugin-config.js +113 -0
- package/lib/grid-register.js +25 -22
- package/lib/logger.js +1 -1
- package/lib/logsink.js +14 -7
- package/lib/main.js +255 -90
- package/lib/schema/arg-spec.js +232 -0
- package/lib/schema/cli-args.js +261 -0
- package/lib/schema/cli-transformers.js +122 -0
- package/lib/schema/index.js +2 -0
- package/lib/schema/keywords.js +134 -0
- package/lib/schema/schema.js +734 -0
- package/lib/utils.js +85 -129
- package/package.json +68 -85
- package/scripts/postinstall.js +71 -0
- package/types/appium-manifest.ts +61 -0
- package/types/cli.ts +153 -0
- package/types/extension.ts +56 -0
- package/types/external-manifest.ts +58 -0
- package/types/index.ts +14 -0
- package/CHANGELOG.md +0 -3515
- package/bin/ios-webkit-debug-proxy-launcher.js +0 -71
- package/build/lib/cli/npm.js +0 -206
- package/build/lib/cli/parser-helpers.js +0 -82
- package/build/lib/driver-config.js +0 -77
- package/build/lib/drivers.js +0 -96
- package/build/lib/extension-config.js +0 -251
- package/build/lib/plugin-config.js +0 -59
- package/build/lib/plugins.js +0 -14
- package/lib/cli/npm.js +0 -183
- package/lib/cli/parser-helpers.js +0 -79
- package/lib/driver-config.js +0 -46
- package/lib/drivers.js +0 -81
- package/lib/extension-config.js +0 -208
- package/lib/plugin-config.js +0 -34
- package/lib/plugins.js +0 -10
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ServerArgs } from '@appium/types';
|
|
2
|
+
import type { DRIVER_TYPE as DRIVER_SUBCOMMAND, EXT_SUBCOMMAND_INSTALL, EXT_SUBCOMMAND_LIST, EXT_SUBCOMMAND_RUN, EXT_SUBCOMMAND_UNINSTALL, EXT_SUBCOMMAND_UPDATE, PLUGIN_TYPE as PLUGIN_SUBCOMMAND, SERVER_SUBCOMMAND } from '../lib/constants';
|
|
3
|
+
export declare type ServerSubcommand = typeof SERVER_SUBCOMMAND;
|
|
4
|
+
export declare type DriverSubcommand = typeof DRIVER_SUBCOMMAND;
|
|
5
|
+
export declare type PluginSubcommand = typeof PLUGIN_SUBCOMMAND;
|
|
6
|
+
/**
|
|
7
|
+
* Possible subcommands for the `appium` CLI.
|
|
8
|
+
*/
|
|
9
|
+
export declare type CliSubcommand = ServerSubcommand | DriverSubcommand | PluginSubcommand;
|
|
10
|
+
/**
|
|
11
|
+
* Possible subcommands of {@linkcode DriverSubcommand} or
|
|
12
|
+
* {@linkcode PluginSubcommand}.
|
|
13
|
+
*/
|
|
14
|
+
export declare type CliExtensionSubcommand = typeof EXT_SUBCOMMAND_INSTALL | typeof EXT_SUBCOMMAND_LIST | typeof EXT_SUBCOMMAND_RUN | typeof EXT_SUBCOMMAND_UPDATE | typeof EXT_SUBCOMMAND_UNINSTALL;
|
|
15
|
+
/**
|
|
16
|
+
* Random stuff that may appear in the parsed args which has no equivalent in a
|
|
17
|
+
* config file.
|
|
18
|
+
*/
|
|
19
|
+
export interface MoreArgs {
|
|
20
|
+
/**
|
|
21
|
+
* Possible subcommands. If empty, defaults to {@linkcode ServerSubcommand}.
|
|
22
|
+
*/
|
|
23
|
+
subcommand?: CliSubcommand;
|
|
24
|
+
/**
|
|
25
|
+
* Path to config file, if any. Does not make sense for this to be allowed in a config file!
|
|
26
|
+
*/
|
|
27
|
+
configFile?: string;
|
|
28
|
+
/**
|
|
29
|
+
* If true, show the config and exit
|
|
30
|
+
*/
|
|
31
|
+
showConfig?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* If true, open a REPL
|
|
34
|
+
*/
|
|
35
|
+
shell?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* These arguments are _not_ supported by the CLI, but only via programmatic usage / tests.
|
|
39
|
+
*/
|
|
40
|
+
export interface ProgrammaticArgs {
|
|
41
|
+
/**
|
|
42
|
+
* If `true`, throw on error instead of exit.
|
|
43
|
+
*/
|
|
44
|
+
throwInsteadOfExit?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Seems to only be used in tests or standalone driver calls
|
|
47
|
+
*/
|
|
48
|
+
logHandler?: (...args: any[]) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Alternate way to set `APPIUM_HOME` for tests. Since we don't want to muck about
|
|
51
|
+
* with the environment, we just set it here.
|
|
52
|
+
*
|
|
53
|
+
* Setting this means that any discovery of the proper `APPIUM_HOME` path is bypassed
|
|
54
|
+
* and is equivalent to setting `APPIUM_HOME` in the environment.
|
|
55
|
+
*/
|
|
56
|
+
appiumHome?: string;
|
|
57
|
+
/**
|
|
58
|
+
* If true, show the {@link BuildInfo build info} and exit
|
|
59
|
+
*/
|
|
60
|
+
showBuildInfo?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* If true, show config and exit
|
|
63
|
+
*/
|
|
64
|
+
showConfig?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* These are args which the user will specify if using an extension command
|
|
68
|
+
*/
|
|
69
|
+
export interface ExtArgs extends WithExtSubcommand {
|
|
70
|
+
/**
|
|
71
|
+
* Subcommands of `driver` subcommand
|
|
72
|
+
*/
|
|
73
|
+
driverCommand?: CliExtensionSubcommand;
|
|
74
|
+
/**
|
|
75
|
+
* Subcommands of `plugin` subcommand
|
|
76
|
+
*/
|
|
77
|
+
pluginCommand?: CliExtensionSubcommand;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Args having the `server` subcommand
|
|
81
|
+
*/
|
|
82
|
+
export interface WithServerSubcommand {
|
|
83
|
+
subcommand?: ServerSubcommand;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Args having the `driver` or `plugin` subcommand
|
|
87
|
+
*/
|
|
88
|
+
export interface WithExtSubcommand {
|
|
89
|
+
subcommand: DriverSubcommand | PluginSubcommand;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Some generic bits of arguments; should not be used outside this declaration
|
|
93
|
+
*/
|
|
94
|
+
declare type CommonArgs<SArgs, T = WithServerSubcommand> = MoreArgs & ProgrammaticArgs & (T extends WithServerSubcommand ? SArgs : T extends WithExtSubcommand ? ExtArgs : never);
|
|
95
|
+
/**
|
|
96
|
+
* Fully-parsed arguments, containing defaults, computed args, and config file values.
|
|
97
|
+
*/
|
|
98
|
+
export declare type ParsedArgs<T = WithServerSubcommand> = CommonArgs<ServerArgs, T>;
|
|
99
|
+
/**
|
|
100
|
+
* Partial arguments, as supplied by a user. _May_ have defaults applied; _may_ contain config values; _may_ contain computed args.
|
|
101
|
+
*/
|
|
102
|
+
export declare type Args<T = WithServerSubcommand> = CommonArgs<Partial<ServerArgs>, T>;
|
|
103
|
+
/**
|
|
104
|
+
* Shown by `appium --build-info`
|
|
105
|
+
*/
|
|
106
|
+
export declare type BuildInfo = {
|
|
107
|
+
version: string;
|
|
108
|
+
'git-sha'?: string;
|
|
109
|
+
built?: string;
|
|
110
|
+
};
|
|
111
|
+
export {};
|
|
112
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../types/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EACV,WAAW,IAAI,iBAAiB,EAChC,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,WAAW,IAAI,iBAAiB,EAChC,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAE1B,oBAAY,gBAAgB,GAAG,OAAO,iBAAiB,CAAC;AACxD,oBAAY,gBAAgB,GAAG,OAAO,iBAAiB,CAAC;AACxD,oBAAY,gBAAgB,GAAG,OAAO,iBAAiB,CAAC;AAExD;;GAEG;AACH,oBAAY,aAAa,GACrB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,CAAC;AAErB;;;GAGG;AACH,oBAAY,sBAAsB,GAC9B,OAAO,sBAAsB,GAC7B,OAAO,mBAAmB,GAC1B,OAAO,kBAAkB,GACzB,OAAO,qBAAqB,GAC5B,OAAO,wBAAwB,CAAC;AAEpC;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAEtC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,OAAQ,SAAQ,iBAAiB;IAChD;;OAEG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;IAEvC;;OAEG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;CACjD;AAED;;GAEG;AACH,aAAK,UAAU,CAAC,KAAK,EAAE,CAAC,GAAG,oBAAoB,IAAI,QAAQ,GACzD,gBAAgB,GAChB,CAAC,CAAC,SAAS,oBAAoB,GAC3B,KAAK,GACL,CAAC,SAAS,iBAAiB,GAC3B,OAAO,GACP,KAAK,CAAC,CAAC;AAEb;;GAEG;AACH,oBAAY,UAAU,CAAC,CAAC,GAAG,oBAAoB,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAE7E;;GAEG;AACH,oBAAY,IAAI,CAAC,CAAC,GAAG,oBAAoB,IAAI,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;AAEhF;;GAEG;AACH,oBAAY,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BaseDriverBase } from '@appium/base-driver/lib/basedriver/driver';
|
|
2
|
+
import { Class, Driver, ExternalDriver } from '@appium/types';
|
|
3
|
+
import { DriverType, ExtensionType, PluginType } from '.';
|
|
4
|
+
export declare type DriverClass = BaseDriverBase<ExternalDriver, ExternalDriverStatic>;
|
|
5
|
+
/**
|
|
6
|
+
* Additional static props for external driver classes
|
|
7
|
+
*/
|
|
8
|
+
export interface ExternalDriverStatic {
|
|
9
|
+
driverName: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* TODO: This should be derived from the base plugin.
|
|
13
|
+
*/
|
|
14
|
+
export declare type PluginClass = Class<PluginProto, ExternalPluginStatic>;
|
|
15
|
+
/**
|
|
16
|
+
* Static props for plugin classes
|
|
17
|
+
*/
|
|
18
|
+
export interface ExternalPluginStatic {
|
|
19
|
+
pluginName: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A plugin must have this shape.
|
|
23
|
+
* @todo Use base plugin instead of this
|
|
24
|
+
*/
|
|
25
|
+
export interface PluginProto {
|
|
26
|
+
/**
|
|
27
|
+
* I'm not sure why `plugin.name` is required, but it is.
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Assigned by Appium; _not_ provided by implementor.
|
|
32
|
+
*/
|
|
33
|
+
cliArgs?: Record<string, any>;
|
|
34
|
+
/**
|
|
35
|
+
* Don't know what this is, but it's also required.
|
|
36
|
+
*/
|
|
37
|
+
onUnexpectedShutdown?: (driver: Driver, cause: Error | string) => Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Generic to get at the class of an extension.
|
|
41
|
+
*/
|
|
42
|
+
export declare type ExtClass<ExtType extends ExtensionType> = ExtType extends DriverType ? DriverClass : ExtType extends PluginType ? PluginClass : never;
|
|
43
|
+
//# sourceMappingURL=extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../types/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAE1D,oBAAY,WAAW,GAAG,cAAc,CAAC,cAAc,EACrD,oBAAoB,CAAC,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,WAAW,GAAG,KAAK,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B;;OAEG;IACH,oBAAoB,CAAC,EAAE,CACrB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,GAAG,MAAM,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,QAAQ,CAAC,OAAO,SAAS,aAAa,IAAI,OAAO,SAAS,UAAU,GAC5E,WAAW,GACX,OAAO,SAAS,UAAU,GAC1B,WAAW,GACX,KAAK,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These types describe information about external extensions and the contents of their `package.json` files
|
|
3
|
+
*/
|
|
4
|
+
import type { SchemaObject } from 'ajv';
|
|
5
|
+
import type { PackageJson, SetRequired } from 'type-fest';
|
|
6
|
+
import { DriverType, ExtensionType, PluginType } from './index';
|
|
7
|
+
/**
|
|
8
|
+
* This is what is allowed in the `appium.schema` prop of an extension's `package.json`.
|
|
9
|
+
*/
|
|
10
|
+
export declare type SchemaMetadata = string | (SchemaObject & {
|
|
11
|
+
[key: number]: never;
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Manifest data shared by all extensions, as contained in `package.json`
|
|
15
|
+
*/
|
|
16
|
+
export interface CommonMetadata {
|
|
17
|
+
mainClass: string;
|
|
18
|
+
scripts?: Record<string, string>;
|
|
19
|
+
schema?: SchemaMetadata;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Driver-specific manifest data as contained in `package.json`
|
|
23
|
+
*/
|
|
24
|
+
export interface DriverMetadata {
|
|
25
|
+
automationName: string;
|
|
26
|
+
platformNames: string[];
|
|
27
|
+
driverName: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Plugin-specific manifest data as stored in `package.json`
|
|
31
|
+
*/
|
|
32
|
+
export interface PluginMetadata {
|
|
33
|
+
pluginName: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Generic type to refer to either {@linkcode DriverMetadata} or {@linkcode PluginMetadata}
|
|
37
|
+
* Corresponds to the `appium` prop in an extension's `package.json`.
|
|
38
|
+
*/
|
|
39
|
+
export declare type ExtMetadata<ExtType extends ExtensionType> = (ExtType extends DriverType ? DriverMetadata : ExtType extends PluginType ? PluginMetadata : never) & CommonMetadata;
|
|
40
|
+
/**
|
|
41
|
+
* A `package.json` containing extension metadata.
|
|
42
|
+
* Required fields are `name`, `version`, and `appium`.
|
|
43
|
+
*/
|
|
44
|
+
export declare type ExtPackageJson<ExtType extends ExtensionType> = SetRequired<PackageJson, 'name' | 'version'> & {
|
|
45
|
+
appium: ExtMetadata<ExtType>;
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=external-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-manifest.d.ts","sourceRoot":"","sources":["../../types/external-manifest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEhE;;GAEG;AACH,oBAAY,cAAc,GAAG,MAAM,GAAG,CAAC,YAAY,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAA;CAAC,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,oBAAY,WAAW,CAAC,OAAO,SAAS,aAAa,IACnD,CAAC,OAAO,SAAS,UAAU,GACvB,cAAc,GACd,OAAO,SAAS,UAAU,GAC1B,cAAc,GACd,KAAK,CAAC,GACR,cAAc,CAAC;AAEnB;;;GAGG;AACH,oBAAY,cAAc,CAAC,OAAO,SAAS,aAAa,IAAI,WAAW,CACrE,WAAW,EACX,MAAM,GAAG,SAAS,CACnB,GAAG;IAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export * from './appium-manifest';
|
|
3
|
+
export * from './external-manifest';
|
|
4
|
+
export * from './extension';
|
|
5
|
+
export * from './cli';
|
|
6
|
+
export declare type DriverType = 'driver';
|
|
7
|
+
export declare type PluginType = 'plugin';
|
|
8
|
+
export declare type ExtensionType = DriverType | PluginType;
|
|
9
|
+
/**
|
|
10
|
+
* Known environment variables concerning Appium
|
|
11
|
+
*/
|
|
12
|
+
export interface AppiumEnv extends NodeJS.ProcessEnv {
|
|
13
|
+
APPIUM_HOME?: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,oBAAY,UAAU,GAAG,QAAQ,CAAC;AAClC,oBAAY,UAAU,GAAG,QAAQ,CAAC;AAClC,oBAAY,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,UAAU;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/index.js
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"description": "A schema for Appium configuration files",
|
|
5
|
+
"properties": {
|
|
6
|
+
"server": {
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"description": "Configuration when running Appium as a server",
|
|
9
|
+
"properties": {
|
|
10
|
+
"address": {
|
|
11
|
+
"$comment": "I think hostname covers both DNS and IPv4...could be wrong",
|
|
12
|
+
"appiumCliAliases": [
|
|
13
|
+
"a"
|
|
14
|
+
],
|
|
15
|
+
"default": "0.0.0.0",
|
|
16
|
+
"description": "IP address to listen on",
|
|
17
|
+
"format": "hostname",
|
|
18
|
+
"title": "address config",
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"allow-cors": {
|
|
22
|
+
"description": "Whether the Appium server should allow web browser connections from any host",
|
|
23
|
+
"title": "allow-cors config",
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"default": false
|
|
26
|
+
},
|
|
27
|
+
"allow-insecure": {
|
|
28
|
+
"appiumCliTransformer": "csv",
|
|
29
|
+
"default": [],
|
|
30
|
+
"description": "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.",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"title": "allow-insecure config",
|
|
35
|
+
"type": "array",
|
|
36
|
+
"uniqueItems": true
|
|
37
|
+
},
|
|
38
|
+
"base-path": {
|
|
39
|
+
"appiumCliAliases": [
|
|
40
|
+
"pa"
|
|
41
|
+
],
|
|
42
|
+
"default": "",
|
|
43
|
+
"description": "Base path to use as the prefix for all webdriver routes running on the server",
|
|
44
|
+
"title": "base-path config",
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"callback-address": {
|
|
48
|
+
"appiumCliAliases": [
|
|
49
|
+
"ca"
|
|
50
|
+
],
|
|
51
|
+
"description": "Callback IP address (default: same as \"address\")",
|
|
52
|
+
"title": "callback-address config",
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"callback-port": {
|
|
56
|
+
"appiumCliAliases": [
|
|
57
|
+
"cp"
|
|
58
|
+
],
|
|
59
|
+
"default": 4723,
|
|
60
|
+
"description": "Callback port (default: same as \"port\")",
|
|
61
|
+
"maximum": 65535,
|
|
62
|
+
"minimum": 1,
|
|
63
|
+
"title": "callback-port config",
|
|
64
|
+
"type": "integer"
|
|
65
|
+
},
|
|
66
|
+
"debug-log-spacing": {
|
|
67
|
+
"default": false,
|
|
68
|
+
"description": "Add exaggerated spacing in logs to help with visual inspection",
|
|
69
|
+
"title": "debug-log-spacing config",
|
|
70
|
+
"type": "boolean"
|
|
71
|
+
},
|
|
72
|
+
"default-capabilities": {
|
|
73
|
+
"$comment": "TODO",
|
|
74
|
+
"appiumCliAliases": [
|
|
75
|
+
"dc"
|
|
76
|
+
],
|
|
77
|
+
"description": "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.",
|
|
78
|
+
"title": "default-capabilities config",
|
|
79
|
+
"type": "object"
|
|
80
|
+
},
|
|
81
|
+
"deny-insecure": {
|
|
82
|
+
"$comment": "Allowed values are defined by drivers",
|
|
83
|
+
"appiumCliTransformer": "csv",
|
|
84
|
+
"default": [],
|
|
85
|
+
"description": "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.",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"title": "deny-insecure config",
|
|
90
|
+
"type": "array",
|
|
91
|
+
"uniqueItems": true
|
|
92
|
+
},
|
|
93
|
+
"driver": {
|
|
94
|
+
"description": "Driver-specific configuration. Keys should correspond to driver package names",
|
|
95
|
+
"properties": {},
|
|
96
|
+
"title": "driver config",
|
|
97
|
+
"type": "object"
|
|
98
|
+
},
|
|
99
|
+
"keep-alive-timeout": {
|
|
100
|
+
"appiumCliAliases": [
|
|
101
|
+
"ka"
|
|
102
|
+
],
|
|
103
|
+
"default": 600,
|
|
104
|
+
"description": "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.",
|
|
105
|
+
"minimum": 0,
|
|
106
|
+
"title": "keep-alive-timeout config",
|
|
107
|
+
"type": "integer"
|
|
108
|
+
},
|
|
109
|
+
"local-timezone": {
|
|
110
|
+
"default": false,
|
|
111
|
+
"description": "Use local timezone for timestamps",
|
|
112
|
+
"title": "local-timezone config",
|
|
113
|
+
"type": "boolean"
|
|
114
|
+
},
|
|
115
|
+
"log": {
|
|
116
|
+
"appiumCliAliases": [
|
|
117
|
+
"g"
|
|
118
|
+
],
|
|
119
|
+
"appiumCliDest": "logFile",
|
|
120
|
+
"description": "Also send log output to this file",
|
|
121
|
+
"title": "log config",
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
"log-filters": {
|
|
125
|
+
"$comment": "TODO",
|
|
126
|
+
"description": "One or more log filtering rules",
|
|
127
|
+
"items": {
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"title": "log-filters config",
|
|
131
|
+
"type": "array"
|
|
132
|
+
},
|
|
133
|
+
"log-level": {
|
|
134
|
+
"appiumCliDest": "loglevel",
|
|
135
|
+
"default": "debug",
|
|
136
|
+
"description": "Log level (console[:file])",
|
|
137
|
+
"enum": [
|
|
138
|
+
"info",
|
|
139
|
+
"info:debug",
|
|
140
|
+
"info:info",
|
|
141
|
+
"info:warn",
|
|
142
|
+
"info:error",
|
|
143
|
+
"warn",
|
|
144
|
+
"warn:debug",
|
|
145
|
+
"warn:info",
|
|
146
|
+
"warn:warn",
|
|
147
|
+
"warn:error",
|
|
148
|
+
"error",
|
|
149
|
+
"error:debug",
|
|
150
|
+
"error:info",
|
|
151
|
+
"error:warn",
|
|
152
|
+
"error:error",
|
|
153
|
+
"debug",
|
|
154
|
+
"debug:debug",
|
|
155
|
+
"debug:info",
|
|
156
|
+
"debug:warn",
|
|
157
|
+
"debug:error"
|
|
158
|
+
],
|
|
159
|
+
"title": "log-level config",
|
|
160
|
+
"type": "string"
|
|
161
|
+
},
|
|
162
|
+
"log-no-colors": {
|
|
163
|
+
"default": false,
|
|
164
|
+
"description": "Do not use color in console output",
|
|
165
|
+
"title": "log-no-colors config",
|
|
166
|
+
"type": "boolean"
|
|
167
|
+
},
|
|
168
|
+
"log-timestamp": {
|
|
169
|
+
"default": false,
|
|
170
|
+
"description": "Show timestamps in console output",
|
|
171
|
+
"title": "log-timestamp config",
|
|
172
|
+
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"long-stacktrace": {
|
|
175
|
+
"default": false,
|
|
176
|
+
"description": "Add long stack traces to log entries. Recommended for debugging only.",
|
|
177
|
+
"title": "long-stacktrace config",
|
|
178
|
+
"type": "boolean"
|
|
179
|
+
},
|
|
180
|
+
"no-perms-check": {
|
|
181
|
+
"default": false,
|
|
182
|
+
"description": "Do not check that needed files are readable and/or writable",
|
|
183
|
+
"title": "no-perms-check config",
|
|
184
|
+
"type": "boolean"
|
|
185
|
+
},
|
|
186
|
+
"nodeconfig": {
|
|
187
|
+
"$comment": "Selenium Grid 3 is unmaintained and Selenium Grid 4 no longer supports this file.",
|
|
188
|
+
"description": "Path to configuration JSON file to register Appium as a node with Selenium Grid 3; otherwise the configuration itself",
|
|
189
|
+
"title": "nodeconfig config",
|
|
190
|
+
"type": "object"
|
|
191
|
+
},
|
|
192
|
+
"plugin": {
|
|
193
|
+
"description": "Plugin-specific configuration. Keys should correspond to plugin package names",
|
|
194
|
+
"properties": {},
|
|
195
|
+
"title": "plugin config",
|
|
196
|
+
"type": "object"
|
|
197
|
+
},
|
|
198
|
+
"port": {
|
|
199
|
+
"appiumCliAliases": [
|
|
200
|
+
"p"
|
|
201
|
+
],
|
|
202
|
+
"default": 4723,
|
|
203
|
+
"description": "Port to listen on",
|
|
204
|
+
"maximum": 65535,
|
|
205
|
+
"minimum": 1,
|
|
206
|
+
"title": "port config",
|
|
207
|
+
"type": "integer"
|
|
208
|
+
},
|
|
209
|
+
"relaxed-security": {
|
|
210
|
+
"default": false,
|
|
211
|
+
"description": "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\"",
|
|
212
|
+
"title": "relaxed-security config",
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"appiumCliDest": "relaxedSecurityEnabled"
|
|
215
|
+
},
|
|
216
|
+
"session-override": {
|
|
217
|
+
"default": false,
|
|
218
|
+
"description": "Enables session override (clobbering)",
|
|
219
|
+
"title": "session-override config",
|
|
220
|
+
"type": "boolean"
|
|
221
|
+
},
|
|
222
|
+
"strict-caps": {
|
|
223
|
+
"default": false,
|
|
224
|
+
"description": "Cause sessions to fail if desired caps are sent in that Appium does not recognize as valid for the selected device",
|
|
225
|
+
"title": "strict-caps config",
|
|
226
|
+
"type": "boolean"
|
|
227
|
+
},
|
|
228
|
+
"tmp": {
|
|
229
|
+
"appiumCliDest": "tmpDir",
|
|
230
|
+
"description": "Absolute path to directory Appium can use to manage temp files. Defaults to C:\\Windows\\Temp on Windows and /tmp otherwise.",
|
|
231
|
+
"title": "tmp config",
|
|
232
|
+
"type": "string"
|
|
233
|
+
},
|
|
234
|
+
"trace-dir": {
|
|
235
|
+
"description": "Absolute path to directory Appium can use to save iOS instrument traces; defaults to <tmp>/appium-instruments",
|
|
236
|
+
"title": "trace-dir config",
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"use-drivers": {
|
|
240
|
+
"appiumCliDescription": "A list of drivers to activate. Can be a comma-delimited string or path to CSV file. By default, all installed drivers will be activated.",
|
|
241
|
+
"default": [],
|
|
242
|
+
"description": "A list of drivers to activate. By default, all installed drivers will be activated.",
|
|
243
|
+
"items": {
|
|
244
|
+
"type": "string"
|
|
245
|
+
},
|
|
246
|
+
"title": "use-drivers config",
|
|
247
|
+
"type": "array",
|
|
248
|
+
"uniqueItems": true
|
|
249
|
+
},
|
|
250
|
+
"use-plugins": {
|
|
251
|
+
"appiumCliDescription": "A list of plugins to activate. Can be a comma-delimited string, path to CSV file, or the string \"all\" to use all installed plugins.",
|
|
252
|
+
"default": [],
|
|
253
|
+
"description": "A list of plugins to activate. To activate all plugins, the value should be an array with a single item \"all\".",
|
|
254
|
+
"items": {
|
|
255
|
+
"type": "string"
|
|
256
|
+
},
|
|
257
|
+
"title": "use-plugins config",
|
|
258
|
+
"type": "array",
|
|
259
|
+
"uniqueItems": true
|
|
260
|
+
},
|
|
261
|
+
"webhook": {
|
|
262
|
+
"$comment": "This should probably use a uri-template format to restrict the protocol to http/https",
|
|
263
|
+
"appiumCliAliases": [
|
|
264
|
+
"G"
|
|
265
|
+
],
|
|
266
|
+
"description": "Also send log output to this http listener",
|
|
267
|
+
"format": "uri",
|
|
268
|
+
"title": "webhook config",
|
|
269
|
+
"type": "string"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"title": "server config",
|
|
273
|
+
"type": "object"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"title": "Appium Configuration",
|
|
277
|
+
"type": "object"
|
|
278
|
+
}
|