@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
@@ -1,132 +1,47 @@
1
- declare const BaseDriver_base: typeof DriverCore;
2
- declare const BaseDriver_base_1: typeof DriverCore;
3
- declare const BaseDriver_base_2: typeof DriverCore;
4
- declare const BaseDriver_base_3: typeof DriverCore;
5
- declare const BaseDriver_base_4: typeof DriverCore;
6
- declare const BaseDriver_base_5: typeof DriverCore;
7
- declare const BaseDriver_base_6: typeof DriverCore;
8
- /**
9
- * @implements {SessionHandler<C>}
10
- * @template {Constraints} C
11
- * @template {StringRecord} [CArgs=StringRecord]
12
- * @implements {Driver<C, CArgs>}
13
- * @extends {DriverCore<C>}
14
- */
15
- export class BaseDriver<C extends Readonly<Record<string, import("@appium/types").Constraint>>, CArgs extends import("@appium/types").StringRecord = import("@appium/types").StringRecord> extends DriverCore<C>, BaseDriver_base, BaseDriver_base_1, BaseDriver_base_2, BaseDriver_base_3, BaseDriver_base_4, BaseDriver_base_5, BaseDriver_base_6 implements SessionHandler<C>, Driver<C, CArgs> {
16
- /**
17
- *
18
- * @param {DriverOpts<C>} opts
19
- * @param {boolean} shouldValidateCaps
20
- */
21
- constructor(opts?: DriverOpts<C>, shouldValidateCaps?: boolean);
22
- /**
23
- * @type {CArgs & ServerArgs}
24
- */
1
+ import { DriverCore } from './core';
2
+ import { AppiumServer, BaseDriverCapConstraints, Capabilities, Constraints, DefaultCreateSessionResult, Driver, DriverCaps, DriverData, DriverOpts, ServerArgs, StringRecord, W3CDriverCaps } from '@appium/types';
3
+ export declare class BaseDriver<C extends Constraints, CArgs extends StringRecord = StringRecord, Settings extends StringRecord = StringRecord> extends DriverCore<C, Settings> implements Driver<C, CArgs> {
25
4
  cliArgs: CArgs & ServerArgs;
26
- /**
27
- * @type {Capabilities<C>}
28
- */
29
- caps: Capabilities<C>;
30
- /**
31
- * @type {W3CCapabilities<C>}
32
- */
33
- originalCaps: W3CCapabilities<C>;
34
- /**
35
- * @type {C}
36
- */
5
+ caps: DriverCaps<C>;
6
+ originalCaps: W3CDriverCaps<C>;
37
7
  desiredCapConstraints: C;
38
- /**
39
- * @type {DriverOpts<C> & DriverOpts<BaseDriverCapConstraints>}
40
- */
41
- opts: DriverOpts<C> & DriverOpts<BaseDriverCapConstraints>;
8
+ opts: DriverOpts<C>;
9
+ server?: AppiumServer;
10
+ serverHost?: string;
11
+ serverPort?: number;
12
+ serverPath?: string;
13
+ constructor(opts: DriverOpts<C>, shouldValidateCaps?: boolean);
42
14
  /**
43
15
  * Contains the base constraints plus whatever the subclass wants to add.
44
16
  *
45
17
  * Subclasses _shouldn't_ need to use this. If you need to use this, please create
46
18
  * an issue:
47
19
  * @see https://github.com/appium/appium/issues/new
48
- * @type {Readonly<BaseDriverCapConstraints & C>}
49
- * @protected
50
- */
51
- protected get _desiredCapConstraints(): Readonly<typeof BASE_DESIRED_CAP_CONSTRAINTS & C>;
52
- /**
53
- * @param {string} cmd
54
- * @param {...any} args
55
- * @returns {Promise<any>}
56
20
  */
57
- executeCommand(cmd: string, ...args: any[]): Promise<any>;
21
+ protected get _desiredCapConstraints(): Readonly<BaseDriverCapConstraints & C>;
58
22
  /**
59
- *
60
- * @param {Error|import('../protocol/errors').NoSuchDriverError} err
23
+ * This is the main command handler for the driver. It wraps command
24
+ * execution with timeout logic, checking that we have a valid session,
25
+ * and ensuring that we execute commands one at a time. This method is called
26
+ * by MJSONWP's express router.
61
27
  */
62
- startUnexpectedShutdown(err?: Error | import('../protocol/errors').NoSuchDriverError): Promise<void>;
28
+ executeCommand<T = unknown>(cmd: string, ...args: any[]): Promise<T>;
29
+ startUnexpectedShutdown(err?: Error): Promise<void>;
63
30
  startNewCommandTimeout(): Promise<void>;
64
- /**
65
- *
66
- * @param {import('@appium/types').AppiumServer} server
67
- * @param {string} host
68
- * @param {number} port
69
- * @param {string} path
70
- */
71
- assignServer(server: import('@appium/types').AppiumServer, host: string, port: number, path: string): void;
72
- server: import("@appium/types").AppiumServer | undefined;
73
- serverHost: string | undefined;
74
- serverPort: number | undefined;
75
- serverPath: string | undefined;
31
+ assignServer(server: AppiumServer, host: string, port: number, path: string): void;
76
32
  reset(): Promise<void>;
77
- resetOnUnexpectedShutdown: (() => void) | undefined;
78
33
  /**
79
34
  *
80
35
  * Historically the first two arguments were reserved for JSONWP capabilities.
81
36
  * Appium 2 has dropped the support of these, so now we only accept capability
82
37
  * objects in W3C format and thus allow any of the three arguments to represent
83
38
  * the latter.
84
- * @param {W3CCapabilities<C>} w3cCapabilities1
85
- * @param {W3CCapabilities<C>} [w3cCapabilities2]
86
- * @param {W3CCapabilities<C>} [w3cCapabilities]
87
- * @param {DriverData[]} [driverData]
88
- * @returns {Promise<[string,Capabilities<C>]>}
89
- */
90
- createSession(w3cCapabilities1: W3CCapabilities<C>, w3cCapabilities2?: W3CCapabilities<C, void> | undefined, w3cCapabilities?: W3CCapabilities<C, void> | undefined, driverData?: import("@appium/types").DriverData[] | undefined): Promise<[string, Capabilities<C>]>;
91
- /**
92
- *
93
- * @param {string} [sessionId]
94
- * @param {DriverData[]} [driverData]
95
- * @returns {Promise<void>}
96
- */
97
- deleteSession(sessionId?: string | undefined, driverData?: import("@appium/types").DriverData[] | undefined): Promise<void>;
98
- /**
99
- *
100
- * @param {Capabilities<C>} caps
101
39
  */
40
+ createSession(w3cCapabilities1: W3CDriverCaps<C>, w3cCapabilities2?: W3CDriverCaps<C>, w3cCapabilities?: W3CDriverCaps<C>, driverData?: DriverData[]): Promise<DefaultCreateSessionResult<C>>;
41
+ deleteSession(sessionId?: string | null): Promise<void>;
102
42
  logExtraCaps(caps: Capabilities<C>): void;
103
- /**
104
- *
105
- * @param {Capabilities<C>} caps
106
- * @returns {boolean}
107
- */
108
- validateDesiredCaps(caps: Capabilities<C>): boolean;
43
+ validateDesiredCaps(caps: any): caps is DriverCaps<C>;
109
44
  }
110
- export * from "./commands";
45
+ export * from './commands';
111
46
  export default BaseDriver;
112
- export type HTTPMethod = import('@appium/types').HTTPMethod;
113
- export type DriverData = import('@appium/types').DriverData;
114
- export type Constraints = import('@appium/types').Constraints;
115
- export type Constraint = import('@appium/types').Constraint;
116
- export type StringRecord = import('@appium/types').StringRecord;
117
- export type BaseDriverCapConstraints = import('@appium/types').BaseDriverCapConstraints;
118
- export type ServerArgs = import('@appium/types').ServerArgs;
119
- export type UpdateServerCallback = (app: import('express').Express, httpServer: import('@appium/types').AppiumServer) => import('type-fest').Promisable<void>;
120
- /**
121
- * This is used to extend {@linkcode BaseDriver } by the mixins and also external drivers.
122
- */
123
- export type BaseDriverBase<C extends Readonly<Record<string, import("@appium/types").Constraint>>, Proto = {}, Static = {}> = import('@appium/types').Class<BaseDriver<C> & Proto, import("@appium/types").DriverStatic<any> & Static>;
124
- export type SessionHandler<C extends Readonly<Record<string, import("@appium/types").Constraint>> = typeof BASE_DESIRED_CAP_CONSTRAINTS> = import('@appium/types').SessionHandler<[string, object], void, C>;
125
- export type Capabilities<C extends Readonly<Record<string, import("@appium/types").Constraint>> = typeof BASE_DESIRED_CAP_CONSTRAINTS, Extra extends void | import("@appium/types").StringRecord = void> = import('@appium/types').Capabilities<C, Extra>;
126
- export type W3CCapabilities<C extends Readonly<Record<string, import("@appium/types").Constraint>> = typeof BASE_DESIRED_CAP_CONSTRAINTS, Extra extends void | import("@appium/types").StringRecord = void> = import('@appium/types').W3CCapabilities<C, Extra>;
127
- export type Driver<C extends Readonly<Record<string, import("@appium/types").Constraint>> = typeof BASE_DESIRED_CAP_CONSTRAINTS, CArgs extends import("@appium/types").StringRecord = import("@appium/types").StringRecord> = import('@appium/types').Driver<C, CArgs>;
128
- export type ExternalDriver<C extends Readonly<Record<string, import("@appium/types").Constraint>>> = import('@appium/types').ExternalDriver<C>;
129
- export type DriverOpts<C extends Readonly<Record<string, import("@appium/types").Constraint>>> = import('@appium/types').DriverOpts<C>;
130
- import { DriverCore } from "./core";
131
- import { BASE_DESIRED_CAP_CONSTRAINTS } from "@appium/types";
132
47
  //# sourceMappingURL=driver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../lib/basedriver/driver.js"],"names":[],"mappings":";;;;;;;AAmBA;;;;;;GAMG;AACH,8WAN+B,CAAC,UAGT,CAAC,EAAE,KAAK;IA6B7B;;;;OAIG;IACH,mBAHW,WAAW,CAAC,CAAC,uBACb,OAAO,EAcjB;IA1CD;;OAEG;IACH,SAFU,KAAK,GAAG,UAAU,CAEpB;IAER;;OAEG;IACH,MAFU,aAAa,CAAC,CAAC,CAEpB;IAEL;;OAEG;IACH,cAFU,gBAAgB,CAAC,CAAC,CAEf;IAEb;;OAEG;IACH,uBAFU,CAAC,CAEW;IAEtB;;OAEG;IACH,MAFU,WAAW,CAAC,CAAC,GAAG,WAAW,wBAAwB,CAAC,CAEzD;IAqBL;;;;;;;;OAQG;IACH,0FAEC;IAMD;;;;OAIG;IACH,oBAJW,MAAM,WACF,GAAG,KACL,QAAQ,GAAG,CAAC,CA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AAc,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;IAsEpE,uBAAuB,CAC3B,GAAG,GAAE,KAA8E;IAa/E,sBAAsB;IAqB5B,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAWrE,KAAK;IA8BX;;;;;;OAMG;IACG,aAAa,CACjB,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,EAClC,gBAAgB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EACnC,eAAe,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAElC,UAAU,CAAC,EAAE,UAAU,EAAE,GACxB,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;IAiFnC,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAc7C,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC;IAYlC,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,UAAU,CAAC,CAAC,CAAC;CAoBtD;AAED,cAAc,YAAY,CAAC;AAE3B,eAAe,UAAU,CAAC"}
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable require-await */
3
- /* eslint-disable no-unused-vars */
4
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
3
  if (k2 === undefined) k2 = k;
6
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -34,28 +32,11 @@ const EVENT_SESSION_START = 'newSessionStarted';
34
32
  const EVENT_SESSION_QUIT_START = 'quitSessionRequested';
35
33
  const EVENT_SESSION_QUIT_DONE = 'quitSessionFinished';
36
34
  const ON_UNEXPECTED_SHUTDOWN_EVENT = 'onUnexpectedShutdown';
37
- /**
38
- * @implements {SessionHandler<C>}
39
- * @template {Constraints} C
40
- * @template {StringRecord} [CArgs=StringRecord]
41
- * @implements {Driver<C, CArgs>}
42
- * @extends {DriverCore<C>}
43
- */
44
35
  class BaseDriver extends core_1.DriverCore {
45
- /**
46
- *
47
- * @param {DriverOpts<C>} opts
48
- * @param {boolean} shouldValidateCaps
49
- */
50
- constructor(opts = /** @type {DriverOpts<C>} */ ({}), shouldValidateCaps = true) {
36
+ constructor(opts, shouldValidateCaps = true) {
51
37
  super(opts, shouldValidateCaps);
52
- /**
53
- * This must be assigned here because the declaration of {@linkcode BaseDriver.opts} above
54
- * blows away {@linkcode DriverCore.opts}.
55
- */
56
- this.opts = opts;
57
38
  this.caps = {};
58
- this.cliArgs = /** @type {CArgs & ServerArgs} */ ({});
39
+ this.cliArgs = {};
59
40
  }
60
41
  /**
61
42
  * Contains the base constraints plus whatever the subclass wants to add.
@@ -63,24 +44,19 @@ class BaseDriver extends core_1.DriverCore {
63
44
  * Subclasses _shouldn't_ need to use this. If you need to use this, please create
64
45
  * an issue:
65
46
  * @see https://github.com/appium/appium/issues/new
66
- * @type {Readonly<BaseDriverCapConstraints & C>}
67
- * @protected
68
47
  */
69
48
  get _desiredCapConstraints() {
70
49
  return Object.freeze(lodash_1.default.merge({}, types_1.BASE_DESIRED_CAP_CONSTRAINTS, this.desiredCapConstraints));
71
50
  }
72
- // This is the main command handler for the driver. It wraps command
73
- // execution with timeout logic, checking that we have a valid session,
74
- // and ensuring that we execute commands one at a time. This method is called
75
- // by MJSONWP's express router.
76
51
  /**
77
- * @param {string} cmd
78
- * @param {...any} args
79
- * @returns {Promise<any>}
52
+ * This is the main command handler for the driver. It wraps command
53
+ * execution with timeout logic, checking that we have a valid session,
54
+ * and ensuring that we execute commands one at a time. This method is called
55
+ * by MJSONWP's express router.
80
56
  */
81
57
  async executeCommand(cmd, ...args) {
82
58
  // get start time for this command, and log in special cases
83
- let startTime = Date.now();
59
+ const startTime = Date.now();
84
60
  if (cmd === 'createSession') {
85
61
  // If creating a session determine if W3C or MJSONWP protocol was requested and remember the choice
86
62
  this.protocol = (0, protocol_1.determineProtocol)(args);
@@ -137,10 +113,6 @@ class BaseDriver extends core_1.DriverCore {
137
113
  }
138
114
  return res;
139
115
  }
140
- /**
141
- *
142
- * @param {Error|import('../protocol/errors').NoSuchDriverError} err
143
- */
144
116
  async startUnexpectedShutdown(err = new protocol_1.errors.NoSuchDriverError('The driver was unexpectedly shut down!')) {
145
117
  this.eventEmitter.emit(ON_UNEXPECTED_SHUTDOWN_EVENT, err); // allow others to listen for this
146
118
  this.shutdownUnexpectedly = true;
@@ -169,13 +141,6 @@ class BaseDriver extends core_1.DriverCore {
169
141
  await this.startUnexpectedShutdown(new Error(errorMessage));
170
142
  }, this.newCommandTimeoutMs);
171
143
  }
172
- /**
173
- *
174
- * @param {import('@appium/types').AppiumServer} server
175
- * @param {string} host
176
- * @param {number} port
177
- * @param {string} path
178
- */
179
144
  assignServer(server, host, port, path) {
180
145
  this.server = server;
181
146
  this.serverHost = host;
@@ -190,8 +155,8 @@ class BaseDriver extends core_1.DriverCore {
190
155
  this.log.debug('Resetting app mid-session');
191
156
  this.log.debug('Running generic full reset');
192
157
  // preserving state
193
- let currentConfig = {};
194
- for (let property of [
158
+ const currentConfig = {};
159
+ for (const property of [
195
160
  'implicitWaitMs',
196
161
  'newCommandTimeoutMs',
197
162
  'sessionId',
@@ -199,8 +164,6 @@ class BaseDriver extends core_1.DriverCore {
199
164
  ]) {
200
165
  currentConfig[property] = this[property];
201
166
  }
202
- // We also need to preserve the unexpected shutdown, and make sure it is not cancelled during reset.
203
- this.resetOnUnexpectedShutdown = () => { };
204
167
  try {
205
168
  if (this.sessionId !== null) {
206
169
  await this.deleteSession(this.sessionId);
@@ -210,7 +173,7 @@ class BaseDriver extends core_1.DriverCore {
210
173
  }
211
174
  finally {
212
175
  // always restore state.
213
- for (let [key, value] of lodash_1.default.toPairs(currentConfig)) {
176
+ for (const [key, value] of lodash_1.default.toPairs(currentConfig)) {
214
177
  this[key] = value;
215
178
  }
216
179
  }
@@ -222,13 +185,10 @@ class BaseDriver extends core_1.DriverCore {
222
185
  * Appium 2 has dropped the support of these, so now we only accept capability
223
186
  * objects in W3C format and thus allow any of the three arguments to represent
224
187
  * the latter.
225
- * @param {W3CCapabilities<C>} w3cCapabilities1
226
- * @param {W3CCapabilities<C>} [w3cCapabilities2]
227
- * @param {W3CCapabilities<C>} [w3cCapabilities]
228
- * @param {DriverData[]} [driverData]
229
- * @returns {Promise<[string,Capabilities<C>]>}
230
188
  */
231
- async createSession(w3cCapabilities1, w3cCapabilities2, w3cCapabilities, driverData) {
189
+ async createSession(w3cCapabilities1, w3cCapabilities2, w3cCapabilities,
190
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
191
+ driverData) {
232
192
  if (this.sessionId !== null) {
233
193
  throw new protocol_1.errors.SessionNotCreatedError('Cannot create a new session while one is in progress');
234
194
  }
@@ -241,7 +201,6 @@ class BaseDriver extends core_1.DriverCore {
241
201
  this.setProtocolW3C();
242
202
  this.originalCaps = originalCaps;
243
203
  this.log.debug(`Creating session with W3C capabilities: ${JSON.stringify(originalCaps, null, 2)}`);
244
- /** @type {Capabilities<C>} */
245
204
  let caps;
246
205
  try {
247
206
  caps = (0, capabilities_1.processCapabilities)(originalCaps, this._desiredCapConstraints, this.shouldValidateCaps);
@@ -276,37 +235,28 @@ class BaseDriver extends core_1.DriverCore {
276
235
  delete this.opts.app;
277
236
  }
278
237
  if (!lodash_1.default.isUndefined(this.caps.newCommandTimeout)) {
279
- this.newCommandTimeoutMs = /** @type {number} */ (this.caps.newCommandTimeout) * 1000;
238
+ this.newCommandTimeoutMs = this.caps.newCommandTimeout * 1000;
280
239
  }
281
240
  this._log.prefix = helpers_1.default.generateDriverLogPrefix(this, this.sessionId);
282
241
  this.log.info(`Session created with session id: ${this.sessionId}`);
283
242
  return [this.sessionId, caps];
284
243
  }
285
- /**
286
- *
287
- * @param {string} [sessionId]
288
- * @param {DriverData[]} [driverData]
289
- * @returns {Promise<void>}
290
- */
291
- async deleteSession(sessionId, driverData) {
244
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
245
+ async deleteSession(sessionId) {
292
246
  await this.clearNewCommandTimeout();
293
247
  if (this.isCommandsQueueEnabled && this.commandsQueueGuard.isBusy()) {
294
248
  // simple hack to release pending commands if they exist
295
- // @ts-ignore
296
- for (const key of lodash_1.default.keys(this.commandsQueueGuard.queues)) {
297
- // @ts-ignore
298
- this.commandsQueueGuard.queues[key] = [];
249
+ // @ts-expect-error private API
250
+ const queues = this.commandsQueueGuard.queues;
251
+ for (const key of lodash_1.default.keys(queues)) {
252
+ queues[key] = [];
299
253
  }
300
254
  }
301
255
  this.sessionId = null;
302
256
  this._log.prefix = helpers_1.default.generateDriverLogPrefix(this);
303
257
  }
304
- /**
305
- *
306
- * @param {Capabilities<C>} caps
307
- */
308
258
  logExtraCaps(caps) {
309
- let extraCaps = lodash_1.default.difference(lodash_1.default.keys(caps), lodash_1.default.keys(this._desiredCapConstraints));
259
+ const extraCaps = lodash_1.default.difference(lodash_1.default.keys(caps), lodash_1.default.keys(this._desiredCapConstraints));
310
260
  if (extraCaps.length) {
311
261
  this.log.warn(`The following capabilities were provided, but are not ` + `recognized by Appium:`);
312
262
  for (const cap of extraCaps) {
@@ -314,11 +264,6 @@ class BaseDriver extends core_1.DriverCore {
314
264
  }
315
265
  }
316
266
  }
317
- /**
318
- *
319
- * @param {Capabilities<C>} caps
320
- * @returns {boolean}
321
- */
322
267
  validateDesiredCaps(caps) {
323
268
  if (!this.shouldValidateCaps) {
324
269
  return true;
@@ -335,56 +280,6 @@ class BaseDriver extends core_1.DriverCore {
335
280
  }
336
281
  }
337
282
  exports.BaseDriver = BaseDriver;
338
- // eslint-disable-next-line import/no-unresolved
339
283
  __exportStar(require("./commands"), exports);
340
284
  exports.default = BaseDriver;
341
- /**
342
- * @typedef {import('@appium/types').HTTPMethod} HTTPMethod
343
- * @typedef {import('@appium/types').DriverData} DriverData
344
- * @typedef {import('@appium/types').Constraints} Constraints
345
- * @typedef {import('@appium/types').Constraint} Constraint
346
- * @typedef {import('@appium/types').StringRecord} StringRecord
347
- * @typedef {import('@appium/types').BaseDriverCapConstraints} BaseDriverCapConstraints
348
- * @typedef {import('@appium/types').ServerArgs} ServerArgs
349
- */
350
- /**
351
- * @callback UpdateServerCallback
352
- * @param {import('express').Express} app - Express app
353
- * @param {import('@appium/types').AppiumServer} httpServer - HTTP server
354
- * @returns {import('type-fest').Promisable<void>}
355
- */
356
- /**
357
- * This is used to extend {@linkcode BaseDriver} by the mixins and also external drivers.
358
- * @template {Constraints} C
359
- * @template [Proto={}]
360
- * @template [Static={}]
361
- * @typedef {import('@appium/types').Class<BaseDriver<C> & Proto,import('@appium/types').DriverStatic & Static>} BaseDriverBase
362
- */
363
- /**
364
- * @template {Constraints} [C=BaseDriverCapConstraints]
365
- * @typedef {import('@appium/types').SessionHandler<[string, object],void, C>} SessionHandler
366
- */
367
- /**
368
- * @template {Constraints} [C=BaseDriverCapConstraints]
369
- * @template {StringRecord|void} [Extra=void]
370
- * @typedef {import('@appium/types').Capabilities<C, Extra>} Capabilities
371
- */
372
- /**
373
- * @template {Constraints} [C=BaseDriverCapConstraints]
374
- * @template {StringRecord|void} [Extra=void]
375
- * @typedef {import('@appium/types').W3CCapabilities<C, Extra>} W3CCapabilities
376
- */
377
- /**
378
- * @template {Constraints} [C=BaseDriverCapConstraints]
379
- * @template {StringRecord} [CArgs=StringRecord]
380
- * @typedef {import('@appium/types').Driver<C, CArgs>} Driver
381
- */
382
- /**
383
- * @template {Constraints} C
384
- * @typedef {import('@appium/types').ExternalDriver<C>} ExternalDriver
385
- */
386
- /**
387
- * @template {Constraints} C
388
- * @typedef {import('@appium/types').DriverOpts<C>} DriverOpts
389
- */
390
285
  //# sourceMappingURL=driver.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"driver.js","sourceRoot":"","sources":["../../../lib/basedriver/driver.js"],"names":[],"mappings":";AAAA,kCAAkC;AAClC,mCAAmC;;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AAM,EAAE;YACpB,IAAI,CAAC,GAAG,CAAC,IAAI,CACX,wDAAwD,GAAG,uBAAuB,CACnF,CAAC;YACF,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE;gBAC3B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;aAC3B;SACF;IACH,CAAC;IAED,mBAAmB,CAAC,IAAS;QAC3B,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC5B,OAAO,IAAI,CAAC;SACb;QAED,IAAI;YACF,IAAA,2BAAY,EAAC,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;SACjD;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,GAAG,CAAC,aAAa,CACpB,IAAI,iBAAM,CAAC,sBAAsB,CAC/B,uDAAuD;gBACrD,wBAAwB,CAAC,CAAC,OAAO,EAAE,CACtC,CACF,CAAC;SACH;QAED,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAExB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA1UD,gCA0UC;AAED,6CAA2B;AAE3B,kBAAe,UAAU,CAAC"}
@@ -1,112 +1,34 @@
1
- declare const _default: import("@appium/types").DriverHelpers<any>;
1
+ declare const _default: import('@appium/types').DriverHelpers;
2
2
  export default _default;
3
- export type PostProcessOptions = {
4
- /**
5
- * The information about the previously cached app instance (if exists):
6
- * - packageHash: SHA1 hash of the package if it is a file and not a folder
7
- * - lastModified: Optional Date instance, the value of file's `Last-Modified` header
8
- * - immutable: Optional boolean value. Contains true if the file has an `immutable` mark
9
- * in `Cache-control` header
10
- * - maxAge: Optional integer representation of `maxAge` parameter in `Cache-control` header
11
- * - timestamp: The timestamp this item has been added to the cache (measured in Unix epoch
12
- * milliseconds)
13
- * - integrity: An object containing either `file` property with SHA1 hash of the file
14
- * or `folder` property with total amount of cached files and subfolders
15
- * - fullPath: the full path to the cached app
16
- */
17
- cachedAppInfo: any | null;
18
- /**
19
- * Whether the app has been downloaded from a remote URL
20
- */
21
- isUrl: boolean;
22
- /**
23
- * Optional headers object. Only present if `isUrl` is true and if the server
24
- * responds to HEAD requests. All header names are normalized to lowercase.
25
- */
26
- headers: any | null;
27
- /**
28
- * A string containing full path to the preprocessed application package (either
29
- * downloaded or a local one)
30
- */
31
- appPath: string;
3
+ export type RemoteAppProps = {
4
+ lastModified: Date | null;
5
+ immutable: boolean;
6
+ maxAge: number | null;
7
+ etag: string | null;
32
8
  };
33
- export type PostProcessResult = {
9
+ /**
10
+ * Properties of the remote application (e.g. GET HTTP response) to be downloaded.
11
+ */
12
+ export type RemoteAppData = {
34
13
  /**
35
- * The full past to the post-processed application package on the
36
- * local file system (might be a file or a folder path)
14
+ * The HTTP status of the response
37
15
  */
38
- appPath: string;
39
- };
40
- export type ConfigureAppOptions = {
16
+ status: number;
41
17
  /**
42
- * Optional function, which should be applied
43
- * to the application after it is downloaded/preprocessed. This function may be async
44
- * and is expected to accept single object parameter.
45
- * The function is expected to either return a falsy value, which means the app must not be
46
- * cached and a fresh copy of it is downloaded each time. If this function returns an object
47
- * containing `appPath` property then the integrity of it will be verified and stored into
48
- * the cache.
18
+ * The HTTP response body represented as readable stream
49
19
  */
50
- onPostProcess?: ((obj: PostProcessOptions) => (Promise<PostProcessResult | undefined> | PostProcessResult | undefined)) | undefined;
20
+ stream: import('stream').Readable;
51
21
  /**
52
- * List of supported application extensions (
53
- * including starting dots). This property is mandatory and must not be empty.
22
+ * HTTP response headers
54
23
  */
55
- supportedExtensions: string[];
56
- };
57
- export type RemoteAppProps = {
58
- lastModified: Date | null;
59
- immutable: boolean;
60
- maxAge: number | null;
24
+ headers: import('axios').RawAxiosResponseHeaders | import('axios').AxiosResponseHeaders;
61
25
  };
62
26
  /**
63
- * @typedef PostProcessOptions
64
- * @property {?Object} cachedAppInfo The information about the previously cached app instance (if exists):
65
- * - packageHash: SHA1 hash of the package if it is a file and not a folder
66
- * - lastModified: Optional Date instance, the value of file's `Last-Modified` header
67
- * - immutable: Optional boolean value. Contains true if the file has an `immutable` mark
68
- * in `Cache-control` header
69
- * - maxAge: Optional integer representation of `maxAge` parameter in `Cache-control` header
70
- * - timestamp: The timestamp this item has been added to the cache (measured in Unix epoch
71
- * milliseconds)
72
- * - integrity: An object containing either `file` property with SHA1 hash of the file
73
- * or `folder` property with total amount of cached files and subfolders
74
- * - fullPath: the full path to the cached app
75
- * @property {boolean} isUrl Whether the app has been downloaded from a remote URL
76
- * @property {?Object} headers Optional headers object. Only present if `isUrl` is true and if the server
77
- * responds to HEAD requests. All header names are normalized to lowercase.
78
- * @property {string} appPath A string containing full path to the preprocessed application package (either
79
- * downloaded or a local one)
80
- */
81
- /**
82
- * @typedef PostProcessResult
83
- * @property {string} appPath The full past to the post-processed application package on the
84
- * local file system (might be a file or a folder path)
85
- */
86
- /**
87
- * @typedef ConfigureAppOptions
88
- * @property {(obj: PostProcessOptions) => (Promise<PostProcessResult|undefined>|PostProcessResult|undefined)} [onPostProcess]
89
- * Optional function, which should be applied
90
- * to the application after it is downloaded/preprocessed. This function may be async
91
- * and is expected to accept single object parameter.
92
- * The function is expected to either return a falsy value, which means the app must not be
93
- * cached and a fresh copy of it is downloaded each time. If this function returns an object
94
- * containing `appPath` property then the integrity of it will be verified and stored into
95
- * the cache.
96
- * @property {string[]} supportedExtensions List of supported application extensions (
97
- * including starting dots). This property is mandatory and must not be empty.
98
- */
99
- /**
100
- * Prepares an app to be used in an automated test. The app gets cached automatically
101
- * if it is an archive or if it is downloaded from an URL.
102
- * If the downloaded app has `.zip` extension, this method will unzip it.
103
- * The unzip does not work when `onPostProcess` is provided.
104
27
  *
105
- * @param {string} app Either a full path to the app or a remote URL
106
- * @param {string|string[]|ConfigureAppOptions} options
107
- * @returns The full path to the resulting application bundle
28
+ * @param {string} app
29
+ * @param {string|string[]|import('@appium/types').ConfigureAppOptions} options
108
30
  */
109
- export function configureApp(app: string, options?: string | string[] | ConfigureAppOptions): Promise<any>;
31
+ export function configureApp(app: string, options?: string | string[] | import('@appium/types').ConfigureAppOptions): Promise<any>;
110
32
  export function isPackageOrBundle(app: any): boolean;
111
33
  /**
112
34
  * Finds all instances 'firstKey' and create a duplicate with the key 'secondKey',
@@ -133,5 +55,6 @@ export function parseCapsArray(cap: string | Array<string>): any[];
133
55
  * @param {string?} sessionId session identifier (if exists)
134
56
  * @returns {string}
135
57
  */
136
- export function generateDriverLogPrefix(obj: import('@appium/types').Core, sessionId?: string | null): string;
58
+ export function generateDriverLogPrefix(obj: import("@appium/types").Core<any, import("@appium/types").StringRecord<any>>, sessionId?: string | null): string;
59
+ export const BASEDRIVER_VER: string;
137
60
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../lib/basedriver/helpers.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;WA8Kc,OAAO;;;;;;;;;;aAGP,MAAM;;;;;;;aAMN,MAAM;;;;;;;;;;;;2BAMA,kBAAkB,KAAK,CAAC,QAAQ,iBAAiB,GAAC,SAAS,CAAC,GAAC,iBAAiB,GAAC,SAAS,CAAC;;;;;yBAQ/F,MAAM,EAAE;;;kBA+ZR,IAAI;eACJ,OAAO;YACP,MAAM;;AArcpB;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;GAIG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;GASG;AACH,kCAJW,MAAM,YACN,MAAM,GAAC,MAAM,EAAE,GAAC,mBAAmB,gBA6N7C;AA8FD,qDAEC;AAED;;;;;;;;;GASG;AACH,oFAuBC;AAED;;;;;GAKG;AACH,oCAFW,MAAM,GAAC,aAAa,SAoB9B;AAED;;;;;;GAMG;AACH,6CAJW,OAAO,eAAe,EAAE,IAAI,cAC5B,MAAM,UACJ,MAAM,CAKlB"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../lib/basedriver/helpers.js"],"names":[],"mappings":"wBA2kBW,OAAO,eAAe,EAAE,aAAa;;;kBAmBlC,IAAI;eACJ,OAAO;YACP,MAAM;UACN,MAAM;;;;;;;;;YAKN,MAAM;;;;YACN,OAAO,QAAQ,EAAE,QAAQ;;;;aACzB,OAAO,OAAO,EAAE,uBAAuB,GAAG,OAAO,OAAO,EAAE,oBAAoB;;AAtgB5F;;;;GAIG;AACH,kCAHW,MAAM,YACN,MAAM,GAAC,MAAM,EAAE,GAAC,OAAO,eAAe,EAAE,mBAAmB,gBA6PrE;AA4JD,qDAEC;AAED;;;;;;;;;GASG;AACH,oFAuBC;AAED;;;;;GAKG;AACH,oCAFW,MAAM,GAAC,aAAa,SAoB9B;AAED;;;;;;GAMG;AACH,uIAHW,MAAM,UACJ,MAAM,CAKlB"}