@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 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=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
- // 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.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": "^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');