@appium/types 0.9.1 → 0.10.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/action.d.ts +17 -16
- package/build/lib/action.d.ts.map +1 -1
- package/build/lib/action.js.map +1 -1
- package/build/lib/appium-config.d.ts +27 -27
- package/build/lib/appium-config.d.ts.map +1 -1
- package/build/lib/capabilities.d.ts +16 -16
- package/build/lib/capabilities.d.ts.map +1 -1
- package/build/lib/config.d.ts +10 -10
- package/build/lib/config.d.ts.map +1 -1
- package/build/lib/constraints.d.ts +20 -20
- package/build/lib/constraints.js +1 -1
- package/build/lib/constraints.js.map +1 -1
- package/build/lib/driver.d.ts +15 -14
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/index.d.ts +13 -13
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/plugin.d.ts +3 -3
- package/build/lib/plugin.d.ts.map +1 -1
- package/build/lib/standard-caps.d.ts +3 -3
- package/build/lib/standard-caps.d.ts.map +1 -1
- package/lib/action.ts +6 -12
- package/lib/constraints.js +1 -1
- package/lib/driver.ts +3 -1
- package/package.json +4 -4
- package/build/lib/extension.d.ts +0 -71
- package/build/lib/extension.d.ts.map +0 -1
- package/build/lib/extension.js +0 -3
- package/build/lib/extension.js.map +0 -1
- package/build/lib/logger.d.ts +0 -39
- package/build/lib/logger.d.ts.map +0 -1
- package/build/lib/logger.js +0 -3
- package/build/lib/logger.js.map +0 -1
- package/build/lib/server.d.ts +0 -21
- package/build/lib/server.d.ts.map +0 -1
- package/build/lib/server.js +0 -3
- package/build/lib/server.js.map +0 -1
- package/build/lib/util.d.ts +0 -16
- package/build/lib/util.d.ts.map +0 -1
- package/build/lib/util.js +0 -3
- package/build/lib/util.js.map +0 -1
package/build/lib/action.d.ts
CHANGED
|
@@ -3,34 +3,35 @@
|
|
|
3
3
|
* Portions Copyright (c) 2017 Igor Muchychka
|
|
4
4
|
* @see https://github.com/w3c-webdriver/w3c-webdriver
|
|
5
5
|
*/
|
|
6
|
-
export interface Element {
|
|
7
|
-
|
|
6
|
+
export interface Element<Id extends string = string> {
|
|
7
|
+
ELEMENT?: Id;
|
|
8
|
+
'element-6066-11e4-a52e-4f735466cecf': Id;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* @group Actions
|
|
11
12
|
*/
|
|
12
|
-
export
|
|
13
|
+
export type PauseAction = {
|
|
13
14
|
type: 'pause';
|
|
14
15
|
duration: number;
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* @group Actions
|
|
18
19
|
*/
|
|
19
|
-
export
|
|
20
|
+
export type KeyDownAction = {
|
|
20
21
|
type: 'keyDown';
|
|
21
22
|
value: Key | string;
|
|
22
23
|
};
|
|
23
24
|
/**
|
|
24
25
|
* @group Actions
|
|
25
26
|
*/
|
|
26
|
-
export
|
|
27
|
+
export type KeyUpAction = {
|
|
27
28
|
type: 'keyUp';
|
|
28
29
|
value: Key | string;
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
31
32
|
* @group Actions
|
|
32
33
|
*/
|
|
33
|
-
export
|
|
34
|
+
export type PointerMoveAction = {
|
|
34
35
|
type: 'pointerMove';
|
|
35
36
|
x: number;
|
|
36
37
|
y: number;
|
|
@@ -40,33 +41,33 @@ export declare type PointerMoveAction = {
|
|
|
40
41
|
/**
|
|
41
42
|
* @group Actions
|
|
42
43
|
*/
|
|
43
|
-
export
|
|
44
|
+
export type PointerUpAction = {
|
|
44
45
|
type: 'pointerUp';
|
|
45
46
|
button: number;
|
|
46
47
|
};
|
|
47
48
|
/**
|
|
48
49
|
* @group Actions
|
|
49
50
|
*/
|
|
50
|
-
export
|
|
51
|
+
export type PointerDownAction = {
|
|
51
52
|
type: 'pointerDown';
|
|
52
53
|
button: number;
|
|
53
54
|
};
|
|
54
55
|
/**
|
|
55
56
|
* @group Actions
|
|
56
57
|
*/
|
|
57
|
-
export
|
|
58
|
+
export type NullAction = PauseAction;
|
|
58
59
|
/**
|
|
59
60
|
* @group Actions
|
|
60
61
|
*/
|
|
61
|
-
export
|
|
62
|
+
export type KeyAction = PauseAction | KeyDownAction | KeyUpAction;
|
|
62
63
|
/**
|
|
63
64
|
* @group Actions
|
|
64
65
|
*/
|
|
65
|
-
export
|
|
66
|
+
export type PointerAction = PauseAction | PointerMoveAction | PointerUpAction | PointerDownAction;
|
|
66
67
|
/**
|
|
67
68
|
* @group Actions
|
|
68
69
|
*/
|
|
69
|
-
export
|
|
70
|
+
export type NullActionSequence = {
|
|
70
71
|
type: 'none';
|
|
71
72
|
id: string;
|
|
72
73
|
actions: NullAction[];
|
|
@@ -74,7 +75,7 @@ export declare type NullActionSequence = {
|
|
|
74
75
|
/**
|
|
75
76
|
* @group Actions
|
|
76
77
|
*/
|
|
77
|
-
export
|
|
78
|
+
export type KeyActionSequence = {
|
|
78
79
|
type: 'key';
|
|
79
80
|
id: string;
|
|
80
81
|
actions: KeyAction[];
|
|
@@ -82,13 +83,13 @@ export declare type KeyActionSequence = {
|
|
|
82
83
|
/**
|
|
83
84
|
* @group Actions
|
|
84
85
|
*/
|
|
85
|
-
export
|
|
86
|
+
export type PointerParameters = {
|
|
86
87
|
pointerType: 'mouse' | 'pen' | 'touch';
|
|
87
88
|
};
|
|
88
89
|
/**
|
|
89
90
|
* @group Actions
|
|
90
91
|
*/
|
|
91
|
-
export
|
|
92
|
+
export type PointerActionSequence = {
|
|
92
93
|
type: 'pointer';
|
|
93
94
|
id: string;
|
|
94
95
|
actions: PointerAction[];
|
|
@@ -97,7 +98,7 @@ export declare type PointerActionSequence = {
|
|
|
97
98
|
/**
|
|
98
99
|
* @group Actions
|
|
99
100
|
*/
|
|
100
|
-
export
|
|
101
|
+
export type ActionSequence = NullActionSequence | KeyActionSequence | PointerActionSequence;
|
|
101
102
|
/**
|
|
102
103
|
* @group Actions
|
|
103
104
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../lib/action.ts"],"names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AAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,WAAW;IACpB,MAAM,WAAW;IACjB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,QAAQ,WAAW;IACnB,GAAG,WAAW;IACd,SAAS,WAAW;IACpB,QAAQ,WAAW;IACnB,OAAO,WAAW;IAClB,MAAM,WAAW;IACjB,EAAE,WAAW;IACb,EAAE,WAAW;IACb,EAAE,WAAW;IACb,EAAE,WAAW;IACb,EAAE,WAAW;IACb,EAAE,WAAW;IACb,EAAE,WAAW;IACb,EAAE,WAAW;IACb,EAAE,WAAW;IACb,GAAG,WAAW;IACd,GAAG,WAAW;IACd,GAAG,WAAW;IACd,IAAI,WAAW;IACf,cAAc,WAAW;IACzB,OAAO,WAAW;IAClB,SAAS,WAAW;IACpB,KAAK,WAAW;IAChB,MAAM,WAAW;IACjB,QAAQ,WAAW;IACnB,UAAU,WAAW;IACrB,KAAK,WAAW;IAChB,MAAM,WAAW;IACjB,WAAW,WAAW;IACtB,SAAS,WAAW;IACpB,YAAY,WAAW;IACvB,WAAW,WAAW;IACtB,QAAQ,WAAW;IACnB,QAAQ,WAAW;CACpB"}
|
package/build/lib/action.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../lib/action.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../lib/action.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAiHH;;GAEG;AACH,IAAY,GAuEX;AAvED,WAAY,GAAG;IACb,sBAAe,CAAA;IACf,wBAAiB,CAAA;IACjB,sBAAe,CAAA;IACf,2BAAoB,CAAA;IACpB,qBAAc,CAAA;IACd,u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;IACtB,0BAAmB,CAAA;IACnB,0BAAmB,CAAA;AACrB,CAAC,EAvEW,GAAG,GAAH,WAAG,KAAH,WAAG,QAuEd"}
|
|
@@ -6,51 +6,51 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* IP address to listen on
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type AddressConfig = string;
|
|
10
10
|
/**
|
|
11
11
|
* Whether the Appium server should allow web browser connections from any host
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type AllowCorsConfig = boolean;
|
|
14
14
|
/**
|
|
15
15
|
* Set which insecure features are allowed to run in this server's sessions. Features are defined on a driver level; see documentation for more details. Note that features defined via "deny-insecure" will be disabled, even if also listed here. If string, a path to a text file containing policy or a comma-delimited list.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type AllowInsecureConfig = string[];
|
|
18
18
|
/**
|
|
19
19
|
* Base path to use as the prefix for all webdriver routes running on the server
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export type BasePathConfig = string;
|
|
22
22
|
/**
|
|
23
23
|
* Callback IP address (default: same as "address")
|
|
24
24
|
*/
|
|
25
|
-
export
|
|
25
|
+
export type CallbackAddressConfig = string;
|
|
26
26
|
/**
|
|
27
27
|
* Callback port (default: same as "port")
|
|
28
28
|
*/
|
|
29
|
-
export
|
|
29
|
+
export type CallbackPortConfig = number;
|
|
30
30
|
/**
|
|
31
31
|
* Add exaggerated spacing in logs to help with visual inspection
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
33
|
+
export type DebugLogSpacingConfig = boolean;
|
|
34
34
|
/**
|
|
35
35
|
* Set which insecure features are not allowed to run in this server's sessions. Features are defined on a driver level; see documentation for more details. Features listed here will not be enabled even if also listed in "allow-insecure", and even if "relaxed-security" is enabled. If string, a path to a text file containing policy or a comma-delimited list.
|
|
36
36
|
*/
|
|
37
|
-
export
|
|
37
|
+
export type DenyInsecureConfig = string[];
|
|
38
38
|
/**
|
|
39
39
|
* Number of seconds the Appium server should apply as both the keep-alive timeout and the connection timeout for all requests. A value of 0 disables the timeout.
|
|
40
40
|
*/
|
|
41
|
-
export
|
|
41
|
+
export type KeepAliveTimeoutConfig = number;
|
|
42
42
|
/**
|
|
43
43
|
* Use local timezone for timestamps
|
|
44
44
|
*/
|
|
45
|
-
export
|
|
45
|
+
export type LocalTimezoneConfig = boolean;
|
|
46
46
|
/**
|
|
47
47
|
* Also send log output to this file
|
|
48
48
|
*/
|
|
49
|
-
export
|
|
49
|
+
export type LogConfig = string;
|
|
50
50
|
/**
|
|
51
51
|
* Log filtering rule
|
|
52
52
|
*/
|
|
53
|
-
export
|
|
53
|
+
export type LogFilter = {
|
|
54
54
|
/**
|
|
55
55
|
* Replacement string for matched text
|
|
56
56
|
*/
|
|
@@ -64,63 +64,63 @@ export declare type LogFilter = {
|
|
|
64
64
|
/**
|
|
65
65
|
* One or more log filtering rules
|
|
66
66
|
*/
|
|
67
|
-
export
|
|
67
|
+
export type LogFiltersConfig = LogFilter[];
|
|
68
68
|
/**
|
|
69
69
|
* Log level (console[:file])
|
|
70
70
|
*/
|
|
71
|
-
export
|
|
71
|
+
export type LogLevelConfig = "info" | "info:debug" | "info:info" | "info:warn" | "info:error" | "warn" | "warn:debug" | "warn:info" | "warn:warn" | "warn:error" | "error" | "error:debug" | "error:info" | "error:warn" | "error:error" | "debug" | "debug:debug" | "debug:info" | "debug:warn" | "debug:error";
|
|
72
72
|
/**
|
|
73
73
|
* Do not use color in console output
|
|
74
74
|
*/
|
|
75
|
-
export
|
|
75
|
+
export type LogNoColorsConfig = boolean;
|
|
76
76
|
/**
|
|
77
77
|
* Show timestamps in console output
|
|
78
78
|
*/
|
|
79
|
-
export
|
|
79
|
+
export type LogTimestampConfig = boolean;
|
|
80
80
|
/**
|
|
81
81
|
* Add long stack traces to log entries. Recommended for debugging only.
|
|
82
82
|
*/
|
|
83
|
-
export
|
|
83
|
+
export type LongStacktraceConfig = boolean;
|
|
84
84
|
/**
|
|
85
85
|
* Do not check that needed files are readable and/or writable
|
|
86
86
|
*/
|
|
87
|
-
export
|
|
87
|
+
export type NoPermsCheckConfig = boolean;
|
|
88
88
|
/**
|
|
89
89
|
* Port to listen on
|
|
90
90
|
*/
|
|
91
|
-
export
|
|
91
|
+
export type PortConfig = number;
|
|
92
92
|
/**
|
|
93
93
|
* Disable additional security checks, so it is possible to use some advanced features, provided by drivers supporting this option. Only enable it if all the clients are in the trusted network and it's not the case if a client could potentially break out of the session sandbox. Specific features can be overridden by using "deny-insecure"
|
|
94
94
|
*/
|
|
95
|
-
export
|
|
95
|
+
export type RelaxedSecurityConfig = boolean;
|
|
96
96
|
/**
|
|
97
97
|
* Enables session override (clobbering)
|
|
98
98
|
*/
|
|
99
|
-
export
|
|
99
|
+
export type SessionOverrideConfig = boolean;
|
|
100
100
|
/**
|
|
101
101
|
* Cause sessions to fail if desired caps are sent in that Appium does not recognize as valid for the selected device
|
|
102
102
|
*/
|
|
103
|
-
export
|
|
103
|
+
export type StrictCapsConfig = boolean;
|
|
104
104
|
/**
|
|
105
105
|
* Absolute path to directory Appium can use to manage temp files. Defaults to C:\Windows\Temp on Windows and /tmp otherwise.
|
|
106
106
|
*/
|
|
107
|
-
export
|
|
107
|
+
export type TmpConfig = string;
|
|
108
108
|
/**
|
|
109
109
|
* Absolute path to directory Appium can use to save iOS instrument traces; defaults to <tmp>/appium-instruments
|
|
110
110
|
*/
|
|
111
|
-
export
|
|
111
|
+
export type TraceDirConfig = string;
|
|
112
112
|
/**
|
|
113
113
|
* A list of drivers to activate. By default, all installed drivers will be activated.
|
|
114
114
|
*/
|
|
115
|
-
export
|
|
115
|
+
export type UseDriversConfig = string[];
|
|
116
116
|
/**
|
|
117
117
|
* A list of plugins to activate. To activate all plugins, the value should be an array with a single item "all".
|
|
118
118
|
*/
|
|
119
|
-
export
|
|
119
|
+
export type UsePluginsConfig = string[];
|
|
120
120
|
/**
|
|
121
121
|
* Also send log output to this http listener
|
|
122
122
|
*/
|
|
123
|
-
export
|
|
123
|
+
export type WebhookConfig = string;
|
|
124
124
|
/**
|
|
125
125
|
* A schema for Appium configuration files
|
|
126
126
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appium-config.d.ts","sourceRoot":"","sources":["../../lib/appium-config.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"appium-config.d.ts","sourceRoot":"","sources":["../../lib/appium-config.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AACnC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC;AACtC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,EAAE,CAAC;AAC3C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AACpC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAC3C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACxC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAC5C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,EAAE,CAAC;AAC1C;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAC5C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAC1C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAC/B;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,GAAG,CAAC,aAAa,GAAG,cAAc,CAAC,CAAC;AACrC;;GAEG;AACH,MAAM,MAAM,gBAAg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tB;AACD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AACD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AACD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AACD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AACD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB"}
|
|
@@ -2,19 +2,19 @@ import { StandardCapabilities } from './standard-caps';
|
|
|
2
2
|
import { StringRecord, Constraint, Constraints } from '.';
|
|
3
3
|
import { BaseDriverCapConstraints } from './constraints';
|
|
4
4
|
export { StandardCapabilities };
|
|
5
|
-
export
|
|
5
|
+
export type W3C_APPIUM_PREFIX = 'appium';
|
|
6
6
|
/**
|
|
7
7
|
* Base capabilities as derived from {@linkcode BaseDriverCapConstraints}.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type BaseCapabilities = ConstraintsToCaps<BaseDriverCapConstraints>;
|
|
10
10
|
/**
|
|
11
11
|
* Like {@linkcode BaseCapabilities}, except all Appium-specific keys are namespaced.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type BaseNSCapabilities = CapsToNSCaps<ConstraintsToCaps<BaseDriverCapConstraints>>;
|
|
14
14
|
/**
|
|
15
15
|
* Given a {@linkcode Constraint} `C` and a type `T`, see if `inclusion`/`inclusionCaseInsensitive` is present, and create a union of its allowed literals; otherwise just use `T`.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
type ConstraintChoice<C extends Constraint, T> = C['inclusionCaseInsensitive'] extends ReadonlyArray<T> ? AnyCase<C['inclusionCaseInsensitive'][number]> : C['inclusion'] extends ReadonlyArray<T> ? C['inclusion'][number] : T;
|
|
18
18
|
/**
|
|
19
19
|
* Given {@linkcode Constraint} `C`, determine the associated type of the capability.
|
|
20
20
|
*
|
|
@@ -24,32 +24,32 @@ declare type ConstraintChoice<C extends Constraint, T> = C['inclusionCaseInsensi
|
|
|
24
24
|
* - If `isArray` is `true`, the type is always of type `string[]`. If this is incorrect, then it will be `any[]`.
|
|
25
25
|
* - There is no way to express the shape of an object if `ifObject` is `true`.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
type ConstraintToCapKind<C extends Constraint> = C['isString'] extends true ? ConstraintChoice<C, string> : C['isNumber'] extends true ? ConstraintChoice<C, number> : C['isBoolean'] extends true ? boolean : C['isArray'] extends true ? string[] : C['isObject'] extends true ? object : any;
|
|
28
28
|
/**
|
|
29
29
|
* Given {@linkcode Constraint} `C`, determine if it is required or optional.
|
|
30
30
|
*
|
|
31
31
|
* In practice, _all_ capabilities are considered optional per types, but various errors might be thrown if some are not present.
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
33
|
+
export type ConstraintToCap<C extends Constraint> = C['presence'] extends true | {
|
|
34
34
|
allowEmpty: boolean;
|
|
35
35
|
} ? ConstraintToCapKind<C> : ConstraintToCapKind<C> | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Given `string` `T`, this is a case-insensitive version of `T`.
|
|
38
38
|
*/
|
|
39
|
-
export
|
|
39
|
+
export type AnyCase<T extends string> = string extends T ? string : T extends `${infer F1}${infer F2}${infer R}` ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}` : T extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}` : '';
|
|
40
40
|
/**
|
|
41
41
|
* Given {@linkcode StringRecord} `T` and namespace string `NS`, a type with the key names prefixed by `${NS}:` _except_ for standard capabilities. `NS` defaults to `appium`.
|
|
42
42
|
*
|
|
43
43
|
* If `T` is already namespaced, well, it'll get _double_-namespaced.
|
|
44
44
|
*/
|
|
45
|
-
export
|
|
45
|
+
export type CapsToNSCaps<T extends StringRecord, NS extends string = W3C_APPIUM_PREFIX> = {
|
|
46
46
|
[K in keyof T as K extends keyof StandardCapabilities ? K : NamespacedString<K & string, NS>]: T[K];
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type NamespacedString<S extends string, NS extends string = W3C_APPIUM_PREFIX> = `${NS}:${S}`;
|
|
49
49
|
/**
|
|
50
50
|
* Converts {@linkcode Constraint} `C` to a {@linkcode Capabilities} object.
|
|
51
51
|
*/
|
|
52
|
-
export
|
|
52
|
+
export type ConstraintsToCaps<C extends Constraints> = {
|
|
53
53
|
-readonly [K in keyof C]: ConstraintToCap<C[K]>;
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
@@ -57,13 +57,13 @@ export declare type ConstraintsToCaps<C extends Constraints> = {
|
|
|
57
57
|
*
|
|
58
58
|
* Does not contain {@linkcode BaseCapabilities}; see {@linkcode DriverCaps}.
|
|
59
59
|
*/
|
|
60
|
-
export
|
|
60
|
+
export type Capabilities<C extends Constraints = BaseDriverCapConstraints, Extra extends StringRecord | void = void> = Partial<ConstraintsToCaps<C> & Extra>;
|
|
61
61
|
/**
|
|
62
62
|
* Like {@linkcode Capabilities}, except W3C-style.
|
|
63
63
|
*
|
|
64
64
|
* Does not contain {@linkcode BaseCapabilities}; see {@linkcode W3CDriverCaps}.
|
|
65
65
|
*/
|
|
66
|
-
export
|
|
66
|
+
export type W3CCapabilities<C extends Constraints = BaseDriverCapConstraints, Extra extends StringRecord | void = void> = {
|
|
67
67
|
alwaysMatch: NSCapabilities<C, Extra>;
|
|
68
68
|
firstMatch: NSCapabilities<C, Extra>[];
|
|
69
69
|
};
|
|
@@ -72,7 +72,7 @@ export declare type W3CCapabilities<C extends Constraints = BaseDriverCapConstra
|
|
|
72
72
|
*
|
|
73
73
|
* Does not contain {@linkcode BaseCapabilities}; see {@linkcode NSDriverCaps}.
|
|
74
74
|
*/
|
|
75
|
-
export
|
|
75
|
+
export type NSCapabilities<C extends Constraints = BaseDriverCapConstraints, Extra extends StringRecord | void = void, NS extends string = W3C_APPIUM_PREFIX> = Partial<CapsToNSCaps<ConstraintsToCaps<C> & Extra, NS>>;
|
|
76
76
|
/**
|
|
77
77
|
* Capabilities for drivers extending `BaseDriver`.
|
|
78
78
|
*
|
|
@@ -91,7 +91,7 @@ export declare type NSCapabilities<C extends Constraints = BaseDriverCapConstrai
|
|
|
91
91
|
* }
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
|
-
export
|
|
94
|
+
export type DriverCaps<C extends Constraints, Extra extends StringRecord | void = void> = Capabilities<BaseDriverCapConstraints & C, Extra>;
|
|
95
95
|
/**
|
|
96
96
|
* W3C-style capabilities for drivers extending `BaseDriver`.
|
|
97
97
|
*
|
|
@@ -106,11 +106,11 @@ export declare type DriverCaps<C extends Constraints, Extra extends StringRecord
|
|
|
106
106
|
* }
|
|
107
107
|
* ```
|
|
108
108
|
*/
|
|
109
|
-
export
|
|
109
|
+
export type W3CDriverCaps<C extends Constraints, Extra extends StringRecord | void = void> = W3CCapabilities<BaseDriverCapConstraints & C, Extra>;
|
|
110
110
|
/**
|
|
111
111
|
* Namespaced capabilities for drivers extending `BaseDriver`.
|
|
112
112
|
*
|
|
113
113
|
* Includes {@linkcode BaseCapabilities}.
|
|
114
114
|
*/
|
|
115
|
-
export
|
|
115
|
+
export type NSDriverCaps<C extends Constraints, Extra extends StringRecord | void = void> = NSCapabilities<BaseDriverCapConstraints & C, Extra>;
|
|
116
116
|
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../lib/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,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,CAAC,EAAE,KAAK,CAAC,CAAC;AAEtD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,aAAa,CACvB,CAAC,SAAS,WAAW,EACrB,KAAK,SAAS,YAAY,GAAG,IAAI,GAAG,IAAI,IACtC,eAAe,CAAC,wBAAwB,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,YAAY,CACtB,CAAC,SAAS,WAAW,EACrB,KAAK,SAAS,YAAY,GAAG,IAAI,GAAG,IAAI,IACtC,cAAc,CAAC,wBAAwB,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC"}
|
package/build/lib/config.d.ts
CHANGED
|
@@ -3,26 +3,26 @@ import { AppiumConfiguration, ServerConfig } from './appium-config';
|
|
|
3
3
|
/**
|
|
4
4
|
* The Appium configuration as it would be in a user-provided configuration file.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type AppiumConfig = Partial<AppiumConfiguration>;
|
|
7
7
|
/**
|
|
8
8
|
* Derive the "constant" type of the server properties from the schema.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
type AppiumServerJsonSchema = typeof AppiumConfigJsonSchema['properties']['server']['properties'];
|
|
11
11
|
/**
|
|
12
12
|
* This type associates the types generated from the schema ({@linkcode AppiumConfiguration})
|
|
13
13
|
* with the schema itself (beginning with the `server` prop).
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
type ServerConfigMapping = Associated<ServerConfig, AppiumServerJsonSchema>;
|
|
16
16
|
/**
|
|
17
17
|
* Camel-cased server config. _Not_ flattened.
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type NormalizedServerConfig = {
|
|
20
20
|
[Prop in keyof ServerConfigMapping as AppiumServerJsonSchema[Prop] extends WithDest ? AppiumServerJsonSchema[Prop]['appiumCliDest'] : KebabToCamel<Prop>]: ServerConfig[Prop];
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
23
|
* "Normalized" config, which is camel-cased (instead of kebab-case, like the schema). It is _not_ flattened.
|
|
24
24
|
*/
|
|
25
|
-
export
|
|
25
|
+
export type NormalizedAppiumConfig = {
|
|
26
26
|
server: NormalizedServerConfig;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
@@ -30,29 +30,29 @@ export declare type NormalizedAppiumConfig = {
|
|
|
30
30
|
* {@linkcode WithDest}, and uses the _value_ of that property for the key name;
|
|
31
31
|
* otherwise uses the camel-cased value of the key name.
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
type SetKeyForProp<Prop extends keyof ServerConfigMapping> = AppiumServerJsonSchema[Prop] extends WithDest ? AppiumServerJsonSchema[Prop]['appiumCliDest'] : KebabToCamel<Prop>;
|
|
34
34
|
/**
|
|
35
35
|
* Checks for the existence of default values, and ensures those properties will
|
|
36
36
|
* always be defined (eliminates `| undefined` from the type).
|
|
37
37
|
* If no default value, just a type.
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
type KeyOrDefaultForProp<Prop extends keyof ServerConfigMapping> = AppiumServerJsonSchema[Prop] extends WithDefault ? NonNullable<ServerConfig[Prop]> : ServerConfig[Prop];
|
|
40
40
|
/**
|
|
41
41
|
* The final shape of the parsed CLI arguments.
|
|
42
42
|
*
|
|
43
43
|
* These will be camel-cased unless overridden by `appiumCliDest` field in schema(s).
|
|
44
44
|
*/
|
|
45
|
-
export
|
|
45
|
+
export type ServerArgs = {
|
|
46
46
|
[Prop in keyof ServerConfigMapping as SetKeyForProp<Prop>]: KeyOrDefaultForProp<Prop>;
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
49
|
* Converts a kebab-cased string into a camel-cased string.
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
type KebabToCamel<S extends string> = S extends `${infer P1}-${infer P2}${infer P3}` ? `${Lowercase<P1>}${Uppercase<P2>}${KebabToCamel<P3>}` : Lowercase<S>;
|
|
52
52
|
/**
|
|
53
53
|
* Object `B` has all the keys as object `A` (even if those keys in `A` are otherwise optional).
|
|
54
54
|
*/
|
|
55
|
-
|
|
55
|
+
type Associated<A extends object, B extends {
|
|
56
56
|
[key in keyof Required<A>]: unknown;
|
|
57
57
|
}> = {
|
|
58
58
|
[Prop in keyof Required<A>]: B[Prop];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAC,mBAAmB,EAAE,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAElE;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAC,mBAAmB,EAAE,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAExD;;GAEG;AACH,KAAK,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC;AAElG;;;GAGG;AACH,KAAK,mBAAmB,GAAG,UAAU,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;KAClC,IAAI,IAAI,MAAM,mBAAmB,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,QAAQ,GAC/E,sBAAsB,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,GAC7C,YAAY,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC;CAC5C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,sBAAsB,CAAC;CAChC,CAAC;AAEF;;;;GAIG;AACH,KA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export namespace BASE_DESIRED_CAP_CONSTRAINTS {
|
|
|
16
16
|
export { isString_3 as isString };
|
|
17
17
|
}
|
|
18
18
|
namespace webSocketUrl {
|
|
19
|
-
const
|
|
20
|
-
export { isString_4 as isString };
|
|
19
|
+
const isBoolean: true;
|
|
21
20
|
}
|
|
22
21
|
namespace newCommandTimeout {
|
|
23
22
|
const isNumber: true;
|
|
24
23
|
}
|
|
25
24
|
namespace automationName {
|
|
26
|
-
const
|
|
27
|
-
export {
|
|
25
|
+
const isString_4: true;
|
|
26
|
+
export { isString_4 as isString };
|
|
28
27
|
}
|
|
29
28
|
namespace autoLaunch {
|
|
30
|
-
const
|
|
29
|
+
const isBoolean_1: true;
|
|
30
|
+
export { isBoolean_1 as isBoolean };
|
|
31
31
|
}
|
|
32
32
|
namespace udid {
|
|
33
|
-
const
|
|
34
|
-
export {
|
|
33
|
+
const isString_5: true;
|
|
34
|
+
export { isString_5 as isString };
|
|
35
35
|
}
|
|
36
36
|
namespace orientation {
|
|
37
37
|
const inclusion: readonly ["LANDSCAPE", "PORTRAIT"];
|
|
38
38
|
}
|
|
39
39
|
namespace autoWebview {
|
|
40
|
-
const isBoolean_1: true;
|
|
41
|
-
export { isBoolean_1 as isBoolean };
|
|
42
|
-
}
|
|
43
|
-
namespace noReset {
|
|
44
40
|
const isBoolean_2: true;
|
|
45
41
|
export { isBoolean_2 as isBoolean };
|
|
46
42
|
}
|
|
47
|
-
namespace
|
|
43
|
+
namespace noReset {
|
|
48
44
|
const isBoolean_3: true;
|
|
49
45
|
export { isBoolean_3 as isBoolean };
|
|
50
46
|
}
|
|
47
|
+
namespace fullReset {
|
|
48
|
+
const isBoolean_4: true;
|
|
49
|
+
export { isBoolean_4 as isBoolean };
|
|
50
|
+
}
|
|
51
51
|
namespace language {
|
|
52
|
-
const
|
|
53
|
-
export {
|
|
52
|
+
const isString_6: true;
|
|
53
|
+
export { isString_6 as isString };
|
|
54
54
|
}
|
|
55
55
|
namespace locale {
|
|
56
|
-
const
|
|
57
|
-
export {
|
|
56
|
+
const isString_7: true;
|
|
57
|
+
export { isString_7 as isString };
|
|
58
58
|
}
|
|
59
59
|
namespace eventTimings {
|
|
60
|
-
const isBoolean_4: true;
|
|
61
|
-
export { isBoolean_4 as isBoolean };
|
|
62
|
-
}
|
|
63
|
-
namespace printPageSourceOnFindFailure {
|
|
64
60
|
const isBoolean_5: true;
|
|
65
61
|
export { isBoolean_5 as isBoolean };
|
|
66
62
|
}
|
|
63
|
+
namespace printPageSourceOnFindFailure {
|
|
64
|
+
const isBoolean_6: true;
|
|
65
|
+
export { isBoolean_6 as isBoolean };
|
|
66
|
+
}
|
|
67
67
|
}
|
|
68
68
|
export type BaseDriverCapConstraints = typeof BASE_DESIRED_CAP_CONSTRAINTS;
|
|
69
69
|
//# sourceMappingURL=constraints.d.ts.map
|
package/build/lib/constraints.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constraints.js","sourceRoot":"","sources":["../../lib/constraints.js"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAwB,CAAC;IAChE,YAAY,EAAE;QACZ,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACH,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,
|
|
1
|
+
{"version":3,"file":"constraints.js","sourceRoot":"","sources":["../../lib/constraints.js"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAwB,CAAC;IAChE,YAAY,EAAE;QACZ,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACH,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,IAAI;KAChB;IACD,iBAAiB,EAAE;QACjB,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,SAAS,EAAE,IAAI;KAChB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,SAAS,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC;KACrC;IACD,WAAW,EAAE;QACX,SAAS,EAAE,IAAI;KAChB;IACD,OAAO,EAAE;QACP,SAAS,EAAE,IAAI;KAChB;IACD,SAAS,EAAE;QACT,SAAS,EAAE,IAAI;KAChB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,IAAI;KAChB;IACD,4BAA4B,EAAE;QAC5B,SAAS,EAAE,IAAI;KAChB;CACF,CAAC,CAAC;AAEH;;GAEG"}
|