@appium/base-driver 9.3.3 → 9.3.4
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/basedriver/capabilities.d.ts +59 -36
- package/build/lib/basedriver/capabilities.d.ts.map +1 -1
- package/build/lib/basedriver/capabilities.js +57 -45
- package/build/lib/basedriver/capabilities.js.map +1 -1
- package/build/lib/basedriver/commands/event.d.ts +1 -1
- package/build/lib/basedriver/commands/event.d.ts.map +1 -1
- package/build/lib/basedriver/commands/event.js.map +1 -1
- package/build/lib/basedriver/commands/execute.d.ts +1 -1
- package/build/lib/basedriver/commands/execute.d.ts.map +1 -1
- package/build/lib/basedriver/commands/execute.js.map +1 -1
- package/build/lib/basedriver/commands/find.d.ts +1 -1
- package/build/lib/basedriver/commands/find.d.ts.map +1 -1
- package/build/lib/basedriver/commands/find.js.map +1 -1
- package/build/lib/basedriver/commands/index.d.ts +7 -7
- package/build/lib/basedriver/commands/index.d.ts.map +1 -1
- package/build/lib/basedriver/commands/index.js +7 -21
- package/build/lib/basedriver/commands/index.js.map +1 -1
- package/build/lib/basedriver/commands/log.d.ts +1 -1
- package/build/lib/basedriver/commands/log.d.ts.map +1 -1
- package/build/lib/basedriver/commands/log.js.map +1 -1
- package/build/lib/basedriver/commands/mixin.d.ts +4 -4
- package/build/lib/basedriver/commands/mixin.d.ts.map +1 -1
- package/build/lib/basedriver/commands/mixin.js +5 -4
- package/build/lib/basedriver/commands/mixin.js.map +1 -1
- package/build/lib/basedriver/commands/session.d.ts +1 -1
- package/build/lib/basedriver/commands/session.d.ts.map +1 -1
- package/build/lib/basedriver/commands/session.js +1 -4
- package/build/lib/basedriver/commands/session.js.map +1 -1
- package/build/lib/basedriver/commands/settings.d.ts +1 -1
- package/build/lib/basedriver/commands/settings.d.ts.map +1 -1
- package/build/lib/basedriver/commands/settings.js.map +1 -1
- package/build/lib/basedriver/commands/timeout.d.ts +1 -1
- package/build/lib/basedriver/commands/timeout.d.ts.map +1 -1
- package/build/lib/basedriver/commands/timeout.js +1 -4
- package/build/lib/basedriver/commands/timeout.js.map +1 -1
- package/build/lib/basedriver/core.d.ts +13 -17
- package/build/lib/basedriver/core.d.ts.map +1 -1
- package/build/lib/basedriver/core.js +32 -20
- package/build/lib/basedriver/core.js.map +1 -1
- package/build/lib/basedriver/device-settings.d.ts +11 -11
- package/build/lib/basedriver/device-settings.d.ts.map +1 -1
- package/build/lib/basedriver/device-settings.js +7 -8
- package/build/lib/basedriver/device-settings.js.map +1 -1
- package/build/lib/basedriver/driver.d.ts +23 -108
- package/build/lib/basedriver/driver.d.ts.map +1 -1
- package/build/lib/basedriver/driver.js +21 -126
- package/build/lib/basedriver/driver.js.map +1 -1
- package/build/lib/basedriver/helpers.d.ts +21 -98
- package/build/lib/basedriver/helpers.d.ts.map +1 -1
- package/build/lib/basedriver/helpers.js +178 -182
- package/build/lib/basedriver/helpers.js.map +1 -1
- package/build/lib/express/server.d.ts +3 -3
- package/build/lib/express/server.d.ts.map +1 -1
- package/build/lib/express/server.js +4 -2
- package/build/lib/express/server.js.map +1 -1
- package/build/lib/express/websocket.d.ts +5 -44
- package/build/lib/express/websocket.d.ts.map +1 -1
- package/build/lib/express/websocket.js +10 -39
- package/build/lib/express/websocket.js.map +1 -1
- package/build/lib/helpers/capabilities.d.ts +2 -2
- package/build/lib/helpers/capabilities.d.ts.map +1 -1
- package/build/lib/helpers/capabilities.js +2 -3
- package/build/lib/helpers/capabilities.js.map +1 -1
- package/build/lib/protocol/protocol.d.ts +1 -1
- package/build/lib/protocol/protocol.d.ts.map +1 -1
- package/build/lib/protocol/protocol.js +10 -2
- package/build/lib/protocol/protocol.js.map +1 -1
- package/build/lib/protocol/routes.d.ts +1 -0
- package/build/lib/protocol/routes.d.ts.map +1 -1
- package/build/lib/protocol/routes.js +12 -10
- package/build/lib/protocol/routes.js.map +1 -1
- package/lib/basedriver/capabilities.js +70 -56
- package/lib/basedriver/commands/event.ts +3 -2
- package/lib/basedriver/commands/execute.ts +2 -1
- package/lib/basedriver/commands/find.ts +1 -0
- package/lib/basedriver/commands/index.ts +7 -7
- package/lib/basedriver/commands/log.ts +2 -4
- package/lib/basedriver/commands/mixin.ts +5 -4
- package/lib/basedriver/commands/session.ts +9 -7
- package/lib/basedriver/commands/settings.ts +1 -0
- package/lib/basedriver/commands/timeout.ts +17 -17
- package/lib/basedriver/core.js +11 -25
- package/lib/basedriver/device-settings.js +9 -11
- package/lib/basedriver/{driver.js → driver.ts} +69 -175
- package/lib/basedriver/helpers.js +214 -212
- package/lib/express/server.js +4 -2
- package/lib/express/websocket.js +10 -39
- package/lib/helpers/capabilities.js +2 -3
- package/lib/protocol/protocol.js +11 -2
- package/lib/protocol/routes.js +12 -13
- package/package.json +10 -6
package/lib/protocol/routes.js
CHANGED
|
@@ -18,6 +18,7 @@ const SET_ALERT_TEXT_PAYLOAD_PARAMS = {
|
|
|
18
18
|
* define the routes, mapping of HTTP methods to particular driver commands, and
|
|
19
19
|
* any parameters that are expected in a request parameters can be `required` or
|
|
20
20
|
* `optional`
|
|
21
|
+
* @satisfies {import('@appium/types').MethodMap<import('../basedriver/driver').BaseDriver>}
|
|
21
22
|
*/
|
|
22
23
|
const METHOD_MAP = /** @type {const} */ ({
|
|
23
24
|
'/status': {
|
|
@@ -129,7 +130,11 @@ const METHOD_MAP = /** @type {const} */ ({
|
|
|
129
130
|
POST: {command: 'deactivateIMEEngine', deprecated: true},
|
|
130
131
|
},
|
|
131
132
|
'/session/:sessionId/ime/activate': {
|
|
132
|
-
POST: {
|
|
133
|
+
POST: {
|
|
134
|
+
command: 'activateIMEEngine',
|
|
135
|
+
payloadParams: {required: ['engine']},
|
|
136
|
+
deprecated: true,
|
|
137
|
+
},
|
|
133
138
|
},
|
|
134
139
|
'/session/:sessionId/frame': {
|
|
135
140
|
POST: {command: 'setFrame', payloadParams: {required: ['id']}},
|
|
@@ -356,7 +361,11 @@ const METHOD_MAP = /** @type {const} */ ({
|
|
|
356
361
|
DELETE: {command: 'releaseActions'},
|
|
357
362
|
},
|
|
358
363
|
'/session/:sessionId/touch/longclick': {
|
|
359
|
-
POST: {
|
|
364
|
+
POST: {
|
|
365
|
+
command: 'touchLongClick',
|
|
366
|
+
payloadParams: {required: ['elements']},
|
|
367
|
+
deprecated: true,
|
|
368
|
+
},
|
|
360
369
|
},
|
|
361
370
|
'/session/:sessionId/touch/flick': {
|
|
362
371
|
POST: {
|
|
@@ -922,7 +931,7 @@ const METHOD_MAP = /** @type {const} */ ({
|
|
|
922
931
|
let ALL_COMMANDS = [];
|
|
923
932
|
for (let v of _.values(METHOD_MAP)) {
|
|
924
933
|
for (let m of _.values(v)) {
|
|
925
|
-
if (m.command) {
|
|
934
|
+
if ('command' in m && m.command) {
|
|
926
935
|
ALL_COMMANDS.push(m.command);
|
|
927
936
|
}
|
|
928
937
|
}
|
|
@@ -1006,13 +1015,3 @@ function routeToCommandName(endpoint, method, basePath = DEFAULT_BASE_PATH) {
|
|
|
1006
1015
|
const NO_SESSION_ID_COMMANDS = ['createSession', 'getStatus', 'getSessions'];
|
|
1007
1016
|
|
|
1008
1017
|
export {METHOD_MAP, ALL_COMMANDS, NO_SESSION_ID_COMMANDS, routeToCommandName};
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
* This checks compat with the `MethodMap` interface.
|
|
1012
|
-
* @ignore
|
|
1013
|
-
*/
|
|
1014
|
-
// eslint-disable-next-line no-unused-vars
|
|
1015
|
-
const _validMethodMap =
|
|
1016
|
-
/** @type {import('@appium/types').MethodMap<import('@appium/types').ExternalDriver<import('@appium/types').BaseDriverCapConstraints>>} */ (
|
|
1017
|
-
METHOD_MAP
|
|
1018
|
-
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/base-driver",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.4",
|
|
4
4
|
"description": "Base driver class for Appium drivers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -40,11 +40,12 @@
|
|
|
40
40
|
"test": "npm run test:unit",
|
|
41
41
|
"test:e2e": "mocha -p --timeout 20s --slow 10s \"./test/e2e/**/*.spec.js\"",
|
|
42
42
|
"test:smoke": "node ./index.js",
|
|
43
|
-
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
|
43
|
+
"test:unit": "mocha \"./test/unit/**/*.spec.js\"",
|
|
44
|
+
"test:types": "tsd"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@appium/support": "^3.1.
|
|
47
|
-
"@appium/types": "^0.10.
|
|
47
|
+
"@appium/support": "^3.1.8",
|
|
48
|
+
"@appium/types": "^0.10.2",
|
|
48
49
|
"@colors/colors": "1.5.0",
|
|
49
50
|
"@types/async-lock": "1.4.0",
|
|
50
51
|
"@types/bluebird": "3.5.38",
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
"morgan": "1.10.0",
|
|
66
67
|
"serve-favicon": "2.5.0",
|
|
67
68
|
"source-map-support": "0.5.21",
|
|
68
|
-
"type-fest": "3.
|
|
69
|
+
"type-fest": "3.7.1",
|
|
69
70
|
"validate.js": "0.13.1"
|
|
70
71
|
},
|
|
71
72
|
"engines": {
|
|
@@ -75,8 +76,11 @@
|
|
|
75
76
|
"publishConfig": {
|
|
76
77
|
"access": "public"
|
|
77
78
|
},
|
|
78
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "d514ebdd7ebd27bb236509d0a3d580f0f18a34e5",
|
|
79
80
|
"typedoc": {
|
|
80
81
|
"entryPoint": "./lib/index.js"
|
|
82
|
+
},
|
|
83
|
+
"tsd": {
|
|
84
|
+
"directory": "test/types"
|
|
81
85
|
}
|
|
82
86
|
}
|