@sentry/cli 2.0.3 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  <p align="center">
2
- <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
3
- <br />
2
+ <a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
3
+ <picture>
4
+ <source srcset="https://sentry-brand.storage.googleapis.com/sentry-logo-white.png" media="(prefers-color-scheme: dark)" />
5
+ <source srcset="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" />
6
+ <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" alt="Sentry" width="280">
7
+ </picture>
8
+ </a>
4
9
  </p>
5
10
 
6
11
  # Official Sentry Command Line Interface
@@ -20,10 +25,21 @@ fastlane tools.
20
25
 
21
26
  ## Installation
22
27
 
23
- The recommended way to install is with everybody's favorite curl to bash:
28
+ If you are on OS X or Linux, you can use the automated downloader which will fetch the latest release version for you and install it:
24
29
 
25
30
  curl -sL https://sentry.io/get-cli/ | bash
26
31
 
32
+ We do however, encourage you to pin the specific version of the CLI, so your builds are always reproducible.
33
+ To do that, you can use the exact same method, with an additional version specifier:
34
+
35
+ curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION=2.0.4 bash
36
+
37
+ This will automatically download the correct version of `sentry-cli` for your operating system and install it. If necessary, it will prompt for your admin password for `sudo`. For a different installation location or for systems without `sudo` (like Windows), you can `export INSTALL_DIR=/custom/installation/path` before running this command.
38
+
39
+ To verify it’s installed correctly you can bring up the help:
40
+
41
+ sentry-cli --help
42
+
27
43
  ### Node
28
44
 
29
45
  Additionally you can also install this binary via npm:
package/checksums.txt CHANGED
@@ -1,9 +1,9 @@
1
- sentry-cli-Darwin-arm64=c3e015c0071e5d5c0e15eafd79818d05e7c73a6a1b48411387d6c310c967d1dc
2
- sentry-cli-Darwin-universal=89a6c663d8642625281ce0313d07f7e14762cb94d05e3b3159b28ad1dfbf7be5
3
- sentry-cli-Darwin-x86_64=500491c3d043b89b582ec1440742afd820d65318fedb9a553db1fc3cf68810c2
4
- sentry-cli-Linux-aarch64=ae1d495faa0f92a681e9425a61a6364e28105181911428f9db6dedd94a81ed8f
5
- sentry-cli-Linux-armv7=88242c3bd2cd47bab201c5209aad3baa0c8cf4b73cef28e4da27f6e1a8ff08e5
6
- sentry-cli-Linux-i686=ce876ee505911815f34a01d94ffddcd4575c5f3cf7d893081374ef237847d9f4
7
- sentry-cli-Linux-x86_64=fdcc34085404086eff7dd0d96bc68603da4bce1c094f8898fccfd08b4e599453
8
- sentry-cli-Windows-i686.exe=0eedd609ee68bb4fef61e4cd0f50816fbd1bc955cda2ed978e9f33e4b8ace14a
9
- sentry-cli-Windows-x86_64.exe=12952d184511366aa3feae1ddc95af3730f54013a5c399ed2f75e8b2363171fa
1
+ sentry-cli-Darwin-arm64=6dc88344710a59bba72b6ee951074d725055e7151430df71446f6763d2993261
2
+ sentry-cli-Darwin-universal=96f380d262725e88fc2ae83a1449eadc1fb6ffcaad61feee68de468d599cd96f
3
+ sentry-cli-Darwin-x86_64=950d02537781523a2ac211f37759d8ead004fa64b57661c28bacd12b178499a9
4
+ sentry-cli-Linux-aarch64=889aeaa277cada5287ed87821db4145d1f38dc367e85a1405282a68bb736a1a7
5
+ sentry-cli-Linux-armv7=b4ceec0c1dad0e686a47cab92f82533c880b59840aebd9b0173ad16ae33237aa
6
+ sentry-cli-Linux-i686=6ee5ce20cc2bce0408e5b2e2cb4b1d7ade453b7d8f532ec7a26660e3ef7b86fc
7
+ sentry-cli-Linux-x86_64=03144d349c30aaf1d89b661eb6e8b7d09144938e38d0c9191eb2a571535c95f4
8
+ sentry-cli-Windows-i686.exe=160eee4560a314e82eb772c7103cca2e1b86a0e0ea5f952c932336f4eb0b5276
9
+ sentry-cli-Windows-x86_64.exe=b6531c7ba4f7214a0cd63bbf9831da95c4477848c3b932cb8ff7c73a9256a993
package/js/helper.js CHANGED
@@ -1,19 +1,22 @@
1
1
  'use strict';
