Socket
Socket
Sign inDemoInstall

saucelabs

Package Overview
Dependencies
Maintainers
4
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

saucelabs - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

20

build/constants.js

@@ -6,3 +6,3 @@ "use strict";

});
exports.SC_CLOSE_TIMEOUT = exports.SC_CLOSE_MESSAGE = exports.SC_READY_MESSAGE = exports.SC_PARAMS_TO_STRIP = exports.SC_CLI_PARAM_KEYS = exports.SAUCE_CONNECT_CLI_PARAMS = exports.CLI_PARAMS = exports.EPILOG = exports.USAGE = exports.TO_STRING_TAG = exports.SYMBOL_ITERATOR = exports.SYMBOL_TOSTRING = exports.SYMBOL_INSPECT = exports.REGION_MAPPING = exports.DEFAULT_OPTIONS = exports.JOB_ASSET_NAMES = exports.PARAMETERS_MAP = exports.PROTOCOL_MAP = exports.SAUCE_VERSION_NOTE = exports.SAUCE_CONNECT_DISTS = exports.SAUCE_CONNECT_BASE = exports.SAUCE_CONNECT_VERSION = void 0;
exports.SC_CLOSE_TIMEOUT = exports.SC_CLOSE_MESSAGE = exports.SC_READY_MESSAGE = exports.SC_PARAMS_TO_STRIP = exports.SC_CLI_PARAM_KEYS = exports.SAUCE_CONNECT_CLI_PARAMS = exports.CLI_PARAMS = exports.EPILOG = exports.USAGE = exports.TO_STRING_TAG = exports.SYMBOL_ITERATOR = exports.SYMBOL_TOSTRING = exports.SYMBOL_INSPECT = exports.REGION_MAPPING = exports.DEFAULT_OPTIONS = exports.JOB_ASSET_NAMES = exports.PARAMETERS_MAP = exports.PROTOCOL_MAP = exports.SAUCE_VERSION_NOTE = exports.SAUCE_CONNECT_DISTS = exports.SAUCE_CONNECT_BASE = exports.DEFAULT_SAUCE_CONNECT_VERSION = void 0;

@@ -13,9 +13,9 @@ var _changeCase = require("change-case");

const SAUCE_CONNECT_VERSION = '4.5.4';
exports.SAUCE_CONNECT_VERSION = SAUCE_CONNECT_VERSION;
const DEFAULT_SAUCE_CONNECT_VERSION = '4.5.4';
exports.DEFAULT_SAUCE_CONNECT_VERSION = DEFAULT_SAUCE_CONNECT_VERSION;
const SAUCE_CONNECT_BASE = 'https://saucelabs.com/downloads';
exports.SAUCE_CONNECT_BASE = SAUCE_CONNECT_BASE;
const SAUCE_CONNECT_DISTS = [[`${SAUCE_CONNECT_BASE}/sc-${SAUCE_CONNECT_VERSION}-osx.zip`, 'darwin'], [`${SAUCE_CONNECT_BASE}/sc-${SAUCE_CONNECT_VERSION}-win32.zip`, 'win32'], [`${SAUCE_CONNECT_BASE}/sc-${SAUCE_CONNECT_VERSION}-linux.tar.gz`, 'linux', 'x64'], [`${SAUCE_CONNECT_BASE}/sc-${SAUCE_CONNECT_VERSION}_linux32.tar.gz`, 'linux']];
const SAUCE_CONNECT_DISTS = [[`${SAUCE_CONNECT_BASE}/sc-%s-osx.zip`, 'darwin'], [`${SAUCE_CONNECT_BASE}/sc-%s-win32.zip`, 'win32'], [`${SAUCE_CONNECT_BASE}/sc-%s-linux.tar.gz`, 'linux', 'x64'], [`${SAUCE_CONNECT_BASE}/sc-%s_linux32.tar.gz`, 'linux']];
exports.SAUCE_CONNECT_DISTS = SAUCE_CONNECT_DISTS;
const SAUCE_VERSION_NOTE = `node-saucelabs v${_package.version}\nSauce Connect v${SAUCE_CONNECT_VERSION}`;
const SAUCE_VERSION_NOTE = `node-saucelabs v${_package.version}\nSauce Connect v${DEFAULT_SAUCE_CONNECT_VERSION}`;
exports.SAUCE_VERSION_NOTE = SAUCE_VERSION_NOTE;

