appium 2.0.0-beta.34 → 2.0.0-beta.38
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 +41 -52
- package/build/lib/appium.d.ts.map +1 -1
- package/build/lib/appium.js +32 -15
- package/build/lib/cli/args.d.ts +1 -1
- package/build/lib/cli/args.d.ts.map +1 -1
- package/build/lib/cli/args.js +1 -1
- package/build/lib/cli/driver-command.d.ts +5 -5
- package/build/lib/cli/driver-command.d.ts.map +1 -1
- package/build/lib/cli/driver-command.js +8 -8
- package/build/lib/cli/extension-command.d.ts +78 -51
- package/build/lib/cli/extension-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.js +135 -80
- package/build/lib/cli/extension.d.ts +9 -5
- package/build/lib/cli/extension.d.ts.map +1 -1
- package/build/lib/cli/extension.js +5 -7
- package/build/lib/cli/parser.d.ts +3 -3
- package/build/lib/cli/parser.d.ts.map +1 -1
- package/build/lib/cli/parser.js +1 -1
- package/build/lib/cli/plugin-command.d.ts +9 -15
- package/build/lib/cli/plugin-command.d.ts.map +1 -1
- package/build/lib/cli/plugin-command.js +8 -8
- package/build/lib/cli/utils.js +1 -1
- package/build/lib/config-file.d.ts.map +1 -1
- package/build/lib/config-file.js +1 -1
- package/build/lib/config.d.ts +4 -4
- package/build/lib/config.d.ts.map +1 -1
- package/build/lib/config.js +1 -1
- package/build/lib/constants.d.ts.map +1 -1
- package/build/lib/constants.js +1 -1
- package/build/lib/extension/driver-config.d.ts +29 -32
- package/build/lib/extension/driver-config.d.ts.map +1 -1
- package/build/lib/extension/driver-config.js +7 -20
- package/build/lib/extension/extension-config.d.ts +108 -36
- package/build/lib/extension/extension-config.d.ts.map +1 -1
- package/build/lib/extension/extension-config.js +199 -60
- package/build/lib/extension/index.d.ts +16 -7
- package/build/lib/extension/index.d.ts.map +1 -1
- package/build/lib/extension/index.js +15 -18
- package/build/lib/extension/manifest.d.ts +12 -12
- package/build/lib/extension/manifest.d.ts.map +1 -1
- package/build/lib/extension/manifest.js +13 -3
- package/build/lib/extension/package-changed.d.ts.map +1 -1
- package/build/lib/extension/package-changed.js +1 -1
- package/build/lib/extension/plugin-config.d.ts +19 -24
- package/build/lib/extension/plugin-config.d.ts.map +1 -1
- package/build/lib/extension/plugin-config.js +9 -18
- package/build/lib/grid-register.d.ts.map +1 -1
- package/build/lib/grid-register.js +1 -1
- package/build/lib/logger.d.ts +1 -1
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +1 -1
- package/build/lib/logsink.d.ts.map +1 -1
- package/build/lib/logsink.js +3 -2
- package/build/lib/main.d.ts +13 -12
- package/build/lib/main.d.ts.map +1 -1
- package/build/lib/main.js +4 -4
- package/build/lib/schema/arg-spec.d.ts +4 -4
- package/build/lib/schema/arg-spec.d.ts.map +1 -1
- package/build/lib/schema/arg-spec.js +1 -1
- package/build/lib/schema/cli-args.d.ts.map +1 -1
- package/build/lib/schema/cli-args.js +1 -1
- package/build/lib/schema/cli-transformers.d.ts.map +1 -1
- package/build/lib/schema/cli-transformers.js +1 -1
- package/build/lib/schema/keywords.d.ts.map +1 -1
- package/build/lib/schema/keywords.js +1 -1
- package/build/lib/schema/schema.d.ts +2 -2
- package/build/lib/schema/schema.d.ts.map +1 -1
- package/build/lib/schema/schema.js +1 -1
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/appium-manifest.d.ts +23 -4
- package/build/types/appium-manifest.d.ts.map +1 -1
- package/build/types/cli.d.ts.map +1 -1
- package/build/types/{external-manifest.d.ts → extension-manifest.d.ts} +15 -7
- package/build/types/extension-manifest.d.ts.map +1 -0
- package/build/types/index.d.ts +6 -5
- package/build/types/index.d.ts.map +1 -1
- package/driver.d.ts +1 -0
- package/driver.js +14 -0
- package/lib/appium.js +208 -124
- package/lib/cli/args.js +143 -93
- package/lib/cli/driver-command.js +46 -26
- package/lib/cli/extension-command.js +314 -157
- package/lib/cli/extension.js +15 -19
- package/lib/cli/parser.js +19 -31
- package/lib/cli/plugin-command.js +39 -24
- package/lib/cli/utils.js +8 -14
- package/lib/config-file.js +21 -25
- package/lib/config.js +82 -64
- package/lib/constants.js +4 -13
- package/lib/extension/driver-config.js +171 -171
- package/lib/extension/extension-config.js +347 -126
- package/lib/extension/index.js +72 -58
- package/lib/extension/manifest.js +48 -57
- package/lib/extension/package-changed.js +9 -8
- package/lib/extension/plugin-config.js +62 -62
- package/lib/grid-register.js +29 -18
- package/lib/logger.js +1 -2
- package/lib/logsink.js +29 -31
- package/lib/main.js +111 -73
- package/lib/schema/arg-spec.js +10 -13
- package/lib/schema/cli-args.js +14 -37
- package/lib/schema/cli-transformers.js +7 -14
- package/lib/schema/keywords.js +15 -13
- package/lib/schema/schema.js +58 -75
- package/lib/utils.js +50 -25
- package/package.json +25 -18
- 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 +27 -15
- package/types/cli.ts +2 -9
- package/types/{external-manifest.ts → extension-manifest.ts} +21 -15
- package/types/index.ts +12 -5
- package/build/types/extension.d.ts +0 -43
- package/build/types/extension.d.ts.map +0 -1
- package/build/types/external-manifest.d.ts.map +0 -1
- package/lib/appium-config.schema.json +0 -278
- package/scripts/postinstall.js +0 -71
- package/types/extension.ts +0 -56
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { SchemaObject } from 'ajv';
|
|
5
5
|
import type { PackageJson, SetRequired } from 'type-fest';
|
|
6
|
-
import { DriverType, ExtensionType, PluginType } from '
|
|
6
|
+
import { DriverType, ExtensionType, PluginType } from '@appium/types';
|
|
7
7
|
/**
|
|
8
8
|
* This is what is allowed in the `appium.schema` prop of an extension's `package.json`.
|
|
9
9
|
*/
|
|
10
|
-
export declare type
|
|
10
|
+
export declare type ExtSchemaMetadata = string | (SchemaObject & {
|
|
11
11
|
[key: number]: never;
|
|
12
12
|
});
|
|
13
13
|
/**
|
|
14
14
|
* Manifest data shared by all extensions, as contained in `package.json`
|
|
15
15
|
*/
|
|
16
|
-
export interface
|
|
16
|
+
export interface CommonExtMetadata {
|
|
17
17
|
mainClass: string;
|
|
18
18
|
scripts?: Record<string, string>;
|
|
19
|
-
schema?:
|
|
19
|
+
schema?: ExtSchemaMetadata;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Driver-specific manifest data as contained in `package.json`
|
|
@@ -36,12 +36,20 @@ export interface PluginMetadata {
|
|
|
36
36
|
* Generic type to refer to either {@linkcode DriverMetadata} or {@linkcode PluginMetadata}
|
|
37
37
|
* Corresponds to the `appium` prop in an extension's `package.json`.
|
|
38
38
|
*/
|
|
39
|
-
export declare type ExtMetadata<ExtType extends ExtensionType> = (ExtType extends DriverType ? DriverMetadata : ExtType extends PluginType ? PluginMetadata : never) &
|
|
39
|
+
export declare type ExtMetadata<ExtType extends ExtensionType> = (ExtType extends DriverType ? DriverMetadata : ExtType extends PluginType ? PluginMetadata : never) & CommonExtMetadata;
|
|
40
40
|
/**
|
|
41
41
|
* A `package.json` containing extension metadata.
|
|
42
|
-
*
|
|
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
|
|
43
47
|
*/
|
|
44
48
|
export declare type ExtPackageJson<ExtType extends ExtensionType> = SetRequired<PackageJson, 'name' | 'version'> & {
|
|
45
49
|
appium: ExtMetadata<ExtType>;
|
|
50
|
+
peerDependencies: {
|
|
51
|
+
appium: string;
|
|
52
|
+
[key: string]: string;
|
|
53
|
+
};
|
|
46
54
|
};
|
|
47
|
-
//# sourceMappingURL=
|
|
55
|
+
//# sourceMappingURL=extension-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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AG,MAAM,CAAA;KAAC,CAAC;CAC3D,CAAC"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import { ExtensionType, DriverType, DriverClass, PluginType, PluginClass } from '@appium/types';
|
|
2
3
|
export * from './appium-manifest';
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './extension';
|
|
4
|
+
export * from './extension-manifest';
|
|
5
5
|
export * from './cli';
|
|
6
|
-
export declare type DriverType = 'driver';
|
|
7
|
-
export declare type PluginType = 'plugin';
|
|
8
|
-
export declare type ExtensionType = DriverType | PluginType;
|
|
9
6
|
/**
|
|
10
7
|
* Known environment variables concerning Appium
|
|
11
8
|
*/
|
|
12
9
|
export interface AppiumEnv extends NodeJS.ProcessEnv {
|
|
13
10
|
APPIUM_HOME?: string;
|
|
14
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;
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";AAAA,
|
|
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');
|