@sentry/cli 1.77.2 → 1.77.3

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
@@ -1,11 +1,6 @@
1
1
  <p align="center">
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>
2
+ <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
3
+ <br />
9
4
  </p>
10
5
 
11
6
  # Official Sentry Command Line Interface
@@ -17,7 +12,7 @@
17
12
 
18
13
  This is a Sentry command line client for some generic tasks. Right now this is
19
14
  primarily used to upload debug symbols to Sentry if you are not using the
20
- Fastlane tools.
15
+ fastlane tools.
21
16
 
22
17
  * Downloads can be found under
23
18
  [Releases](https://github.com/getsentry/sentry-cli/releases/)
@@ -25,34 +20,13 @@ Fastlane tools.
25
20
 
26
21
  ## Installation
27
22
 
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:
23
+ The recommended way to install is with everybody's favorite curl to bash:
29
24
 
30
25
  curl -sL https://sentry.io/get-cli/ | bash
31
26
 
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
- If you are using `sentry-cli` on Windows environments, [Microsoft Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist) is required.
40
-
41
- To verify it’s installed correctly you can bring up the help:
42
-
43
- sentry-cli --help
44
-
45
- ### pip
46
-
47
- _New in 2.14.3_: `sentry-cli` can also be installed using `pip`:
48
-
49
- ```bash
50
- pip install sentry-cli
51
- ```
52
-
53
27
  ### Node
54
28
 
55
- Additionally, you can also install this binary via npm:
29
+ Additionally you can also install this binary via npm:
56
30
 
57
31
  npm install @sentry/cli
58
32
 
@@ -77,22 +51,14 @@ Or add property into your `.npmrc` file (https://www.npmjs.org/doc/files/npmrc.h
77
51
  sentrycli_cdnurl=https://mymirror.local/path
78
52
  ```
79
53
 
80
- There are a few environment variables that you can provide to control the npm installation:
54
+ Another option is to use the environment variable `SENTRYCLI_CDNURL`.
81
55
 
82
- ```
83
- SENTRYCLI_CDNURL=<url> # Use alternative cdn url for downloading binary
84
- SENTRYCLI_USE_LOCAL=1 # Use local instance of sentry-cli binary (looked up via $PATH environment)
85
- SENTRYCLI_SKIP_DOWNLOAD=1 # Skip downloading binary entirely
86
- SENTRYCLI_NO_PROGRESS_BAR=1 # Do not print the progress bar when downloading binary (default for non-TTY environments like CI)
87
- SENTRYCLI_LOG_STREAM=<stdout|stderr> # Changes where to redirect install script output
56
+ ```sh
57
+ SENTRYCLI_CDNURL=https://mymirror.local/path npm install @sentry/cli
88
58
  ```
89
59
 
90
- When using `sentry-cli` via JavaScript API or any 3rd party plugin that is consuming said API,
91
- you can also use `SENTRY_BINARY_PATH=<path>` alongside `SENTRYCLI_SKIP_DOWNLOAD=1` to completely
92
- control what binaries are downloaded and used throughout the whole process.
93
-
94
60
  If you're installing the CLI with NPM from behind a proxy, the install script will
95
- use either NPM's configured HTTPS proxy server or the value from your `HTTPS_PROXY`
61
+ use either NPM's configured HTTPS proxy server, or the value from your `HTTPS_PROXY`
96
62
  environment variable.
97
63
 
98
64
  ### Homebrew
@@ -113,23 +79,6 @@ docker pull getsentry/sentry-cli
113
79
  docker run --rm -v $(pwd):/work getsentry/sentry-cli --help
114
80
  ```
115
81
 
116
- Starting version _`2.8.0`_, in case you see `"error: config value 'safe.directory' was not found;"` message,
117
- you also need to correctly set UID and GID of mounted volumes like so:
118
-
119
- ```sh
120
- docker run --rm -u "$(id -u):$(id -g)" -v $(pwd):/work getsentry/sentry-cli --help
121
- ```
122
-
123
- This is required due to security issue in older `git` implementations. See [here](https://github.blog/2022-04-12-git-security-vulnerability-announced/) for more details.
124
-
125
- ## Update
126
-
127
- To update sentry-cli to the latest version run:
128
-
129
- ```sh
130
- sentry-cli update
131
- ```
132
-
133
82
  ## Compiling
134
83
 
135
84
  In case you want to compile this yourself, you need to install at minimum the
package/bin/sentry-cli CHANGED
@@ -3,17 +3,17 @@
3
3
  'use strict';
4
4
 
5
5
  const childProcess = require('child_process');
6
- const SentryCli = require('../js');
6
+ const cli = require('../js');
7
7
 
8
8
  const child = childProcess
9
- .spawn(SentryCli.getPath(), process.argv.slice(2), {
9
+ .spawn(cli.getPath(), process.argv.slice(2), {
10
10
  stdio: 'inherit',
11
11
  })
12
- .on('error', (err) => {
12
+ .on('error', err => {
13
13
  console.error(err); // eslint-disable-line no-console
14
14
  process.exit(1);
15
15
  })
16
- .on('exit', (code) => process.exit(code));
16
+ .on('exit', code => process.exit(code));
17
17
 
18
18
  process.on('SIGTERM', () => child.kill('SIGTERM'));
19
19
  process.on('SIGINT', () => child.kill('SIGINT'));
package/checksums.txt CHANGED
@@ -1,9 +1,16 @@
1
- sentry-cli-Darwin-arm64=a69b907a4984a5d69fdb8fa018d08e45254e57a7038839a39deee09545137c9c
2
- sentry-cli-Darwin-universal=88648343df5e7e6bbf7e95fb8c67681b7949fdc919c00c0acaedf2ac8e258acc
3
- sentry-cli-Darwin-x86_64=26593639d98aa5e853951d1a4303ab578f1964545984b22e7f51feafcbe56152
4
- sentry-cli-Linux-aarch64=62f023ef7741facc7d4faead1717840aa83572991f9bcf42172b0ad82f27a820
5
- sentry-cli-Linux-armv7=23570b65e0c31428914d388b8e5e7ffb499627af810f60965517148cce0ac6fc
6
- sentry-cli-Linux-i686=a8e77f18ddadb5035d1c54b5978d7528b87fda62804a19a272f21761cdd0c889
7
- sentry-cli-Linux-x86_64=088ac6568445c4ebb5b82652190f51c711e13d40d5bd94a62cc37f2f1865412d
8
- sentry-cli-Windows-i686.exe=1d8a960afa3e6ef6f08125974d2ae2e79e8a7b38ae30f7c0b7a32db26f8b8e8b
9
- sentry-cli-Windows-x86_64.exe=6c30d85138bac891ba490a222870067c82c0617226bcd8b32768f11b7a5c9585
1
+ sentry-cli-Darwin-arm64=940be414d1c4a49d36ada2893f66feabe358d4d386d42069abd13adec40b89da
2
+ sentry-cli-Darwin-universal=6d88b76f393e2e7d28fdd47e38b967b120cffd63c23f9bcf957bd9649249d819
3
+ sentry-cli-Darwin-x86_64=ed0a4656c3748c71b409f6c232ae63c119c8d303cade1ae004e9ca1a4750da7a
4
+ sentry-cli-Linux-aarch64=f36e03cfcf93eebc73c93ebf9772afc34bca30ca70e808d964d0e44b7a63c425
5
+ sentry-cli-Linux-armv7=ab1d464c92713b06f9156014ac0c075d179aa227416e99a2602ecadce7350ab7
6
+ sentry-cli-Linux-i686=ba52347c977fb6d2124fd188da5d3b6c54de59dc98036c27a24f1e7666fe6606
7
+ sentry-cli-Linux-x86_64=3188668e55aad1fec58d13ca695d2c31131ba90f30ea39885778cfba64429288
8
+ sentry-cli-Windows-i686.exe=42142f6477b09c5ea4a65bc93648ae4897196bf478f3aeb561a97ddabc525567
9
+ sentry-cli-Windows-x86_64.exe=c6365ff2bd6b067cdd3d24d36ba62c8aefaf1dce7f23b2cdc3c70b8f7e9058d2
10
+ sentry-cli-darwin-0.placeholder.tgz=a4bd6f16aa88eba11edf12887810f6e59b264c13f68fc4588a586c1518a7de5d
11
+ sentry-cli-linux-arm-0.placeholder.tgz=a4bd6f16aa88eba11edf12887810f6e59b264c13f68fc4588a586c1518a7de5d
12
+ sentry-cli-linux-arm64-0.placeholder.tgz=a4bd6f16aa88eba11edf12887810f6e59b264c13f68fc4588a586c1518a7de5d
13
+ sentry-cli-linux-i686-0.placeholder.tgz=a4bd6f16aa88eba11edf12887810f6e59b264c13f68fc4588a586c1518a7de5d
14
+ sentry-cli-linux-x64-0.placeholder.tgz=a4bd6f16aa88eba11edf12887810f6e59b264c13f68fc4588a586c1518a7de5d
15
+ sentry-cli-win32-i686-0.placeholder.tgz=a4bd6f16aa88eba11edf12887810f6e59b264c13f68fc4588a586c1518a7de5d
16
+ sentry-cli-win32-x64-0.placeholder.tgz=a4bd6f16aa88eba11edf12887810f6e59b264c13f68fc4588a586c1518a7de5d
package/js/helper.js CHANGED
@@ -1,30 +1,17 @@
1
1
  'use strict';
2
2
 
3
- const os = require('os');
4
3
  const path = require('path');
5
- const fs = require('fs');
6
4
  const childProcess = require('child_process');
7
5
 
8
- const BINARY_DISTRIBUTIONS = [
9
- { packageName: '@sentry/cli-darwin', subpath: 'bin/sentry-cli' },
10
- { packageName: '@sentry/cli-linux-x64', subpath: 'bin/sentry-cli' },
11
- { packageName: '@sentry/cli-linux-i686', subpath: 'bin/sentry-cli' },
12
- { packageName: '@sentry/cli-linux-arm64', subpath: 'bin/sentry-cli' },
13
- { packageName: '@sentry/cli-linux-arm', subpath: 'bin/sentry-cli' },
14
- { packageName: '@sentry/cli-win32-x64', subpath: 'bin/sentry-cli.exe' },
15
- { packageName: '@sentry/cli-win32-i686', subpath: 'bin/sentry-cli.exe' },
16
- ];
17
-
18
6
  /**
19
- * This convoluted function resolves the path to the manually downloaded fallback
20
- * `sentry-cli` binary in a way that can't be analysed by @vercel/nft.
7
+ * This convoluted function resolves the path to the `sentry-cli` binary in a
8
+ * way that can't be analysed by @vercel/nft.
21
9
  *
22
10
  * Without this, the binary can be detected as an asset and included by bundlers
23
11
  * that use @vercel/nft.
24
- *
25
12
  * @returns {string} The path to the sentry-cli binary
26
13
  */
27
- function getFallbackBinaryPath() {
14
+ function getBinaryPath() {
28
15
  const parts = [];
29
16
  parts.push(__dirname);
30
17
  parts.push('..');
@@ -32,143 +19,19 @@ function getFallbackBinaryPath() {
32
19
  return path.resolve(...parts);
33
20
  }
34
21
 
35
- function getDistributionForThisPlatform() {
36
- const arch = os.arch();
37
- const platform = os.platform();
38
-
39
- let packageName = undefined;
40
- if (platform === 'darwin') {
41
- packageName = '@sentry/cli-darwin';
42
- } else if (platform === 'linux' || platform === 'freebsd') {
43
- switch (arch) {
44
- case 'x64':
45
- packageName = '@sentry/cli-linux-x64';
46
- break;
47
- case 'x86':
48
- case 'ia32':
49
- packageName = '@sentry/cli-linux-i686';
50
- break;
51
- case 'arm64':
52
- packageName = '@sentry/cli-linux-arm64';
53
- break;
54
- case 'arm':
55
- packageName = '@sentry/cli-linux-arm';
56
- break;
57
- }
58
- } else if (platform === 'win32') {
59
- switch (arch) {
60
- case 'x64':
61
- packageName = '@sentry/cli-win32-x64';
62
- break;
63
- case 'x86':
64
- case 'ia32':
65
- packageName = '@sentry/cli-win32-i686';
66
- break;
67
- }
68
- }
69
-
70
- let subpath = undefined;
71
- switch (platform) {
72
- case 'win32':
73
- subpath = 'bin/sentry-cli.exe';
74
- break;
75
- case 'darwin':
76
- case 'linux':
77
- case 'freebsd':
78
- subpath = 'bin/sentry-cli';
79
- break;
80
- default:
81
- subpath = 'bin/sentry-cli';
82
- break;
83
- }
84
-
85
- return { packageName, subpath };
86
- }
87
-
88
- /**
89
- * Throws an error with a message stating that Sentry CLI doesn't support the current platform.
90
- *
91
- * @returns {never} nothing. It throws.
92
- */
93
- function throwUnsupportedPlatformError() {
94
- throw new Error(
95
- `Unsupported operating system or architecture! Sentry CLI does not work on this architecture.
96
-
97
- Sentry CLI supports:
98
- - Darwin (macOS)
99
- - Linux and FreeBSD on x64, x86, ia32, arm64, and arm architectures
100
- - Windows x64, x86, and ia32 architectures`
101
- );
102
- }
103
-
104
- /**
105
- * Tries to find the installed Sentry CLI binary - either by looking into the relevant
106
- * optional dependencies or by trying to resolve the fallback binary.
107
- *
108
- * @returns {string} The path to the sentry-cli binary
109
- */
110
- function getBinaryPath() {
111
- if (process.env.SENTRY_BINARY_PATH) {
112
- return process.env.SENTRY_BINARY_PATH;
113
- }
114
-
115
- const { packageName, subpath } = getDistributionForThisPlatform();
116
-
117
- if (packageName === undefined) {
118
- throwUnsupportedPlatformError();
119
- }
120
-
121
- let fallbackBinaryPath = getFallbackBinaryPath();
122
- if (fs.existsSync(fallbackBinaryPath)) {
123
- // Since the fallback got installed, the optional dependencies likely didn't get installed, so we just default to the fallback.
124
- return fallbackBinaryPath;
125
- }
126
-
127
- let compatibleBinaryPath;
128
- try {
129
- compatibleBinaryPath = require.resolve(`${packageName}/${subpath}`);
130
- } catch (e) {
131
- const otherInstalledDistribution = BINARY_DISTRIBUTIONS.find(({ packageName, subpath }) => {
132
- try {
133
- require.resolve(`${packageName}/${subpath}`);
134
- return true;
135
- } catch (e) {
136
- return false;
137
- }
138
- });
139
-
140
- // These error messages are heavily inspired by esbuild's error messages: https://github.com/evanw/esbuild/blob/f3d535262e3998d845d0f102b944ecd5a9efda57/lib/npm/node-platform.ts#L150
141
- if (otherInstalledDistribution) {
142
- throw new Error(`Sentry CLI binary for this platform/architecture not found!
143
-
144
- The "${otherInstalledDistribution.packageName}" package is installed, but for the current platform, you should have the "${packageName}" package installed instead. This usually happens if the "@sentry/cli" package is installed on one platform (for example Windows or MacOS) and then the "node_modules" folder is reused on another operating system (for example Linux in Docker).
145
-
146
- To fix this, avoid copying the "node_modules" folder, and instead freshly install your dependencies on the target system. You can also configure your package manager to install the right package. For example, yarn has the "supportedArchitectures" feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitecture.`);
147
- } else {
148
- throw new Error(`Sentry CLI binary for this platform/architecture not found!
149
-
150
- It seems like none of the "@sentry/cli" package's optional dependencies got installed. Please make sure your package manager is configured to install optional dependencies. If you are using npm to install your dependencies, please don't set the "--no-optional", "--ignore-optional", or "--omit=optional" flags. Sentry CLI needs the "optionalDependencies" feature in order to install its binary.`);
151
- }
152
- }
153
-
154
- return compatibleBinaryPath;
155
- }
156
-
157
22
  /**
158
- * Will be used as the binary path when defined with `mockBinaryPath`.
159
- * @type {string | undefined}
23
+ * Absolute path to the sentry-cli binary (platform dependent).
24
+ * @type {string}
160
25
  */
161
- let mockedBinaryPath;
26
+ let binaryPath = getBinaryPath();
162
27
 
163
28
  /**
164
29
  * Overrides the default binary path with a mock value, useful for testing.
165
30
  *
166
31
  * @param {string} mockPath The new path to the mock sentry-cli binary
167
- * @deprecated This was used in tests internally and will be removed in the next major version.
168
32
  */
169
- // TODO(v3): Remove this function
170
33
  function mockBinaryPath(mockPath) {
171
- mockedBinaryPath = mockPath;
34
+ binaryPath = mockPath;
172
35
  }
173
36
 
174
37
  /**
@@ -198,7 +61,7 @@ function mockBinaryPath(mockPath) {
198
61
  function serializeOptions(schema, options) {
199
62
  return Object.keys(schema).reduce((newOptions, option) => {
200
63
  const paramValue = options[option];
201
- if (paramValue === undefined || paramValue === null) {
64
+ if (paramValue === undefined) {
202
65
  return newOptions;
203
66
  }
204
67
 
@@ -254,7 +117,7 @@ function prepareCommand(command, schema, options) {
254
117
  * @returns {string}
255
118
  */
256
119
  function getPath() {
257
- return mockedBinaryPath !== undefined ? mockedBinaryPath : getBinaryPath();
120
+ return binaryPath;
258
121
  }
259
122
 
260
123
  /**
@@ -281,7 +144,7 @@ function getPath() {
281
144
  * @param {Object} [config] More configuration to pass to the CLI
282
145
  * @returns {Promise.<string>} A promise that resolves to the standard output.
283
146
  */
284
- async function execute(args, live, silent, configFile, config = {}) {
147
+ function execute(args, live, silent, configFile, config = {}) {
285
148
  const env = { ...process.env };
286
149
  if (configFile) {
287
150
  env.SENTRY_PROPERTIES = configFile;
@@ -309,12 +172,6 @@ async function execute(args, live, silent, configFile, config = {}) {
309
172
  }
310
173
  if (config.customHeader) {
311
174
  env.CUSTOM_HEADER = config.customHeader;
312
- } else if (config.headers) {
313
- const headers = Object.entries(config.headers).flatMap(([key, value]) => [
314
- '--header',
315
- `${key}:${value}`,
316
- ]);
317
- args = [...headers, ...args];
318
175
  }
319
176
  return new Promise((resolve, reject) => {
320
177
  if (live === true) {
@@ -350,7 +207,4 @@ module.exports = {
350
207
  mockBinaryPath,
351
208
  prepareCommand,
352
209
  serializeOptions,
353
- getDistributionForThisPlatform,
354
- throwUnsupportedPlatformError,
355
- getFallbackBinaryPath,
356
210
  };
package/js/index.d.ts CHANGED
@@ -38,6 +38,11 @@ declare module '@sentry/cli' {
38
38
  * This value will update `SENTRY_VCS_REMOTE` env variable.
39
39
  */
40
40
  vcsRemote?: string;
41
+ /**
42
+ * Unique identifier for the distribution, used to further segment your release.
43
+ * Usually your build number.
44
+ */
45
+ dist?: string;
41
46
  /**
42
47
  * If true, all logs are suppressed.
43
48
  */
@@ -47,11 +52,6 @@ declare module '@sentry/cli' {
47
52
  * This value will update `CUSTOM_HEADER` env variable.
48
53
  */
49
54
  customHeader?: string;
50
- /**
51
- * Headers added to every outgoing network request.
52
- * This value does not set any env variable, and is overridden by `customHeader`.
53
- */
54
- headers?: Record<string, string>;
55
55
  }
56
56
 
57
57
  /**
@@ -59,9 +59,7 @@ declare module '@sentry/cli' {
59
59
  * case `paths` takes the place of `include` in the options so as to make it
60
60
  * clear that this is not recursive.
61
61
  */
62
- export type SourceMapsPathDescriptor = Omit<SentryCliUploadSourceMapsOptions, 'include'> & {
63
- paths: string[];
64
- };
62
+ export type SourceMapsPathDescriptor = Omit<SentryCliUploadSourceMapsOptions, 'include'> & { paths: string[] }
65
63
 
66
64
  export interface SentryCliUploadSourceMapsOptions {
67
65
  /**
@@ -87,15 +85,6 @@ declare module '@sentry/cli' {
87
85
  * This prevents the automatic detection of sourcemap references.
88
86
  */
89
87
  sourceMapReference?: boolean;
90
- /**
91
- * Enables files gzip decompression prior to uploading. Defaults to `false`.
92
- */
93
- decompress?: boolean;
94
- /**
95
- * Enable artifacts deduplication prior to uploading. This will skip uploading
96
- * any artifacts that are already present on the server. Defaults to `true`.
97
- */
98
- dedupe?: boolean;
99
88
  /**
100
89
  * When paired with the rewrite option this will remove a prefix from uploaded files.
101
90
  * For instance you can use this to remove a path that is build machine specific.
@@ -127,15 +116,6 @@ declare module '@sentry/cli' {
127
116
  * By default the following file extensions are processed: js, map, jsbundle and bundle.
128
117
  */
129
118
  ext?: string[];
130
- /**
131
- * Unique identifier for the distribution, used to further segment your release.
132
- * Usually your build number.
133
- */
134
- dist?: string;
135
- /**
136
- * Use new Artifact Bundles upload, that enables use of Debug ID for Source Maps discovery.
137
- */
138
- useArtifactBundle?: boolean;
139
119
  }
140
120
 
141
121
  export interface SentryCliNewDeployOptions {
@@ -196,19 +176,31 @@ declare module '@sentry/cli' {
196
176
  }
197
177
 
198
178
  export interface SentryCliReleases {
199
- ['new'](release: string, options?: { projects: string[] } | string[]): Promise<string>;
179
+ ['new'](
180
+ release: string,
181
+ options?: { projects: string[] } | string[]
182
+ ): Promise<string>;
200
183
 
201
- setCommits(release: string, options: SentryCliCommitsOptions): Promise<string>;
184
+ setCommits(
185
+ release: string,
186
+ options: SentryCliCommitsOptions
187
+ ): Promise<string>;
202
188
 
203
- finalize(release: string): Promise<string>;
189
+ finalize(release: string): Promise<string>
204
190
 
205
- proposeVersion(): Promise<string>;
191
+ proposeVersion(): Promise<string>
206
192
 
207
- uploadSourceMaps(release: string, options: SentryCliUploadSourceMapsOptions): Promise<string>;
193
+ uploadSourceMaps(
194
+ release: string,
195
+ options: SentryCliUploadSourceMapsOptions
196
+ ): Promise<string>
208
197
 
209
198
  listDeploys(release: string): Promise<string>;
210
199
 
211
- newDeploy(release: string, options: SentryCliNewDeployOptions): Promise<string>;
200
+ newDeploy(
201
+ release: string,
202
+ options: SentryCliNewDeployOptions
203
+ ): Promise<string>
212
204
 
213
205
  execute(args: string[], live: boolean): Promise<string>;
214
206
  }
@@ -222,14 +214,21 @@ declare module '@sentry/cli' {
222
214
  * This value will update `SENTRY_PROPERTIES` env variable.
223
215
  * @param options {@link SentryCliOptions}
224
216
  */
225
- constructor(configFile?: string | null, options?: SentryCliOptions);
217
+ constructor(configFile?: string | null, options?: SentryCliOptions)
226
218
 
227
219
  public configFile?: string;
228
220
  public options?: SentryCliOptions;
229
- public releases: SentryCliReleases;
221
+ public releases: SentryCliReleases
222
+
223
+ public static getVersion(): string
224
+ public static getPath(): string
225
+
226
+ /**
227
+ * Downloads the CLI binary.
228
+ * @returns {Promise<void>}
229
+ */
230
+ static downloadBinary(logger: { log(...args: unknown[]): void }): Promise<void>;
230
231
 
231
- public static getVersion(): string;
232
- public static getPath(): string;
233
- public execute(args: string[], live: boolean): Promise<string>;
232
+ public execute(args: string[], live: boolean): Promise<string>
234
233
  }
235
234
  }
package/js/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  const pkgInfo = require('../package.json');
4
4
  const helper = require('./helper');
5
5
  const Releases = require('./releases');
6
+ const install = require('./install');
6
7
 
7
8
  /**
8
9
  * Interface to and wrapper around the `sentry-cli` executable.
@@ -54,6 +55,15 @@ class SentryCli {
54
55
  return helper.getPath();
55
56
  }
56
57
 
58
+ /**
59
+ * Downloads the CLI binary.
60
+ * @param {any} [configFile] Optional logger to log installation information. Defaults to printing to the terminal.
61
+ * @returns {Promise<void>}
62
+ */
63
+ static downloadBinary(logger) {
64
+ return install.downloadBinary(logger);
65
+ }
66
+
57
67
  /**
58
68
  * See {helper.execute} docs.
59
69
  * @param {string[]} args Command line arguments passed to `sentry-cli`.