@@ -136,2 +136,12 @@ const protocols = [require('../apis/sauce.json'), require('../apis/rdc.json'), require('../apis/performance.json')];

const SAUCE_CONNECT_CLI_PARAMS = [{
/**
* custom parameter
*/
name: 'sc-version',
description: 'Specify the Sauce Connect version you want to use.',
default: DEFAULT_SAUCE_CONNECT_VERSION
}, {
/**
* Sauce Connect parameter
*/
alias: 'a',

@@ -138,0 +148,0 @@ name: 'auth',

@@ -10,2 +10,4 @@ "use strict";

var _util = _interopRequireDefault(require("util"));
var _path = _interopRequireDefault(require("path"));

@@ -231,2 +233,4 @@

const sauceConnectVersion = argv.scVersion || _constants.DEFAULT_SAUCE_CONNECT_VERSION;
const {

@@ -240,5 +244,5 @@ host,

/**
* filter out yargs and yargs params
* filter out yargs, yargs params and custom parameters
*/
.filter(([k]) => !['_', '$0', ..._constants.SC_PARAMS_TO_STRIP].includes(k))
.filter(([k]) => !['_', '$0', 'sc-version', ..._constants.SC_PARAMS_TO_STRIP].includes(k))
/**

@@ -252,8 +256,8 @@ * remove duplicate params by yargs

const bin = _constants.SAUCE_CONNECT_DISTS.reduce((bin, dist) => {
bin.src(...dist);
const bin = _constants.SAUCE_CONNECT_DISTS.reduce((bin, [downloadUrl, ...args]) => {
bin.src(_util.default.format(downloadUrl, sauceConnectVersion), ...args);
return bin;
}, new _binWrapper.default());
bin.dest(_path.default.join(__dirname, 'bin', 'bin')).use(process.platform.startsWith('win') ? 'sc.exe' : 'sc').version(`v${_constants.SAUCE_CONNECT_VERSION}`);
bin.dest(_path.default.join(__dirname, `.sc-v${sauceConnectVersion}`)).use('/bin/' + (process.platform.startsWith('win') ? 'sc.exe' : 'sc')).version(`v${sauceConnectVersion}`);
await bin.run(['--version']);

@@ -281,3 +285,12 @@ const cp = (0, _child_process.spawn)(bin.path(), args);

cp.stdout.on('data', data => {
if (data.toString().includes(_constants.SC_READY_MESSAGE)) {
const output = data.toString();
/**
* print to stdout if called via CLI
*/
if (fromCLI) {
process.stdout.write(output);
}
if (output.includes(_constants.SC_READY_MESSAGE)) {
return resolve(returnObj);

@@ -284,0 +297,0 @@ }

{
"name": "saucelabs",
"version": "4.1.0",
"version": "4.2.0",
"author": "Christian Bromann <christian@saucelabs.com>",

@@ -25,3 +25,3 @@ "description": "A wrapper around Sauce Labs REST API",

"compile": "babel src -d build",
"eslint": "eslint ./src/**/*.js ./tests/**/*.js",
"eslint": "eslint -c ./.eslintrc.js ./src/**/*.js ./tests/**/*.js",
"generate:docs": "babel-node ./scripts/generate-docs",

@@ -66,5 +66,5 @@ "generate:typings": "babel-node ./scripts/generate-typings",

"codecov": "^3.7.0",
"eslint": "^7.0.0",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.2",
"jest": "^26.0.1",
"jest": "^25.5.4",
"np": "^6.2.3",

@@ -71,0 +71,0 @@ "npm-run-all": "^4.1.5",

@@ -101,4 +101,6 @@ <p align="center">

```sh
$ sl sc --region eu --se-port 4445
# start Sauce Connect tunnel for eu-central-1 region
$ sl sc --region eu --tunnel-identifier "my-tunnel"
# run a specific Sauce Connect version
$ sl sc --scVersion 4.5.4
# see all available Sauce Connect parameters via:

@@ -169,9 +171,9 @@ $ sl sc --help

*/
const sc = await api.startSauceConnect({
const sc = await myAccount.startSauceConnect({
/**
* see all available parameters here: https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy+Command-Line+Quick+Reference+Guide
* all parameters have to be applied camel cased instead of with hyphens, e.g.
* to apply the `--se-port` parameter, set:
* to apply the `--tunnel-identifier` parameter, set:
*/
sePort: 1234
tunnelIdentifier: 'my-tunnel'
})

@@ -178,0 +180,0 @@

Sorry, the diff of this file is too big to display

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