@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.
Files changed (91) hide show
  1. package/build/lib/basedriver/capabilities.d.ts +59 -36
  2. package/build/lib/basedriver/capabilities.d.ts.map +1 -1
  3. package/build/lib/basedriver/capabilities.js +57 -45
  4. package/build/lib/basedriver/capabilities.js.map +1 -1
  5. package/build/lib/basedriver/commands/event.d.ts +1 -1
  6. package/build/lib/basedriver/commands/event.d.ts.map +1 -1
  7. package/build/lib/basedriver/commands/event.js.map +1 -1
  8. package/build/lib/basedriver/commands/execute.d.ts +1 -1
  9. package/build/lib/basedriver/commands/execute.d.ts.map +1 -1
  10. package/build/lib/basedriver/commands/execute.js.map +1 -1
  11. package/build/lib/basedriver/commands/find.d.ts +1 -1
  12. package/build/lib/basedriver/commands/find.d.ts.map +1 -1
  13. package/build/lib/basedriver/commands/find.js.map +1 -1
  14. package/build/lib/basedriver/commands/index.d.ts +7 -7
  15. package/build/lib/basedriver/commands/index.d.ts.map +1 -1
  16. package/build/lib/basedriver/commands/index.js +7 -21
  17. package/build/lib/basedriver/commands/index.js.map +1 -1
  18. package/build/lib/basedriver/commands/log.d.ts +1 -1
  19. package/build/lib/basedriver/commands/log.d.ts.map +1 -1
  20. package/build/lib/basedriver/commands/log.js.map +1 -1
  21. package/build/lib/basedriver/commands/mixin.d.ts +4 -4
  22. package/build/lib/basedriver/commands/mixin.d.ts.map +1 -1
  23. package/build/lib/basedriver/commands/mixin.js +5 -4
  24. package/build/lib/basedriver/commands/mixin.js.map +1 -1
  25. package/build/lib/basedriver/commands/session.d.ts +1 -1
  26. package/build/lib/basedriver/commands/session.d.ts.map +1 -1
  27. package/build/lib/basedriver/commands/session.js +1 -4
  28. package/build/lib/basedriver/commands/session.js.map +1 -1
  29. package/build/lib/basedriver/commands/settings.d.ts +1 -1
  30. package/build/lib/basedriver/commands/settings.d.ts.map +1 -1
  31. package/build/lib/basedriver/commands/settings.js.map +1 -1
  32. package/build/lib/basedriver/commands/timeout.d.ts +1 -1
  33. package/build/lib/basedriver/commands/timeout.d.ts.map +1 -1
  34. package/build/lib/basedriver/commands/timeout.js +1 -4
  35. package/build/lib/basedriver/commands/timeout.js.map +1 -1
  36. package/build/lib/basedriver/core.d.ts +13 -17
  37. package/build/lib/basedriver/core.d.ts.map +1 -1
  38. package/build/lib/basedriver/core.js +32 -20
  39. package/build/lib/basedriver/core.js.map +1 -1
  40. package/build/lib/basedriver/device-settings.d.ts +11 -11
  41. package/build/lib/basedriver/device-settings.d.ts.map +1 -1
  42. package/build/lib/basedriver/device-settings.js +7 -8
  43. package/build/lib/basedriver/device-settings.js.map +1 -1
  44. package/build/lib/basedriver/driver.d.ts +23 -108
  45. package/build/lib/basedriver/driver.d.ts.map +1 -1
  46. package/build/lib/basedriver/driver.js +21 -126
  47. package/build/lib/basedriver/driver.js.map +1 -1
  48. package/build/lib/basedriver/helpers.d.ts +21 -98
  49. package/build/lib/basedriver/helpers.d.ts.map +1 -1
  50. package/build/lib/basedriver/helpers.js +178 -182
  51. package/build/lib/basedriver/helpers.js.map +1 -1
  52. package/build/lib/express/server.d.ts +3 -3
  53. package/build/lib/express/server.d.ts.map +1 -1
  54. package/build/lib/express/server.js +4 -2
  55. package/build/lib/express/server.js.map +1 -1
  56. package/build/lib/express/websocket.d.ts +5 -44
  57. package/build/lib/express/websocket.d.ts.map +1 -1
  58. package/build/lib/express/websocket.js +10 -39
  59. package/build/lib/express/websocket.js.map +1 -1
  60. package/build/lib/helpers/capabilities.d.ts +2 -2
  61. package/build/lib/helpers/capabilities.d.ts.map +1 -1
  62. package/build/lib/helpers/capabilities.js +2 -3
  63. package/build/lib/helpers/capabilities.js.map +1 -1
  64. package/build/lib/protocol/protocol.d.ts +1 -1
  65. package/build/lib/protocol/protocol.d.ts.map +1 -1
  66. package/build/lib/protocol/protocol.js +10 -2
  67. package/build/lib/protocol/protocol.js.map +1 -1
  68. package/build/lib/protocol/routes.d.ts +1 -0
  69. package/build/lib/protocol/routes.d.ts.map +1 -1
  70. package/build/lib/protocol/routes.js +12 -10
  71. package/build/lib/protocol/routes.js.map +1 -1
  72. package/lib/basedriver/capabilities.js +70 -56
  73. package/lib/basedriver/commands/event.ts +3 -2
  74. package/lib/basedriver/commands/execute.ts +2 -1
  75. package/lib/basedriver/commands/find.ts +1 -0
  76. package/lib/basedriver/commands/index.ts +7 -7
  77. package/lib/basedriver/commands/log.ts +2 -4
  78. package/lib/basedriver/commands/mixin.ts +5 -4
  79. package/lib/basedriver/commands/session.ts +9 -7
  80. package/lib/basedriver/commands/settings.ts +1 -0
  81. package/lib/basedriver/commands/timeout.ts +17 -17
  82. package/lib/basedriver/core.js +11 -25
  83. package/lib/basedriver/device-settings.js +9 -11
  84. package/lib/basedriver/{driver.js → driver.ts} +69 -175
  85. package/lib/basedriver/helpers.js +214 -212
  86. package/lib/express/server.js +4 -2
  87. package/lib/express/websocket.js +10 -39
  88. package/lib/helpers/capabilities.js +2 -3
  89. package/lib/protocol/protocol.js +11 -2
  90. package/lib/protocol/routes.js +12 -13
  91. package/package.json +10 -6
@@ -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: {command: 'activateIMEEngine', payloadParams: {required: ['engine']}, deprecated: true},
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: {command: 'touchLongClick', payloadParams: {required: ['elements']}, deprecated: true},
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",
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.7",
47
- "@appium/types": "^0.10.1",
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.6.1",
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": "872b924a97c13142bdb8bf4218a4db324f309ce4",
79
+ "gitHead": "d514ebdd7ebd27bb236509d0a3d580f0f18a34e5",
79
80
  "typedoc": {
80
81
  "entryPoint": "./lib/index.js"
82
+ },
83
+ "tsd": {
84
+ "directory": "test/types"
81
85
  }
82
86
  }