testcafe-browser-provider-browserstack
Advanced tools
Comparing version 1.14.2 to 1.15.0
@@ -155,3 +155,2 @@ "use strict"; | ||
body: { desiredCapabilities: capabilities }, | ||
executeImmediately: true | ||
}); | ||
@@ -167,3 +166,3 @@ AutomateBackend._ensureSessionId(this.sessions[id]); | ||
var sessionId = this.sessions[id].sessionId; | ||
this.sessions[id].interval = setInterval(() => requestApi(BROWSERSTACK_API_PATHS.getUrl(sessionId), { executeImmediately: true }), API_POLLING_INTERVAL); | ||
this.sessions[id].interval = setInterval(() => requestApi(BROWSERSTACK_API_PATHS.getUrl(sessionId)), API_POLLING_INTERVAL); | ||
await requestApi(BROWSERSTACK_API_PATHS.openUrl(sessionId), { body: { url: pageUrl } }); | ||
@@ -204,2 +203,2 @@ } | ||
exports.default = AutomateBackend; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b21hdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYmFja2VuZHMvYXV0b21hdGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsK0JBQStCO0FBQy9CLGtEQUFpQztBQUNqQyx1RUFBa0Q7QUFDbEQscUdBQTJFO0FBQzNFLGlHQUFzRTtBQUN0RSw0RUFBOEQ7QUFDOUQsa0RBQTBCO0FBRTFCLE1BQU0sb0JBQW9CLEdBQUcsSUFBQSxrQ0FBcUIsR0FBRSxDQUFDO0FBRXJELE1BQU0sc0JBQXNCLEdBQUc7SUFDM0IsV0FBVyxFQUFFO1FBQ1QsR0FBRyxFQUFFLHFEQUFxRDtLQUM3RDtJQUVELFVBQVUsRUFBRTtRQUNSLEdBQUcsRUFBSyxtREFBbUQ7UUFDM0QsTUFBTSxFQUFFLE1BQU07S0FDakI7SUFFRCxPQUFPLEVBQUUsRUFBRSx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YyByZXBvcnRKb2JSZXN1bHQgKGlkLCBqb2JSZXN1bHQsIGpvYkRhdGEsIHBvc3NpYmxlUmVzdWx0cykge1xuICAgICAgICB2YXIgc2Vzc2lvbklkID0gdGhpcy5zZXNzaW9uc1tpZF0uc2Vzc2lvbklkO1xuICAgICAgICB2YXIgam9iU3RhdHVzID0gY3JlYXRlQnJvd3NlcnN0YWNrU3RhdHVzKGpvYlJlc3VsdCwgam9iRGF0YSwgcG9zc2libGVSZXN1bHRzKTtcblxuICAgICAgICBhd2FpdCByZXF1ZXN0QXBpQmFzZShCUk9XU0VSU1RBQ0tfQVBJX1BBVEhTLnNldFN0YXR1cyhzZXNzaW9uSWQpLCB7IGJvZHk6IGpvYlN0YXR1cyB9KTtcbiAgICB9XG59XG4iXX0= |
@@ -73,3 +73,5 @@ "use strict"; | ||
capabilities = Object.assign({ 'browserstack.local': local, timeout: TESTS_TIMEOUT, url: pageUrl }, restCapabilities); | ||
this.workers[id] = await (0, request_api_1.default)(BROWSERSTACK_API_PATHS.newWorker, Object.assign({ executeImmediately: true }, capabilities)); | ||
this.workers[id] = await (0, request_api_1.default)(BROWSERSTACK_API_PATHS.newWorker, { | ||
body: Object.assign({}, capabilities) | ||
}); | ||
const sessionInfo = await this._requestSessionInfo(id); | ||
@@ -110,2 +112,2 @@ const osInfo = { | ||
exports.default = JSTestingBackend; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianMtdGVzdGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iYWNrZW5kcy9qcy10ZXN0aW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxrREFBaUM7QUFDakMsdUVBQThDO0FBQzlDLHFHQUEyRTtBQUMzRSxrREFBMEI7QUFHMUIsTUFBTSxhQUFhLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0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ICAuLi5yZXN0Q2FwYWJpbGl0aWVzLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMud29ya2Vyc1tpZF0gPSBhd2FpdCByZXF1ZXN0QXBpKEJST1dTRVJTVEFDS19BUElfUEFUSFMubmV3V29ya2VyLCB7XG4gICAgICAgICAgICBleGVjdXRlSW1tZWRpYXRlbHk6IHRydWUsXG5cbiAgICAgICAgICAgIC4uLmNhcGFiaWxpdGllcyxcbiAgICAgICAgfSk7XG5cbiAgICAgICAgY29uc3Qgc2Vzc2lvbkluZm8gPSBhd2FpdCB0aGlzLl9yZXF1ZXN0U2Vzc2lvbkluZm8oaWQpO1xuICAgICAgICBjb25zdCBvc0luZm8gICAgICA9IHtcbiAgICAgICAgICAgIG5hbWU6ICAgIHNlc3Npb25JbmZvWydvcyddIHx8ICcnLFxuICAgICAgICAgICAgdmVyc2lvbjogc2Vzc2lvbkluZm9bJ29zX3ZlcnNpb24nXSB8fCAnJ1xuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMud29ya2Vyc1tpZF0uc3RhcnRlZCAgICA9IERhdGUubm93KCk7XG4gICAgICAgIHRoaXMud29ya2Vyc1tpZF0uc2Vzc2lvblVybCA9IHNlc3Npb25JbmZvWydicm93c2VyX3VybCddO1xuICAgICAgICB0aGlzLndvcmtlcnNbaWRdLm9zSW5mbyAgICAgPSBvc0luZm87XG4gICAgICAgIHRoaXMud29ya2Vyc1tpZF0uc2Vzc2lvbklkICA9IGF3YWl0IHRoaXMuX2dldFNlc3Npb25JZChpZCk7XG4gICAgfVxuXG4gICAgYXN5bmMgY2xvc2VCcm93c2VyIChpZCkge1xuICAgICAgICB2YXIgd29ya2VySWQgPSB0aGlzLndvcmtlcnNbaWRdLmlkO1xuXG4gICAgICAgIC8vIFJldHVybiBpbmNhc2Ugb2YgaW52YWxpZCB3b3JrZXJJZFxuICAgICAgICBpZiAoIXdvcmtlcklkIHx8IHdvcmtlcklkID09PSAnJylcbiAgICAgICAgICAgIHJldHVybjt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CBvc0luZm8gICAgICA9IHtcbiAgICAgICAgICAgIG5hbWU6ICAgIHNlc3Npb25JbmZvWydvcyddIHx8ICcnLFxuICAgICAgICAgICAgdmVyc2lvbjogc2Vzc2lvbkluZm9bJ29zX3ZlcnNpb24nXSB8fCAnJ1xuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMud29ya2Vyc1tpZF0uc3RhcnRlZCAgICA9IERhdGUubm93KCk7XG4gICAgICAgIHRoaXMud29ya2Vyc1tpZF0uc2Vzc2lvblVybCA9IHNlc3Npb25JbmZvWydicm93c2VyX3VybCddO1xuICAgICAgICB0aGlzLndvcmtlcnNbaWRdLm9zSW5mbyAgICAgPSBvc0luZm87XG4gICAgICAgIHRoaXMud29ya2Vyc1tpZF0uc2Vzc2lvbklkICA9IGF3YWl0IHRoaXMuX2dldFNlc3Npb25JZChpZCk7XG4gICAgfVxuXG4gICAgYXN5bmMgY2xvc2VCcm93c2VyIChpZCkge1xuICAgICAgICB2YXIgd29ya2VySWQgPSB0aGlzLndvcmtlcnNbaWRdLmlkO1xuXG4gICAgICAgIC8vIFJldHVybiBpbmNhc2Ugb2YgaW52YWxpZCB3b3JrZXJJZFxuICAgICAgICBpZiAoIXdvcmtlcklkIHx8IHdvcmtlcklkID09PSAnJylcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICBhd2FpdCByZXF1ZXN0QXBpKEJST1dTRVJTVEFDS19BUElfUEFUSFMuZGVsZXRlV29ya2VyKHdvcmtlcklkKSk7XG5cbiAgICB9XG5cbiAgICBhc3luYyB0YWtlU2NyZWVuc2hvdCAoaWQsIHNjcmVlbnNob3RQYXRoKSB7XG4gICAgICAgIHZhciBidWZmZXIgICAgPSBhd2FpdCByZXF1ZXN0QXBpKEJST1dTRVJTVEFDS19BUElfUEFUSFMuc2NyZWVuc2hvdCh0aGlzLndvcmtlcnNbaWRdLmlkKSk7XG4gICAgICAgIHZhciBwbmdCdWZmZXIgPSBhd2FpdCBzaGFycChidWZmZXIpLnRv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bn1cblxuIl19 |
@@ -40,41 +40,37 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const pinkie_1 = __importDefault(require("pinkie")); | ||
const request_promise_1 = __importDefault(require("request-promise")); | ||
const node_fetch_1 = __importDefault(require("node-fetch")); | ||
const https_proxy_agent_1 = require("https-proxy-agent"); | ||
const ERROR_MESSAGES = __importStar(require("../templates/error-messages")); | ||
const apiRequestPromise = pinkie_1.default.resolve(null); | ||
function default_1(apiPath, params = {}) { | ||
async function default_1(apiPath, params = {}) { | ||
if (!process.env['BROWSERSTACK_USERNAME'] || !process.env['BROWSERSTACK_ACCESS_KEY']) | ||
throw new Error(ERROR_MESSAGES.BROWSERSTACK_AUTHENTICATION_FAILED()); | ||
var { body, executeImmediately } = params, queryParams = __rest(params, ["body", "executeImmediately"]); | ||
var opts = { | ||
url: apiPath.url, | ||
auth: { | ||
user: process.env['BROWSERSTACK_USERNAME'], | ||
pass: process.env['BROWSERSTACK_ACCESS_KEY'], | ||
}, | ||
const { body } = params, queryParams = __rest(params, ["body"]); | ||
const urlObj = new URL(apiPath.url); | ||
for (const [key, value] of Object.entries(queryParams)) | ||
urlObj.searchParams.append(key, value); | ||
const url = urlObj.toString(); | ||
const user = process.env['BROWSERSTACK_USERNAME']; | ||
const pass = process.env['BROWSERSTACK_ACCESS_KEY']; | ||
const options = { | ||
method: apiPath.method || 'GET', | ||
headers: { | ||
'user-agent': 'testcafe-browserstack', | ||
'Authorization': `Basic ${Buffer.from(user + ':' + pass).toString('base64')}`, | ||
'User-Agent': 'testcafe-browserstack', | ||
}, | ||
qs: Object.assign({}, queryParams), | ||
method: apiPath.method || 'GET', | ||
json: apiPath.encoding === void 0 | ||
}; | ||
const proxy = process.env['BROWSERSTACK_PROXY']; | ||
if (proxy) | ||
opts.proxy = `http://${proxy}`; | ||
if (body) | ||
opts.body = body; | ||
if (apiPath.encoding !== void 0) | ||
opts.encoding = apiPath.encoding; | ||
const chainPromise = executeImmediately ? pinkie_1.default.resolve(null) : apiRequestPromise; | ||
const currentRequestPromise = chainPromise | ||
.then(() => (0, request_promise_1.default)(opts)) | ||
.catch(error => { | ||
if (error.statusCode === 401) | ||
throw new Error(ERROR_MESSAGES.BROWSERSTACK_AUTHENTICATION_FAILED()); | ||
throw error; | ||
}); | ||
return currentRequestPromise; | ||
options.agent = new https_proxy_agent_1.HttpsProxyAgent(`http://${proxy}`); | ||
if (body) { | ||
options.body = JSON.stringify(body); | ||
options.headers['Content-Type'] = 'application/json'; | ||
} | ||
const res = await (0, node_fetch_1.default)(url, options); | ||
if (res.status === 401) | ||
throw new Error(ERROR_MESSAGES.BROWSERSTACK_AUTHENTICATION_FAILED()); | ||
if (apiPath.encoding === null) | ||
return Buffer.from(await res.arrayBuffer()); | ||
return res.json(); | ||
} | ||
exports.default = default_1; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC1hcGkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbHMvcmVxdWVzdC1hcGkuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsb0RBQTZCO0FBQzdCLHNFQUFzQztBQUN0Qyw0RUFBOEQ7QUFFOUQsTUFBTSxpQkFBaUIsR0FBRyxnQkFBTyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUVoRCxtQkFBeUIsT0FBTyxFQUFFLE1BQU0sR0FBRyxFQUFFO0lBQ3pDLElBQUksQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLHVCQUF1QixDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLHlCQUF5QixDQUFDO1FBQ2hGLE1BQU0sSUFBSSxLQUFLLENBQUMsY0FBYyxDQUFDLGtDQUFrQyxFQUFFLENB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IGZldGNoKHVybCwgb3B0aW9ucyk7XG5cbiAgICBpZiAocmVzLnN0YXR1cyA9PT0gNDAxKVxuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoRVJST1JfTUVTU0FHRVMuQlJPV1NFUlNUQUNLX0FVVEhFTlRJQ0FUSU9OX0ZBSUxFRCgpKTtcblxuICAgIGlmIChhcGlQYXRoLmVuY29kaW5nID09PSBudWxsKVxuICAgICAgICByZXR1cm4gQnVmZmVyLmZyb20oYXdhaXQgcmVzLmFycmF5QnVmZmVyKCkpO1xuXG4gICAgcmV0dXJuIHJlcy5qc29uKCk7XG59XG4iXX0= |
{ | ||
"name": "testcafe-browser-provider-browserstack", | ||
"version": "1.14.2", | ||
"version": "1.15.0", | ||
"description": "Browserstack TestCafe browser provider plugin.", | ||
"repository": "https://github.com/DevExpress/testcafe-browser-provider-browserstack", | ||
"engines": { | ||
"node": ">=8.0.0" | ||
"node": ">=10" | ||
}, | ||
@@ -37,9 +37,9 @@ "homepage": "https://github.com/DevExpress/testcafe-browser-provider-browserstack", | ||
"firefox-profile": "^4.2.2", | ||
"https-proxy-agent": "^7.0.0", | ||
"lodash": "^4.17.15", | ||
"mime-db": "^1.43.0", | ||
"node-fetch": "^2.6.11", | ||
"os-family": "^1.0.0", | ||
"pinkie": "^2.0.4", | ||
"promisify-event": "^1.0.0", | ||
"request": "^2.88.0", | ||
"request-promise": "^4.2.4", | ||
"sharp": "^0.30.7", | ||
@@ -46,0 +46,0 @@ "tmp": "0.0.31" |
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
Network access
Supply chain riskThis module accesses the network.
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
141087
898
2
+ Addedhttps-proxy-agent@^7.0.0
+ Addednode-fetch@^2.6.11
+ Addedagent-base@7.1.3(transitive)
+ Addedhttps-proxy-agent@7.0.6(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removedrequest@^2.88.0
- Removedrequest-promise@^4.2.4
- Removedajv@6.12.6(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedbluebird@3.7.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpsl@1.15.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrequest@2.88.2(transitive)
- Removedrequest-promise@4.2.6(transitive)
- Removedrequest-promise-core@1.1.4(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedstealthy-require@1.1.1(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)