webdriver 6.1.2 → 6.1.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/README.md CHANGED
@@ -107,6 +107,20 @@ Count of request retries to the Selenium server.
107
107
  Type: `Number`<br>
108
108
  Default: *2*
109
109
 
110
+ ### agent
111
+
112
+ Allows you to use a custom` http`/`https`/`http2` [agent](https://www.npmjs.com/package/got#agent) to make requests.
113
+
114
+ Type: `Object`<br>
115
+ Default:
116
+
117
+ ```js
118
+ {
119
+ http: new http.Agent({ keepAlive: true }),
120
+ https: new https.Agent({ keepAlive: true })
121
+ }
122
+ ```
123
+
110
124
  ### transformRequest
111
125
  Function intercepting [HTTP request options](https://github.com/sindresorhus/got#options) before a WebDriver request is made
112
126
 
package/build/request.js CHANGED
@@ -76,7 +76,7 @@ class WebDriverRequest extends _events.default {
76
76
 
77
77
  _createOptions(options, sessionId) {
78
78
  const requestOptions = {
79
- agent: options.agent || agents[options.protocol],
79
+ agent: options.agent || agents,
80
80
  headers: _objectSpread({}, DEFAULT_HEADERS, {}, typeof options.headers === 'object' ? options.headers : {}),
81
81
  searchParams: typeof options.queryParams === 'object' ? options.queryParams : {},
82
82
  timeout: options.connectionRetryTimeout
@@ -95,7 +95,8 @@ class WebDriverRequest extends _events.default {
95
95
  requestOptions.uri = new URL(`${options.protocol}://` + `${options.hostname}:${options.port}` + (this.isHubCommand ? this.endpoint : _path.default.join(options.path, this.endpoint.replace(':sessionId', sessionId))));
96
96
 
97
97
  if (this.endpoint === '/session' && options.user && options.key) {
98
- requestOptions.auth = `${options.user}:${options.key}`;
98
+ requestOptions.username = options.user;
99
+ requestOptions.password = options.key;
99
100
  }
100
101
 
101
102
  requestOptions.rejectUnauthorized = !(process.env.STRICT_SSL === 'false' || process.env.strict_ssl === 'false');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webdriver",
3
- "version": "6.1.2",
3
+ "version": "6.1.4",
4
4
  "description": "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
5
5
  "author": "Christian Bromann <christian@saucelabs.com>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/master/packages/webdriver",
@@ -34,11 +34,11 @@
34
34
  "@wdio/logger": "6.0.16",
35
35
  "@wdio/protocols": "6.1.2",
36
36
  "@wdio/utils": "6.1.0",
37
- "got": "^10.7.0",
37
+ "got": "^11.0.2",
38
38
  "lodash.merge": "^4.6.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@types/got": "^9.6.9"
41
+ "@types/got": "^9.6.10"
42
42
  },
43
- "gitHead": "49a1c97a6f4275c4000281019eaf15ffa1a85387"
43
+ "gitHead": "e186dd1169872769741244602b0c68f5932c7d1a"
44
44
  }
package/webdriver.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
11
11
  /// <reference types="node"/>
12
12
 
13
- declare type HTTPRequestOptions = import('got').GotOptions;
13
+ declare type HTTPRequestOptions = import('got').Options;
14
14
  declare type HTTPResponse = import('got').Response;
15
15
 
16
16
  declare namespace WebDriver {