Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wdio/config

Package Overview
Dependencies
Maintainers
3
Versions
336
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/config - npm Package Compare versions

Comparing version 5.4.11 to 5.4.13

9

build/lib/ConfigParser.js

@@ -71,6 +71,13 @@ "use strict";

/**
* For Sauce Labs RDC we need to determine if the config file has a `testobject_api_key`
* If so, we need to provide a boolean to the `detectBackend` to set the correct hostname
*/
const isRDC = this._capabilities.some(capability => 'testobject_api_key' in capability);
/**
* detect Selenium backend
*/
this._config = (0, _deepmerge.default)((0, _utils.detectBackend)(this._config), this._config, MERGE_OPTIONS);
this._config = (0, _deepmerge.default)((0, _utils.detectBackend)(this._config, isRDC), this._config, MERGE_OPTIONS);
} catch (e) {

@@ -77,0 +84,0 @@ log.error(`Failed loading configuration file: ${filePath}:`, e.message);

21

build/utils.js

@@ -19,5 +19,10 @@ "use strict";

function getSauceEndpoint(region) {
const dc = region ? typeof REGION_MAPPING[region] !== 'undefined' ? REGION_MAPPING[region] : region + '.' : '';
return `${dc}saucelabs.com`;
function getSauceEndpoint(region, isRDC) {
const dcRegion = REGION_MAPPING[region] ? region : 'us';
if (isRDC) {
return `${dcRegion}1.appium.testobject.com`;
}
return `${REGION_MAPPING[dcRegion]}saucelabs.com`;
}

@@ -29,3 +34,3 @@ /**

function detectBackend(options = {}) {
function detectBackend(options = {}, isRDC = false) {
const {

@@ -69,6 +74,10 @@ port,

if (typeof user === 'string' && key.length === 36) {
if (typeof user === 'string' && key.length === 36 || // When SC is used a user needs to be provided and `isRDC` needs to be true
typeof user === 'string' && isRDC || // Or only RDC
isRDC) {
// For the VM cloud a prefix needs to be added, the RDC cloud doesn't have that
const preFix = isRDC ? '' : 'ondemand.';
return {
protocol: protocol || 'https',
hostname: hostname || `ondemand.${getSauceEndpoint(region)}`,
hostname: hostname || preFix + getSauceEndpoint(region, isRDC),
port: port || 443

@@ -75,0 +84,0 @@ };

{
"name": "@wdio/config",
"version": "5.4.11",
"version": "5.4.13",
"description": "A helper utility to parse and validate WebdriverIO options",

@@ -40,3 +40,3 @@ "author": "Christian Bromann <christian@saucelabs.com>",

},
"gitHead": "8dba3695bd0dffac069be2309d4e0358916e2f75"
"gitHead": "2501a3fb559163b6806f61092816b97d21c1825f"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc