@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 +19 -3
- package/checksums.txt +9 -9
- package/js/helper.js +10 -7
- package/package.json +2 -2
- package/scripts/install.js +11 -9
package/README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
|
|
3
|
-
<
|
|
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
|
-
|
|
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=
|
|
2
|
-
sentry-cli-Darwin-universal=
|
|
3
|
-
sentry-cli-Darwin-x86_64=
|
|
4
|
-
sentry-cli-Linux-aarch64=
|
|
5
|
-
sentry-cli-Linux-armv7=
|
|
6
|
-
sentry-cli-Linux-i686=
|
|
7
|
-
sentry-cli-Linux-x86_64=
|
|
8
|
-
sentry-cli-Windows-i686.exe=
|
|
9
|
-
sentry-cli-Windows-x86_64.exe=
|
|
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
|
-
|
|
12
|
-
|
|
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
|
+
"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": "^
|
|
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",
|
package/scripts/install.js
CHANGED
|
@@ -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 = (
|
|
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
|
-
|
|
234
|
-
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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');
|