browserstack-local
Advanced tools
Comparing version 1.5.3 to 1.5.4
@@ -6,3 +6,3 @@ const https = require('https'), | ||
const binaryPath = process.argv[2],httpPath = process.argv[3], proxyHost = process.argv[4], proxyPort = process.argv[5]; | ||
const binaryPath = process.argv[2], httpPath = process.argv[3], proxyHost = process.argv[4], proxyPort = process.argv[5], useCaCertificate = process.argv[6]; | ||
@@ -17,2 +17,9 @@ var fileStream = fs.createWriteStream(binaryPath); | ||
}); | ||
if (useCaCertificate) { | ||
try { | ||
options.ca = fs.readFileSync(useCaCertificate); | ||
} catch(err) { | ||
console.log("failed to read cert file", err) | ||
} | ||
} | ||
} | ||
@@ -19,0 +26,0 @@ |
@@ -186,2 +186,7 @@ var childProcess = require('child_process'), | ||
case 'useCaCertificate': | ||
if(value) | ||
this.useCaCertificate = value; | ||
break; | ||
case 'proxyHost': | ||
@@ -249,2 +254,5 @@ if(value) | ||
} | ||
if (this.useCaCertificate) { | ||
conf.useCaCertificate = this.useCaCertificate; | ||
} | ||
if(!callback) { | ||
@@ -289,2 +297,6 @@ return this.binary.binaryPath(conf); | ||
args.push(this.onlyAutomateFlag); | ||
if (this.useCaCertificate) { | ||
args.push('--use-ca-certificate'); | ||
args.push(this.useCaCertificate); | ||
} | ||
if(this.proxyHost){ | ||
@@ -291,0 +303,0 @@ args.push('--proxy-host'); |
@@ -76,2 +76,7 @@ var https = require('https'), | ||
opts.push(conf.proxyHost, conf.proxyPort); | ||
if (conf.useCaCertificate) { | ||
opts.push(conf.useCaCertificate); | ||
} | ||
} else if (conf.useCaCertificate) { | ||
opts.push(undefined, undefined, conf.useCaCertificate); | ||
} | ||
@@ -117,2 +122,9 @@ | ||
} | ||
if (conf.useCaCertificate) { | ||
try { | ||
options.ca = fs.readFileSync(conf.useCaCertificate); | ||
} catch(err) { | ||
console.log("failed to read cert file", err) | ||
} | ||
} | ||
@@ -119,0 +131,0 @@ https.get(options, function (response) { |
{ | ||
"name": "browserstack-local", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"description": "Nodejs bindings for BrowserStack Local", | ||
@@ -5,0 +5,0 @@ "engine": "^0.10.44", |
@@ -81,5 +81,6 @@ # browserstack-local-nodejs | ||
* proxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified | ||
* useCaCertificate: Path to ca cert file, if required | ||
```js | ||
bs_local_args = { 'key': '<browserstack-accesskey>', 'proxyHost': '127.0.0.1', 'proxyPort': '8000', 'proxyUser': 'user', 'proxyPass': 'password' } | ||
bs_local_args = { 'key': '<browserstack-accesskey>', 'proxyHost': '127.0.0.1', 'proxyPort': '8000', 'proxyUser': 'user', 'proxyPass': 'password', 'useCaCertificate': '/Users/test/cert.pem' } | ||
``` | ||
@@ -86,0 +87,0 @@ |
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
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
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
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
47858
16
1075
153
6
38