@sentry/cli 3.0.3 → 3.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
@@ -20,21 +20,25 @@ Please refer to [Sentry CLI's documentation page](https://docs.sentry.io/cli/).
20
20
 
21
21
  ## Compatibility
22
22
 
23
- Sentry CLI officially supports [Sentry SaaS](https://sentry.io/) and [Sentry Self-Hosted](https://github.com/getsentry/self-hosted) versions 25.11.1 and above.
23
+ Sentry CLI officially supports [Sentry SaaS](https://sentry.io/) and [Sentry Self-Hosted](https://github.com/getsentry/self-hosted) versions 24.11.1 and above.
24
24
 
25
- ### Self-Hosted Sentry
25
+ <details>
26
26
 
27
- Although some Sentry CLI features may work with versions of Sentry Self-Hosted prior to 25.11.1, we recommend users upgrade their self-hosted installations to a compatible version.
27
+ <summary><h3>Self-Hosted Sentry</h3></summary>
28
28
 
29
- For users who cannot upgrade their self-hosted installation, we recommend using the latest compatible Sentry CLI version, per the table below:
29
+ For self-hosted installations, only those features which were available in Sentry CLI at the time of the release of the given self-hosted version are supported, as new features may require server-side support. Additionally, some features, like the `sentry-cli build` commands, are restricted to Sentry SaaS.
30
+
31
+ Users who are using Sentry Self-Hosted versions older than 24.11.1 are encouraged to upgrade their Sentry Self-Hosted installations before using Sentry CLI versions 3.0.0 and above. For users who cannot upgrade, please use the version indicated in the table below.
30
32
 
31
33
  | **Sentry Self-Hosted Version** | **Newest Compatible Sentry CLI Version** |
32
34
  | ------------------------------ | --------------------------------------------------------------------- |
33
- | ≥ 25.11.1 | [latest](https://github.com/getsentry/sentry-cli/releases/latest) |
34
- | < 25.11.1 | [2.58.4](https://github.com/getsentry/sentry-cli/releases/tag/2.58.4) |
35
+ | ≥ 24.11.1 | [latest](https://github.com/getsentry/sentry-cli/releases/latest) |
36
+ | < 24.11.1 | [2.58.4](https://github.com/getsentry/sentry-cli/releases/tag/2.58.4) |
35
37
 
36
38
  Note that we can only provide support for officially-supported Sentry Self-Hosted versions. We will not backport fixes for older Sentry CLI versions, even if they should be compatible with your self-hosted version.
37
39
 
40
+ </details>
41
+
38
42
  ## Versioning
39
43
 
40
44
  Sentry CLI follows semantic versioning, according to [this versioning policy](VERSIONING.md).
@@ -58,3 +62,7 @@ Also, there is a Dockerfile that builds an Alpine-based Docker image with
58
62
  docker build -t sentry-cli .
59
63
  docker run --rm -v $(pwd):/work sentry-cli --help
60
64
  ```
65
+
66
+ ## Internal docs
67
+
68
+ Snapshot: [Sentry CLI distribution as of 2026-01-29](docs/snapshots/2026-01-29-sentry-cli-distribution.md).
package/checksums.txt CHANGED
@@ -1,10 +1,10 @@
1
- sentry-cli-Darwin-arm64=4a67813a0945ee87de3bfbf62faf596a8e6374b7d4ca9ee1b067a4b725d61dc6
2
- sentry-cli-Darwin-universal=de726ed1b4efd7c3a2b35481fbc80213c24696b00f476d001d52b8eab87c4d38
3
- sentry-cli-Darwin-x86_64=9560c0994e5e3cda856345cd22ae05815c9a5a0f8c650ecdc2487559098f6f3a
4
- sentry-cli-Linux-aarch64=2617026dcaa0c9fc413bf0cbd83d0e2ac9dc75b3adbb4de8128ba1e2723fef46
5
- sentry-cli-Linux-armv7=b14004c1de1c2c19f51972547b3588cac1a332558d55a89baa5becb218de738f
6
- sentry-cli-Linux-i686=ae73f0edff817f1e71614305ef666199fb3b46f8d7cb890a08654e9d03fef923
7
- sentry-cli-Linux-x86_64=0dba6a25c7d2aa22d4140e65e5652214e4a8dfb2dc3463ab87359abe06c21272
8
- sentry-cli-Windows-aarch64.exe=f43f57d345e5e56a36faa7632f5bac10174426d1e402f1664ec2b5f9c2740809
9
- sentry-cli-Windows-i686.exe=468fa7d37b5dc43c9f4ec61ea5ea5f9ada5a44bd7bbcfdb37828bfc5b2517fe3
10
- sentry-cli-Windows-x86_64.exe=e74d54955197307baf88b6dca37b39cf3dd1156c116421ce424162daaaed8cb2
1
+ sentry-cli-Darwin-arm64=17802017c1a0d76751b4bfdddea4366a84d19e790de86e9675e09f2d4cf9cefd
2
+ sentry-cli-Darwin-universal=a18195af49db6ea455a0d785b5bd392fb8df6f2eaf0078528c6b4653b4ce5799
3
+ sentry-cli-Darwin-x86_64=4018f4162b2f160c01b082d64ac36cce069c81e71a1bae3707324b3d90634415
4
+ sentry-cli-Linux-aarch64=e92b176153f3729b2b4b0d41b9b523df6ebbd49378b45fbbc008052042460f96
5
+ sentry-cli-Linux-armv7=9cde058201958bc53c1ba4deb67fcb76970084522cd5e980ea16791b21757c31
6
+ sentry-cli-Linux-i686=5e08f47c358ee6592bea2a6854a722d7a5512c879e7a0440897e882fdb5b496c
7
+ sentry-cli-Linux-x86_64=cb82525102b8ad9a300bfb55afa3dc2d9ab275caf1dcbfdf431fc11fdf13136f
8
+ sentry-cli-Windows-aarch64.exe=6b88b9e618a00f2f8dd743fb8a44ab250de34fca07e178c2fa36a7d42fce513f
9
+ sentry-cli-Windows-i686.exe=034c756e27768b872ae1bdec1eb3edfb32ec3f7d7576e7373a45ec0784e067ee
10
+ sentry-cli-Windows-x86_64.exe=a417276f00f895659dfa21d0f0e847e056eccf2a457939ccd83424bf99174604
package/js/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Releases } from './releases';
2
+ import { SourceMaps } from './sourceMaps';
2
3
  import type { SentryCliOptions } from './types';
3
- export type { SentryCliOptions, SentryCliUploadSourceMapsOptions, SourceMapsPathDescriptor, SentryCliNewDeployOptions, SentryCliCommitsOptions, } from './types';
4
+ export type { SentryCliOptions, SentryCliUploadSourceMapsOptions, SourceMapsPathDescriptor, SentryCliNewDeployOptions, SentryCliCommitsOptions, SentryCliInjectOptions, } from './types';
4
5
  /**
5
6
  * Interface to and wrapper around the `sentry-cli` executable.
6
7
  *
@@ -20,6 +21,7 @@ export declare class SentryCli {
20
21
  configFile: string | null;
21
22
  options: SentryCliOptions;
22
23
  releases: Releases;
24
+ sourceMaps: SourceMaps;
23
25
  /**
24
26
  * Creates a new `SentryCli` instance.
25
27
  *
package/js/index.js CHANGED
@@ -4,6 +4,7 @@ exports.SentryCli = void 0;
4
4
  const pkgInfo = require("../package.json");
5
5
  const helper = require("./helper");
6
6
  const releases_1 = require("./releases");
7
+ const sourceMaps_1 = require("./sourceMaps");
7
8
  /**
8
9
  * Interface to and wrapper around the `sentry-cli` executable.
9
10
  *
@@ -40,6 +41,7 @@ class SentryCli {
40
41
  }
41
42
  this.options = options || { silent: false };
42
43
  this.releases = new releases_1.Releases(this.options, configFile);
44
+ this.sourceMaps = new sourceMaps_1.SourceMaps(this.options, configFile);
43
45
  }
44
46
  /**
45
47
  * Returns the version of the installed `sentry-cli` binary.
@@ -98,6 +98,7 @@ export declare class Releases {
98
98
  * time: 1295, // deployment duration in seconds. This can be specified alternatively to `started` and `finished`
99
99
  * name: 'PickleRick', // human readable name for this deployment
100
100
  * url: 'https://example.com', // URL that points to the deployment
101
+ * projects: ['project1', 'project2'], // list of projects to deploy to
101
102
  * });
102
103
  *
103
104
  * @param release Unique name of the release.
@@ -126,6 +126,7 @@ class Releases {
126
126
  * @param options Options to configure the source map upload.
127
127
  * @returns A promise that resolves when the upload has completed successfully.
128
128
  */
129
+ // TODO: Add `uploadSourceMaps()` to SourceMaps class as `.upload()` (keep it here too for backward compatibility)
129
130
  uploadSourceMaps(release, options) {
130
131
  return __awaiter(this, void 0, void 0, function* () {
131
132
  if (!options || !options.include || !Array.isArray(options.include)) {
@@ -196,6 +197,7 @@ class Releases {
196
197
  * time: 1295, // deployment duration in seconds. This can be specified alternatively to `started` and `finished`
197
198
  * name: 'PickleRick', // human readable name for this deployment
198
199
  * url: 'https://example.com', // URL that points to the deployment
200
+ * projects: ['project1', 'project2'], // list of projects to deploy to
199
201
  * });
200
202
  *
201
203
  * @param release Unique name of the release.
@@ -207,7 +209,9 @@ class Releases {
207
209
  if (!options || !options.env) {
208
210
  throw new Error('options.env must be a valid name');
209
211
  }
210
- const args = ['releases', 'deploys', release, 'new'];
212
+ const args = ['deploys', 'new']
213
+ .concat(helper.getProjectFlagsFromOptions(options))
214
+ .concat(['--release', release]);
211
215
  return this.execute(helper.prepareCommand(args, deploys_1.DEPLOYS_OPTIONS, options), null);
212
216
  });
213
217
  }
@@ -0,0 +1,45 @@
1
+ import { SentryCliInjectOptions, SentryCliOptions } from '../types';
2
+ /**
3
+ * Manages source map operations on Sentry.
4
+ */
5
+ export declare class SourceMaps {
6
+ options: SentryCliOptions;
7
+ private configFile;
8
+ constructor(options: SentryCliOptions, configFile: string | null);
9
+ /**
10
+ * Fixes up JavaScript source files and source maps with debug ids.
11
+ *
12
+ * For every minified JS source file, a debug id is generated and
13
+ * inserted into the file. If the source file references a
14
+ * source map and that source map is locally available,
15
+ * the debug id will be injected into it as well.
16
+ * If the referenced source map already contains a debug id,
17
+ * that id is used instead.
18
+ *
19
+ * @example
20
+ * await cli.sourceMaps.inject({
21
+ * // required options:
22
+ * paths: ['./dist'],
23
+ *
24
+ * // default options:
25
+ * ignore: ['node_modules'], // globs for files to ignore
26
+ * ignoreFile: null, // path to a file with ignore rules
27
+ * ext: ['js', 'cjs', 'mjs'], // file extensions to consider
28
+ * dryRun: false, // don't modify files on disk
29
+ * });
30
+ *
31
+ * @param options Options to configure the debug id injection.
32
+ * @returns A promise that resolves when the injection has completed successfully.
33
+ */
34
+ inject(options: SentryCliInjectOptions): Promise<string>;
35
+ /**
36
+ * See {helper.execute} docs.
37
+ * @param args Command line arguments passed to `sentry-cli`.
38
+ * @param live can be set to:
39
+ * - `true` to inherit stdio and reject the promise if the command
40
+ * exits with a non-zero exit code.
41
+ * - `false` to not inherit stdio and return the output as a string.
42
+ * @returns A promise that resolves to the standard output.
43
+ */
44
+ execute(args: string[], live: boolean): Promise<string>;
45
+ }
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SourceMaps = void 0;
13
+ const inject_1 = require("./options/inject");
14
+ const helper = require("../helper");
15
+ /**
16
+ * Default arguments for the `--ignore` option.
17
+ */
18
+ const DEFAULT_IGNORE = ['node_modules'];
19
+ /**
20
+ * Manages source map operations on Sentry.
21
+ */
22
+ class SourceMaps {
23
+ constructor(options = {}, configFile) {
24
+ this.options = options;
25
+ this.configFile = configFile;
26
+ }
27
+ /**
28
+ * Fixes up JavaScript source files and source maps with debug ids.
29
+ *
30
+ * For every minified JS source file, a debug id is generated and
31
+ * inserted into the file. If the source file references a
32
+ * source map and that source map is locally available,
33
+ * the debug id will be injected into it as well.
34
+ * If the referenced source map already contains a debug id,
35
+ * that id is used instead.
36
+ *
37
+ * @example
38
+ * await cli.sourceMaps.inject({
39
+ * // required options:
40
+ * paths: ['./dist'],
41
+ *
42
+ * // default options:
43
+ * ignore: ['node_modules'], // globs for files to ignore
44
+ * ignoreFile: null, // path to a file with ignore rules
45
+ * ext: ['js', 'cjs', 'mjs'], // file extensions to consider
46
+ * dryRun: false, // don't modify files on disk
47
+ * });
48
+ *
49
+ * @param options Options to configure the debug id injection.
50
+ * @returns A promise that resolves when the injection has completed successfully.
51
+ */
52
+ inject(options) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ if (!options || !options.paths || !Array.isArray(options.paths)) {
55
+ throw new Error('`options.paths` must be a valid array of paths.');
56
+ }
57
+ if (options.paths.length === 0) {
58
+ throw new Error('`options.paths` must contain at least one path.');
59
+ }
60
+ const newOptions = Object.assign({}, options);
61
+ if (!newOptions.ignoreFile && !newOptions.ignore) {
62
+ newOptions.ignore = DEFAULT_IGNORE;
63
+ }
64
+ const args = helper.prepareCommand(['sourcemaps', 'inject', ...options.paths], inject_1.INJECT_OPTIONS, newOptions);
65
+ return this.execute(args, true);
66
+ });
67
+ }
68
+ /**
69
+ * See {helper.execute} docs.
70
+ * @param args Command line arguments passed to `sentry-cli`.
71
+ * @param live can be set to:
72
+ * - `true` to inherit stdio and reject the promise if the command
73
+ * exits with a non-zero exit code.
74
+ * - `false` to not inherit stdio and return the output as a string.
75
+ * @returns A promise that resolves to the standard output.
76
+ */
77
+ execute(args, live) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ return helper.execute(args, live, this.options.silent, this.configFile, this.options);
80
+ });
81
+ }
82
+ }
83
+ exports.SourceMaps = SourceMaps;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Schema for the `sourcemaps inject` command.
3
+ */
4
+ export declare const INJECT_OPTIONS: {
5
+ ignore: {
6
+ param: string;
7
+ type: "array";
8
+ };
9
+ ignoreFile: {
10
+ param: string;
11
+ type: "string";
12
+ };
13
+ ext: {
14
+ param: string;
15
+ type: "array";
16
+ };
17
+ dryRun: {
18
+ param: string;
19
+ type: "boolean";
20
+ };
21
+ };
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INJECT_OPTIONS = void 0;
4
+ /**
5
+ * Schema for the `sourcemaps inject` command.
6
+ */
7
+ exports.INJECT_OPTIONS = {
8
+ ignore: {
9
+ param: '--ignore',
10
+ type: 'array',
11
+ },
12
+ ignoreFile: {
13
+ param: '--ignore-file',
14
+ type: 'string',
15
+ },
16
+ ext: {
17
+ param: '--ext',
18
+ type: 'array',
19
+ },
20
+ dryRun: {
21
+ param: '--dry-run',
22
+ type: 'boolean',
23
+ },
24
+ };
package/js/types.d.ts CHANGED
@@ -163,6 +163,10 @@ export type SentryCliNewDeployOptions = {
163
163
  * URL that points to the deployment.
164
164
  */
165
165
  url?: string;
166
+ /**
167
+ * The projects to deploy the release to. If not provided, the deployment will be created for all projects associated with the release.
168
+ */
169
+ projects?: string[];
166
170
  };
167
171
  /**
168
172
  * Options for setting commits on a release
@@ -196,3 +200,31 @@ export type SentryCliCommitsOptions = {
196
200
  */
197
201
  ignoreEmpty?: boolean;
198
202
  };
203
+ /**
204
+ * Options for injecting debug IDs into source files and source maps
205
+ */
206
+ export type SentryCliInjectOptions = {
207
+ /**
208
+ * One or more paths that Sentry CLI should scan recursively for JavaScript source files.
209
+ */
210
+ paths: string[];
211
+ /**
212
+ * One or more paths to ignore during injection. Overrides entries in ignoreFile file.
213
+ * Defaults to ['node_modules'] if neither ignore nor ignoreFile is specified.
214
+ */
215
+ ignore?: string[];
216
+ /**
217
+ * Path to a file containing list of files/directories to ignore.
218
+ * Can point to .gitignore or anything with the same format.
219
+ */
220
+ ignoreFile?: string;
221
+ /**
222
+ * Set the file extensions of JavaScript files that are considered for injection.
223
+ * This overrides the default extensions (js, cjs, mjs).
224
+ */
225
+ ext?: string[];
226
+ /**
227
+ * Don't modify files on disk.
228
+ */
229
+ dryRun?: boolean;
230
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/cli",
3
- "version": "3.0.3",
3
+ "version": "3.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/",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^20.10.0",
25
- "@vercel/nft": "^0.22.1",
25
+ "@vercel/nft": "^1.2.0",
26
26
  "eslint": "^7.32.0",
27
27
  "eslint-config-prettier": "^8.5.0",
28
28
  "jest": "^27.5.1",
@@ -32,14 +32,14 @@
32
32
  "typescript": "5.8.3"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@sentry/cli-darwin": "3.0.3",
36
- "@sentry/cli-linux-arm": "3.0.3",
37
- "@sentry/cli-linux-arm64": "3.0.3",
38
- "@sentry/cli-linux-i686": "3.0.3",
39
- "@sentry/cli-linux-x64": "3.0.3",
40
- "@sentry/cli-win32-i686": "3.0.3",
41
- "@sentry/cli-win32-x64": "3.0.3",
42
- "@sentry/cli-win32-arm64": "3.0.3"
35
+ "@sentry/cli-darwin": "3.2.0",
36
+ "@sentry/cli-linux-arm": "3.2.0",
37
+ "@sentry/cli-linux-arm64": "3.2.0",
38
+ "@sentry/cli-linux-i686": "3.2.0",
39
+ "@sentry/cli-linux-x64": "3.2.0",
40
+ "@sentry/cli-win32-i686": "3.2.0",
41
+ "@sentry/cli-win32-x64": "3.2.0",
42
+ "@sentry/cli-win32-arm64": "3.2.0"
43
43
  },
44
44
  "scripts": {
45
45
  "postinstall": "node ./scripts/install.js",