@applitools/execution-grid-client
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -66,2 +66,5 @@ "use strict"; | ||
} | ||
finally { | ||
requestLogger.log(`Request was responded with status ${response.statusCode}`); | ||
} | ||
}); | ||
@@ -82,3 +85,2 @@ server.listen(port, 'localhost'); | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u; | ||
const session = {}; | ||
const requestBody = await (0, raw_body_1.default)(request, 'utf-8').then(body => (body ? JSON.parse(body) : undefined)); | ||
@@ -88,2 +90,3 @@ if (!requestBody) | ||
logger.log(`Request was intercepted with body:`, requestBody); | ||
const session = {}; | ||
session.serverUrl = | ||
@@ -90,0 +93,0 @@ (_e = (_c = (_b = (_a = requestBody.capabilities) === null || _a === void 0 ? void 0 : _a.alwaysMatch) === null || _b === void 0 ? void 0 : _b['applitools:eyesServerUrl']) !== null && _c !== void 0 ? _c : (_d = requestBody.desiredCapabilities) === null || _d === void 0 ? void 0 : _d['applitools:eyesServerUrl']) !== null && _e !== void 0 ? _e : serverUrl; |
@@ -6,2 +6,3 @@ "use strict"; | ||
const stream_1 = require("stream"); | ||
// TODO: get rid of http-proxy library | ||
async function proxy(request, response, options) { | ||
@@ -27,6 +28,8 @@ const proxy = (0, http_proxy_1.createProxy)(); | ||
}; | ||
// prevent modification of the request headers in the http-proxy library | ||
Object.freeze(request.headers); | ||
proxy.on('proxyRes', proxyResponse => resolve(proxyResponse)); | ||
proxy.web(request, response, settings, reject); | ||
proxy.on('proxyRes', resolve); | ||
}); | ||
} | ||
exports.proxy = proxy; |
{ | ||
"name": "@applitools/execution-grid-client", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "", | ||
@@ -11,3 +11,3 @@ "license": "SEE LICENSE IN LICENSE", | ||
"bin": { | ||
"eg-client": "./bin/cli.js" | ||
"eg-client": "./dist/cli.js" | ||
}, | ||
@@ -14,0 +14,0 @@ "main": "./dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34374
357