appium 2.0.0-beta.7 → 2.0.0-beta.71
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/LICENSE +1 -1
- package/README.md +149 -58
- package/build/lib/appium.d.ts +229 -0
- package/build/lib/appium.d.ts.map +1 -0
- package/build/lib/appium.js +678 -439
- package/build/lib/appium.js.map +1 -0
- package/build/lib/cli/args.d.ts +17 -0
- package/build/lib/cli/args.d.ts.map +1 -0
- package/build/lib/cli/args.js +263 -300
- package/build/lib/cli/args.js.map +1 -0
- package/build/lib/cli/driver-command.d.ts +102 -0
- package/build/lib/cli/driver-command.d.ts.map +1 -0
- package/build/lib/cli/driver-command.js +131 -81
- package/build/lib/cli/driver-command.js.map +1 -0
- package/build/lib/cli/extension-command.d.ts +402 -0
- package/build/lib/cli/extension-command.d.ts.map +1 -0
- package/build/lib/cli/extension-command.js +799 -383
- package/build/lib/cli/extension-command.js.map +1 -0
- package/build/lib/cli/extension.d.ts +23 -0
- package/build/lib/cli/extension.d.ts.map +1 -0
- package/build/lib/cli/extension.js +71 -60
- package/build/lib/cli/extension.js.map +1 -0
- package/build/lib/cli/parser.d.ts +84 -0
- package/build/lib/cli/parser.d.ts.map +1 -0
- package/build/lib/cli/parser.js +252 -148
- package/build/lib/cli/parser.js.map +1 -0
- package/build/lib/cli/plugin-command.d.ts +99 -0
- package/build/lib/cli/plugin-command.d.ts.map +1 -0
- package/build/lib/cli/plugin-command.js +125 -81
- package/build/lib/cli/plugin-command.js.map +1 -0
- package/build/lib/cli/utils.d.ts +29 -0
- package/build/lib/cli/utils.d.ts.map +1 -0
- package/build/lib/cli/utils.js +72 -51
- package/build/lib/cli/utils.js.map +1 -0
- package/build/lib/config-file.d.ts +100 -0
- package/build/lib/config-file.d.ts.map +1 -0
- package/build/lib/config-file.js +207 -0
- package/build/lib/config-file.js.map +1 -0
- package/build/lib/config.d.ts +49 -0
- package/build/lib/config.d.ts.map +1 -0
- package/build/lib/config.js +262 -223
- package/build/lib/config.js.map +1 -0
- package/build/lib/constants.d.ts +56 -0
- package/build/lib/constants.d.ts.map +1 -0
- package/build/lib/constants.js +73 -0
- package/build/lib/constants.js.map +1 -0
- package/build/lib/extension/driver-config.d.ts +82 -0
- package/build/lib/extension/driver-config.d.ts.map +1 -0
- package/build/lib/extension/driver-config.js +210 -0
- package/build/lib/extension/driver-config.js.map +1 -0
- package/build/lib/extension/extension-config.d.ts +270 -0
- package/build/lib/extension/extension-config.d.ts.map +1 -0
- package/build/lib/extension/extension-config.js +601 -0
- package/build/lib/extension/extension-config.js.map +1 -0
- package/build/lib/extension/index.d.ts +48 -0
- package/build/lib/extension/index.d.ts.map +1 -0
- package/build/lib/extension/index.js +105 -0
- package/build/lib/extension/index.js.map +1 -0
- 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 +134 -0
- package/build/lib/extension/manifest-migrations.js.map +1 -0
- package/build/lib/extension/manifest.d.ts +145 -0
- package/build/lib/extension/manifest.d.ts.map +1 -0
- package/build/lib/extension/manifest.js +528 -0
- package/build/lib/extension/manifest.js.map +1 -0
- package/build/lib/extension/package-changed.d.ts +11 -0
- package/build/lib/extension/package-changed.d.ts.map +1 -0
- package/build/lib/extension/package-changed.js +62 -0
- package/build/lib/extension/package-changed.js.map +1 -0
- package/build/lib/extension/plugin-config.d.ts +56 -0
- package/build/lib/extension/plugin-config.d.ts.map +1 -0
- package/build/lib/extension/plugin-config.js +102 -0
- package/build/lib/extension/plugin-config.js.map +1 -0
- package/build/lib/grid-register.d.ts +10 -0
- package/build/lib/grid-register.d.ts.map +1 -0
- package/build/lib/grid-register.js +122 -144
- package/build/lib/grid-register.js.map +1 -0
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +5 -17
- package/build/lib/logger.js.map +1 -0
- package/build/lib/logsink.d.ts +4 -0
- package/build/lib/logsink.d.ts.map +1 -0
- package/build/lib/logsink.js +189 -184
- package/build/lib/logsink.js.map +1 -0
- package/build/lib/main.d.ts +62 -0
- package/build/lib/main.d.ts.map +1 -0
- package/build/lib/main.js +388 -234
- package/build/lib/main.js.map +1 -0
- package/build/lib/schema/arg-spec.d.ts +143 -0
- package/build/lib/schema/arg-spec.d.ts.map +1 -0
- package/build/lib/schema/arg-spec.js +164 -0
- package/build/lib/schema/arg-spec.js.map +1 -0
- package/build/lib/schema/cli-args.d.ts +19 -0
- package/build/lib/schema/cli-args.d.ts.map +1 -0
- package/build/lib/schema/cli-args.js +220 -0
- package/build/lib/schema/cli-args.js.map +1 -0
- package/build/lib/schema/cli-transformers.d.ts +5 -0
- package/build/lib/schema/cli-transformers.d.ts.map +1 -0
- package/build/lib/schema/cli-transformers.js +124 -0
- package/build/lib/schema/cli-transformers.js.map +1 -0
- package/build/lib/schema/index.d.ts +3 -0
- package/build/lib/schema/index.d.ts.map +1 -0
- package/build/lib/schema/index.js +19 -0
- package/build/lib/schema/index.js.map +1 -0
- package/build/lib/schema/keywords.d.ts +24 -0
- package/build/lib/schema/keywords.d.ts.map +1 -0
- package/build/lib/schema/keywords.js +128 -0
- package/build/lib/schema/keywords.js.map +1 -0
- package/build/lib/schema/schema.d.ts +260 -0
- package/build/lib/schema/schema.d.ts.map +1 -0
- package/build/lib/schema/schema.js +640 -0
- package/build/lib/schema/schema.js.map +1 -0
- package/build/lib/utils.d.ts +266 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +349 -273
- package/build/lib/utils.js.map +1 -0
- package/build/types/cli.d.ts +134 -0
- package/build/types/cli.d.ts.map +1 -0
- package/build/types/cli.js +3 -0
- package/build/types/cli.js.map +1 -0
- package/build/types/index.d.ts +15 -0
- package/build/types/index.d.ts.map +1 -0
- 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 +21 -0
- package/build/types/manifest/index.d.ts.map +1 -0
- package/build/types/manifest/index.js +42 -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/build/types/manifest/v4.d.ts +139 -0
- package/build/types/manifest/v4.d.ts.map +1 -0
- package/build/types/manifest/v4.js +3 -0
- package/build/types/manifest/v4.js.map +1 -0
- package/driver.d.ts +1 -0
- package/driver.js +14 -0
- package/index.js +11 -0
- package/lib/appium.js +558 -186
- package/lib/cli/args.js +275 -407
- package/lib/cli/driver-command.js +132 -24
- package/lib/cli/extension-command.js +751 -272
- package/lib/cli/extension.js +47 -20
- package/lib/cli/parser.js +267 -95
- package/lib/cli/plugin-command.js +122 -22
- package/lib/cli/utils.js +24 -10
- package/lib/config-file.js +220 -0
- package/lib/config.js +243 -132
- package/lib/constants.js +79 -0
- package/lib/extension/driver-config.js +247 -0
- package/lib/extension/extension-config.js +709 -0
- package/lib/extension/index.js +116 -0
- package/lib/extension/manifest-migrations.js +136 -0
- package/lib/extension/manifest.js +580 -0
- package/lib/extension/package-changed.js +64 -0
- package/lib/extension/plugin-config.js +112 -0
- package/lib/grid-register.js +49 -35
- package/lib/logger.js +1 -2
- package/lib/logsink.js +59 -36
- package/lib/main.js +369 -104
- package/lib/schema/arg-spec.js +229 -0
- package/lib/schema/cli-args.js +241 -0
- package/lib/schema/cli-transformers.js +119 -0
- package/lib/schema/index.js +2 -0
- package/lib/schema/keywords.js +136 -0
- package/lib/schema/schema.js +725 -0
- package/lib/utils.js +289 -167
- package/package.json +84 -83
- package/plugin.d.ts +1 -0
- package/plugin.js +13 -0
- package/scripts/autoinstall-extensions.js +243 -0
- package/support.d.ts +1 -0
- package/support.js +13 -0
- package/tsconfig.json +25 -0
- package/types/cli.ts +193 -0
- package/types/index.ts +20 -0
- package/types/manifest/README.md +30 -0
- package/types/manifest/base.ts +158 -0
- package/types/manifest/index.ts +28 -0
- package/types/manifest/v3.ts +161 -0
- package/types/manifest/v4.ts +161 -0
- package/CHANGELOG.md +0 -3594
- package/bin/ios-webkit-debug-proxy-launcher.js +0 -71
- package/build/lib/cli/argparse-actions.js +0 -104
- package/build/lib/cli/npm.js +0 -200
- package/build/lib/cli/parser-helpers.js +0 -93
- package/build/lib/driver-config.js +0 -77
- package/build/lib/drivers.js +0 -99
- package/build/lib/extension-config.js +0 -253
- package/build/lib/plugin-config.js +0 -59
- package/build/lib/plugins.js +0 -14
- package/lib/cli/argparse-actions.js +0 -77
- package/lib/cli/npm.js +0 -175
- package/lib/cli/parser-helpers.js +0 -91
- package/lib/driver-config.js +0 -46
- package/lib/drivers.js +0 -84
- package/lib/extension-config.js +0 -209
- package/lib/plugin-config.js +0 -34
- package/lib/plugins.js +0 -10
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.normalizeConfig = exports.readConfigFile = exports.formatErrors = void 0;
|
|
7
|
+
const better_ajv_errors_1 = __importDefault(require("@sidvind/better-ajv-errors"));
|
|
8
|
+
const lilconfig_1 = require("lilconfig");
|
|
9
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
10
|
+
const yaml_1 = __importDefault(require("yaml"));
|
|
11
|
+
const schema_1 = require("./schema/schema");
|
|
12
|
+
/**
|
|
13
|
+
* lilconfig loader to handle `.yaml` files
|
|
14
|
+
* @type {import('lilconfig').LoaderSync}
|
|
15
|
+
*/
|
|
16
|
+
function yamlLoader(filepath, content) {
|
|
17
|
+
return yaml_1.default.parse(content);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A cache of the raw config file (a JSON string) at a filepath.
|
|
21
|
+
* This is used for better error reporting.
|
|
22
|
+
* Note that config files needn't be JSON, but it helps if they are.
|
|
23
|
+
* @type {Map<string,RawJson>}
|
|
24
|
+
*/
|
|
25
|
+
const rawConfig = new Map();
|
|
26
|
+
/**
|
|
27
|
+
* Custom JSON loader that caches the raw config file (for use with `better-ajv-errors`).
|
|
28
|
+
* If it weren't for this cache, this would be unnecessary.
|
|
29
|
+
* @type {import('lilconfig').LoaderSync}
|
|
30
|
+
*/
|
|
31
|
+
function jsonLoader(filepath, content) {
|
|
32
|
+
rawConfig.set(filepath, content);
|
|
33
|
+
return JSON.parse(content);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Loads a config file from an explicit path
|
|
37
|
+
* @param {LilconfigAsyncSearcher} lc - lilconfig instance
|
|
38
|
+
* @param {string} filepath - Path to config file
|
|
39
|
+
* @returns {Promise<import('lilconfig').LilconfigResult>}
|
|
40
|
+
*/
|
|
41
|
+
async function loadConfigFile(lc, filepath) {
|
|
42
|
+
try {
|
|
43
|
+
// removing "await" will cause any rejection to _not_ be caught in this block!
|
|
44
|
+
return await lc.load(filepath);
|
|
45
|
+
}
|
|
46
|
+
catch ( /** @type {unknown} */err) {
|
|
47
|
+
if ( /** @type {NodeJS.ErrnoException} */(err).code === 'ENOENT') {
|
|
48
|
+
/** @type {NodeJS.ErrnoException} */ (err).message = `Config file not found at user-provided path: ${filepath}`;
|
|
49
|
+
throw err;
|
|
50
|
+
}
|
|
51
|
+
else if (err instanceof SyntaxError) {
|
|
52
|
+
// generally invalid JSON
|
|
53
|
+
err.message = `Config file at user-provided path ${filepath} is invalid:\n${err.message}`;
|
|
54
|
+
throw err;
|
|
55
|
+
}
|
|
56
|
+
throw err;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Searches for a config file
|
|
61
|
+
* @param {LilconfigAsyncSearcher} lc - lilconfig instance
|
|
62
|
+
* @returns {Promise<import('lilconfig').LilconfigResult>}
|
|
63
|
+
*/
|
|
64
|
+
async function searchConfigFile(lc) {
|
|
65
|
+
return await lc.search();
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Given an array of errors and the result of loading a config file, generate a
|
|
69
|
+
* helpful string for the user.
|
|
70
|
+
*
|
|
71
|
+
* - If `opts` contains a `json` property, this should be the original JSON
|
|
72
|
+
* _string_ of the config file. This is only applicable if the config file
|
|
73
|
+
* was in JSON format. If present, it will associate line numbers with errors.
|
|
74
|
+
* - If `errors` happens to be empty, this will throw.
|
|
75
|
+
* @param {import('ajv').ErrorObject[]} errors - Non-empty array of errors. Required.
|
|
76
|
+
* @param {ReadConfigFileResult['config']|any} [config] -
|
|
77
|
+
* Configuration & metadata
|
|
78
|
+
* @param {FormatConfigErrorsOptions} [opts]
|
|
79
|
+
* @throws {TypeError} If `errors` is empty
|
|
80
|
+
* @returns {string}
|
|
81
|
+
*/
|
|
82
|
+
function formatErrors(errors = [], config = {}, opts = {}) {
|
|
83
|
+
if (errors && !errors.length) {
|
|
84
|
+
throw new TypeError('Array of errors must be non-empty');
|
|
85
|
+
}
|
|
86
|
+
return (0, better_ajv_errors_1.default)((0, schema_1.getSchema)(opts.schemaId), config, errors, {
|
|
87
|
+
json: opts.json,
|
|
88
|
+
format: 'cli',
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
exports.formatErrors = formatErrors;
|
|
92
|
+
/**
|
|
93
|
+
* Given an optional path, read a config file. Validates the config file.
|
|
94
|
+
*
|
|
95
|
+
* Call {@link validate} if you already have a config object.
|
|
96
|
+
* @param {string} [filepath] - Path to config file, if we have one
|
|
97
|
+
* @param {ReadConfigFileOptions} [opts] - Options
|
|
98
|
+
* @public
|
|
99
|
+
* @returns {Promise<ReadConfigFileResult>} Contains config and filepath, if found, and any errors
|
|
100
|
+
*/
|
|
101
|
+
async function readConfigFile(filepath, opts = {}) {
|
|
102
|
+
const lc = (0, lilconfig_1.lilconfig)('appium', {
|
|
103
|
+
loaders: {
|
|
104
|
+
'.yaml': yamlLoader,
|
|
105
|
+
'.yml': yamlLoader,
|
|
106
|
+
'.json': jsonLoader,
|
|
107
|
+
noExt: jsonLoader,
|
|
108
|
+
},
|
|
109
|
+
packageProp: 'appiumConfig',
|
|
110
|
+
});
|
|
111
|
+
const result = filepath ? await loadConfigFile(lc, filepath) : await searchConfigFile(lc);
|
|
112
|
+
if (result?.filepath && !result?.isEmpty) {
|
|
113
|
+
const { pretty = true } = opts;
|
|
114
|
+
try {
|
|
115
|
+
let configResult;
|
|
116
|
+
const errors = (0, schema_1.validate)(result.config);
|
|
117
|
+
if (lodash_1.default.isEmpty(errors)) {
|
|
118
|
+
configResult = { ...result, errors };
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
const reason = formatErrors(errors, result.config, {
|
|
122
|
+
json: rawConfig.get(result.filepath),
|
|
123
|
+
pretty,
|
|
124
|
+
});
|
|
125
|
+
configResult = reason ? { ...result, errors, reason } : { ...result, errors };
|
|
126
|
+
}
|
|
127
|
+
// normalize (to camel case) all top-level property names of the config file
|
|
128
|
+
configResult.config = normalizeConfig(/** @type {AppiumConfig} */ (configResult.config));
|
|
129
|
+
return configResult;
|
|
130
|
+
}
|
|
131
|
+
finally {
|
|
132
|
+
// clean up the raw config file cache, which is only kept to better report errors.
|
|
133
|
+
rawConfig.delete(result.filepath);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return result ?? {};
|
|
137
|
+
}
|
|
138
|
+
exports.readConfigFile = readConfigFile;
|
|
139
|
+
/**
|
|
140
|
+
* Convert schema property names to either a) the value of the `appiumCliDest` property, if any; or b) camel-case
|
|
141
|
+
* @param {AppiumConfig} config - Configuration object
|
|
142
|
+
* @returns {NormalizedAppiumConfig} New object with camel-cased keys (or `dest` keys).
|
|
143
|
+
*/
|
|
144
|
+
function normalizeConfig(config) {
|
|
145
|
+
const schema = (0, schema_1.getSchema)();
|
|
146
|
+
/**
|
|
147
|
+
* @param {AppiumConfig} config
|
|
148
|
+
* @param {string} [section] - Keypath (lodash `_.get()` style) to section of config. If omitted, assume root Appium config schema
|
|
149
|
+
* @todo Rewrite as a loop
|
|
150
|
+
* @returns Normalized section of config
|
|
151
|
+
*/
|
|
152
|
+
const normalize = (config, section) => {
|
|
153
|
+
const obj = lodash_1.default.isUndefined(section) ? config : lodash_1.default.get(config, section, config);
|
|
154
|
+
const mappedObj = lodash_1.default.mapKeys(obj, (__, prop) => lodash_1.default.get(schema, `properties.server.properties[${prop}].appiumCliDest`, lodash_1.default.camelCase(prop)));
|
|
155
|
+
return lodash_1.default.mapValues(mappedObj, (value, property) => {
|
|
156
|
+
const nextSection = section ? `${section}.${property}` : property;
|
|
157
|
+
return isSchemaTypeObject(schema.properties?.[property])
|
|
158
|
+
? normalize(config, nextSection)
|
|
159
|
+
: value;
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Returns `true` if the schema prop references an object, or if it's an object itself
|
|
164
|
+
* @param {import('ajv').SchemaObject|object} schema - Referencing schema object
|
|
165
|
+
*/
|
|
166
|
+
const isSchemaTypeObject = (schema) => Boolean(schema?.properties || schema?.type === 'object');
|
|
167
|
+
return normalize(config);
|
|
168
|
+
}
|
|
169
|
+
exports.normalizeConfig = normalizeConfig;
|
|
170
|
+
/**
|
|
171
|
+
* Result of calling {@link readConfigFile}.
|
|
172
|
+
* @typedef ReadConfigFileResult
|
|
173
|
+
* @property {import('ajv').ErrorObject[]} [errors] - Validation errors
|
|
174
|
+
* @property {string} [filepath] - The path to the config file, if found
|
|
175
|
+
* @property {boolean} [isEmpty] - If `true`, the config file exists but is empty
|
|
176
|
+
* @property {NormalizedAppiumConfig} [config] - The parsed configuration
|
|
177
|
+
* @property {string|import('@sidvind/better-ajv-errors').IOutputError[]} [reason] - Human-readable error messages and suggestions. If the `pretty` option is `true`, this will be a nice string to print.
|
|
178
|
+
*/
|
|
179
|
+
/**
|
|
180
|
+
* Options for {@link readConfigFile}.
|
|
181
|
+
* @typedef ReadConfigFileOptions
|
|
182
|
+
* @property {boolean} [pretty=true] If `false`, do not use color and fancy formatting in the `reason` property of the {@link ReadConfigFileResult}. The value of `reason` is then suitable for machine-reading.
|
|
183
|
+
*/
|
|
184
|
+
/**
|
|
185
|
+
* This is an `AsyncSearcher` which is inexplicably _not_ exported by the `lilconfig` type definition.
|
|
186
|
+
* @typedef {ReturnType<import('lilconfig')["lilconfig"]>} LilconfigAsyncSearcher
|
|
187
|
+
*/
|
|
188
|
+
/**
|
|
189
|
+
* The contents of an Appium config file. Generated from schema
|
|
190
|
+
* @typedef {import('@appium/types').AppiumConfig} AppiumConfig
|
|
191
|
+
*/
|
|
192
|
+
/**
|
|
193
|
+
* The contents of an Appium config file with camelcased property names (and using `appiumCliDest` value if present). Generated from {@link AppiumConfig}
|
|
194
|
+
* @typedef {import('@appium/types').NormalizedAppiumConfig} NormalizedAppiumConfig
|
|
195
|
+
*/
|
|
196
|
+
/**
|
|
197
|
+
* The string should be a raw JSON string.
|
|
198
|
+
* @typedef {string} RawJson
|
|
199
|
+
*/
|
|
200
|
+
/**
|
|
201
|
+
* Options for {@link formatErrors}.
|
|
202
|
+
* @typedef FormatConfigErrorsOptions
|
|
203
|
+
* @property {import('./config-file').RawJson} [json] - Raw JSON config (as string)
|
|
204
|
+
* @property {boolean} [pretty=true] - Whether to format errors as a CLI-friendly string
|
|
205
|
+
* @property {string} [schemaId] - Specific ID of a prop; otherwise entire schema
|
|
206
|
+
*/
|
|
207
|
+
//# sourceMappingURL=config-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-file.js","sourceRoot":"","sources":["../../lib/config-file.js"],"names":[],"mappings":";;;;;;AAAA,mFAAyD;AACzD,yCAAoC;AACpC,oDAAuB;AACvB,gDAAwB;AACxB,4CAAoD;AAEpD;;;GAGG;AACH,SAAS,UAAU,CAAC,QAAQ,EAAE,OAAO;IACnC,OAAO,cAAI,CAAC,K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AC,CAAC;gBACtD,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;gBAChC,CAAC,CAAC,KAAK,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF;;;OAGG;IACH,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,IAAI,MAAM,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC;IAEhG,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AA9BD,0CA8BC;AAED;;;;;;;;GAQG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;;;GAMG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export function checkNpmOk(): Promise<void>;
|
|
2
|
+
export type ParsedArgs = import('appium/types').ParsedArgs;
|
|
3
|
+
export type Args = import('appium/types').Args;
|
|
4
|
+
export type ArgSpec = import("./schema/arg-spec").ArgSpec<any>;
|
|
5
|
+
/**
|
|
6
|
+
* Mutable object containing Appium build information. By default it
|
|
7
|
+
* only contains the Appium version, but is updated with the build timestamp
|
|
8
|
+
* and git commit hash asynchronously as soon as `updateBuildInfo` is called
|
|
9
|
+
* and succeeds.
|
|
10
|
+
* @returns {import('appium/types').BuildInfo}
|
|
11
|
+
*/
|
|
12
|
+
export function getBuildInfo(): import('appium/types').BuildInfo;
|
|
13
|
+
export function checkNodeOk(): void;
|
|
14
|
+
export function showBuildInfo(): Promise<void>;
|
|
15
|
+
export function warnNodeDeprecations(): void;
|
|
16
|
+
/**
|
|
17
|
+
* @param {string} tmpDir
|
|
18
|
+
*/
|
|
19
|
+
export function validateTmpDir(tmpDir: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Returns k/v pairs of server arguments which are _not_ the defaults.
|
|
22
|
+
* @param {Args} parsedArgs
|
|
23
|
+
* @returns {Args}
|
|
24
|
+
*/
|
|
25
|
+
export function getNonDefaultServerArgs(parsedArgs: Args): Args;
|
|
26
|
+
/**
|
|
27
|
+
* @param {boolean} [useGithubApiFallback]
|
|
28
|
+
* @returns {Promise<string?>}
|
|
29
|
+
*/
|
|
30
|
+
export function getGitRev(useGithubApiFallback?: boolean | undefined): Promise<string | null>;
|
|
31
|
+
export const APPIUM_VER: string;
|
|
32
|
+
/**
|
|
33
|
+
* @param {boolean} [useGithubApiFallback]
|
|
34
|
+
*/
|
|
35
|
+
export function updateBuildInfo(useGithubApiFallback?: boolean | undefined): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Shows a breakdown of the current config after CLI params, config file loaded & defaults applied.
|
|
38
|
+
*
|
|
39
|
+
* The actual shape of `preConfigParsedArgs` and `defaults` does not matter for the purposes of this function,
|
|
40
|
+
* but it's intended to be called with values of type {@link ParsedArgs} and `DefaultValues<true>`, respectively.
|
|
41
|
+
*
|
|
42
|
+
* @param {Partial<ParsedArgs>} nonDefaultPreConfigParsedArgs - Parsed CLI args (or param to `init()`) before config & defaults applied
|
|
43
|
+
* @param {import('./config-file').ReadConfigFileResult} configResult - Result of attempting to load a config file. _Must_ be normalized
|
|
44
|
+
* @param {Partial<ParsedArgs>} defaults - Configuration defaults from schemas
|
|
45
|
+
* @param {ParsedArgs} parsedArgs - Entire parsed args object
|
|
46
|
+
*/
|
|
47
|
+
export function showConfig(nonDefaultPreConfigParsedArgs: Partial<ParsedArgs>, configResult: import('./config-file').ReadConfigFileResult, defaults: Partial<ParsedArgs>, parsedArgs: ParsedArgs): void;
|
|
48
|
+
export const rootDir: string;
|
|
49
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.js"],"names":[],"mappings":"AAuJA,4CAOC;yBAyLY,OAAO,cAAc,EAAE,UAAU;mBACjC,OAAO,cAAc,EAAE,IAAI;;AArNxC;;;;;;GAMG;AACH,gCAFa,OAAO,cAAc,EAAE,SAAS,CAI5C;AAED,oCAOC;AAwBD,+CAGC;AAhBD,6CAWC;AA6ID;;GAEG;AACH,uCAFW,MAAM,iBAWhB;AAlJD;;;;GAIG;AACH,oDAHW,IAAI,GACF,IAAI,CAmFhB;AAtMD;;;GAGG;AACH,uEAFa,QAAQ,MAAM,QAAE,CA6B5B;AAtFD,gCAAsC;AA6BtC;;GAEG;AACH,2FAUC;AAmOD;;;;;;;;;;GAUG;AACH,0DALW,QAAQ,UAAU,CAAC,gBACnB,OAAO,eAAe,EAAE,oBAAoB,YAC5C,QAAQ,UAAU,CAAC,cACnB,UAAU,QAqBpB;AAgBD,6BAAuC"}
|