appium 2.0.0-beta.46 → 2.0.0-beta.48
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 +145 -44
- package/build/lib/appium.d.ts +3 -103
- package/build/lib/appium.d.ts.map +1 -1
- package/build/lib/appium.js +679 -549
- package/build/lib/appium.js.map +1 -1
- package/build/lib/cli/args.js +247 -127
- package/build/lib/cli/args.js.map +1 -1
- package/build/lib/cli/driver-command.d.ts +24 -5
- package/build/lib/cli/driver-command.d.ts.map +1 -1
- package/build/lib/cli/driver-command.js +78 -88
- package/build/lib/cli/driver-command.js.map +1 -1
- package/build/lib/cli/extension-command.d.ts +33 -24
- package/build/lib/cli/extension-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.js +729 -512
- package/build/lib/cli/extension-command.js.map +1 -1
- package/build/lib/cli/extension.d.ts +7 -6
- package/build/lib/cli/extension.d.ts.map +1 -1
- package/build/lib/cli/extension.js +68 -65
- package/build/lib/cli/extension.js.map +1 -1
- 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 +234 -192
- package/build/lib/cli/parser.js.map +1 -1
- package/build/lib/cli/plugin-command.js +58 -87
- package/build/lib/cli/plugin-command.js.map +1 -1
- package/build/lib/cli/utils.js +66 -69
- package/build/lib/cli/utils.js.map +1 -1
- package/build/lib/config-file.d.ts.map +1 -1
- package/build/lib/config-file.js +189 -120
- package/build/lib/config-file.js.map +1 -1
- package/build/lib/config.d.ts.map +1 -1
- package/build/lib/config.js +254 -213
- package/build/lib/config.js.map +1 -1
- package/build/lib/constants.d.ts +6 -5
- package/build/lib/constants.d.ts.map +1 -1
- package/build/lib/constants.js +65 -59
- package/build/lib/constants.js.map +1 -1
- package/build/lib/extension/driver-config.js +199 -164
- package/build/lib/extension/driver-config.js.map +1 -1
- package/build/lib/extension/extension-config.d.ts +33 -26
- package/build/lib/extension/extension-config.d.ts.map +1 -1
- package/build/lib/extension/extension-config.js +541 -396
- package/build/lib/extension/extension-config.js.map +1 -1
- package/build/lib/extension/index.js +98 -68
- package/build/lib/extension/index.js.map +1 -1
- package/build/lib/extension/manifest-migrations.d.ts +27 -0
- package/build/lib/extension/manifest-migrations.d.ts.map +1 -0
- package/build/lib/extension/manifest-migrations.js +118 -0
- package/build/lib/extension/manifest-migrations.js.map +1 -0
- package/build/lib/extension/manifest.d.ts +35 -63
- package/build/lib/extension/manifest.d.ts.map +1 -1
- package/build/lib/extension/manifest.js +500 -240
- package/build/lib/extension/manifest.js.map +1 -1
- package/build/lib/extension/package-changed.js +57 -61
- package/build/lib/extension/package-changed.js.map +1 -1
- package/build/lib/extension/plugin-config.d.ts +2 -3
- package/build/lib/extension/plugin-config.d.ts.map +1 -1
- package/build/lib/extension/plugin-config.js +94 -70
- package/build/lib/extension/plugin-config.js.map +1 -1
- package/build/lib/grid-register.js +119 -137
- package/build/lib/grid-register.js.map +1 -1
- package/build/lib/logger.d.ts +1 -1
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +5 -15
- package/build/lib/logger.js.map +1 -1
- package/build/lib/logsink.d.ts.map +1 -1
- package/build/lib/logsink.js +189 -183
- package/build/lib/logsink.js.map +1 -1
- package/build/lib/main.d.ts +19 -12
- package/build/lib/main.d.ts.map +1 -1
- package/build/lib/main.js +330 -304
- package/build/lib/main.js.map +1 -1
- package/build/lib/schema/arg-spec.js +153 -108
- package/build/lib/schema/arg-spec.js.map +1 -1
- package/build/lib/schema/cli-args.js +203 -164
- package/build/lib/schema/cli-args.js.map +1 -1
- package/build/lib/schema/cli-transformers.js +117 -72
- package/build/lib/schema/cli-transformers.js.map +1 -1
- package/build/lib/schema/index.js +17 -32
- package/build/lib/schema/index.js.map +1 -1
- package/build/lib/schema/keywords.js +125 -67
- package/build/lib/schema/keywords.js.map +1 -1
- package/build/lib/schema/schema.d.ts.map +1 -1
- package/build/lib/schema/schema.js +582 -417
- package/build/lib/schema/schema.js.map +1 -1
- package/build/lib/utils.d.ts +41 -255
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +342 -193
- package/build/lib/utils.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/cli.d.ts +45 -34
- package/build/types/cli.d.ts.map +1 -1
- package/build/types/cli.js +3 -0
- package/build/types/cli.js.map +1 -0
- package/build/types/index.d.ts +1 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/index.js +19 -0
- package/build/types/index.js.map +1 -0
- package/build/types/manifest/base.d.ts +135 -0
- package/build/types/manifest/base.d.ts.map +1 -0
- package/build/types/manifest/base.js +3 -0
- package/build/types/manifest/base.js.map +1 -0
- package/build/types/manifest/index.d.ts +19 -0
- package/build/types/manifest/index.d.ts.map +1 -0
- package/build/types/manifest/index.js +40 -0
- package/build/types/manifest/index.js.map +1 -0
- package/build/types/manifest/v3.d.ts +139 -0
- package/build/types/manifest/v3.d.ts.map +1 -0
- package/build/types/manifest/v3.js +3 -0
- package/build/types/manifest/v3.js.map +1 -0
- package/lib/appium.js +1 -1
- package/lib/cli/args.js +1 -1
- package/lib/cli/driver-command.js +17 -0
- package/lib/cli/extension-command.js +119 -65
- package/lib/cli/extension.js +9 -8
- package/lib/cli/parser.js +2 -2
- package/lib/config-file.js +2 -3
- package/lib/config.js +3 -2
- package/lib/constants.js +7 -5
- package/lib/extension/extension-config.js +52 -47
- package/lib/extension/manifest-migrations.js +120 -0
- package/lib/extension/manifest.js +184 -103
- package/lib/extension/plugin-config.js +1 -2
- package/lib/logsink.js +26 -5
- package/lib/main.js +58 -50
- package/lib/schema/schema.js +6 -1
- package/lib/utils.js +62 -0
- package/package.json +24 -25
- package/scripts/autoinstall-extensions.js +78 -26
- package/types/cli.ts +81 -42
- package/types/index.ts +1 -2
- package/types/manifest/README.md +30 -0
- package/types/manifest/base.ts +158 -0
- package/types/manifest/index.ts +27 -0
- package/types/manifest/v3.ts +161 -0
- package/build/types/appium-manifest.d.ts +0 -59
- package/build/types/appium-manifest.d.ts.map +0 -1
- package/build/types/extension-manifest.d.ts +0 -55
- package/build/types/extension-manifest.d.ts.map +0 -1
- package/types/appium-manifest.ts +0 -73
- package/types/extension-manifest.ts +0 -64
|
@@ -20,48 +20,6 @@ export class Manifest {
|
|
|
20
20
|
* @private
|
|
21
21
|
*/
|
|
22
22
|
private constructor();
|
|
23
|
-
/**
|
|
24
|
-
* The entire contents of a parsed YAML extension config file.
|
|
25
|
-
*
|
|
26
|
-
* Contains proxies for automatic persistence on disk
|
|
27
|
-
* @type {ManifestData}
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
private _data;
|
|
31
|
-
/**
|
|
32
|
-
* Path to `APPIUM_HOME`.
|
|
33
|
-
* @private
|
|
34
|
-
* @type {Readonly<string>}
|
|
35
|
-
*/
|
|
36
|
-
private _appiumHome;
|
|
37
|
-
/**
|
|
38
|
-
* Path to `extensions.yaml`
|
|
39
|
-
* @type {string}
|
|
40
|
-
* Not set until {@link Manifest.read} is called.
|
|
41
|
-
*/
|
|
42
|
-
_manifestPath: string;
|
|
43
|
-
/**
|
|
44
|
-
* Helps avoid writing multiple times.
|
|
45
|
-
*
|
|
46
|
-
* If this is `undefined`, calling {@link Manifest.write} will cause it to be
|
|
47
|
-
* set to a `Promise`. When the call to `write()` is complete, the `Promise`
|
|
48
|
-
* will resolve and then this value will be set to `undefined`. Concurrent calls
|
|
49
|
-
* made while this value is a `Promise` will return the `Promise` itself.
|
|
50
|
-
* @private
|
|
51
|
-
* @type {Promise<boolean>|undefined}
|
|
52
|
-
*/
|
|
53
|
-
private _writing;
|
|
54
|
-
/**
|
|
55
|
-
* Helps avoid reading multiple times.
|
|
56
|
-
*
|
|
57
|
-
* If this is `undefined`, calling {@link Manifest.read} will cause it to be
|
|
58
|
-
* set to a `Promise`. When the call to `read()` is complete, the `Promise`
|
|
59
|
-
* will resolve and then this value will be set to `undefined`. Concurrent calls
|
|
60
|
-
* made while this value is a `Promise` will return the `Promise` itself.
|
|
61
|
-
* @private
|
|
62
|
-
* @type {Promise<void>|undefined}
|
|
63
|
-
*/
|
|
64
|
-
private _reading;
|
|
65
23
|
/**
|
|
66
24
|
* Searches `APPIUM_HOME` for installed extensions and adds them to the manifest.
|
|
67
25
|
* @returns {Promise<boolean>} `true` if any extensions were added, `false` otherwise.
|
|
@@ -82,11 +40,10 @@ export class Manifest {
|
|
|
82
40
|
/**
|
|
83
41
|
* Given a path to a `package.json`, add it as either a driver or plugin to the manifest.
|
|
84
42
|
*
|
|
85
|
-
* Will _not_ overwrite existing entries.
|
|
86
43
|
* @template {ExtensionType} ExtType
|
|
87
44
|
* @param {ExtPackageJson<ExtType>} pkgJson
|
|
88
45
|
* @param {string} pkgPath
|
|
89
|
-
* @returns {boolean} - `true`
|
|
46
|
+
* @returns {boolean} - `true` if this method did anything.
|
|
90
47
|
*/
|
|
91
48
|
addExtensionFromPackage<ExtType extends import("@appium/types").ExtensionType>(pkgJson: ExtPackageJson<ExtType>, pkgPath: string): boolean;
|
|
92
49
|
/**
|
|
@@ -100,42 +57,56 @@ export class Manifest {
|
|
|
100
57
|
* @param {ExtManifest<ExtType>} extData - Extension metadata
|
|
101
58
|
* @returns {ExtManifest<ExtType>} A clone of `extData`, potentially with a mutated `appiumVersion` field
|
|
102
59
|
*/
|
|
103
|
-
|
|
60
|
+
setExtension<ExtType_1 extends import("@appium/types").ExtensionType>(extType: ExtType_1, extName: string, extData: ExtManifest<ExtType_1>): ExtManifest<ExtType_1>;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the schema revision
|
|
63
|
+
* @param {keyof import('./manifest-migrations').ManifestDataVersions} rev
|
|
64
|
+
*/
|
|
65
|
+
setSchemaRev(rev: keyof import('./manifest-migrations').ManifestDataVersions): void;
|
|
66
|
+
/**
|
|
67
|
+
* Remove an extension from the manifest.
|
|
68
|
+
* @param {ExtensionType} extType
|
|
69
|
+
* @param {string} extName
|
|
70
|
+
*/
|
|
71
|
+
deleteExtension(extType: ExtensionType, extName: string): void;
|
|
104
72
|
/**
|
|
105
|
-
* Returns the APPIUM_HOME path
|
|
73
|
+
* Returns the `APPIUM_HOME` path
|
|
106
74
|
*/
|
|
107
75
|
get appiumHome(): string;
|
|
108
76
|
/**
|
|
109
|
-
* Returns the path to the manifest file
|
|
77
|
+
* Returns the path to the manifest file (`extensions.yaml`)
|
|
110
78
|
*/
|
|
111
79
|
get manifestPath(): string;
|
|
80
|
+
/**
|
|
81
|
+
* Returns the schema rev of this manifest
|
|
82
|
+
*/
|
|
83
|
+
get schemaRev(): number;
|
|
112
84
|
/**
|
|
113
85
|
* Returns extension data for a particular type.
|
|
114
86
|
*
|
|
115
87
|
* @template {ExtensionType} ExtType
|
|
116
88
|
* @param {ExtType} extType
|
|
117
|
-
* @returns {ExtRecord<ExtType
|
|
89
|
+
* @returns {Readonly<ExtRecord<ExtType>>}
|
|
118
90
|
*/
|
|
119
|
-
getExtensionData<ExtType_2 extends import("@appium/types").ExtensionType>(extType: ExtType_2): ExtRecord<ExtType_2
|
|
91
|
+
getExtensionData<ExtType_2 extends import("@appium/types").ExtensionType>(extType: ExtType_2): Readonly<ExtRecord<ExtType_2>>;
|
|
120
92
|
/**
|
|
121
93
|
* Reads manifest from disk and _overwrites_ the internal data.
|
|
122
94
|
*
|
|
123
|
-
* If the manifest does not exist on disk, an
|
|
95
|
+
* If the manifest does not exist on disk, an
|
|
96
|
+
* {@link INITIAL_MANIFEST_DATA "empty"} manifest file will be created, as
|
|
97
|
+
* well as its directory if needed.
|
|
124
98
|
*
|
|
125
|
-
*
|
|
99
|
+
* This will also, if necessary:
|
|
100
|
+
* 1. perform a migration of the manifest data
|
|
101
|
+
* 2. sync the manifest with extensions on-disk (kind of like "auto
|
|
102
|
+
* discovery")
|
|
103
|
+
* 3. write the manifest to disk.
|
|
104
|
+
*
|
|
105
|
+
* Only one read operation can happen at a time.
|
|
126
106
|
*
|
|
127
|
-
* Only one read operation should happen at a time. This is controlled via the {@link Manifest._reading} property.
|
|
128
107
|
* @returns {Promise<ManifestData>} The data
|
|
129
108
|
*/
|
|
130
109
|
read(): Promise<ManifestData>;
|
|
131
|
-
/**
|
|
132
|
-
* Ensures {@link Manifest._manifestPath} is set.
|
|
133
|
-
*
|
|
134
|
-
* Creates the directory if necessary.
|
|
135
|
-
* @private
|
|
136
|
-
* @returns {Promise<string>}
|
|
137
|
-
*/
|
|
138
|
-
private _setManifestPath;
|
|
139
110
|
/**
|
|
140
111
|
* Writes the data if it need s writing.
|
|
141
112
|
*
|
|
@@ -145,6 +116,7 @@ export class Manifest {
|
|
|
145
116
|
* @returns {Promise<boolean>} Whether the data was written
|
|
146
117
|
*/
|
|
147
118
|
write(): Promise<boolean>;
|
|
119
|
+
#private;
|
|
148
120
|
}
|
|
149
121
|
/**
|
|
150
122
|
* Type of the string referring to a driver (typically as a key or type string)
|
|
@@ -162,9 +134,9 @@ export type SyncWithInstalledExtensionsOpts = {
|
|
|
162
134
|
};
|
|
163
135
|
export type ManifestData = import('appium/types').ManifestData;
|
|
164
136
|
export type InternalMetadata = import('appium/types').InternalMetadata;
|
|
165
|
-
export type ExtPackageJson<
|
|
166
|
-
export type ExtManifest<
|
|
167
|
-
export type ExtRecord<
|
|
137
|
+
export type ExtPackageJson<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtPackageJson<ExtType>;
|
|
138
|
+
export type ExtManifest<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtManifest<ExtType>;
|
|
139
|
+
export type ExtRecord<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtRecord<ExtType>;
|
|
168
140
|
/**
|
|
169
141
|
* Either `driver` or `plugin` rn
|
|
170
142
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../lib/extension/manifest.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../lib/extension/manifest.js"],"names":[],"mappings":"AAqFA;;;;GAIG;AACH;IAwDE;;;;;;OAMG;IACH,yEAEG;IArBH;;;;;;OAMG;IACH,sBAGC;IAaD;;;OAGG;IACH,+BAFa,QAAQ,OAAO,CAAC,CAqE5B;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;;OAOG;IACH,0HAHW,MAAM,GACJ,OAAO,CA0CnB;IAED;;;;;;;;;;OAUG;IACH,mGAJW,MAAM,2DAQhB;IAED;;;OAGG;IACH,kBAFW,MAAM,OAAO,uBAAuB,EAAE,oBAAoB,QAIpE;IAED;;;;OAIG;IACH,yBAHW,aAAa,WACb,MAAM,QAIhB;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH,wBAEC;IAED;;;;;;OAMG;IACH,8HAEC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,QAFa,QAAQ,YAAY,CAAC,CAwFjC;IAyBD;;;;;;;OAOG;IACH,SAFa,QAAQ,OAAO,CAAC,CAiC5B;;CACF;;;;yBAIY,OAAO,eAAe,EAAE,UAAU;;;;yBAKlC,OAAO,eAAe,EAAE,UAAU;;;;;;;2BASlC,OAAO,cAAc,EAAE,YAAY;+BACnC,OAAO,cAAc,EAAE,gBAAgB;oFAKvC,OAAO,cAAc,EAAE,cAAc,CAAC,OAAO,CAAC;iFAK9C,OAAO,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC;+EAK3C,OAAO,cAAc,EAAE,SAAS,CAAC,OAAO,CAAC;;;;4BAKzC,OAAO,eAAe,EAAE,aAAa"}
|