appium 2.13.0 → 2.14.0
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 +4 -64
- package/build/lib/appium.d.ts.map +1 -1
- package/build/lib/appium.js +46 -316
- package/build/lib/appium.js.map +1 -1
- package/build/lib/bidi.d.ts +32 -0
- package/build/lib/bidi.d.ts.map +1 -0
- package/build/lib/bidi.js +348 -0
- package/build/lib/bidi.js.map +1 -0
- package/build/lib/cli/args.d.ts.map +1 -1
- package/build/lib/cli/args.js +21 -31
- package/build/lib/cli/args.js.map +1 -1
- package/build/lib/cli/extension-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.js +38 -5
- package/build/lib/cli/extension-command.js.map +1 -1
- package/build/lib/cli/parser.d.ts.map +1 -1
- package/build/lib/cli/parser.js +26 -15
- package/build/lib/cli/parser.js.map +1 -1
- package/build/lib/cli/utils.d.ts.map +1 -1
- package/build/lib/cli/utils.js +3 -1
- package/build/lib/cli/utils.js.map +1 -1
- package/build/lib/config.js +42 -9
- package/build/lib/config.js.map +1 -1
- package/build/lib/extension/extension-config.d.ts +7 -0
- package/build/lib/extension/extension-config.d.ts.map +1 -1
- package/build/lib/extension/extension-config.js +42 -11
- package/build/lib/extension/extension-config.js.map +1 -1
- package/build/lib/extension/manifest.js +2 -2
- package/build/lib/extension/manifest.js.map +1 -1
- package/build/lib/schema/schema.js +3 -3
- package/build/lib/schema/schema.js.map +1 -1
- package/build/lib/utils.js +1 -2
- package/build/lib/utils.js.map +1 -1
- package/lib/appium.js +16 -377
- package/lib/bidi.ts +436 -0
- package/lib/cli/args.js +22 -32
- package/lib/cli/extension-command.js +4 -4
- package/lib/cli/parser.js +33 -17
- package/lib/cli/utils.js +3 -1
- package/lib/config.js +7 -7
- package/lib/extension/extension-config.js +49 -11
- package/lib/extension/manifest.js +2 -2
- package/lib/schema/schema.js +2 -2
- package/lib/utils.js +2 -2
- package/package.json +13 -13
- package/scripts/autoinstall-extensions.js +5 -5
- package/LICENSE +0 -201
package/lib/cli/parser.js
CHANGED
|
@@ -18,9 +18,11 @@ import {finalizeSchema, getArgSpec, hasArgSpec} from '../schema';
|
|
|
18
18
|
import {rootDir} from '../config';
|
|
19
19
|
import {getExtensionArgs, getServerArgs} from './args';
|
|
20
20
|
import {
|
|
21
|
+
DEFAULT_PLUGINS,
|
|
21
22
|
SUBCOMMAND_MOBILE,
|
|
22
23
|
SUBCOMMAND_DESKTOP,
|
|
23
24
|
SUBCOMMAND_BROWSER,
|
|
25
|
+
SUBCOMMAND_RESET,
|
|
24
26
|
getPresetDrivers,
|
|
25
27
|
determinePlatformName
|
|
26
28
|
} from './setup-command';
|
|
@@ -53,7 +55,8 @@ class ArgParser {
|
|
|
53
55
|
const parser = new ArgumentParser({
|
|
54
56
|
add_help: true,
|
|
55
57
|
description:
|
|
56
|
-
'A webdriver-compatible server that facilitates automation of web, mobile, and other
|
|
58
|
+
'A webdriver-compatible server that facilitates automation of web, mobile, and other ' +
|
|
59
|
+
'types of apps across various platforms.',
|
|
57
60
|
prog,
|
|
58
61
|
});
|
|
59
62
|
|
|
@@ -84,9 +87,6 @@ class ArgParser {
|
|
|
84
87
|
|
|
85
88
|
const subParsers = parser.add_subparsers({dest: 'subcommand'});
|
|
86
89
|
|
|
87
|
-
// add the 'setup' command
|
|
88
|
-
ArgParser._addSetupToParser(subParsers);
|
|
89
|
-
|
|
90
90
|
// add the 'server' subcommand, and store the raw arguments on the parser
|
|
91
91
|
// object as a way for other parts of the code to work with the arguments
|
|
92
92
|
// conceptually rather than just through argparse
|
|
@@ -97,6 +97,9 @@ class ArgParser {
|
|
|
97
97
|
// add the 'driver' and 'plugin' subcommands
|
|
98
98
|
ArgParser._addExtensionCommandsToParser(subParsers);
|
|
99
99
|
|
|
100
|
+
// add the 'setup' command
|
|
101
|
+
ArgParser._addSetupToParser(subParsers);
|
|
102
|
+
|
|
100
103
|
// backwards compatibility / drop-in wrapper
|
|
101
104
|
/**
|
|
102
105
|
* @type {ArgParser['parseArgs']}
|
|
@@ -205,7 +208,8 @@ class ArgParser {
|
|
|
205
208
|
static _addServerToParser(subParser) {
|
|
206
209
|
const serverParser = subParser.add_parser('server', {
|
|
207
210
|
add_help: true,
|
|
208
|
-
help: '
|
|
211
|
+
help: 'Start an Appium server',
|
|
212
|
+
description: 'Start an Appium server (the "server" subcommand is optional)',
|
|
209
213
|
});
|
|
210
214
|
|
|
211
215
|
ArgParser._patchExit(serverParser);
|
|
@@ -227,7 +231,8 @@ class ArgParser {
|
|
|
227
231
|
for (const type of /** @type {[DriverType, PluginType]} */ ([DRIVER_TYPE, PLUGIN_TYPE])) {
|
|
228
232
|
const extParser = subParsers.add_parser(type, {
|
|
229
233
|
add_help: true,
|
|
230
|
-
help: `
|
|
234
|
+
help: `Manage Appium ${type}s`,
|
|
235
|
+
description: `Manage Appium ${type}s using various subcommands`,
|
|
231
236
|
});
|
|
232
237
|
|
|
233
238
|
ArgParser._patchExit(extParser);
|
|
@@ -259,19 +264,17 @@ class ArgParser {
|
|
|
259
264
|
{
|
|
260
265
|
command: EXT_SUBCOMMAND_UPDATE,
|
|
261
266
|
args: extensionArgs[type].update,
|
|
262
|
-
help: `Update installed ${type}s to the latest version`,
|
|
267
|
+
help: `Update one or more installed ${type}s to the latest version`,
|
|
263
268
|
},
|
|
264
269
|
{
|
|
265
270
|
command: EXT_SUBCOMMAND_RUN,
|
|
266
271
|
args: extensionArgs[type].run,
|
|
267
|
-
help:
|
|
268
|
-
`Run a script (defined inside the ${type}'s package.json under the ` +
|
|
269
|
-
`“scripts” field inside the “appium” field) from an installed ${type}`,
|
|
272
|
+
help: `Run a script (if available) from the given ${type}`,
|
|
270
273
|
},
|
|
271
274
|
{
|
|
272
275
|
command: EXT_SUBCOMMAND_DOCTOR,
|
|
273
276
|
args: extensionArgs[type].doctor,
|
|
274
|
-
help: `Run doctor checks (if
|
|
277
|
+
help: `Run doctor checks (if available) for the given ${type}`,
|
|
275
278
|
},
|
|
276
279
|
];
|
|
277
280
|
|
|
@@ -299,9 +302,12 @@ class ArgParser {
|
|
|
299
302
|
static _addSetupToParser(subParser) {
|
|
300
303
|
const setupParser = subParser.add_parser('setup', {
|
|
301
304
|
add_help: true,
|
|
302
|
-
help:
|
|
303
|
-
|
|
304
|
-
`
|
|
305
|
+
help: 'Batch install or uninstall Appium drivers and plugins',
|
|
306
|
+
description:
|
|
307
|
+
`Install a preset of official drivers/plugins compatible with the current host platform ` +
|
|
308
|
+
`(${determinePlatformName()}). Existing drivers/plugins will remain. The default preset ` +
|
|
309
|
+
`is "mobile". Providing the special "reset" subcommand will instead uninstall all ` +
|
|
310
|
+
`drivers and plugins, and remove their related manifest files.`,
|
|
305
311
|
});
|
|
306
312
|
|
|
307
313
|
|
|
@@ -313,15 +319,25 @@ class ArgParser {
|
|
|
313
319
|
const parserSpecs = [
|
|
314
320
|
{
|
|
315
321
|
command: SUBCOMMAND_MOBILE,
|
|
316
|
-
help:
|
|
322
|
+
help:
|
|
323
|
+
`The preset for mobile devices ` +
|
|
324
|
+
`(drivers: ${_.join(getPresetDrivers(SUBCOMMAND_MOBILE), ',')}; plugins: ${DEFAULT_PLUGINS})`
|
|
317
325
|
},
|
|
318
326
|
{
|
|
319
327
|
command: SUBCOMMAND_BROWSER,
|
|
320
|
-
help:
|
|
328
|
+
help:
|
|
329
|
+
`The preset for desktop browsers ` +
|
|
330
|
+
`(drivers: ${_.join(getPresetDrivers(SUBCOMMAND_BROWSER), ',')}; plugins: ${DEFAULT_PLUGINS})`
|
|
321
331
|
},
|
|
322
332
|
{
|
|
323
333
|
command: SUBCOMMAND_DESKTOP,
|
|
324
|
-
help:
|
|
334
|
+
help:
|
|
335
|
+
`The preset for desktop applications ` +
|
|
336
|
+
`(drivers: ${_.join(getPresetDrivers(SUBCOMMAND_DESKTOP), ',')}; plugins: ${DEFAULT_PLUGINS})`
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
command: SUBCOMMAND_RESET,
|
|
340
|
+
help: 'Remove all installed drivers and plugins'
|
|
325
341
|
},
|
|
326
342
|
];
|
|
327
343
|
|
package/lib/cli/utils.js
CHANGED
package/lib/config.js
CHANGED
|
@@ -3,7 +3,7 @@ import _ from 'lodash';
|
|
|
3
3
|
import {system, fs, npm} from '@appium/support';
|
|
4
4
|
import axios from 'axios';
|
|
5
5
|
import {exec} from 'teen_process';
|
|
6
|
-
import semver from 'semver';
|
|
6
|
+
import * as semver from 'semver';
|
|
7
7
|
import os from 'node:os';
|
|
8
8
|
import {npmPackage} from './utils';
|
|
9
9
|
import B from 'bluebird';
|
|
@@ -115,7 +115,7 @@ export async function getGitRev(useGithubApiFallback = false) {
|
|
|
115
115
|
cwd: __dirname,
|
|
116
116
|
});
|
|
117
117
|
return stdout.trim();
|
|
118
|
-
} catch
|
|
118
|
+
} catch {}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
if (!useGithubApiFallback) {
|
|
@@ -132,7 +132,7 @@ export async function getGitRev(useGithubApiFallback = false) {
|
|
|
132
132
|
},
|
|
133
133
|
})
|
|
134
134
|
).data?.object?.sha;
|
|
135
|
-
} catch
|
|
135
|
+
} catch {}
|
|
136
136
|
return null;
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -149,7 +149,7 @@ async function getGitTimestamp(commitSha, useGithubApiFallback = false) {
|
|
|
149
149
|
cwd: __dirname,
|
|
150
150
|
});
|
|
151
151
|
return stdout.trim();
|
|
152
|
-
} catch
|
|
152
|
+
} catch {}
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
if (!useGithubApiFallback) {
|
|
@@ -164,7 +164,7 @@ async function getGitTimestamp(commitSha, useGithubApiFallback = false) {
|
|
|
164
164
|
},
|
|
165
165
|
})
|
|
166
166
|
).data?.tagger?.date;
|
|
167
|
-
} catch
|
|
167
|
+
} catch {}
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
170
170
|
|
|
@@ -194,7 +194,7 @@ export function checkNodeOk() {
|
|
|
194
194
|
|
|
195
195
|
export async function showBuildInfo() {
|
|
196
196
|
await updateBuildInfo(true);
|
|
197
|
-
console.log(JSON.stringify(getBuildInfo()));
|
|
197
|
+
console.log(JSON.stringify(getBuildInfo()));
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
/**
|
|
@@ -356,7 +356,7 @@ export async function requireDir(root, requireWriteable = true, displayName = 'f
|
|
|
356
356
|
if (requireWriteable) {
|
|
357
357
|
try {
|
|
358
358
|
await fs.access(root, fs.constants.W_OK);
|
|
359
|
-
} catch
|
|
359
|
+
} catch {
|
|
360
360
|
throw new Error(
|
|
361
361
|
`The ${displayName} '${root}' must be ` +
|
|
362
362
|
`writeable for the current user account '${os.userInfo().username}'`
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
} from '../schema/schema';
|
|
15
15
|
import { pathToFileURL } from 'url';
|
|
16
16
|
|
|
17
|
+
const DEFAULT_ENTRY_POINT = 'index.js';
|
|
17
18
|
/**
|
|
18
19
|
* "npm" install type
|
|
19
20
|
* Used when extension was installed by npm package name
|
|
@@ -567,23 +568,39 @@ export class ExtensionConfig {
|
|
|
567
568
|
const {mainClass} = this.installedExtensions[extName];
|
|
568
569
|
const moduleRoot = this.getInstallPath(extName);
|
|
569
570
|
const packageJsonPath = path.join(moduleRoot, 'package.json');
|
|
570
|
-
let
|
|
571
|
+
let extensionManifest;
|
|
571
572
|
try {
|
|
572
|
-
|
|
573
|
+
extensionManifest = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'));
|
|
573
574
|
} catch (e) {
|
|
574
|
-
throw new ReferenceError(
|
|
575
|
+
throw new ReferenceError(
|
|
576
|
+
`Could not read the ${this.extensionType} manifest at ${packageJsonPath}: ${e.message}`
|
|
577
|
+
);
|
|
575
578
|
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
579
|
+
/** @type {string | undefined} */
|
|
580
|
+
let entryPointRelativePath;
|
|
581
|
+
try {
|
|
582
|
+
if (extensionManifest.type === 'module' && extensionManifest.exports) {
|
|
583
|
+
entryPointRelativePath = resolveEsmEntryPoint(extensionManifest.exports);
|
|
584
|
+
}
|
|
585
|
+
entryPointRelativePath = entryPointRelativePath ?? extensionManifest.main ?? DEFAULT_ENTRY_POINT;
|
|
586
|
+
} catch (e) {
|
|
587
|
+
throw new ReferenceError(
|
|
588
|
+
`Could not find the ${this.extensionType} installed at ${moduleRoot}: ${e.message}`
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
const entryPointFullPath = path.resolve(moduleRoot, /** @type {string} */ (entryPointRelativePath));
|
|
592
|
+
if (!await fs.exists(entryPointFullPath)) {
|
|
593
|
+
throw new ReferenceError(
|
|
594
|
+
`Cannot find a valid ${this.extensionType} main entry point in '${packageJsonPath}'. ` +
|
|
595
|
+
`Assumed entry point: '${entryPointFullPath}'`
|
|
596
|
+
);
|
|
580
597
|
}
|
|
581
598
|
// note: this will only reload the entry point
|
|
582
|
-
if (process.env.APPIUM_RELOAD_EXTENSIONS && require.cache[
|
|
583
|
-
log.debug(`Removing ${
|
|
584
|
-
delete require.cache[
|
|
599
|
+
if (process.env.APPIUM_RELOAD_EXTENSIONS && require.cache[entryPointFullPath]) {
|
|
600
|
+
log.debug(`Removing ${entryPointFullPath} from require cache`);
|
|
601
|
+
delete require.cache[entryPointFullPath];
|
|
585
602
|
}
|
|
586
|
-
return [
|
|
603
|
+
return [entryPointFullPath, mainClass];
|
|
587
604
|
}
|
|
588
605
|
|
|
589
606
|
/**
|
|
@@ -672,6 +689,27 @@ export class ExtensionConfig {
|
|
|
672
689
|
}
|
|
673
690
|
}
|
|
674
691
|
|
|
692
|
+
/**
|
|
693
|
+
* https://nodejs.org/api/packages.html#package-entry-points
|
|
694
|
+
*
|
|
695
|
+
* @param {any} exportsValue
|
|
696
|
+
* @returns {string | undefined}
|
|
697
|
+
*/
|
|
698
|
+
export function resolveEsmEntryPoint(exportsValue) {
|
|
699
|
+
if (_.isString(exportsValue) && exportsValue) {
|
|
700
|
+
return exportsValue;
|
|
701
|
+
}
|
|
702
|
+
if (!_.isPlainObject(exportsValue)) {
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
for (const key of ['.', 'import']) {
|
|
707
|
+
if (exportsValue[key]) {
|
|
708
|
+
return resolveEsmEntryPoint(exportsValue[key]);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
675
713
|
/**
|
|
676
714
|
* An issue with the {@linkcode ExtManifest} for a particular extension.
|
|
677
715
|
*
|
|
@@ -242,8 +242,8 @@ export class Manifest {
|
|
|
242
242
|
* @type {InternalMetadata}
|
|
243
243
|
*/
|
|
244
244
|
const internal = {
|
|
245
|
-
pkgName: pkgJson.name,
|
|
246
|
-
version: pkgJson.version,
|
|
245
|
+
pkgName: /** @type {string} */ (pkgJson.name),
|
|
246
|
+
version: /** @type {string} */ (pkgJson.version),
|
|
247
247
|
appiumVersion: pkgJson.peerDependencies?.appium,
|
|
248
248
|
installType,
|
|
249
249
|
installSpec: `${pkgJson.name}@${pkgJson.version}`,
|
package/lib/schema/schema.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Ajv from 'ajv';
|
|
1
|
+
import {Ajv} from 'ajv';
|
|
2
2
|
import addFormats from 'ajv-formats';
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
import path from 'path';
|
|
@@ -453,7 +453,7 @@ class AppiumSchema {
|
|
|
453
453
|
let refSchema;
|
|
454
454
|
try {
|
|
455
455
|
refSchema = this.getSchema($ref);
|
|
456
|
-
} catch
|
|
456
|
+
} catch {
|
|
457
457
|
// this can happen if an extension schema supplies a $ref to a non-existent schema
|
|
458
458
|
throw new SchemaUnknownSchemaError($ref);
|
|
459
459
|
}
|
package/lib/utils.js
CHANGED
|
@@ -247,10 +247,10 @@ export function adjustNodePath() {
|
|
|
247
247
|
// ! so it could break (maybe, eventually).
|
|
248
248
|
// See https://gist.github.com/branneman/8048520#7-the-hack
|
|
249
249
|
// @ts-ignore see above comment
|
|
250
|
-
|
|
250
|
+
|
|
251
251
|
require('module').Module._initPaths();
|
|
252
252
|
return true;
|
|
253
|
-
} catch
|
|
253
|
+
} catch {
|
|
254
254
|
return false;
|
|
255
255
|
}
|
|
256
256
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Automation for Apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@appium/base-driver": "^9.
|
|
64
|
-
"@appium/base-plugin": "^2.2.
|
|
65
|
-
"@appium/docutils": "^1.0.
|
|
63
|
+
"@appium/base-driver": "^9.14.0",
|
|
64
|
+
"@appium/base-plugin": "^2.2.51",
|
|
65
|
+
"@appium/docutils": "^1.0.27",
|
|
66
66
|
"@appium/logger": "^1.6.1",
|
|
67
|
-
"@appium/schema": "^0.7.
|
|
68
|
-
"@appium/support": "^
|
|
69
|
-
"@appium/types": "^0.
|
|
67
|
+
"@appium/schema": "^0.7.1",
|
|
68
|
+
"@appium/support": "^6.0.1",
|
|
69
|
+
"@appium/types": "^0.23.0",
|
|
70
70
|
"@sidvind/better-ajv-errors": "3.0.1",
|
|
71
71
|
"@types/argparse": "2.0.17",
|
|
72
72
|
"@types/bluebird": "3.5.42",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"argparse": "2.0.1",
|
|
79
79
|
"async-lock": "1.4.1",
|
|
80
80
|
"asyncbox": "3.0.0",
|
|
81
|
-
"axios": "1.7.
|
|
81
|
+
"axios": "1.7.9",
|
|
82
82
|
"bluebird": "3.7.2",
|
|
83
83
|
"cross-env": "7.0.3",
|
|
84
|
-
"lilconfig": "3.1.
|
|
84
|
+
"lilconfig": "3.1.3",
|
|
85
85
|
"lodash": "4.17.21",
|
|
86
86
|
"lru-cache": "10.4.3",
|
|
87
87
|
"ora": "5.4.1",
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
"resolve-from": "5.0.0",
|
|
90
90
|
"semver": "7.6.3",
|
|
91
91
|
"source-map-support": "0.5.21",
|
|
92
|
-
"teen_process": "2.2.
|
|
93
|
-
"type-fest": "4.
|
|
92
|
+
"teen_process": "2.2.2",
|
|
93
|
+
"type-fest": "4.31.0",
|
|
94
94
|
"winston": "3.17.0",
|
|
95
95
|
"wrap-ansi": "7.0.0",
|
|
96
96
|
"ws": "8.18.0",
|
|
97
|
-
"yaml": "2.
|
|
97
|
+
"yaml": "2.7.0"
|
|
98
98
|
},
|
|
99
99
|
"engines": {
|
|
100
100
|
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"publishConfig": {
|
|
104
104
|
"access": "public"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "3fa73a1d1a95e3868fbceb005f8b1deb4ac53eaf"
|
|
107
107
|
}
|
|
@@ -85,10 +85,10 @@ async function init() {
|
|
|
85
85
|
}
|
|
86
86
|
try {
|
|
87
87
|
({env, util, logger} = require('@appium/support'));
|
|
88
|
-
// @ts-ignore
|
|
88
|
+
// @ts-ignore This is OK
|
|
89
89
|
({runExtensionCommand} = require('../build/lib/cli/extension'));
|
|
90
90
|
({DRIVER_TYPE, PLUGIN_TYPE} = require('../build/lib/constants'));
|
|
91
|
-
// @ts-ignore
|
|
91
|
+
// @ts-ignore This is OK
|
|
92
92
|
({loadExtensions} = require('../build/lib/extension'));
|
|
93
93
|
logger.getLogger('Appium').level = 'error';
|
|
94
94
|
|
|
@@ -119,7 +119,7 @@ async function main() {
|
|
|
119
119
|
|
|
120
120
|
if (!driverEnv && !pluginEnv) {
|
|
121
121
|
spinner.succeed(
|
|
122
|
-
wrap(`No drivers or plugins to automatically install.
|
|
122
|
+
wrap(`No drivers or plugins to automatically install.
|
|
123
123
|
If desired, provide arguments with comma-separated values "--drivers=<known_driver>[,known_driver...]" and/or "--plugins=<known_plugin>[,known_plugin...]" to the "npm install appium" command. The specified extensions will be installed automatically with Appium. Note: to see the list of known extensions, run "appium <driver|plugin> list".`)
|
|
124
124
|
);
|
|
125
125
|
return;
|
|
@@ -193,7 +193,7 @@ async function checkAndInstallExtension({
|
|
|
193
193
|
spinner,
|
|
194
194
|
}) {
|
|
195
195
|
const extList = await runExtensionCommand(
|
|
196
|
-
// @ts-ignore
|
|
196
|
+
// @ts-ignore This is OK
|
|
197
197
|
{
|
|
198
198
|
appiumHome,
|
|
199
199
|
subcommand: type,
|
|
@@ -209,7 +209,7 @@ async function checkAndInstallExtension({
|
|
|
209
209
|
}
|
|
210
210
|
spinner.start(`Installing ${type} "${ext}"...`);
|
|
211
211
|
await runExtensionCommand(
|
|
212
|
-
// @ts-ignore
|
|
212
|
+
// @ts-ignore this is OK
|
|
213
213
|
{
|
|
214
214
|
subcommand: type,
|
|
215
215
|
appiumHome,
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|