2
2
 
3
3
  const childProcess = require('child_process');
4
- const os = require('os');
5
- const path = require('path');
6
4
 
7
5
  /**
8
6
  * Absolute path to the sentry-cli binary (platform dependent).
9
7
  * @type {string}
10
8
  */
11
- // istanbul ignore next
12
- let binaryPath = path.resolve(
13
- __dirname,
14
-
15
- os.platform() === 'win32' ? '..\\sentry-cli.exe' : '../sentry-cli'
9
+ let binaryPath = eval(
10
+ "require('path').resolve(__dirname, require('os').platform() === 'win32' ? '..\\sentry-cli.exe' : '../sentry-cli')"
16
11
  );
12
+
13
+ /**
14
+ * NOTE: `eval` usage is a workaround for @vercel/nft detecting the binary itself as the hard dependency
15
+ * and effectively always including it in the bundle, which is not what we want.
16
+ * ref: https://github.com/getsentry/sentry-javascript/issues/3865
17
+ * ref: https://github.com/vercel/nft/issues/203
18
+ */
19
+
17
20
  /**
18
21
  * Overrides the default binary path with a mock value, useful for testing.
19
22
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/cli",
3
- "version": "2.0.3",
3
+ "version": "2.2.0",
4
4
  "description": "A command line utility to work with Sentry. https://docs.sentry.io/hosted/learn/cli/",
5
5
  "repository": "git://github.com/getsentry/sentry-cli.git",
6
6
  "homepage": "https://docs.sentry.io/hosted/learn/cli/",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "https-proxy-agent": "^5.0.0",
19
- "node-fetch": "^3.2.3",
19
+ "node-fetch": "^2.6.7",
20
20
  "npmlog": "^6.0.1",
21
21
  "progress": "^2.0.3",
22
22
  "proxy-from-env": "^1.1.0",
@@ -11,7 +11,7 @@ const zlib = require('zlib');
11
11
  const stream = require('stream');
12
12
  const process = require('process');
13
13
 
14
- const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args));
14
+ const fetch = require('node-fetch');
15
15
  const HttpsProxyAgent = require('https-proxy-agent');
16
16
  const ProgressBar = require('progress');
17
17
  const Proxy = require('proxy-from-env');
@@ -230,17 +230,19 @@ async function downloadBinary() {
230
230
  redirect: 'follow',
231
231
  });
232
232
  } catch (error) {
233
- throw new Error(
234
- `Unable to download sentry-cli binary from ${downloadUrl}.\nError message: ${error.message}\nError code: ${error.code}`
235
- );
233
+ let errorMsg = `Unable to download sentry-cli binary from ${downloadUrl}.\nError message: ${error.message}`;
234
+ if (error.code) {
235
+ errorMsg += `\nError code: ${error.code}`;
236
+ }
237
+ throw new Error(errorMsg);
236
238
  }
237
239
 
238
240
  if (!response.ok) {
239
- throw new Error(
240
- `Unable to download sentry-cli binary from ${downloadUrl}.\nServer returned ${
241
- response.status
242
- }${response.statusText ? `: ${response.statusText}` : ''}.`
243
- );
241
+ let errorMsg = `Unable to download sentry-cli binary from ${downloadUrl}.\nServer returned: ${response.status}`;
242
+ if (response.statusText) {
243
+ errorMsg += ` - ${response.statusText}`;
244
+ }
245
+ throw new Error(errorMsg);
244
246
  }
245
247
 
246
248
  const contentEncoding = response.headers.get('content-encoding');