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

browserstack-cypress-cli

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserstack-cypress-cli - npm Package Compare versions

Comparing version 1.29.1 to 1.29.2

10

bin/commands/runs.js

@@ -266,3 +266,11 @@ 'use strict';

let npm_zip_size = utils.fetchZipSize(path.join(process.cwd(), config.packageFileName));
let node_modules_size = await utils.fetchFolderSize(path.join(process.cwd(), "node_modules"))
let node_modules_size = await utils.fetchFolderSize(path.join(process.cwd(), "node_modules"));
if (Constants.turboScaleObj.enabled) {
// Note: Calculating md5 here for turboscale force-upload so that we don't need to re-calculate at hub
let zip_md5sum = await checkUploaded.checkSpecsMd5(bsConfig.run_settings, args, {markBlockStart, markBlockEnd});
let npm_package_md5sum = await checkUploaded.checkPackageMd5(bsConfig.run_settings);
Object.assign(md5data, { npm_package_md5sum });
Object.assign(md5data, { zip_md5sum });
}

@@ -269,0 +277,0 @@ //Package diff

9

bin/helpers/checkUploaded.js

@@ -16,5 +16,2 @@ 'use strict';

return new Promise(function (resolve, reject) {
if (args["force-upload"]) {
return resolve("force-upload");
}
let cypressFolderPath = undefined;

@@ -170,2 +167,6 @@ if (runSettings.home_directory) {

exports.checkUploadedMd5 = checkUploadedMd5;
module.exports = {
checkSpecsMd5,
checkPackageMd5,
checkUploadedMd5
};

@@ -13,2 +13,3 @@ 'use strict';

const { AUTH_REGEX, REDACTED_AUTH, REDACTED, CLI_ARGS_REGEX, RAW_ARGS_REGEX } = require("./constants");
const { isTurboScaleSession } = require('../helpers/atsHelper');

@@ -201,6 +202,54 @@ function get_version(package_name) {

function sendTurboscaleErrorLogs(args) {
let bsConfig = JSON.parse(JSON.stringify(args.bstack_config));
let data = utils.isUndefined(args.data) ? {} : args.data;
const turboscaleErrorPayload = {
kind: 'hst-cypress-cli-error',
data: data,
error: args.message
}
const options = {
headers: {
'User-Agent': utils.getUserAgent()
},
method: "POST",
auth: {
username: bsConfig.auth.username,
password: bsConfig.auth.access_key,
},
url: `${config.turboScaleAPIUrl}/send-instrumentation`,
body: turboscaleErrorPayload,
json: true,
maxAttempts: 10, // (default) try 3 times
retryDelay: 2000, // (default) wait for 2s before trying again
retrySrategy: request.RetryStrategies.HTTPOrNetworkError, // (default) retry on 5xx or network errors
};
fileLogger.info(`Sending ${JSON.stringify(turboscaleErrorPayload)} to ${config.turboScaleAPIUrl}/send-instrumentation`);
request(options, function (error, res, body) {
if (error) {
//write err response to file
fileLogger.error(JSON.stringify(error));
return;
}
// write response file
let response = {
attempts: res.attempts,
statusCode: res.statusCode,
body: body
};
fileLogger.info(`${JSON.stringify(response)}`);
});
}
function send(args) {
let bsConfig = JSON.parse(JSON.stringify(args.bstack_config));
if (isTurboScaleSession(bsConfig) && args.message_type === 'error') {
sendTurboscaleErrorLogs(args);
}
if (isUsageReportingEnabled() === "true") return;
let bsConfig = JSON.parse(JSON.stringify(args.bstack_config));
let runSettings = "";

@@ -263,2 +312,6 @@ let sanitizedbsConfig = "";

if (isTurboScaleSession(bsConfig)) {
payload.event_type = 'hst_cypress_cli_stats';
}
const options = {

@@ -265,0 +318,0 @@ headers: {

{
"name": "browserstack-cypress-cli",
"version": "1.29.1",
"version": "1.29.2",
"description": "BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.",

@@ -5,0 +5,0 @@ "main": "index.js",

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