Socket
Socket
Sign inDemoInstall

@sentry/cli

Package Overview
Dependencies
Maintainers
8
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/cli - npm Package Compare versions

Comparing version 1.36.4 to 1.37.0

7

CHANGELOG.md
# Changelog
## sentry-cli 1.37.0
* Support React Native >= 0.46 (@stephan-nordnes-eriksen, #377)
* Cache binaries to speed up NPM package installation (@timfish, #425)
* Check for successful upload of debug files (#429)
* Limit debug file uploads to 2GB (maximum allowed by Sentry) (#432)
## sentry-cli 1.36.4

@@ -4,0 +11,0 @@

10

package.json
{
"name": "@sentry/cli",
"version": "1.36.4",
"version": "1.37.0",
"description": "A command line utility to work with Sentry. https://docs.sentry.io/hosted/learn/cli/",
"scripts": {
"install": "node scripts/install.js",
"fix:eslint": "eslint --fix 'bin/*' js",
"fix:prettier": "prettier --write 'bin/*' 'scripts/*.js' 'js/**/*.js'",
"fix:eslint": "eslint --fix \"bin/*\" js",
"fix:prettier": "prettier --write \"bin/*\" \"scripts/*.js\" \"js/**/*.js\"",
"fix": "npm-run-all fix:eslint fix:prettier",
"test:jest": "jest",
"test:eslint": "eslint bin scripts js",
"test:prettier": "prettier-check 'bin/*' 'scripts/*.js' 'js/**/*.js'",
"test:prettier": "prettier-check \"bin/*\" \"scripts/*.js\" \"js/**/*.js\"",
"test": "npm-run-all test:jest test:eslint test:prettier",

@@ -33,3 +33,5 @@ "test:watch": "jest --watch --notify"

"dependencies": {
"fs-copy-file-sync": "^1.1.1",
"https-proxy-agent": "^2.2.1",
"mkdirp": "^0.5.1",
"node-fetch": "^2.1.2",

@@ -36,0 +38,0 @@ "progress": "2.0.0",

47

scripts/install.js

@@ -9,2 +9,3 @@ #!/usr/bin/env node

const path = require('path');
const crypto = require('crypto');

@@ -15,2 +16,4 @@ const HttpsProxyAgent = require('https-proxy-agent');

const Proxy = require('proxy-from-env');
const copyFileSync = require('fs-copy-file-sync');
const mkdirp = require('mkdirp');

@@ -70,2 +73,31 @@ const helper = require('../js/helper');

function npmCache() {
const env = process.env;
return (
env.npm_config_cache ||
env.npm_config_yarn_offline_mirror ||
(env.APPDATA ? path.join(env.APPDATA, 'npm-cache') : path.join(os.homedir(), '.npm'))
);
}
function getCachedPath(url) {
const digest = crypto
.createHash('md5')
.update(url)
.digest('hex')
.slice(0, 6);
return path.join(
npmCache(),
'sentry-cli',
`${digest}-${path.basename(url).replace(/[^a-zA-Z0-9.]+/g, '-')}`
);
}
function getTempFile(cached) {
return `${cached}.${process.pid}-${Math.random()
.toString(16)
.slice(2)}.tmp`;
}
function downloadBinary() {

@@ -88,2 +120,8 @@ const arch = os.arch();

const cachedPath = getCachedPath(downloadUrl);
if (fs.existsSync(cachedPath)) {
copyFileSync(cachedPath, outputPath);
return Promise.resolve();
}
const proxyUrl = Proxy.getProxyForUrl(downloadUrl);

@@ -106,2 +144,5 @@ const agent = proxyUrl ? new HttpsProxyAgent(proxyUrl) : null;

const tempPath = getTempFile(cachedPath);
mkdirp.sync(path.dirname(tempPath));
return new Promise((resolve, reject) => {

@@ -111,5 +152,9 @@ response.body

.on('data', chunk => progressBar.tick(chunk.length))
.pipe(fs.createWriteStream(outputPath, { mode: '0755' }))
.pipe(fs.createWriteStream(tempPath, { mode: '0755' }))
.on('error', e => reject(e))
.on('close', () => resolve());
}).then(() => {
copyFileSync(tempPath, cachedPath);
copyFileSync(tempPath, outputPath);
fs.unlinkSync(tempPath);
});

@@ -116,0 +161,0 @@ });

Sorry, the diff of this file is not supported yet

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