@applitools/spec-driver-webdriver 1.7.1 → 1.7.2
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/CHANGELOG.md +7 -0
- package/dist/spec-driver.js +23 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.7.2](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-webdriver@1.7.1...js/spec-driver-webdriver@1.7.2) (2026-12-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* skip the env proxy for WebDriver urls in NO_PROXY | FLD-4721 ([#4608](https://github.com/Applitools-Dev/sdk/issues/4608)) ([362ce91](https://github.com/Applitools-Dev/sdk/commit/362ce91dfcd79856049859f34de77624687982dd))
|
|
9
|
+
|
|
3
10
|
## [1.7.1](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-webdriver@1.7.0...js/spec-driver-webdriver@1.7.1) (2026-11-30)
|
|
4
11
|
|
|
5
12
|
|
package/dist/spec-driver.js
CHANGED
|
@@ -119,6 +119,28 @@ function getAgents(httpUrl, httpsUrl) {
|
|
|
119
119
|
httpsAgent.connect = ((req, opts) => originalConnect(req, { ...opts, rejectUnauthorized: false }));
|
|
120
120
|
return { httpAgent, httpsAgent };
|
|
121
121
|
}
|
|
122
|
+
function isNoProxyUrl(url) {
|
|
123
|
+
const noProxy = utils.general.getEnvCaseInsensitive('NO_PROXY');
|
|
124
|
+
if (!noProxy)
|
|
125
|
+
return false;
|
|
126
|
+
const hostname = url.hostname.toLowerCase().replace(/^\[(.*)\]$/, '$1');
|
|
127
|
+
const port = url.port || (url.protocol === 'https:' ? '443' : '80');
|
|
128
|
+
return noProxy.split(',').some(rawEntry => {
|
|
129
|
+
var _a;
|
|
130
|
+
const entry = rawEntry.trim().toLowerCase();
|
|
131
|
+
if (!entry)
|
|
132
|
+
return false;
|
|
133
|
+
if (entry === '*')
|
|
134
|
+
return true;
|
|
135
|
+
// an unbracketed entry with several colons is a bare IPv6 address without a port
|
|
136
|
+
const match = (_a = /^\[(.+)\](?::(\d+))?$/.exec(entry)) !== null && _a !== void 0 ? _a : /^([^:]+)(?::(\d+))?$/.exec(entry);
|
|
137
|
+
const host = (match ? match[1] : entry).replace(/^\./, '');
|
|
138
|
+
const entryPort = match === null || match === void 0 ? void 0 : match[2];
|
|
139
|
+
if (entryPort && entryPort !== port)
|
|
140
|
+
return false;
|
|
141
|
+
return hostname === host || hostname.endsWith(`.${host}`);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
122
144
|
// Exported for testing
|
|
123
145
|
function buildWebDriverProxyCapabilities(proxyConfig, noProxy) {
|
|
124
146
|
if (proxyConfig.hasProxy && noProxy) {
|
|
@@ -223,7 +245,7 @@ function toDriver(driver) {
|
|
|
223
245
|
}
|
|
224
246
|
else {
|
|
225
247
|
const proxyConfig = getProxyConfiguration();
|
|
226
|
-
if (proxyConfig.hasProxy) {
|
|
248
|
+
if (proxyConfig.hasProxy && !isNoProxyUrl(url)) {
|
|
227
249
|
const { httpAgent, httpsAgent } = getAgents(proxyConfig.httpUrl, proxyConfig.httpsUrl);
|
|
228
250
|
options.agent = { http: httpAgent, https: httpsAgent };
|
|
229
251
|
}
|