@sentry/cli 2.47.0 → 2.48.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/checksums.txt +10 -10
- package/js/helper.js +21 -4
- package/js/releases/index.js +12 -5
- package/js/releases/options/deploys.js +3 -0
- package/js/releases/options/uploadSourcemaps.js +3 -0
- package/package.json +13 -10
package/checksums.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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-aarch64.exe=
|
|
9
|
-
sentry-cli-Windows-i686.exe=
|
|
10
|
-
sentry-cli-Windows-x86_64.exe=
|
|
1
|
+
sentry-cli-Darwin-arm64=4055005b478b9af96d67dd63f0821c85505e4a6f08ab5a1b9b0c3941ea542a8f
|
|
2
|
+
sentry-cli-Darwin-universal=583fe0f18651e219969f0a47698b522354b0ac0fb296764c67ea36850a99d39d
|
|
3
|
+
sentry-cli-Darwin-x86_64=5c2707c5d965be755c0200be19e6f9ebe924b135f79201858d375adb751eee7d
|
|
4
|
+
sentry-cli-Linux-aarch64=61ed4b287492919fb30bd96511169650a88c5004f31fcce5490541b8e0d4d4bf
|
|
5
|
+
sentry-cli-Linux-armv7=672049db50efd2cf28d0172cea8aff670f6f16b31a0444dc471209df1c6c0578
|
|
6
|
+
sentry-cli-Linux-i686=fbad1830295a11697d3c0ee9d17819bd35872bf86539d719795afb79ba4137fd
|
|
7
|
+
sentry-cli-Linux-x86_64=fdb0ee7a426cdd1b1bbae35ff4835af6fa55f0647fe558c7e8705df61b279f30
|
|
8
|
+
sentry-cli-Windows-aarch64.exe=37c91959e56a704264da6595357e8412d33602d764ddf0fb2cfef4a05bd872ee
|
|
9
|
+
sentry-cli-Windows-i686.exe=29ae42121c757fc7d473c458dc70deb06d9288e6ec31c15db41f6af0a557f5c3
|
|
10
|
+
sentry-cli-Windows-x86_64.exe=2015a5c425fe33101c1e922c79fc6440398ee7ce328053dfb06e4839abe2d497
|
package/js/helper.js
CHANGED
|
@@ -186,6 +186,7 @@ function mockBinaryPath(mockPath) {
|
|
|
186
186
|
* @typedef {object} OptionSchema
|
|
187
187
|
* @prop {string} param The flag of the command line option including dashes.
|
|
188
188
|
* @prop {OptionType} type The value type of the command line option.
|
|
189
|
+
* @prop {string} [invertedParam] The flag of the command line option including dashes (optional).
|
|
189
190
|
*/
|
|
190
191
|
|
|
191
192
|
/**
|
|
@@ -245,7 +246,7 @@ function serializeOptions(schema, options) {
|
|
|
245
246
|
/**
|
|
246
247
|
* Serializes the command and its options into an arguments array.
|
|
247
248
|
*
|
|
248
|
-
* @param {string} command The literal name of the command.
|
|
249
|
+
* @param {string[]} command The literal name of the command.
|
|
249
250
|
* @param {OptionsSchema} [schema] An options schema required by the command.
|
|
250
251
|
* @param {object} [options] An options object according to the schema.
|
|
251
252
|
* @returns {string[]} An arguments array that can be passed via command line.
|
|
@@ -280,7 +281,11 @@ function getPath() {
|
|
|
280
281
|
* expect(output.trim()).toBe('sentry-cli x.y.z');
|
|
281
282
|
*
|
|
282
283
|
* @param {string[]} args Command line arguments passed to `sentry-cli`.
|
|
283
|
-
* @param {boolean} live
|
|
284
|
+
* @param {boolean | 'rejectOnError'} live can be set to:
|
|
285
|
+
* - `true` to inherit stdio to display `sentry-cli` output directly.
|
|
286
|
+
* - `false` to not inherit stdio and return the output as a string.
|
|
287
|
+
* - `'rejectOnError'` to inherit stdio and reject the promise if the command
|
|
288
|
+
* exits with a non-zero exit code.
|
|
284
289
|
* @param {boolean} silent Disable stdout for silents build (CI/Webpack Stats, ...)
|
|
285
290
|
* @param {string} [configFile] Relative or absolute path to the configuration file.
|
|
286
291
|
* @param {Object} [config] More configuration to pass to the CLI
|
|
@@ -321,15 +326,27 @@ async function execute(args, live, silent, configFile, config = {}) {
|
|
|
321
326
|
]);
|
|
322
327
|
args = [...headers, ...args];
|
|
323
328
|
}
|
|
329
|
+
|
|
324
330
|
return new Promise((resolve, reject) => {
|
|
325
|
-
if (live === true) {
|
|
331
|
+
if (live === true || live === 'rejectOnError') {
|
|
326
332
|
const output = silent ? 'ignore' : 'inherit';
|
|
327
333
|
const pid = childProcess.spawn(getPath(), args, {
|
|
328
334
|
env,
|
|
329
335
|
// stdin, stdout, stderr
|
|
330
336
|
stdio: ['ignore', output, output],
|
|
331
337
|
});
|
|
332
|
-
pid.on('exit', () => {
|
|
338
|
+
pid.on('exit', (exitCode) => {
|
|
339
|
+
if (live === 'rejectOnError') {
|
|
340
|
+
if (exitCode === 0) {
|
|
341
|
+
resolve('success (live mode)');
|
|
342
|
+
}
|
|
343
|
+
reject(new Error(`Command ${args.join(' ')} failed with exit code ${exitCode}`));
|
|
344
|
+
}
|
|
345
|
+
// According to the type definition, resolving with void is not allowed.
|
|
346
|
+
// However, for backwards compatibility, we resolve void here to
|
|
347
|
+
// avoid a behaviour-breaking change.
|
|
348
|
+
// TODO (v3): Clean this up and always resolve a string (or change the type definition)
|
|
349
|
+
// @ts-expect-error - see comment above
|
|
333
350
|
resolve();
|
|
334
351
|
});
|
|
335
352
|
} else {
|
package/js/releases/index.js
CHANGED
|
@@ -10,13 +10,13 @@ const DEFAULT_IGNORE = ['node_modules'];
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Schema for the `upload-sourcemaps` command.
|
|
13
|
-
* @type {OptionsSchema}
|
|
13
|
+
* @type {import('../helper').OptionsSchema}
|
|
14
14
|
*/
|
|
15
15
|
const SOURCEMAPS_SCHEMA = require('./options/uploadSourcemaps');
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Schema for the `deploys new` command.
|
|
19
|
-
* @type {OptionsSchema}
|
|
19
|
+
* @type {import('../helper').OptionsSchema}
|
|
20
20
|
*/
|
|
21
21
|
const DEPLOYS_SCHEMA = require('./options/deploys');
|
|
22
22
|
|
|
@@ -95,7 +95,7 @@ class Releases {
|
|
|
95
95
|
commitFlags.push('--ignore-missing');
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
return this.execute(['releases', 'set-commits', release].concat(commitFlags));
|
|
98
|
+
return this.execute(['releases', 'set-commits', release].concat(commitFlags), false);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/**
|
|
@@ -199,7 +199,10 @@ class Releases {
|
|
|
199
199
|
|
|
200
200
|
return uploadPaths.map((path) =>
|
|
201
201
|
// `execute()` is async and thus we're returning a promise here
|
|
202
|
-
this.execute(
|
|
202
|
+
this.execute(
|
|
203
|
+
helper.prepareCommand([...args, path], SOURCEMAPS_SCHEMA, newOptions),
|
|
204
|
+
options.live != null ? options.live : true
|
|
205
|
+
)
|
|
203
206
|
);
|
|
204
207
|
});
|
|
205
208
|
|
|
@@ -255,7 +258,11 @@ class Releases {
|
|
|
255
258
|
/**
|
|
256
259
|
* See {helper.execute} docs.
|
|
257
260
|
* @param {string[]} args Command line arguments passed to `sentry-cli`.
|
|
258
|
-
* @param {boolean} live
|
|
261
|
+
* @param {boolean | 'rejectOnError'} live can be set to:
|
|
262
|
+
* - `true` to inherit stdio to display `sentry-cli` output directly.
|
|
263
|
+
* - `false` to not inherit stdio and return the output as a string.
|
|
264
|
+
* - `'rejectOnError'` to inherit stdio and reject the promise if the command
|
|
265
|
+
* exits with a non-zero exit code.
|
|
259
266
|
* @returns {Promise.<string>} A promise that resolves to the standard output.
|
|
260
267
|
*/
|
|
261
268
|
async execute(args, live) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.48.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/",
|
|
@@ -22,22 +22,24 @@
|
|
|
22
22
|
"which": "^2.0.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
+
"@types/node": "^20.10.0",
|
|
25
26
|
"@vercel/nft": "^0.22.1",
|
|
26
27
|
"eslint": "^7.32.0",
|
|
27
28
|
"eslint-config-prettier": "^8.5.0",
|
|
28
29
|
"jest": "^27.5.1",
|
|
29
30
|
"npm-run-all": "^4.1.5",
|
|
30
|
-
"prettier": "2.8.8"
|
|
31
|
+
"prettier": "2.8.8",
|
|
32
|
+
"typescript": "~5.8.3"
|
|
31
33
|
},
|
|
32
34
|
"optionalDependencies": {
|
|
33
|
-
"@sentry/cli-darwin": "2.
|
|
34
|
-
"@sentry/cli-linux-arm": "2.
|
|
35
|
-
"@sentry/cli-linux-arm64": "2.
|
|
36
|
-
"@sentry/cli-linux-i686": "2.
|
|
37
|
-
"@sentry/cli-linux-x64": "2.
|
|
38
|
-
"@sentry/cli-win32-i686": "2.
|
|
39
|
-
"@sentry/cli-win32-x64": "2.
|
|
40
|
-
"@sentry/cli-win32-arm64": "2.
|
|
35
|
+
"@sentry/cli-darwin": "2.48.0",
|
|
36
|
+
"@sentry/cli-linux-arm": "2.48.0",
|
|
37
|
+
"@sentry/cli-linux-arm64": "2.48.0",
|
|
38
|
+
"@sentry/cli-linux-i686": "2.48.0",
|
|
39
|
+
"@sentry/cli-linux-x64": "2.48.0",
|
|
40
|
+
"@sentry/cli-win32-i686": "2.48.0",
|
|
41
|
+
"@sentry/cli-win32-x64": "2.48.0",
|
|
42
|
+
"@sentry/cli-win32-arm64": "2.48.0"
|
|
41
43
|
},
|
|
42
44
|
"scripts": {
|
|
43
45
|
"postinstall": "node ./scripts/install.js",
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
"test:watch": "jest --watch --notify",
|
|
50
52
|
"test:eslint": "eslint bin/* scripts/**/*.js js/**/*.js",
|
|
51
53
|
"test:prettier": "prettier --check bin/* scripts/**/*.js js/**/*.js",
|
|
54
|
+
"check:types": "tsc --noEmit",
|
|
52
55
|
"test:vercel-nft": "node scripts/test-vercel-nft.js"
|
|
53
56
|
},
|
|
54
57
|
"jest": {
|