appium 2.0.0-beta.3 → 2.0.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -11
- package/build/lib/appium.d.ts +215 -0
- package/build/lib/appium.d.ts.map +1 -0
- package/build/lib/appium.js +238 -132
- package/build/lib/cli/args.d.ts +20 -0
- package/build/lib/cli/args.d.ts.map +1 -0
- package/build/lib/cli/args.js +96 -282
- package/build/lib/cli/driver-command.d.ts +36 -0
- package/build/lib/cli/driver-command.d.ts.map +1 -0
- package/build/lib/cli/driver-command.js +19 -12
- package/build/lib/cli/extension-command.d.ts +345 -0
- package/build/lib/cli/extension-command.d.ts.map +1 -0
- package/build/lib/cli/extension-command.js +171 -96
- package/build/lib/cli/extension.d.ts +14 -0
- package/build/lib/cli/extension.d.ts.map +1 -0
- package/build/lib/cli/extension.js +31 -16
- package/build/lib/cli/parser.d.ts +79 -0
- package/build/lib/cli/parser.d.ts.map +1 -0
- package/build/lib/cli/parser.js +152 -95
- package/build/lib/cli/plugin-command.d.ts +39 -0
- package/build/lib/cli/plugin-command.d.ts.map +1 -0
- package/build/lib/cli/plugin-command.js +18 -13
- 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 +27 -3
- 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 +136 -0
- package/build/lib/config.d.ts +40 -0
- package/build/lib/config.d.ts.map +1 -0
- package/build/lib/config.js +92 -67
- package/build/lib/constants.d.ts +48 -0
- package/build/lib/constants.d.ts.map +1 -0
- package/build/lib/constants.js +60 -0
- package/build/lib/extension/driver-config.d.ts +84 -0
- package/build/lib/extension/driver-config.d.ts.map +1 -0
- package/build/lib/extension/driver-config.js +190 -0
- package/build/lib/extension/extension-config.d.ts +170 -0
- package/build/lib/extension/extension-config.d.ts.map +1 -0
- package/build/lib/extension/extension-config.js +297 -0
- package/build/lib/extension/index.d.ts +39 -0
- package/build/lib/extension/index.d.ts.map +1 -0
- package/build/lib/extension/index.js +77 -0
- package/build/lib/extension/manifest.d.ts +174 -0
- package/build/lib/extension/manifest.d.ts.map +1 -0
- package/build/lib/extension/manifest.js +246 -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 +68 -0
- package/build/lib/extension/plugin-config.d.ts +62 -0
- package/build/lib/extension/plugin-config.d.ts.map +1 -0
- package/build/lib/extension/plugin-config.js +87 -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 +21 -25
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +4 -6
- package/build/lib/logsink.d.ts +4 -0
- package/build/lib/logsink.d.ts.map +1 -0
- package/build/lib/logsink.js +12 -16
- package/build/lib/main.d.ts +51 -0
- package/build/lib/main.d.ts.map +1 -0
- package/build/lib/main.js +174 -82
- 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 +119 -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 +180 -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 +74 -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 +34 -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 +70 -0
- package/build/lib/schema/schema.d.ts +259 -0
- package/build/lib/schema/schema.d.ts.map +1 -0
- package/build/lib/schema/schema.js +452 -0
- package/build/lib/utils.d.ts +66 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +35 -139
- package/build/tsconfig.tsbuildinfo +1 -0
- package/index.js +11 -0
- package/lib/appium-config.schema.json +278 -0
- package/lib/appium.js +398 -155
- package/lib/cli/args.js +174 -377
- package/lib/cli/driver-command.js +22 -7
- package/lib/cli/extension-command.js +372 -177
- package/lib/cli/extension.js +32 -10
- package/lib/cli/parser.js +252 -83
- package/lib/cli/plugin-command.js +19 -6
- package/lib/cli/utils.js +22 -2
- package/lib/config-file.js +223 -0
- package/lib/config.js +169 -69
- package/lib/constants.js +78 -0
- package/lib/extension/driver-config.js +249 -0
- package/lib/extension/extension-config.js +458 -0
- package/lib/extension/index.js +102 -0
- package/lib/extension/manifest.js +486 -0
- package/lib/extension/package-changed.js +63 -0
- package/lib/extension/plugin-config.js +113 -0
- package/lib/grid-register.js +25 -22
- package/lib/logger.js +1 -1
- package/lib/logsink.js +14 -7
- package/lib/main.js +233 -83
- package/lib/schema/arg-spec.js +232 -0
- package/lib/schema/cli-args.js +261 -0
- package/lib/schema/cli-transformers.js +122 -0
- package/lib/schema/index.js +2 -0
- package/lib/schema/keywords.js +134 -0
- package/lib/schema/schema.js +734 -0
- package/lib/utils.js +85 -129
- package/package.json +62 -85
- package/scripts/postinstall.js +71 -0
- package/types/appium-manifest.d.ts +61 -0
- package/types/cli.d.ts +134 -0
- package/types/extension.d.ts +56 -0
- package/types/external-manifest.d.ts +58 -0
- package/types/index.d.ts +7 -0
- package/CHANGELOG.md +0 -3515
- package/bin/ios-webkit-debug-proxy-launcher.js +0 -71
- package/build/lib/cli/npm.js +0 -206
- package/build/lib/cli/parser-helpers.js +0 -82
- package/build/lib/driver-config.js +0 -77
- package/build/lib/drivers.js +0 -96
- package/build/lib/extension-config.js +0 -251
- package/build/lib/plugin-config.js +0 -59
- package/build/lib/plugins.js +0 -14
- package/lib/cli/npm.js +0 -183
- package/lib/cli/parser-helpers.js +0 -79
- package/lib/driver-config.js +0 -46
- package/lib/drivers.js +0 -81
- package/lib/extension-config.js +0 -208
- package/lib/plugin-config.js +0 -34
- package/lib/plugins.js +0 -10
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
|
|
2
|
+
import { transformers } from './cli-transformers';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Collection of keyword definitions to add to the singleton `Ajv` instance.
|
|
6
|
+
* @type {Record<string,KeywordDefinition>}
|
|
7
|
+
*/
|
|
8
|
+
export const keywords = {
|
|
9
|
+
/**
|
|
10
|
+
* Keyword to provide a list of command alias names for the CLI.
|
|
11
|
+
*
|
|
12
|
+
* If defined, there must be at least one item in the array and it must be non-empty.
|
|
13
|
+
* All items in the array must be unique.
|
|
14
|
+
*
|
|
15
|
+
* @todo Avoid alias collisions!
|
|
16
|
+
* @type {KeywordDefinition}
|
|
17
|
+
* @example
|
|
18
|
+
* {appiumCliAliases: ['B', 'bobby', 'robert']}
|
|
19
|
+
*/
|
|
20
|
+
appiumCliAliases: {
|
|
21
|
+
keyword: 'appiumCliAliases',
|
|
22
|
+
metaSchema: {
|
|
23
|
+
type: 'array',
|
|
24
|
+
items: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
minLength: 1,
|
|
27
|
+
},
|
|
28
|
+
minItems: 1,
|
|
29
|
+
uniqueItems: true,
|
|
30
|
+
description: 'List of aliases for the argument. Aliases shorter than three (3) characters will be prefixed with a single dash; otherwise two (2).'
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* Keyword to provide the name of the property in the destination (parsed
|
|
35
|
+
* args) object. By default, this value will be whatever the property name is,
|
|
36
|
+
* but camel-cased. If a flag needs something _other_ than just camel-casing,
|
|
37
|
+
* use this.
|
|
38
|
+
* @type {KeywordDefinition}
|
|
39
|
+
* @example
|
|
40
|
+
* // for prop 'no-color'
|
|
41
|
+
* {appiumCliDest: 'NOCOLOR'} // value will be stored as property `NOCOLOR` instead of `noColor`
|
|
42
|
+
*/
|
|
43
|
+
appiumCliDest: {
|
|
44
|
+
keyword: 'appiumCliDest',
|
|
45
|
+
metaSchema: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
minLength: 1,
|
|
48
|
+
description: 'Name of the associated property in the parsed CLI arguments object'
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* CLI-specific description of the property. Sometimes the allowed type can
|
|
54
|
+
* be different enough on the CLI that providing a description written for a
|
|
55
|
+
* config file context wouldn't make sense.
|
|
56
|
+
* @type {KeywordDefinition}
|
|
57
|
+
* @example
|
|
58
|
+
* {appiumCliDescription: 'This is a comma-delimited string, but in the config file it is an array'}
|
|
59
|
+
*/
|
|
60
|
+
appiumCliDescription: {
|
|
61
|
+
keyword: 'appiumCliDescription',
|
|
62
|
+
schemaType: 'string',
|
|
63
|
+
metaSchema: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
minLength: 1,
|
|
66
|
+
description: 'Description to provide in the --help text of the CLI. Overrides `description`'
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Transformers for CLI args. These usually take strings then do something with them, like
|
|
72
|
+
* read a file or parse further.
|
|
73
|
+
* @type {KeywordDefinition}
|
|
74
|
+
*/
|
|
75
|
+
appiumCliTransformer: {
|
|
76
|
+
keyword: 'appiumCliTransformer',
|
|
77
|
+
metaSchema: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
enum: Object.keys(transformers),
|
|
80
|
+
description: 'The name of a custom transformer to run against the value as provided via the CLI.'
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Flag to tell Appium to _not_ provide this property as a CLI argument.
|
|
86
|
+
* @type {KeywordDefinition}
|
|
87
|
+
*/
|
|
88
|
+
appiumCliIgnored: {
|
|
89
|
+
keyword: 'appiumCliIgnored',
|
|
90
|
+
metaSchema: {
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
description: 'If `true`, Appium will not provide this property as a CLI argument. This is NOT the same as a "hidden" argument.',
|
|
93
|
+
enum: [true]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Mark this property as deprecated.
|
|
99
|
+
* @type {KeywordDefinition}
|
|
100
|
+
*/
|
|
101
|
+
appiumDeprecated: {
|
|
102
|
+
keyword: 'appiumDeprecated',
|
|
103
|
+
metaSchema: {
|
|
104
|
+
type: 'boolean',
|
|
105
|
+
description: 'If `true`, this property will be displayed as "deprecated" to the user',
|
|
106
|
+
enum: [true],
|
|
107
|
+
$comment: 'JSON schema draft-2019-09 keyword `deprecated` serves the same purpose. This keyword should itself be deprecated if we move to draft-2019-09!'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* These are the valid values for the `appiumCliTransformer` keyword.
|
|
114
|
+
* Unfortunately, TS cannot infer this in a JS context. In TS, we'd use
|
|
115
|
+
* `as const` when defining `argTransformers`, then get `keyof typeof argTransformers`. alas.
|
|
116
|
+
* @typedef {'csv'|'json'} AppiumCliTransformerName
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* These are the custom keywords that Appium recognizes.
|
|
121
|
+
*
|
|
122
|
+
* @typedef AppiumJSONSchemaKeywords
|
|
123
|
+
* @property {string} [appiumCliDest]
|
|
124
|
+
* @property {string} [appiumCliDescription]
|
|
125
|
+
* @property {string[]} [appiumCliAliases]
|
|
126
|
+
* @property {boolean} [appiumCliIgnored]
|
|
127
|
+
* @property {AppiumCliTransformerName} [appiumCliTransformer]
|
|
128
|
+
* @property {boolean} [appiumDeprecated]
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @typedef {import('ajv').KeywordDefinition} KeywordDefinition
|
|
134
|
+
*/
|