appium 2.0.0-beta.47 → 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.
Files changed (32) hide show
  1. package/build/lib/cli/driver-command.d.ts +24 -5
  2. package/build/lib/cli/driver-command.d.ts.map +1 -1
  3. package/build/lib/cli/driver-command.js +15 -0
  4. package/build/lib/cli/driver-command.js.map +1 -1
  5. package/build/lib/cli/extension-command.d.ts +1 -1
  6. package/build/lib/cli/extension-command.d.ts.map +1 -1
  7. package/build/lib/cli/extension-command.js +3 -4
  8. package/build/lib/cli/extension-command.js.map +1 -1
  9. package/build/lib/constants.d.ts +1 -0
  10. package/build/lib/constants.d.ts.map +1 -1
  11. package/build/lib/constants.js +1 -0
  12. package/build/lib/constants.js.map +1 -1
  13. package/build/lib/extension/extension-config.d.ts +15 -10
  14. package/build/lib/extension/extension-config.d.ts.map +1 -1
  15. package/build/lib/extension/extension-config.js +32 -14
  16. package/build/lib/extension/extension-config.js.map +1 -1
  17. package/build/lib/extension/manifest-migrations.d.ts +8 -8
  18. package/build/lib/extension/manifest-migrations.d.ts.map +1 -1
  19. package/build/lib/extension/manifest-migrations.js +39 -20
  20. package/build/lib/extension/manifest-migrations.js.map +1 -1
  21. package/build/lib/extension/manifest.d.ts +29 -8
  22. package/build/lib/extension/manifest.d.ts.map +1 -1
  23. package/build/lib/extension/manifest.js +104 -36
  24. package/build/lib/extension/manifest.js.map +1 -1
  25. package/build/tsconfig.tsbuildinfo +1 -1
  26. package/lib/cli/driver-command.js +17 -0
  27. package/lib/cli/extension-command.js +3 -4
  28. package/lib/constants.js +1 -0
  29. package/lib/extension/extension-config.js +28 -22
  30. package/lib/extension/manifest-migrations.js +41 -20
  31. package/lib/extension/manifest.js +113 -39
  32. package/package.json +9 -9
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.migrate = void 0;
7
+ const constants_1 = require("../constants");
7
8
  const logger_1 = __importDefault(require("../logger"));
8
9
  /**
9
10
  * This contains logic to migrate old versions of `extensions.yaml` to new versions.
@@ -15,7 +16,13 @@ const logger_1 = __importDefault(require("../logger"));
15
16
  */
16
17
  const SCHEMA_REV_3 = 3;
17
18
  /**
18
- * Collection of functions to migrate from one version to another
19
+ * Collection of functions to migrate from one version to another.
20
+ *
21
+ * These functions _should not actually perform the migration_; rather, they
22
+ * should return `true` if the migration should be performed. The migration
23
+ * itself will happen within {@linkcode Manifest.syncWithInstalledExtensions}; the extensions
24
+ * will be checked and the manifest file updated per the state of the filesystem.
25
+ *
19
26
  * @type {{[P in keyof ManifestDataVersions]?: Migration}}
20
27
  */
