appium 3.5.0 → 3.5.2
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.map +1 -1
- package/build/lib/appium.js +43 -45
- package/build/lib/appium.js.map +1 -1
- package/build/lib/bidi-commands.d.ts.map +1 -1
- package/build/lib/bidi-commands.js +34 -29
- package/build/lib/bidi-commands.js.map +1 -1
- package/build/lib/bootstrap/appium-initializer.d.ts.map +1 -1
- package/build/lib/bootstrap/appium-initializer.js +13 -13
- package/build/lib/bootstrap/appium-initializer.js.map +1 -1
- package/build/lib/bootstrap/appium-main-runner.d.ts.map +1 -1
- package/build/lib/bootstrap/appium-main-runner.js +2 -2
- package/build/lib/bootstrap/appium-main-runner.js.map +1 -1
- package/build/lib/bootstrap/config-file.d.ts.map +1 -1
- package/build/lib/bootstrap/config-file.js +11 -11
- package/build/lib/bootstrap/config-file.js.map +1 -1
- package/build/lib/bootstrap/grid-v3-register.d.ts.map +1 -1
- package/build/lib/bootstrap/grid-v3-register.js +9 -6
- package/build/lib/bootstrap/grid-v3-register.js.map +1 -1
- package/build/lib/bootstrap/main-helpers.d.ts +1 -1
- package/build/lib/bootstrap/main-helpers.d.ts.map +1 -1
- package/build/lib/bootstrap/main-helpers.js +19 -20
- package/build/lib/bootstrap/main-helpers.js.map +1 -1
- package/build/lib/bootstrap/node-helpers.d.ts +1 -1
- package/build/lib/bootstrap/node-helpers.d.ts.map +1 -1
- package/build/lib/bootstrap/node-helpers.js +7 -14
- package/build/lib/bootstrap/node-helpers.js.map +1 -1
- package/build/lib/bootstrap/startup-config.d.ts.map +1 -1
- package/build/lib/bootstrap/startup-config.js +32 -30
- package/build/lib/bootstrap/startup-config.js.map +1 -1
- package/build/lib/cli/args.d.ts +3 -2
- package/build/lib/cli/args.d.ts.map +1 -1
- package/build/lib/cli/args.js +2 -5
- package/build/lib/cli/args.js.map +1 -1
- package/build/lib/cli/driver-command.d.ts +1 -2
- package/build/lib/cli/driver-command.d.ts.map +1 -1
- package/build/lib/cli/driver-command.js +7 -8
- package/build/lib/cli/driver-command.js.map +1 -1
- package/build/lib/cli/extension-command.d.ts +2 -2
- package/build/lib/cli/extension-command.d.ts.map +1 -1
- package/build/lib/cli/extension-command.js +100 -66
- package/build/lib/cli/extension-command.js.map +1 -1
- package/build/lib/cli/extension.d.ts.map +1 -1
- package/build/lib/cli/extension.js.map +1 -1
- package/build/lib/cli/parser.d.ts.map +1 -1
- package/build/lib/cli/parser.js +21 -14
- package/build/lib/cli/parser.js.map +1 -1
- package/build/lib/cli/plugin-command.d.ts +1 -1
- package/build/lib/cli/plugin-command.d.ts.map +1 -1
- package/build/lib/cli/plugin-command.js +5 -5
- package/build/lib/cli/plugin-command.js.map +1 -1
- package/build/lib/cli/setup-command.d.ts +1 -1
- package/build/lib/cli/setup-command.d.ts.map +1 -1
- package/build/lib/cli/setup-command.js +14 -19
- package/build/lib/cli/setup-command.js.map +1 -1
- package/build/lib/cli/utils.d.ts.map +1 -1
- package/build/lib/cli/utils.js +3 -2
- package/build/lib/cli/utils.js.map +1 -1
- package/build/lib/doctor/doctor.d.ts +0 -1
- package/build/lib/doctor/doctor.d.ts.map +1 -1
- package/build/lib/doctor/doctor.js +12 -17
- package/build/lib/doctor/doctor.js.map +1 -1
- package/build/lib/extension/driver-config.d.ts.map +1 -1
- package/build/lib/extension/driver-config.js +11 -12
- package/build/lib/extension/driver-config.js.map +1 -1
- package/build/lib/extension/extension-config.d.ts.map +1 -1
- package/build/lib/extension/extension-config.js +28 -27
- package/build/lib/extension/extension-config.js.map +1 -1
- package/build/lib/extension/index.d.ts.map +1 -1
- package/build/lib/extension/index.js +13 -16
- package/build/lib/extension/index.js.map +1 -1
- package/build/lib/extension/manifest.d.ts +3 -2
- package/build/lib/extension/manifest.d.ts.map +1 -1
- package/build/lib/extension/manifest.js +19 -22
- package/build/lib/extension/manifest.js.map +1 -1
- package/build/lib/extension/plugin-config.d.ts.map +1 -1
- package/build/lib/extension/plugin-config.js +7 -9
- package/build/lib/extension/plugin-config.js.map +1 -1
- package/build/lib/helpers/build.d.ts +0 -1
- package/build/lib/helpers/build.d.ts.map +1 -1
- package/build/lib/helpers/build.js +2 -4
- package/build/lib/helpers/build.js.map +1 -1
- package/build/lib/helpers/capability.d.ts.map +1 -1
- package/build/lib/helpers/capability.js +27 -22
- package/build/lib/helpers/capability.js.map +1 -1
- package/build/lib/helpers/network.d.ts.map +1 -1
- package/build/lib/helpers/network.js +4 -3
- package/build/lib/helpers/network.js.map +1 -1
- package/build/lib/insecure-features.d.ts.map +1 -1
- package/build/lib/insecure-features.js +9 -13
- package/build/lib/insecure-features.js.map +1 -1
- package/build/lib/inspector-commands.d.ts.map +1 -1
- package/build/lib/inspector-commands.js +29 -28
- package/build/lib/inspector-commands.js.map +1 -1
- package/build/lib/logsink.d.ts.map +1 -1
- package/build/lib/logsink.js +8 -7
- package/build/lib/logsink.js.map +1 -1
- package/build/lib/schema/arg-spec.d.ts.map +1 -1
- package/build/lib/schema/arg-spec.js +5 -8
- package/build/lib/schema/arg-spec.js.map +1 -1
- package/build/lib/schema/cli-args.d.ts.map +1 -1
- package/build/lib/schema/cli-args.js +20 -19
- package/build/lib/schema/cli-args.js.map +1 -1
- package/build/lib/schema/cli-transformers.d.ts.map +1 -1
- package/build/lib/schema/cli-transformers.js.map +1 -1
- package/build/lib/schema/schema.d.ts.map +1 -1
- package/build/lib/schema/schema.js +28 -21
- package/build/lib/schema/schema.js.map +1 -1
- package/build/lib/utils/hash.d.ts +5 -0
- package/build/lib/utils/hash.d.ts.map +1 -0
- package/build/lib/{utils.js → utils/hash.js} +3 -21
- package/build/lib/utils/hash.js.map +1 -0
- package/build/lib/utils/index.d.ts +8 -0
- package/build/lib/utils/index.d.ts.map +1 -0
- package/build/lib/utils/index.js +31 -0
- package/build/lib/utils/index.js.map +1 -0
- package/build/lib/utils/is-package-changed.d.ts +16 -0
- package/build/lib/utils/is-package-changed.d.ts.map +1 -0
- package/build/lib/utils/is-package-changed.js +62 -0
- package/build/lib/utils/is-package-changed.js.map +1 -0
- package/build/lib/utils/object.d.ts +120 -0
- package/build/lib/utils/object.d.ts.map +1 -0
- package/build/lib/utils/object.js +288 -0
- package/build/lib/utils/object.js.map +1 -0
- package/build/lib/{extension → utils}/package-changed.d.ts +0 -1
- package/build/lib/utils/package-changed.d.ts.map +1 -0
- package/build/lib/{extension → utils}/package-changed.js +3 -4
- package/build/lib/utils/package-changed.js.map +1 -0
- package/build/lib/utils/package-json.d.ts +9 -0
- package/build/lib/utils/package-json.d.ts.map +1 -0
- package/build/lib/utils/package-json.js +32 -0
- package/build/lib/utils/package-json.js.map +1 -0
- package/build/lib/utils/resolve-from.d.ts +11 -0
- package/build/lib/utils/resolve-from.d.ts.map +1 -0
- package/build/lib/utils/resolve-from.js +41 -0
- package/build/lib/utils/resolve-from.js.map +1 -0
- package/build/types/cli.d.ts.map +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/manifest/base.d.ts.map +1 -1
- package/build/types/manifest/v3.d.ts.map +1 -1
- package/build/types/manifest/v4.d.ts.map +1 -1
- package/lib/appium.ts +59 -55
- package/lib/bidi-commands.ts +106 -60
- package/lib/bootstrap/appium-initializer.ts +27 -19
- package/lib/bootstrap/appium-main-runner.ts +8 -4
- package/lib/bootstrap/config-file.ts +33 -16
- package/lib/bootstrap/grid-v3-register.ts +26 -19
- package/lib/bootstrap/main-helpers.ts +25 -19
- package/lib/bootstrap/node-helpers.ts +19 -22
- package/lib/bootstrap/startup-config.ts +42 -39
- package/lib/cli/args.ts +3 -4
- package/lib/cli/driver-command.ts +19 -13
- package/lib/cli/extension-command.ts +208 -143
- package/lib/cli/extension.ts +4 -6
- package/lib/cli/parser.ts +32 -30
- package/lib/cli/plugin-command.ts +20 -9
- package/lib/cli/setup-command.ts +54 -39
- package/lib/cli/utils.ts +4 -3
- package/lib/doctor/doctor.ts +15 -17
- package/lib/extension/driver-config.ts +22 -17
- package/lib/extension/extension-config.ts +74 -66
- package/lib/extension/index.ts +42 -25
- package/lib/extension/manifest.ts +34 -31
- package/lib/extension/plugin-config.ts +15 -10
- package/lib/helpers/build.ts +6 -5
- package/lib/helpers/capability.ts +40 -35
- package/lib/helpers/network.ts +6 -5
- package/lib/insecure-features.ts +16 -14
- package/lib/inspector-commands.ts +72 -40
- package/lib/logsink.ts +22 -26
- package/lib/schema/arg-spec.ts +9 -8
- package/lib/schema/cli-args-guards.ts +4 -4
- package/lib/schema/cli-args.ts +25 -21
- package/lib/schema/cli-transformers.ts +6 -2
- package/lib/schema/format-errors.ts +1 -1
- package/lib/schema/schema.ts +52 -38
- package/lib/{utils.ts → utils/hash.ts} +2 -19
- package/lib/utils/index.ts +23 -0
- package/lib/utils/is-package-changed.ts +78 -0
- package/lib/utils/object.ts +312 -0
- package/lib/{extension → utils}/package-changed.ts +6 -7
- package/lib/utils/package-json.ts +36 -0
- package/lib/utils/resolve-from.ts +40 -0
- package/package.json +13 -16
- package/scripts/autoinstall-extensions.js +8 -8
- package/tsconfig.json +8 -2
- package/types/cli.ts +18 -18
- package/types/index.ts +2 -2
- package/types/manifest/base.ts +2 -2
- package/types/manifest/v3.ts +2 -2
- package/types/manifest/v4.ts +2 -2
- package/build/lib/extension/package-changed.d.ts.map +0 -1
- package/build/lib/extension/package-changed.js.map +0 -1
- package/build/lib/utils.d.ts +0 -13
- package/build/lib/utils.d.ts.map +0 -1
- package/build/lib/utils.js.map +0 -1
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import {fs} from '@appium/support';
|
|
2
|
-
import {isPackageChanged} from 'package-changed';
|
|
3
2
|
import path from 'node:path';
|
|
4
3
|
import {PKG_HASHFILE_RELATIVE_PATH} from '../constants';
|
|
5
4
|
import {log} from '../logger';
|
|
5
|
+
import {isPackageChanged} from './is-package-changed';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Determines if extensions have changed, and updates a hash the `package.json` in `appiumHome` if so.
|
|
9
9
|
*
|
|
10
10
|
* If they have, we need to sync them with the `extensions.yaml` manifest.
|
|
11
11
|
*
|
|
12
|
-
* _Warning: this makes a blocking call to `writeFileSync`._
|
|
13
12
|
*/
|
|
14
13
|
export async function packageDidChange(appiumHome: string): Promise<boolean> {
|
|
15
14
|
const hashFilename = path.join(appiumHome, PKG_HASHFILE_RELATIVE_PATH);
|
|
@@ -21,12 +20,12 @@ export async function packageDidChange(appiumHome: string): Promise<boolean> {
|
|
|
21
20
|
} catch (err: any) {
|
|
22
21
|
throw new Error(
|
|
23
22
|
`Appium could not create the directory for hash file: ${hashFilenameDir}. Original error: ${err.message}`,
|
|
24
|
-
{cause: err}
|
|
23
|
+
{cause: err},
|
|
25
24
|
);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
let isChanged: boolean;
|
|
29
|
-
let writeHash: () => void
|
|
28
|
+
let writeHash: () => Promise<void>;
|
|
30
29
|
let oldHash: string | undefined;
|
|
31
30
|
let hash: string;
|
|
32
31
|
try {
|
|
@@ -41,14 +40,14 @@ export async function packageDidChange(appiumHome: string): Promise<boolean> {
|
|
|
41
40
|
|
|
42
41
|
if (isChanged) {
|
|
43
42
|
try {
|
|
44
|
-
writeHash();
|
|
43
|
+
await writeHash();
|
|
45
44
|
log.debug(
|
|
46
|
-
`Updated hash of ${appiumHome}/package.json from: ${oldHash ?? '(none)'} to: ${hash}
|
|
45
|
+
`Updated hash of ${appiumHome}/package.json from: ${oldHash ?? '(none)'} to: ${hash}`,
|
|
47
46
|
);
|
|
48
47
|
} catch (err: any) {
|
|
49
48
|
throw new Error(
|
|
50
49
|
`Appium could not write hash file: ${hashFilenameDir}. Original error: ${err.message}`,
|
|
51
|
-
{cause: err}
|
|
50
|
+
{cause: err},
|
|
52
51
|
);
|
|
53
52
|
}
|
|
54
53
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import nodeFs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import type {PackageJson} from 'type-fest';
|
|
4
|
+
|
|
5
|
+
type AppiumPackageJson = PackageJson & {
|
|
6
|
+
name: string;
|
|
7
|
+
version: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
function readPackageJsonSync(): {pkgRoot: string; pkg: AppiumPackageJson} {
|
|
11
|
+
let current = path.resolve(__dirname);
|
|
12
|
+
const root = path.parse(current).root;
|
|
13
|
+
let pkgRoot: string;
|
|
14
|
+
while (true) {
|
|
15
|
+
if (nodeFs.existsSync(path.join(current, 'package.json'))) {
|
|
16
|
+
pkgRoot = current;
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
if (current === root) {
|
|
20
|
+
throw new Error(`Could not find \`package.json\` from ${__dirname}`);
|
|
21
|
+
}
|
|
22
|
+
current = path.dirname(current);
|
|
23
|
+
}
|
|
24
|
+
const pkg = JSON.parse(
|
|
25
|
+
nodeFs.readFileSync(path.join(pkgRoot, 'package.json'), 'utf8'),
|
|
26
|
+
) as PackageJson;
|
|
27
|
+
if (typeof pkg.name !== 'string' || typeof pkg.version !== 'string') {
|
|
28
|
+
throw new Error(`Invalid \`package.json\` near ${__dirname}`);
|
|
29
|
+
}
|
|
30
|
+
return {pkgRoot, pkg: pkg as AppiumPackageJson};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const {pkg, pkgRoot} = readPackageJsonSync();
|
|
34
|
+
|
|
35
|
+
export const npmPackage = pkg;
|
|
36
|
+
export const appiumPackageRoot = pkgRoot;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {realpath} from 'node:fs/promises';
|
|
2
|
+
import Module from 'node:module';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Resolves `moduleId` using Node's module resolution from `fromDirectory`.
|
|
7
|
+
*
|
|
8
|
+
* @param fromDirectory - Directory to resolve from (typically a project or `APPIUM_HOME` root)
|
|
9
|
+
* @param moduleId - Module id or path to resolve (e.g. `semver/package.json`)
|
|
10
|
+
* @returns Resolved module id. Package paths are typically absolute filesystem paths; built-in
|
|
11
|
+
* modules may resolve to non-absolute ids (e.g. `node:fs`, `fs`).
|
|
12
|
+
* @throws `Error` if Node cannot resolve `moduleId` from `fromDirectory`
|
|
13
|
+
*/
|
|
14
|
+
export async function resolveFrom(fromDirectory: string, moduleId: string): Promise<string> {
|
|
15
|
+
let resolvedFromDirectory: string;
|
|
16
|
+
try {
|
|
17
|
+
resolvedFromDirectory = await realpath(fromDirectory);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
const err = error as NodeJS.ErrnoException;
|
|
20
|
+
if (err.code === 'ENOENT') {
|
|
21
|
+
resolvedFromDirectory = path.resolve(fromDirectory);
|
|
22
|
+
} else {
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const fromFile = path.join(resolvedFromDirectory, 'noop.js');
|
|
28
|
+
const nodeModule = Module as typeof Module & {
|
|
29
|
+
_resolveFilename: (
|
|
30
|
+
id: string,
|
|
31
|
+
parent: {id: string; filename: string; paths: string[]},
|
|
32
|
+
) => string;
|
|
33
|
+
_nodeModulePaths: (from: string) => string[];
|
|
34
|
+
};
|
|
35
|
+
return nodeModule._resolveFilename(moduleId, {
|
|
36
|
+
id: fromFile,
|
|
37
|
+
filename: fromFile,
|
|
38
|
+
paths: nodeModule._nodeModulePaths(resolvedFromDirectory),
|
|
39
|
+
});
|
|
40
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "Automation for Apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -60,28 +60,25 @@
|
|
|
60
60
|
"test:unit": "mocha \"./test/unit/**/*.spec.ts\""
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@appium/base-driver": "10.
|
|
64
|
-
"@appium/base-plugin": "3.3.
|
|
65
|
-
"@appium/docutils": "2.
|
|
66
|
-
"@appium/logger": "2.0.
|
|
67
|
-
"@appium/schema": "1.2.
|
|
68
|
-
"@appium/support": "7.2.
|
|
69
|
-
"@appium/types": "1.5.
|
|
63
|
+
"@appium/base-driver": "10.7.1",
|
|
64
|
+
"@appium/base-plugin": "3.3.2",
|
|
65
|
+
"@appium/docutils": "2.5.1",
|
|
66
|
+
"@appium/logger": "2.0.9",
|
|
67
|
+
"@appium/schema": "1.2.1",
|
|
68
|
+
"@appium/support": "7.2.5",
|
|
69
|
+
"@appium/types": "1.5.1",
|
|
70
70
|
"@sidvind/better-ajv-errors": "5.0.0",
|
|
71
71
|
"ajv": "8.20.0",
|
|
72
72
|
"ajv-formats": "3.0.1",
|
|
73
73
|
"argparse": "2.0.1",
|
|
74
74
|
"asyncbox": "6.3.0",
|
|
75
|
-
"axios": "1.
|
|
75
|
+
"axios": "1.18.0",
|
|
76
76
|
"lilconfig": "3.1.3",
|
|
77
|
-
"
|
|
78
|
-
"lru-cache": "11.5.0",
|
|
77
|
+
"lru-cache": "11.5.1",
|
|
79
78
|
"ora": "5.4.1",
|
|
80
|
-
"
|
|
81
|
-
"resolve-from": "5.0.0",
|
|
82
|
-
"semver": "7.8.1",
|
|
79
|
+
"semver": "7.8.4",
|
|
83
80
|
"teen_process": "4.1.3",
|
|
84
|
-
"type-fest": "5.
|
|
81
|
+
"type-fest": "5.7.0",
|
|
85
82
|
"winston": "3.19.0",
|
|
86
83
|
"ws": "8.21.0",
|
|
87
84
|
"yaml": "2.9.0"
|
|
@@ -93,5 +90,5 @@
|
|
|
93
90
|
"publishConfig": {
|
|
94
91
|
"access": "public"
|
|
95
92
|
},
|
|
96
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "e6b583a2094f7919ef27b0dc28ebf42b3184852b"
|
|
97
94
|
}
|
|
@@ -113,9 +113,9 @@ async function main() {
|
|
|
113
113
|
spinner.succeed('No drivers or plugins to automatically install.');
|
|
114
114
|
log(
|
|
115
115
|
'If desired, provide the argument "--drivers=<driver_name>[,<driver_name>...]" and/or ' +
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
'"--plugins=<plugin_name>[,<plugin_name>...]" to the "npm install appium" command. ' +
|
|
117
|
+
'The specified extensions will be installed automatically alongside Appium. ' +
|
|
118
|
+
'For a list of known extensions, run "appium <driver|plugin> list".',
|
|
119
119
|
);
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
@@ -165,11 +165,11 @@ async function main() {
|
|
|
165
165
|
spinner.succeed(
|
|
166
166
|
`Done. ${installedStats[DRIVER_TYPE]} ${util.pluralize(
|
|
167
167
|
'driver',
|
|
168
|
-
installedStats[DRIVER_TYPE]
|
|
168
|
+
installedStats[DRIVER_TYPE],
|
|
169
169
|
)} and ${installedStats[PLUGIN_TYPE]} ${util.pluralize(
|
|
170
170
|
'plugin',
|
|
171
|
-
installedStats[PLUGIN_TYPE]
|
|
172
|
-
)} are installed
|
|
171
|
+
installedStats[PLUGIN_TYPE],
|
|
172
|
+
)} are installed.`,
|
|
173
173
|
);
|
|
174
174
|
}
|
|
175
175
|
|
|
@@ -196,7 +196,7 @@ async function checkAndInstallExtension({
|
|
|
196
196
|
showInstalled: true,
|
|
197
197
|
suppressOutput: true,
|
|
198
198
|
},
|
|
199
|
-
type === DRIVER_TYPE ? driverConfig : pluginConfig
|
|
199
|
+
type === DRIVER_TYPE ? driverConfig : pluginConfig,
|
|
200
200
|
);
|
|
201
201
|
if (extList[ext]) {
|
|
202
202
|
spinner.info(`The ${type} "${ext}" is already installed.`);
|
|
@@ -212,7 +212,7 @@ async function checkAndInstallExtension({
|
|
|
212
212
|
suppressOutput: true,
|
|
213
213
|
[type]: ext,
|
|
214
214
|
},
|
|
215
|
-
type === DRIVER_TYPE ? driverConfig : pluginConfig
|
|
215
|
+
type === DRIVER_TYPE ? driverConfig : pluginConfig,
|
|
216
216
|
);
|
|
217
217
|
spinner.succeed(`Installed ${type} "${ext}".`);
|
|
218
218
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "@appium/tsconfig/tsconfig.json",
|
|
3
|
+
"ts-node": {
|
|
4
|
+
"transpileOnly": true,
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"rootDir": "."
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"compilerOptions": {
|
|
4
10
|
"rootDir": ".",
|
|
5
11
|
"outDir": "build",
|
|
12
|
+
"strict": true,
|
|
6
13
|
"paths": {
|
|
7
14
|
"@appium/support": ["../support"],
|
|
8
15
|
"@appium/base-driver": ["../base-driver"],
|
|
@@ -22,7 +29,6 @@
|
|
|
22
29
|
{"path": "../support"},
|
|
23
30
|
{"path": "../base-driver"},
|
|
24
31
|
{"path": "../base-plugin"},
|
|
25
|
-
{"path": "../fake-driver"}
|
|
26
|
-
{"path": "../test-support"}
|
|
32
|
+
{"path": "../fake-driver"}
|
|
27
33
|
]
|
|
28
34
|
}
|
package/types/cli.ts
CHANGED
|
@@ -153,47 +153,47 @@ export interface BaseExtArgs<Cmd extends CliExtensionCommand> {
|
|
|
153
153
|
*/
|
|
154
154
|
export type ExtArgs<
|
|
155
155
|
Cmd extends CliExtensionCommand,
|
|
156
|
-
SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand
|
|
156
|
+
SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand,
|
|
157
157
|
> = BaseExtArgs<Cmd> &
|
|
158
158
|
(Cmd extends CliCommandSetup
|
|
159
159
|
? SetupArgs
|
|
160
160
|
: Cmd extends CliCommandDriver
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
? DriverExtArgs
|
|
162
|
+
: Cmd extends CliCommandPlugin
|
|
163
|
+
? PluginExtArgs
|
|
164
|
+
: never) &
|
|
165
165
|
(SubCmd extends 'install'
|
|
166
166
|
? CliExtensionSubcommandInstallArgs
|
|
167
167
|
: SubCmd extends 'list'
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
? CliExtensionSubcommandListArgs
|
|
169
|
+
: SubCmd extends 'update'
|
|
170
|
+
? CliExtensionSubcommandUpdateArgs
|
|
171
|
+
: never);
|
|
172
172
|
|
|
173
173
|
/**
|
|
174
174
|
* Some generic bits of arguments; should not be used outside this declaration
|
|
175
175
|
*/
|
|
176
176
|
export type CommonArgs<
|
|
177
177
|
Cmd extends CliCommand = CliCommandServer,
|
|
178
|
-
SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void
|
|
178
|
+
SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void,
|
|
179
179
|
> = MoreArgs &
|
|
180
180
|
ProgrammaticArgs &
|
|
181
181
|
(Cmd extends CliCommandServer
|
|
182
182
|
? ServerArgs
|
|
183
183
|
: Cmd extends CliCommandSetup
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
184
|
+
? SetupArgs
|
|
185
|
+
: Cmd extends CliExtensionCommand
|
|
186
|
+
? SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand
|
|
187
|
+
? ExtArgs<Cmd, SubCmd>
|
|
188
|
+
: never
|
|
189
|
+
: never);
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
192
|
* Fully-parsed arguments, containing defaults, computed args, and config file values.
|
|
193
193
|
*/
|
|
194
194
|
export type ParsedArgs<
|
|
195
195
|
Cmd extends CliCommand = CliCommandServer,
|
|
196
|
-
SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void
|
|
196
|
+
SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void,
|
|
197
197
|
> = CommonArgs<Cmd, SubCmd>;
|
|
198
198
|
|
|
199
199
|
/**
|
|
@@ -203,7 +203,7 @@ export type ParsedArgs<
|
|
|
203
203
|
*/
|
|
204
204
|
export type Args<
|
|
205
205
|
Cmd extends CliCommand = CliCommandServer,
|
|
206
|
-
SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void
|
|
206
|
+
SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void,
|
|
207
207
|
> = Cmd extends CliCommandServer
|
|
208
208
|
? SetOptional<CommonArgs<Cmd>, keyof ServerArgs>
|
|
209
209
|
: ParsedArgs<Cmd, SubCmd>;
|
package/types/index.ts
CHANGED
package/types/manifest/base.ts
CHANGED
|
@@ -100,8 +100,8 @@ export interface PluginMetadata {
|
|
|
100
100
|
export type ExtMetadata<ExtType extends ExtensionType> = (ExtType extends DriverType
|
|
101
101
|
? DriverMetadata
|
|
102
102
|
: ExtType extends PluginType
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
? PluginMetadata
|
|
104
|
+
: never) &
|
|
105
105
|
CommonExtMetadata;
|
|
106
106
|
|
|
107
107
|
/**
|
package/types/manifest/v3.ts
CHANGED
|
@@ -103,8 +103,8 @@ export interface PluginMetadata {
|
|
|
103
103
|
export type ExtMetadata<ExtType extends ExtensionType> = (ExtType extends DriverType
|
|
104
104
|
? DriverMetadata
|
|
105
105
|
: ExtType extends PluginType
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
? PluginMetadata
|
|
107
|
+
: never) &
|
|
108
108
|
CommonExtMetadata;
|
|
109
109
|
|
|
110
110
|
/**
|
package/types/manifest/v4.ts
CHANGED
|
@@ -103,8 +103,8 @@ export interface PluginMetadata {
|
|
|
103
103
|
export type ExtMetadata<ExtType extends ExtensionType> = (ExtType extends DriverType
|
|
104
104
|
? DriverMetadata
|
|
105
105
|
: ExtType extends PluginType
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
? PluginMetadata
|
|
107
|
+
: never) &
|
|
108
108
|
CommonExtMetadata;
|
|
109
109
|
|
|
110
110
|
/**
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package-changed.d.ts","sourceRoot":"","sources":["../../../lib/extension/package-changed.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA2C3E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package-changed.js","sourceRoot":"","sources":["../../../lib/extension/package-changed.ts"],"names":[],"mappings":";;;;;AAaA,4CA2CC;AAxDD,6CAAmC;AACnC,qDAAiD;AACjD,0DAA6B;AAC7B,4CAAwD;AACxD,sCAA8B;AAE9B;;;;;;GAMG;AACI,KAAK,UAAU,gBAAgB,CAAC,UAAkB;IACvD,MAAM,YAAY,GAAG,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,sCAA0B,CAAC,CAAC;IAEvE,MAAM,eAAe,GAAG,mBAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACnD,YAAG,CAAC,KAAK,CAAC,iCAAiC,eAAe,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC;QACH,MAAM,YAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,wDAAwD,eAAe,qBAAqB,GAAG,CAAC,OAAO,EAAE,EACzG,EAAC,KAAK,EAAE,GAAG,EAAC,CACb,CAAC;IACJ,CAAC;IAED,IAAI,SAAkB,CAAC;IACvB,IAAI,SAAqB,CAAC;IAC1B,IAAI,OAA2B,CAAC;IAChC,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QACH,CAAC,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAC,GAAG,MAAM,IAAA,kCAAgB,EAAC;YAC9D,GAAG,EAAE,UAAU;YACf,YAAY,EAAE,sCAA0B;SACzC,CAAC,CAAC,CAAC;IACN,CAAC;IAAC,MAAM,CAAC;QACP,kFAAkF;QAClF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,CAAC;YACH,SAAS,EAAE,CAAC;YACZ,YAAG,CAAC,KAAK,CACP,mBAAmB,UAAU,uBAAuB,OAAO,IAAI,QAAQ,QAAQ,IAAI,EAAE,CACtF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CACb,qCAAqC,eAAe,qBAAqB,GAAG,CAAC,OAAO,EAAE,EACtF,EAAC,KAAK,EAAE,GAAG,EAAC,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/build/lib/utils.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import _ from 'lodash';
|
|
2
|
-
export declare const npmPackage: import("read-pkg", { with: { "resolution-mode": "import" } }).NormalizedPackageJson;
|
|
3
|
-
/**
|
|
4
|
-
* Returns the root directory of the Appium module (memoized).
|
|
5
|
-
*
|
|
6
|
-
* @throws {Error} If the appium module root cannot be determined.
|
|
7
|
-
*/
|
|
8
|
-
export declare const getAppiumModuleRoot: (() => string) & _.MemoizedFunction;
|
|
9
|
-
/**
|
|
10
|
-
* Adler-32 checksum (see https://github.com/SheetJS/js-adler32).
|
|
11
|
-
*/
|
|
12
|
-
export declare function adler32(str: string, seed?: number | null): number;
|
|
13
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/build/lib/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAGvB,eAAO,MAAM,UAAU,qFAAoC,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,SAA6C,MAAM,sBAMjF,CAAC;AAEH;;GAEG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM,CAgDvE"}
|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