New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@getgauge/cli

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getgauge/cli - npm Package Compare versions

Comparing version

to
1.1.2

3

package.json

@@ -32,6 +32,5 @@ {

"dependencies": {
"superagent": "^5.2.2",
"unzipper": "^0.9.3"
},
"version": "1.1.1"
"version": "1.1.2"
}

@@ -8,6 +8,15 @@ #!/usr/bin/env node

unzip = require('unzipper'),
request = require('superagent'),
https = require('https'),
packageJsonPath = path.join(__dirname, "..", "package.json"),
binPath = "./bin";
var downloadFollowingRedirect = function(url, resolve, reject) {
https.get(url, { headers: { 'accept-encoding': 'gzip,deflate' } }, res => {
if (res.statusCode >= 300 && res.statusCode < 400) {
downloadFollowingRedirect(res.headers.location, reject, resolve);
} else {
res.pipe(unzip.Extract({ path: path.normalize(binPath) })).on('error', reject).on('end', resolve);
}
});
};

@@ -20,4 +29,3 @@ var downloadAndExtract = function(version) {

try {
request.get(url).pipe(unzip.Extract({ path: path.normalize(binPath) }));
resolve();
downloadFollowingRedirect(url, resolve, reject);
} catch (error) {

@@ -27,6 +35,6 @@ reject(error);

})
}
};
install.getVersion(packageJsonPath)
.then((v) => downloadAndExtract(v.split('-')[0]))
.catch((e) => console.error(e));
.then((v) => downloadAndExtract(v.split('-')[0]))
.catch((e) => console.error(e));