21
28
  const Migrations = {
@@ -27,9 +34,13 @@ const Migrations = {
27
34
  *
28
35
  * @type {Migration}
29
36
  */
30
- [SCHEMA_REV_3]: (data) => {
37
+ [SCHEMA_REV_3]: (manifest) => {
31
38
  let shouldSync = false;
32
- const allExtData = [...Object.values(data.drivers), ...Object.values(data.plugins)];
39
+ /** @type {Array<ExtManifest<PluginType>|ExtManifest<DriverType>>} */
40
+ const allExtData = [
41
+ ...Object.values(manifest.getExtensionData(constants_1.DRIVER_TYPE)),
42
+ ...Object.values(manifest.getExtensionData(constants_1.PLUGIN_TYPE)),
43
+ ];
33
44
  for (const metadata of allExtData) {
34
45
  if (!('installPath' in metadata)) {
35
46
  shouldSync = true;
@@ -40,14 +51,20 @@ const Migrations = {
40
51
  },
41
52
  };
42
53
  /**
43
- * Set `schemaRev` to a specific version
44
- * @param {AnyManifestDataVersion} data
54
+ * Set `schemaRev` to a specific version.
55
+ *
56
+ * This _does_ mutate `data` in-place, unlike functions in
57
+ * {@linkcode Migrations}.
58
+ *
59
+ * Again, returning `true` means that the manifest should be--at
60
+ * minimum--persisted to disk, since we changed it.
61
+ * @param {Readonly<Manifest>} manifest
45
62
  * @param {keyof ManifestDataVersions} version
46
63
  * @returns {boolean} Whether the data was modified
47
64
  */
48
- function setSchemaRev(data, version) {
49
- if (data.schemaRev ?? 0 < version) {
50
- data.schemaRev = version;
65
+ function setSchemaRev(manifest, version) {
66
+ if (manifest.schemaRev ?? 0 < version) {
67
+ manifest.setSchemaRev(version);
51
68
  return true;
52
69
  }
53
70
  return false;
@@ -57,43 +74,45 @@ function setSchemaRev(data, version) {
57
74
  *
58
75
  * `data` is modified in-place.
59
76
  *
60
- * @param {Manifest} manifest
61
- * @param {AnyManifestDataVersion} data
77
+ * @param {Readonly<Manifest>} manifest
62
78
  * @returns {Promise<boolean>} If `true` existing packages should be synced from disk and the manifest should be persisted.
63
79
  */
64
- async function migrate(manifest, data) {
80
+ async function migrate(manifest) {
65
81
  let didChange = false;
66
82
  for await (const [v, migration] of Object.entries(Migrations)) {
67
83
  const version = /** @type {keyof ManifestDataVersions} */ (Number(v));
68
- didChange = (await migration(data, manifest)) || didChange;
69
- didChange = setSchemaRev(data, version) || didChange;
84
+ didChange = (await migration(manifest)) || didChange;
85
+ didChange = setSchemaRev(manifest, version) || didChange;
70
86
  }
71
87
  if (didChange) {
72
88
  // this is not _technically_ true, since we don't actually write the file here.
73
- logger_1.default.info(`Upgraded extension manifest to schema v${data.schemaRev}`);
89
+ logger_1.default.info(`Upgraded extension manifest to schema v${manifest.schemaRev}`);
74
90
  }
75
91
  return didChange;
76
92
  }
77
93
  exports.migrate = migrate;
78
94
  /**
79
- * Migration functions take a {@linkcode Manifest} and its data and **mutates `data` in-place**.
95
+ * A migration function. It will return `true` if a change _should be made_.
80
96
  *
81
97
  * A migration function should not modify `schemaRev`, as this is done automatically.
82
98
  *
83
- * A migration function can also call out to, say, {@linkcode Manifest.syncWithInstalledExtensions}, which
84
- * may apply the mutation itself.
85
- *
86
99
  * Note that at the time of writing, we're not able to determine the version of the _current_ manifest file if there is no `schemaRev` prop present (and we may not want to trust it anyway).
87
100
  * @callback Migration
88
- * @param {AnyManifestDataVersion} data - The raw data from `Manifest`
89
- * @param {Manifest} manifest - The `Manifest` instance
101
+ * @param {Readonly<Manifest>} manifest - The `Manifest` instance
90
102
  * @returns {boolean|Promise<boolean>} If `true`, then something changed
91
103
  */
92
104
  /**
93
105
  * @typedef {import('appium/types').ManifestData} ManifestData
106
+ * @typedef {import('@appium/types').DriverType} DriverType
107
+ * @typedef {import('@appium/types').PluginType} PluginType
94
108
  * @typedef {import('appium/types').AnyManifestDataVersion} AnyManifestDataVersion
95
109
  * @typedef {import('appium/types').ManifestDataVersions} ManifestDataVersions
110
+ * @typedef {import('@appium/types').ExtensionType} ExtensionType
96
111
  * @typedef {import('appium/types').ManifestV2.ManifestData} ManifestDataV2
97
112
  * @typedef {import('./manifest').Manifest} Manifest
98
113
  */
114
+ /**
115
+ * @template {ExtensionType} ExtType
116
+ * @typedef {import('appium/types').ExtManifest<ExtType>} ExtManifest
117
+ */
99
118
  //# sourceMappingURL=manifest-migrations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-migrations.js","sourceRoot":"","sources":["../../../lib/extension/manifest-migrations.js"],"names":[],"mappings":";;;;;;AAAA,uDAA4B;AAE5B;;;;GAIG;AAEH;;GAEG;AACH,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB;;;GAGG;AACH,MAAM,UAAU,GAAG;IACjB;;;;;;;OAOG;IACH,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE;QACvB,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,MAAM,UAAU,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACpF,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE;YACjC,IAAI,CAAC,CAAC,aAAa,IAAI,QAAQ,CAAC,EAAE;gBAChC,UAAU,GAAG,IAAI,CAAC;gBAClB,MAAM;aACP;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAC;AAEF;;;;;GAKG;AACH,SAAS,YAAY,CAAC,IAAI,EAAE,OAAO;IACjC,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,GAAG,OAAO,EAAE;QACjC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC;QACzB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,OAAO,CAAC,QAAQ,EAAE,IAAI;IAC1C,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,IAAI,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC7D,MAAM,OAAO,GAAG,yCAAyC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACtE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,IAAI,SAAS,CAAC;QAC3D,SAAS,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,SAAS,CAAC;KACtD;IAED,IAAI,SAAS,EAAE;QACb,+EAA+E;QAC/E,gBAAG,CAAC,IAAI,CAAC,0CAA0C,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;KACtE;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAbD,0BAaC;AAED;;;;;;;;;;;;;GAaG;AAEH;;;;;;GAMG"}
1
+ {"version":3,"file":"manifest-migrations.js","sourceRoot":"","sources":["../../../lib/extension/manifest-migrations.js"],"names":[],"mappings":";;;;;;AAAA,4CAAsD;AACtD,uDAA4B;AAE5B;;;;GAIG;AAEH;;GAEG;AACH,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB;;;;;;;;;GASG;AACH,MAAM,UAAU,GAAG;IACjB;;;;;;;OAOG;IACH,CAAC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE;QAC3B,IAAI,UAAU,GAAG,KAAK,CAAC;QAC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AAC;AACnB,CAAC;AAdD,0BAcC;AAED;;;;;;;;;GASG;AAEH;;;;;;;;;GASG;AAEH;;;GAGG"}
@@ -40,11 +40,10 @@ export class Manifest {
40
40
  /**
41
41
  * Given a path to a `package.json`, add it as either a driver or plugin to the manifest.
42
42
  *
43
- * Will _not_ overwrite existing entries.
44
43
  * @template {ExtensionType} ExtType
45
44
  * @param {ExtPackageJson<ExtType>} pkgJson
46
45
  * @param {string} pkgPath
47
- * @returns {boolean} - `true` upon success, `false` if the extension is already registered.
46
+ * @returns {boolean} - `true` if this method did anything.
48
47
  */
49
48
  addExtensionFromPackage<ExtType extends import("@appium/types").ExtensionType>(pkgJson: ExtPackageJson<ExtType>, pkgPath: string): boolean;
50
49
  /**
@@ -58,7 +57,18 @@ export class Manifest {
58
57
  * @param {ExtManifest<ExtType>} extData - Extension metadata
59
58
  * @returns {ExtManifest<ExtType>} A clone of `extData`, potentially with a mutated `appiumVersion` field
60
59
  */
61
- addExtension<ExtType_1 extends import("@appium/types").ExtensionType>(extType: ExtType_1, extName: string, extData: ExtManifest<ExtType_1>): ExtManifest<ExtType_1>;
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;
62
72
  /**
63
73
  * Returns the `APPIUM_HOME` path
64
74
  */
@@ -67,22 +77,33 @@ export class Manifest {
67
77
  * Returns the path to the manifest file (`extensions.yaml`)
68
78
  */
69
79
  get manifestPath(): string;
80
+ /**
81
+ * Returns the schema rev of this manifest
82
+ */
83
+ get schemaRev(): number;
70
84
  /**
71
85
  * Returns extension data for a particular type.
72
86
  *
73
87
  * @template {ExtensionType} ExtType
74
88
  * @param {ExtType} extType
75
- * @returns {ExtRecord<ExtType>}
89
+ * @returns {Readonly<ExtRecord<ExtType>>}
76
90
  */
77
- 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>>;
78
92
  /**
79
93
  * Reads manifest from disk and _overwrites_ the internal data.
80
94
  *
81
- * If the manifest does not exist on disk, an {@link INITIAL_MANIFEST_DATA "empty"} manifest file will be created.
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.
98
+ *
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.
82
104
  *
83
- * If `APPIUM_HOME` contains a `package.json` with an `appium` dependency, then a hash of the `package.json` will be taken. If this hash differs from the last hash, the contents of `APPIUM_HOME/node_modules` will be scanned for extensions that may have been installed outside of the `appium` CLI. Any found extensions will be added to the manifest file, and if so, the manifest file will be written to disk.
105
+ * Only one read operation can happen at a time.
84
106
  *
85
- * Only one read operation should happen at a time.
86
107
  * @returns {Promise<ManifestData>} The data
87
108
  */
88
109
  read(): Promise<ManifestData>;
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../lib/extension/manifest.js"],"names":[],"mappings":"AAgFA;;;;GAIG;AACH;IAwDE;;;;;;OAMG;IACH,yEAEG;IArBH;;;;;;OAMG;IACH,sBAGC;IAaD;;;OAGG;IACH,+BAFa,QAAQ,OAAO,CAAC,CAqD5B;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;;;OAQG;IACH,0HAHW,MAAM,GACJ,OAAO,CAwCnB;IAED;;;;;;;;;;OAUG;IACH,mGAJW,MAAM,2DAQhB;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,2BAEC;IAED;;;;;;OAMG;IACH,oHAEC;IAED;;;;;;;;;OASG;IACH,QAFa,QAAQ,YAAY,CAAC,CAmEjC;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"}
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"}
@@ -51,6 +51,8 @@ const INITIAL_MANIFEST_DATA = Object.freeze({
51
51
  /**
52
52
  * Given a `package.json` return `true` if it represents an Appium Extension (either a driver or plugin).
53
53
  *
54
+ * _This is a type guard; not a validator._
55
+ *
54
56
  * The `package.json` must have an `appium` property which is an object.
55
57
  * @param {any} value
56
58
  * @returns {value is ExtPackageJson<ExtensionType>}
@@ -64,26 +66,30 @@ function isExtension(value) {
64
66
  /**
65
67
  * Given a `package.json`, return `true` if it represents an Appium Driver.
66
68
  *
67
- * To be considered a driver, a `package.json` must have a fields
68
- * `appium.driverName`, `appium.automationName` and `appium.platformNames`.
69
+ * _This is a type guard; not a validator._
70
+ *
71
+ * To be considered a driver, a `package.json` must have an `appium.driverName` field.
72
+ *
73
+ * Further validation of the `appium` property happens elsewhere.
69
74
  * @param {any} value - Value to test
70
75
  * @returns {value is ExtPackageJson<DriverType>}
71
76
  */
72
77
  function isDriver(value) {
73
- return (isExtension(value) &&
74
- lodash_1.default.isString(lodash_1.default.get(value, 'appium.driverName')) &&
75
- lodash_1.default.isString(lodash_1.default.get(value, 'appium.automationName')) &&
76
- lodash_1.default.isArray(lodash_1.default.get(value, 'appium.platformNames')));
78
+ return isExtension(value) && 'driverName' in value.appium && lodash_1.default.isString(value.appium.driverName);
77
79
  }
78
80
  /**
79
81
  * Given a `package.json`, return `true` if it represents an Appium Plugin.
80
82
  *
83
+ * _This is a type guard; not a validator._
84
+ *
81
85
  * To be considered a plugin, a `package.json` must have an `appium.pluginName` field.
86
+ *
87
+ * Further validation of the `appium` property happens elsewhere.
82
88
  * @param {any} value - Value to test
83
89
  * @returns {value is ExtPackageJson<PluginType>}
84
90
  */
85
91
  function isPlugin(value) {
86
- return isExtension(value) && lodash_1.default.isString(lodash_1.default.get(value, 'appium.pluginName'));
92
+ return isExtension(value) && 'pluginName' in value.appium && lodash_1.default.isString(value.appium.pluginName);
87
93
  }
88
94
  /**
89
95
  * Handles reading & writing of extension config files.
@@ -156,7 +162,21 @@ class Manifest {
156
162
  const onMatch = async (filepath) => {
157
163
  try {
158
164
  const pkg = JSON.parse(await support_1.fs.readFile(filepath, 'utf8'));
159
- if (isDriver(pkg) || isPlugin(pkg)) {
165
+ if (isExtension(pkg)) {
166
+ const extType = isDriver(pkg) ? constants_1.DRIVER_TYPE : constants_1.PLUGIN_TYPE;
167
+ /**
168
+ * this should only be 'unknown' if the extension's `package.json` is invalid
169
+ * @type {string}
170
+ */
171
+ const name = isDriver(pkg)
172
+ ? pkg.appium.driverName
173
+ : isPlugin(pkg)
174
+ ? pkg.appium.pluginName
175
+ : '(unknown)';
176
+ if ((isDriver(pkg) && !this.hasDriver(name)) ||
177
+ (isPlugin(pkg) && !this.hasPlugin(name))) {
178
+ logger_1.default.info(`Discovered installed ${extType} "${name}"`);
179
+ }
160
180
  const changed = this.addExtensionFromPackage(pkg, filepath);
161
181
  didChange = didChange || changed;
162
182
  }
@@ -209,11 +229,10 @@ class Manifest {
209
229
  /**
210
230
  * Given a path to a `package.json`, add it as either a driver or plugin to the manifest.
211
231
  *
212
- * Will _not_ overwrite existing entries.
213
232
  * @template {ExtensionType} ExtType
214
233
  * @param {ExtPackageJson<ExtType>} pkgJson
215
234
  * @param {string} pkgPath
216
- * @returns {boolean} - `true` upon success, `false` if the extension is already registered.
235
+ * @returns {boolean} - `true` if this method did anything.
217
236
  */
218
237
  addExtensionFromPackage(pkgJson, pkgPath) {
219
238
  const extensionPath = path_1.default.dirname(pkgPath);
@@ -229,27 +248,29 @@ class Manifest {
229
248
  installPath: extensionPath,
230
249
  };
231
250
  if (isDriver(pkgJson)) {
232
- if (!this.hasDriver(pkgJson.appium.driverName)) {
233
- this.addExtension(constants_1.DRIVER_TYPE, pkgJson.appium.driverName, {
234
- ...lodash_1.default.omit(pkgJson.appium, 'driverName'),
235
- ...internal,
236
- });
251
+ const value = {
252
+ ...lodash_1.default.omit(pkgJson.appium, 'driverName'),
253
+ ...internal,
254
+ };
255
+ if (!lodash_1.default.isEqual(value, __classPrivateFieldGet(this, _Manifest_data, "f").drivers[pkgJson.appium.driverName])) {
256
+ this.setExtension(constants_1.DRIVER_TYPE, pkgJson.appium.driverName, value);
237
257
  return true;
238
258
  }
239
259
  return false;
240
260
  }
241
261
  else if (isPlugin(pkgJson)) {
242
- if (!this.hasPlugin(pkgJson.appium.pluginName)) {
243
- this.addExtension(constants_1.PLUGIN_TYPE, pkgJson.appium.pluginName, {
244
- ...lodash_1.default.omit(pkgJson.appium, 'pluginName'),
245
- ...internal,
246
- });
262
+ const value = {
263
+ ...lodash_1.default.omit(pkgJson.appium, 'pluginName'),
264
+ ...internal,
265
+ };
266
+ if (!lodash_1.default.isEqual(value, __classPrivateFieldGet(this, _Manifest_data, "f").plugins[pkgJson.appium.pluginName])) {
267
+ this.setExtension(constants_1.PLUGIN_TYPE, pkgJson.appium.pluginName, value);
247
268
  return true;
248
269
  }
249
270
  return false;
250
271
  }
251
272
  else {
252
- throw new TypeError(`The extension in ${extensionPath} is neither a valid driver nor a valid plugin.`);
273
+ throw new TypeError(`The extension in ${extensionPath} is neither a valid ${constants_1.DRIVER_TYPE} nor a valid ${constants_1.PLUGIN_TYPE}.`);
253
274
  }
254
275
  }
255
276
  /**
@@ -263,11 +284,26 @@ class Manifest {
263
284
  * @param {ExtManifest<ExtType>} extData - Extension metadata
264
285
  * @returns {ExtManifest<ExtType>} A clone of `extData`, potentially with a mutated `appiumVersion` field
265
286
  */
266
- addExtension(extType, extName, extData) {
267
- const data = lodash_1.default.clone(extData);
287
+ setExtension(extType, extName, extData) {
288
+ const data = lodash_1.default.cloneDeep(extData);
268
289
  __classPrivateFieldGet(this, _Manifest_data, "f")[`${extType}s`][extName] = data;
269
290
  return data;
270
291
  }
292
+ /**
293
+ * Sets the schema revision
294
+ * @param {keyof import('./manifest-migrations').ManifestDataVersions} rev
295
+ */
296
+ setSchemaRev(rev) {
297
+ __classPrivateFieldGet(this, _Manifest_data, "f").schemaRev = rev;
298
+ }
299
+ /**
300
+ * Remove an extension from the manifest.
301
+ * @param {ExtensionType} extType
302
+ * @param {string} extName
303
+ */
304
+ deleteExtension(extType, extName) {
305
+ delete __classPrivateFieldGet(this, _Manifest_data, "f")[`${extType}s`][extName];
306
+ }
271
307
  /**
272
308
  * Returns the `APPIUM_HOME` path
273
309
  */
@@ -280,12 +316,18 @@ class Manifest {
280
316
  get manifestPath() {
281
317
  return __classPrivateFieldGet(this, _Manifest_manifestPath, "f");
282
318
  }
319
+ /**
320
+ * Returns the schema rev of this manifest
321
+ */
322
+ get schemaRev() {
323
+ return __classPrivateFieldGet(this, _Manifest_data, "f").schemaRev;
324
+ }
283
325
  /**
284
326
  * Returns extension data for a particular type.
285
327
  *
286
328
  * @template {ExtensionType} ExtType
287
329
  * @param {ExtType} extType
288
- * @returns {ExtRecord<ExtType>}
330
+ * @returns {Readonly<ExtRecord<ExtType>>}
289
331
  */
290
332
  getExtensionData(extType) {
291
333
  return __classPrivateFieldGet(this, _Manifest_data, "f")[ /** @type {string} */(`${extType}s`)];
@@ -293,11 +335,18 @@ class Manifest {
293
335
  /**
294
336
  * Reads manifest from disk and _overwrites_ the internal data.
295
337
  *
296
- * If the manifest does not exist on disk, an {@link INITIAL_MANIFEST_DATA "empty"} manifest file will be created.
338
+ * If the manifest does not exist on disk, an
339
+ * {@link INITIAL_MANIFEST_DATA "empty"} manifest file will be created, as
340
+ * well as its directory if needed.
341
+ *
342
+ * This will also, if necessary:
343
+ * 1. perform a migration of the manifest data
344
+ * 2. sync the manifest with extensions on-disk (kind of like "auto
345
+ * discovery")
346
+ * 3. write the manifest to disk.
297
347
  *
298
- * If `APPIUM_HOME` contains a `package.json` with an `appium` dependency, then a hash of the `package.json` will be taken. If this hash differs from the last hash, the contents of `APPIUM_HOME/node_modules` will be scanned for extensions that may have been installed outside of the `appium` CLI. Any found extensions will be added to the manifest file, and if so, the manifest file will be written to disk.
348
+ * Only one read operation can happen at a time.
299
349
  *
300
- * Only one read operation should happen at a time.
301
350
  * @returns {Promise<ManifestData>} The data
302
351
  */
303
352
  async read() {
@@ -308,18 +357,22 @@ class Manifest {
308
357
  __classPrivateFieldSet(this, _Manifest_reading, (async () => {
309
358
  /** @type {ManifestData} */
310
359
  let data;
311
- let isNewFile = false;
360
+ /**
361
+ * This will be `true` if, after reading, we need to update the manifest data
362
+ * and write it again to disk.
363
+ */
364
+ let shouldWrite = false;
312
365
  await __classPrivateFieldGet(this, _Manifest_instances, "m", _Manifest_setManifestPath).call(this);
313
366
  try {
314
- logger_1.default.debug(`Reading ${__classPrivateFieldGet(this, _Manifest_manifestPath, "f")}...`);
315
367
  const yaml = await support_1.fs.readFile(__classPrivateFieldGet(this, _Manifest_manifestPath, "f"), 'utf8');
316
368
  data = yaml_1.default.parse(yaml);
317
- logger_1.default.debug(`Parsed manifest file: ${JSON.stringify(data, null, 2)}`);
369
+ logger_1.default.debug(`Parsed manifest file at ${__classPrivateFieldGet(this, _Manifest_manifestPath, "f")}: ${JSON.stringify(data, null, 2)}`);
318
370
  }
319
371
  catch (err) {
320
372
  if (err.code === 'ENOENT') {
373
+ logger_1.default.debug(`No manifest file found at ${__classPrivateFieldGet(this, _Manifest_manifestPath, "f")}; creating`);
321
374
  data = lodash_1.default.cloneDeep(INITIAL_MANIFEST_DATA);
322
- isNewFile = true;
375
+ shouldWrite = true;
323
376
  }
324
377
  else {
325
378
  if (__classPrivateFieldGet(this, _Manifest_manifestPath, "f")) {
@@ -332,17 +385,32 @@ class Manifest {
332
385
  }
333
386
  }
334
387
  __classPrivateFieldSet(this, _Manifest_data, data, "f");
335
- let shouldWrite = false;
336
- if ((data.schemaRev ?? 0) < constants_1.CURRENT_SCHEMA_REV) {
388
+ /**
389
+ * the only way `shouldWrite` is `true` is if we have a new file. a new
390
+ * file will get the latest schema revision, so we can skip the migration.
391
+ */
392
+ if (!shouldWrite && (data.schemaRev ?? 0) < constants_1.CURRENT_SCHEMA_REV) {
337
393
  logger_1.default.debug(`Updating manifest schema from rev ${data.schemaRev ?? '(none)'} to ${constants_1.CURRENT_SCHEMA_REV}`);
338
- shouldWrite = await (0, manifest_migrations_1.migrate)(this, __classPrivateFieldGet(this, _Manifest_data, "f"));
394
+ shouldWrite = await (0, manifest_migrations_1.migrate)(this);
339
395
  }
396
+ /**
397
+ * we still may want to sync with installed extensions even if we have a
398
+ * new file. right now this is limited to the following cases:
399
+ * 1. we have a brand new manifest file
400
+ * 2. we have performed a migration on a manifest file
401
+ * 3. `appium` is a dependency within `package.json`, and `package.json`
402
+ * has changed since last time we checked.
403
+ *
404
+ * It may also make sense to sync with the extensions in an arbitrary
405
+ * `APPIUM_HOME`, but we don't do that here.
406
+ */
340
407
  if (shouldWrite ||
341
408
  ((await support_1.env.hasAppiumDependency(this.appiumHome)) &&
342
409
  (await (0, package_changed_1.packageDidChange)(this.appiumHome)))) {
343
- shouldWrite = await this.syncWithInstalledExtensions();
410
+ logger_1.default.debug('Discovering newly installed extensions...');
411
+ shouldWrite = (await this.syncWithInstalledExtensions()) || shouldWrite;
344
412
  }
345
- if (isNewFile || shouldWrite) {
413
+ if (shouldWrite) {
346
414
  await this.write();
347
415
  }
348
416
  })(), "f");
@@ -1 +1 @@
1
- {"version":3,"file":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