appium 2.0.0-beta.4 → 2.0.0-beta.40
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 +204 -0
- package/build/lib/appium.d.ts.map +1 -0
- package/build/lib/appium.js +257 -131
- 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 +25 -18
- package/build/lib/cli/extension-command.d.ts +372 -0
- package/build/lib/cli/extension-command.d.ts.map +1 -0
- package/build/lib/cli/extension-command.js +286 -156
- package/build/lib/cli/extension.d.ts +18 -0
- package/build/lib/cli/extension.d.ts.map +1 -0
- package/build/lib/cli/extension.js +30 -17
- 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 +33 -0
- package/build/lib/cli/plugin-command.d.ts.map +1 -0
- package/build/lib/cli/plugin-command.js +24 -19
- 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 +81 -0
- package/build/lib/extension/driver-config.d.ts.map +1 -0
- package/build/lib/extension/driver-config.js +177 -0
- package/build/lib/extension/extension-config.d.ts +242 -0
- package/build/lib/extension/extension-config.d.ts.map +1 -0
- package/build/lib/extension/extension-config.js +436 -0
- package/build/lib/extension/index.d.ts +48 -0
- package/build/lib/extension/index.d.ts.map +1 -0
- package/build/lib/extension/index.js +74 -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 +256 -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 +57 -0
- package/build/lib/extension/plugin-config.d.ts.map +1 -0
- package/build/lib/extension/plugin-config.js +78 -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 +14 -17
- package/build/lib/main.d.ts +55 -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 +59 -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-manifest.d.ts +55 -0
- package/build/types/extension-manifest.d.ts.map +1 -0
- package/build/types/index.d.ts +16 -0
- package/build/types/index.d.ts.map +1 -0
- package/driver.d.ts +1 -0
- package/driver.js +14 -0
- package/index.js +11 -0
- package/lib/appium.js +517 -186
- package/lib/cli/args.js +269 -422
- package/lib/cli/driver-command.js +58 -23
- package/lib/cli/extension-command.js +612 -260
- package/lib/cli/extension.js +34 -16
- package/lib/cli/parser.js +241 -83
- package/lib/cli/plugin-command.js +48 -20
- package/lib/cli/utils.js +24 -10
- package/lib/config-file.js +219 -0
- package/lib/config.js +210 -91
- package/lib/constants.js +69 -0
- package/lib/extension/driver-config.js +249 -0
- package/lib/extension/extension-config.js +679 -0
- package/lib/extension/index.js +116 -0
- package/lib/extension/manifest.js +475 -0
- package/lib/extension/package-changed.js +64 -0
- package/lib/extension/plugin-config.js +113 -0
- package/lib/grid-register.js +49 -35
- package/lib/logger.js +1 -2
- package/lib/logsink.js +38 -33
- package/lib/main.js +303 -100
- package/lib/schema/arg-spec.js +229 -0
- package/lib/schema/cli-args.js +238 -0
- package/lib/schema/cli-transformers.js +115 -0
- package/lib/schema/index.js +2 -0
- package/lib/schema/keywords.js +136 -0
- package/lib/schema/schema.js +717 -0
- package/lib/utils.js +121 -140
- package/package.json +75 -85
- package/plugin.d.ts +1 -0
- package/plugin.js +13 -0
- package/scripts/autoinstall-extensions.js +177 -0
- package/support.d.ts +1 -0
- package/support.js +13 -0
- package/types/appium-manifest.ts +73 -0
- package/types/cli.ts +146 -0
- package/types/extension-manifest.ts +64 -0
- package/types/index.ts +21 -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 -253
- 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 -209
- package/lib/plugin-config.js +0 -34
- package/lib/plugins.js +0 -10
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CommonExtMetadata, ExtMetadata, ExtSchemaMetadata } from './extension-manifest';
|
|
2
|
+
import { ExtensionType, DriverType, PluginType } from '@appium/types';
|
|
3
|
+
export declare type InstallType = 'npm' | 'git' | 'local' | 'github';
|
|
4
|
+
export interface InternalMetadata {
|
|
5
|
+
/**
|
|
6
|
+
* Package name of extension
|
|
7
|
+
*
|
|
8
|
+
* `name` from its `package.json`
|
|
9
|
+
*/
|
|
10
|
+
pkgName: string;
|
|
11
|
+
/**
|
|
12
|
+
* Version of extension
|
|
13
|
+
*
|
|
14
|
+
* `version` from its `package.json`
|
|
15
|
+
*/
|
|
16
|
+
version: string;
|
|
17
|
+
/**
|
|
18
|
+
* The method in which the user installed the extension (the `source` CLI arg)
|
|
19
|
+
*/
|
|
20
|
+
installType: InstallType;
|
|
21
|
+
/**
|
|
22
|
+
* Whatever the user typed as the extension to install. May be derived from `package.json`
|
|
23
|
+
*/
|
|
24
|
+
installSpec: string;
|
|
25
|
+
/**
|
|
26
|
+
* Maximum version of Appium that this extension is compatible with.
|
|
27
|
+
*
|
|
28
|
+
* If `undefined`, we'll try anyway.
|
|
29
|
+
*/
|
|
30
|
+
appiumVersion?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Combination of external + internal extension data with `driverName`/`pluginName` removed (it becomes a key in an {@linkcode ExtRecord} object).
|
|
34
|
+
* Part of `extensions.yaml`.
|
|
35
|
+
*/
|
|
36
|
+
export declare type ExtManifest<ExtType extends ExtensionType> = Omit<ExtMetadata<ExtType>, ExtType extends DriverType ? 'driverName' : ExtType extends PluginType ? 'pluginName' : never> & InternalMetadata & CommonExtMetadata;
|
|
37
|
+
export declare type WithSchemaManifest = {
|
|
38
|
+
schema: ExtSchemaMetadata;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* This is just a {@linkcode ExtManifest} except it _for sure_ has a `schema` prop.
|
|
42
|
+
*/
|
|
43
|
+
export declare type ExtManifestWithSchema<ExtType extends ExtensionType> = ExtManifest<ExtType> & WithSchemaManifest;
|
|
44
|
+
/**
|
|
45
|
+
* Generic type for an object keyed by extension name, with values of type {@linkcode ExtData}
|
|
46
|
+
*/
|
|
47
|
+
export declare type ExtRecord<ExtType extends ExtensionType> = Record<string, ExtManifest<ExtType>>;
|
|
48
|
+
export declare type DriverRecord = ExtRecord<DriverType>;
|
|
49
|
+
export declare type PluginRecord = ExtRecord<PluginType>;
|
|
50
|
+
export declare type ExtName<ExtType extends ExtensionType> = keyof ExtRecord<ExtType>;
|
|
51
|
+
/**
|
|
52
|
+
* Represents an entire YAML manifest (`extensions.yaml`)
|
|
53
|
+
*/
|
|
54
|
+
export interface ManifestData {
|
|
55
|
+
drivers: DriverRecord;
|
|
56
|
+
plugins: PluginRecord;
|
|
57
|
+
schemaRev?: number;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=appium-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appium-manifest.d.ts","sourceRoot":"","sources":["../../types/appium-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAC,aAAa,EAAE,UAAU,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAEpE,oBAAY,WAAW,GAAG,KAAK,GA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
|
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;AAE1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ChC,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,GAAG,KAAK,GAAG,CAAC,SAAS,iBAAiB,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC;AAE3F;;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,55 @@
|
|
|
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 '@appium/types';
|
|
7
|
+
/**
|
|
8
|
+
* This is what is allowed in the `appium.schema` prop of an extension's `package.json`.
|
|
9
|
+
*/
|
|
10
|
+
export declare type ExtSchemaMetadata = string | (SchemaObject & {
|
|
11
|
+
[key: number]: never;
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Manifest data shared by all extensions, as contained in `package.json`
|
|
15
|
+
*/
|
|
16
|
+
export interface CommonExtMetadata {
|
|
17
|
+
mainClass: string;
|
|
18
|
+
scripts?: Record<string, string>;
|
|
19
|
+
schema?: ExtSchemaMetadata;
|
|
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) & CommonExtMetadata;
|
|
40
|
+
/**
|
|
41
|
+
* A `package.json` containing extension metadata.
|
|
42
|
+
* Must have the following properties:
|
|
43
|
+
* - `name`: the name of the extension
|
|
44
|
+
* - `version`: the version of the extension
|
|
45
|
+
* - `appium`: the metadata for the extension
|
|
46
|
+
* - `peerDependencies.appium`: the maximum compatible version of Appium
|
|
47
|
+
*/
|
|
48
|
+
export declare type ExtPackageJson<ExtType extends ExtensionType> = SetRequired<PackageJson, 'name' | 'version'> & {
|
|
49
|
+
appium: ExtMetadata<ExtType>;
|
|
50
|
+
peerDependencies: {
|
|
51
|
+
appium: string;
|
|
52
|
+
[key: string]: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=extension-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-manifest.d.ts","sourceRoot":"","sources":["../../types/extension-manifest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,WAAW,CAAC;AACxD,OAAO,EAAC,UAAU,EAAE,aAAa,EAAE,UAAU,EAAC,MAAM,eAAe,CAAC;AAEpE;;GAEG;AACH,oBAAY,iBAAiB,GAAG,MAAM,GAAG,CAAC,YAAY,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAA;CAAC,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;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,IAAI,CAAC,OAAO,SAAS,UAAU,GAChF,cAAc,GACd,OAAO,SAAS,UAAU,GAC1B,cAAc,GACd,KAAK,CAAC,GACR,iBAAiB,CAAC;AAEpB;;;;;;;GAOG;AACH,oBAAY,cAAc,CAAC,OAAO,SAAS,aAAa,IAAI,WAAW,CACrE,WAAW,EACX,MAAM,GAAG,SAAS,CACnB,GAAG;IACF,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,gBAAgB,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC;CAC3D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ExtensionType, DriverType, DriverClass, PluginType, PluginClass } from '@appium/types';
|
|
3
|
+
export * from './appium-manifest';
|
|
4
|
+
export * from './extension-manifest';
|
|
5
|
+
export * from './cli';
|
|
6
|
+
/**
|
|
7
|
+
* Known environment variables concerning Appium
|
|
8
|
+
*/
|
|
9
|
+
export interface AppiumEnv extends NodeJS.ProcessEnv {
|
|
10
|
+
APPIUM_HOME?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Generic to get at the class of an extension.
|
|
14
|
+
*/
|
|
15
|
+
export declare type ExtClass<ExtType extends ExtensionType> = ExtType extends DriverType ? DriverClass : ExtType extends PluginType ? PluginClass : never;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAE9F,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,OAAO,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,UAAU;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,oBAAY,QAAQ,CAAC,OAAO,SAAS,aAAa,IAAI,OAAO,SAAS,UAAU,GAC5E,WAAW,GACX,OAAO,SAAS,UAAU,GAC1B,WAAW,GACX,KAAK,CAAC"}
|
package/driver.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@appium/base-driver';
|
package/driver.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// @ts-check
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This module is here to re-export `@appium/base-driver` for Appium extensions.
|
|
7
|
+
*
|
|
8
|
+
* @see https://npm.im/@appium/base-driver
|
|
9
|
+
* @example
|
|
10
|
+
* const { BaseDriver, errors } = require('appium/driver');
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/** @type {import('@appium/base-driver')} */
|
|
14
|
+
module.exports = require('@appium/base-driver');
|