Socket
Socket
Sign inDemoInstall

browserstack-cypress-cli

Package Overview
Dependencies
Maintainers
1
Versions
73
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.31.4 to 1.31.5

40

bin/helpers/buildArtifacts.js

@@ -13,4 +13,4 @@ 'use strict';

const decompress = require('decompress');
const unzipper = require("unzipper");
let BUILD_ARTIFACTS_TOTAL_COUNT = 0;

@@ -125,9 +125,11 @@ let BUILD_ARTIFACTS_FAIL_COUNT = 0;

writer.on('close', async () => {
if (!error) {
await unzipFile(filePath, fileName);
fs.unlinkSync(tmpFilePath);
resolve(true);
try {
if (!error) {
await unzipFile(filePath, fileName);
fs.unlinkSync(tmpFilePath);
}
} catch (error) {
reject(error);
}
//no need to call the reject here, as it will have been called in the
//'error' stream;
resolve(true);
});

@@ -141,9 +143,21 @@ }

return new Promise( async (resolve, reject) => {
await decompress(path.join(filePath, fileName), filePath)
.then((files) => {
try {
await decompress(path.join(filePath, fileName), filePath);
resolve();
})
.catch((error) => {
reject(error);
});
} catch (error) {
logger.debug(`Error unzipping with decompress, trying with unzipper. Stacktrace: ${error}.`);
try {
fs.createReadStream(path.join(filePath, fileName))
.pipe(unzipper.Extract({ path: filePath }))
.on("close", () => {
resolve();
})
.on("error", (err) => {
reject(err);
});
} catch (unzipperError) {
logger.debug(`Unzipper package error: ${unzipperError}`);
reject(Constants.userMessages.BUILD_ARTIFACTS_UNZIP_FAILURE);
}
}
});

@@ -150,0 +164,0 @@ }

@@ -126,3 +126,4 @@ let config = require("./config");

CYPRESS_INTERACTIVE_SESSION_CONFLICT_VALUES:
"Conflicting values (True & False) were found for the interactive_debugging capability. Please resolve this issue to proceed further."
"Conflicting values (True & False) were found for the interactive_debugging capability. Please resolve this issue to proceed further.",
BUILD_ARTIFACTS_UNZIP_FAILURE: "Failed to unzip build artifacts.",
};

@@ -129,0 +130,0 @@

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

@@ -37,3 +37,4 @@ "main": "index.js",

"yargs": "14.2.3",
"decompress": "4.2.1"
"decompress": "4.2.1",
"unzipper": "^0.12.3"
},

@@ -40,0 +41,0 @@ "repository": {

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