@sentry/cli 2.0.3 → 2.0.4
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/checksums.txt +9 -9
- package/js/helper.js +10 -7
- package/package.json +2 -2
- package/scripts/install.js +11 -9
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=6ad23605f6e345375a80aeebc5db7dc9e42226abf63e39dd91730b8b831511a8
|
|
2
|
+
sentry-cli-Darwin-universal=283370a6bf7356a422f39ab805094edefe15f087d512c4579b60e584cf4a3e20
|
|
3
|
+
sentry-cli-Darwin-x86_64=f1f3ea7f5d1ed481080e8eb150b3adbf4ab02890f9ec1227e1703f7ec8e25c84
|
|
4
|
+
sentry-cli-Linux-aarch64=e796a2d535cc59c6d72e5e19aa7604e964328b5a7e09a62f695e0d9acde9b07e
|
|
5
|
+
sentry-cli-Linux-armv7=19ea3f1a843b37df82b310ab82e330f6f26e4ff8b20b4c98c2a47c894c2164ff
|
|
6
|
+
sentry-cli-Linux-i686=abb2f9daeb78ba01ae3f2c36e4d64fb54fd3e937683c25f980872331c2a0e1b3
|
|
7
|
+
sentry-cli-Linux-x86_64=46b6d913e3bfeccaf3170493942120a1b7b11b07c04e932b8fa643187c621fdf
|
|
8
|
+
sentry-cli-Windows-i686.exe=7df3c7e672dae7338245a07685a05847dfa8d18daea51bbbab78feb95a7c0199
|
|
9
|
+
sentry-cli-Windows-x86_64.exe=ecbc89c357bf67cfa9a2f937a10253c46f1183e8480a86c688885a0e3017003b
|
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.0.4",
|
|
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');
|