@sentry/cli 2.58.2 → 2.58.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.
@@ -2,61 +2,61 @@
2
2
  * @type {import('../../helper').OptionsSchema}
3
3
  */
4
4
  module.exports = {
5
- ignore: {
6
- param: '--ignore',
7
- type: 'array',
8
- },
9
- ignoreFile: {
10
- param: '--ignore-file',
11
- type: 'string',
12
- },
13
- dist: {
14
- param: '--dist',
15
- type: 'string',
16
- },
17
- decompress: {
18
- param: '--decompress',
19
- type: 'boolean',
20
- },
21
- rewrite: {
22
- param: '--rewrite',
23
- invertedParam: '--no-rewrite',
24
- type: 'boolean',
25
- },
26
- sourceMapReference: {
27
- invertedParam: '--no-sourcemap-reference',
28
- type: 'boolean',
29
- },
30
- dedupe: {
31
- invertedParam: '--no-dedupe',
32
- type: 'boolean',
33
- },
34
- stripPrefix: {
35
- param: '--strip-prefix',
36
- type: 'array',
37
- },
38
- stripCommonPrefix: {
39
- param: '--strip-common-prefix',
40
- type: 'boolean',
41
- },
42
- validate: {
43
- param: '--validate',
44
- type: 'boolean',
45
- },
46
- urlPrefix: {
47
- param: '--url-prefix',
48
- type: 'string',
49
- },
50
- urlSuffix: {
51
- param: '--url-suffix',
52
- type: 'string',
53
- },
54
- ext: {
55
- param: '--ext',
56
- type: 'array',
57
- },
58
- useArtifactBundle: {
59
- param: '--use-artifact-bundle',
60
- type: 'boolean',
61
- },
5
+ ignore: {
6
+ param: '--ignore',
7
+ type: 'array',
8
+ },
9
+ ignoreFile: {
10
+ param: '--ignore-file',
11
+ type: 'string',
12
+ },
13
+ dist: {
14
+ param: '--dist',
15
+ type: 'string',
16
+ },
17
+ decompress: {
18
+ param: '--decompress',
19
+ type: 'boolean',
20
+ },
21
+ rewrite: {
22
+ param: '--rewrite',
23
+ invertedParam: '--no-rewrite',
24
+ type: 'boolean',
25
+ },
26
+ sourceMapReference: {
27
+ invertedParam: '--no-sourcemap-reference',
28
+ type: 'boolean',
29
+ },
30
+ dedupe: {
31
+ invertedParam: '--no-dedupe',
32
+ type: 'boolean',
33
+ },
34
+ stripPrefix: {
35
+ param: '--strip-prefix',
36
+ type: 'array',
37
+ },
38
+ stripCommonPrefix: {
39
+ param: '--strip-common-prefix',
40
+ type: 'boolean',
41
+ },
42
+ validate: {
43
+ param: '--validate',
44
+ type: 'boolean',
45
+ },
46
+ urlPrefix: {
47
+ param: '--url-prefix',
48
+ type: 'string',
49
+ },
50
+ urlSuffix: {
51
+ param: '--url-suffix',
52
+ type: 'string',
53
+ },
54
+ ext: {
55
+ param: '--ext',
56
+ type: 'array',
57
+ },
58
+ useArtifactBundle: {
59
+ param: '--use-artifact-bundle',
60
+ type: 'boolean',
61
+ },
62
62
  };
package/js/types.d.ts ADDED
@@ -0,0 +1,230 @@
1
+ /**
2
+ * TypeScript type definitions for @sentry/cli
3
+ */
4
+ /**
5
+ * Options for configuring the Sentry CLI
6
+ */
7
+ export interface SentryCliOptions {
8
+ /**
9
+ * The URL of the Sentry instance you are connecting to. Defaults to https://sentry.io/.
10
+ * This value will update `SENTRY_URL` env variable.
11
+ */
12
+ url?: string;
13
+ /**
14
+ * Authentication token for HTTP requests to Sentry.
15
+ * This value will update `SENTRY_AUTH_TOKEN` env variable.
16
+ */
17
+ authToken?: string;
18
+ /**
19
+ * API key to authenticate any HTTP requests to Sentry (legacy authentication method).
20
+ * This value will update `SENTRY_API_KEY` env variable.
21
+ * @deprecated Use auth-token-based authentication via `authToken` instead.
22
+ * This option is scheduled for removal in the next major release.
23
+ */
24
+ apiKey?: string;
25
+ /**
26
+ * Sentry DSN.
27
+ * This value will update `SENTRY_DSN` env variable.
28
+ */
29
+ dsn?: string;
30
+ /**
31
+ * Organization slug.
32
+ * This value will update `SENTRY_ORG` env variable.
33
+ */
34
+ org?: string;
35
+ /**
36
+ * Project slug.
37
+ * This value will update `SENTRY_PROJECT` env variable.
38
+ */
39
+ project?: string;
40
+ /**
41
+ * Version control system remote name.
42
+ * This value will update `SENTRY_VCS_REMOTE` env variable.
43
+ */
44
+ vcsRemote?: string;
45
+ /**
46
+ * If true, all logs are suppressed.
47
+ */
48
+ silent?: boolean;
49
+ /**
50
+ * A header added to every outgoing network request.
51
+ * This value will update `CUSTOM_HEADER` env variable.
52
+ */
53
+ customHeader?: string;
54
+ /**
55
+ * Headers added to every outgoing network request.
56
+ * This value does not set any env variable, and is overridden by `customHeader`.
57
+ */
58
+ headers?: Record<string, string>;
59
+ }
60
+ /**
61
+ * Custom upload-sourcemaps options for a particular `include` path. In this
62
+ * case `paths` takes the place of `include` in the options so as to make it
63
+ * clear that this is not recursive.
64
+ */
65
+ export type SourceMapsPathDescriptor = Omit<SentryCliUploadSourceMapsOptions, 'include'> & {
66
+ paths: string[];
67
+ };
68
+ /**
69
+ * Options for uploading source maps
70
+ */
71
+ export interface SentryCliUploadSourceMapsOptions {
72
+ /**
73
+ * One or more paths that Sentry CLI should scan recursively for sources.
74
+ * It will upload all .map files and match associated .js files.
75
+ */
76
+ include: Array<string | SourceMapsPathDescriptor>;
77
+ /**
78
+ * One or more paths to ignore during upload. Overrides entries in ignoreFile file.
79
+ */
80
+ ignore?: string[];
81
+ /**
82
+ * Path to a file containing list of files/directories to ignore.
83
+ * Can point to .gitignore or anything with same format.
84
+ */
85
+ ignoreFile?: string | null;
86
+ /**
87
+ * Enables rewriting of matching sourcemaps so that indexed maps are flattened
88
+ * and missing sources are inlined if possible. Defaults to `true`.
89
+ */
90
+ rewrite?: boolean;
91
+ /**
92
+ * This prevents the automatic detection of sourcemap references.
93
+ */
94
+ sourceMapReference?: boolean;
95
+ /**
96
+ * Enables files gzip decompression prior to uploading. Defaults to `false`.
97
+ */
98
+ decompress?: boolean;
99
+ /**
100
+ * Enable artifacts deduplication prior to uploading. This will skip uploading
101
+ * any artifacts that are already present on the server. Defaults to `true`.
102
+ */
103
+ dedupe?: boolean;
104
+ /**
105
+ * When paired with the rewrite option this will remove a prefix from uploaded files.
106
+ * For instance you can use this to remove a path that is build machine specific.
107
+ */
108
+ stripPrefix?: string[];
109
+ /**
110
+ * When paired with the rewrite option this will add ~ to the stripPrefix array.
111
+ */
112
+ stripCommonPrefix?: boolean;
113
+ /**
114
+ * The projects to upload the sourcemaps to. If not provided, the sourcemaps will be uploaded to the default project.
115
+ */
116
+ projects?: string[];
117
+ /**
118
+ * This attempts sourcemap validation before upload when rewriting is not enabled.
119
+ * It will spot a variety of issues with source maps and cancel the upload if any are found.
120
+ * This is not enabled by default as this can cause false positives.
121
+ */
122
+ validate?: boolean;
123
+ /**
124
+ * This sets an URL prefix at the beginning of all files.
125
+ * This defaults to `~/` but you might want to set this to the full URL.
126
+ * This is also useful if your files are stored in a sub folder. eg: url-prefix `~/static/js`.
127
+ */
128
+ urlPrefix?: string;
129
+ /**
130
+ * This sets an URL suffix at the end of all files.
131
+ * Useful for appending query parameters.
132
+ */
133
+ urlSuffix?: string;
134
+ /**
135
+ * This sets the file extensions to be considered.
136
+ * By default the following file extensions are processed: js, map, jsbundle and bundle.
137
+ */
138
+ ext?: string[];
139
+ /**
140
+ * Unique identifier for the distribution, used to further segment your release.
141
+ * Usually your build number.
142
+ */
143
+ dist?: string;
144
+ /**
145
+ * Force use of new Artifact Bundles upload, that enables use of Debug ID for Source Maps discovery,
146
+ * even when the Sentry server does not declare support for it.
147
+ *
148
+ * @deprecated This option is deprecated and will be removed in the next major version. Sentry CLI
149
+ * should always respect what the server says it supports.
150
+ */
151
+ useArtifactBundle?: boolean;
152
+ }
153
+ /**
154
+ * Options for creating a new deployment
155
+ */
156
+ export interface SentryCliNewDeployOptions {
157
+ /**
158
+ * Environment for this release. Values that make sense here would be `production` or `staging`.
159
+ */
160
+ env: string;
161
+ /**
162
+ * Deployment start time in Unix timestamp (in seconds) or ISO 8601 format.
163
+ */
164
+ started?: number | string;
165
+ /**
166
+ * Deployment finish time in Unix timestamp (in seconds) or ISO 8601 format.
167
+ */
168
+ finished?: number | string;
169
+ /**
170
+ * Deployment duration (in seconds). Can be used instead of started and finished.
171
+ */
172
+ time?: number;
173
+ /**
174
+ * Human readable name for the deployment.
175
+ */
176
+ name?: string;
177
+ /**
178
+ * URL that points to the deployment.
179
+ */
180
+ url?: string;
181
+ }
182
+ /**
183
+ * Options for setting commits on a release
184
+ */
185
+ export interface SentryCliCommitsOptions {
186
+ /**
187
+ * Automatically choose the associated commit (uses the current commit). Overrides other setCommit options.
188
+ */
189
+ auto?: boolean;
190
+ /**
191
+ * The full repo name as defined in Sentry. Required if auto option is not true.
192
+ */
193
+ repo?: string;
194
+ /**
195
+ * The current (last) commit in the release. Required if auto option is not true.
196
+ */
197
+ commit?: string;
198
+ /**
199
+ * The commit before the beginning of this release (in other words, the last commit of the previous release).
200
+ * If omitted, this will default to the last commit of the previous release in Sentry.
201
+ * If there was no previous release, the last 10 commits will be used.
202
+ */
203
+ previousCommit?: string;
204
+ /**
205
+ * When the flag is set and the previous release commit was not found in the repository, will create a release
206
+ * with the default commits count(or the one specified with `--initial-depth`) instead of failing the command.
207
+ */
208
+ ignoreMissing?: boolean;
209
+ /**
210
+ * When the flag is set, command will not fail and just exit silently if no new commits for a given release have been found.
211
+ */
212
+ ignoreEmpty?: boolean;
213
+ }
214
+ /**
215
+ * Release management interface
216
+ */
217
+ export interface SentryCliReleases {
218
+ new (release: string, options?: {
219
+ projects: string[];
220
+ } | string[]): Promise<string>;
221
+ setCommits(release: string, options: SentryCliCommitsOptions): Promise<string>;
222
+ finalize(release: string): Promise<string>;
223
+ proposeVersion(): Promise<string>;
224
+ uploadSourceMaps(release: string, options: SentryCliUploadSourceMapsOptions & {
225
+ live?: boolean | 'rejectOnError';
226
+ }): Promise<string[]>;
227
+ listDeploys(release: string): Promise<string>;
228
+ newDeploy(release: string, options: SentryCliNewDeployOptions): Promise<string>;
229
+ execute(args: string[], live: boolean | 'rejectOnError'): Promise<string>;
230
+ }
package/js/types.js ADDED
@@ -0,0 +1,4 @@
1
+ /**
2
+ * TypeScript type definitions for @sentry/cli
3
+ */
4
+ export {};
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@sentry/cli",
3
- "version": "2.58.2",
3
+ "version": "2.58.3",
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/",
7
7
  "author": "Sentry",
8
- "license": "BSD-3-Clause",
8
+ "license": "FSL-1.1-MIT",
9
9
  "engines": {
10
10
  "node": ">= 10"
11
11
  },
@@ -29,28 +29,31 @@
29
29
  "jest": "^27.5.1",
30
30
  "npm-run-all": "^4.1.5",
31
31
  "prettier": "2.8.8",
32
- "typescript": "~5.8.3"
32
+ "typescript": "5.8.3"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@sentry/cli-darwin": "2.58.2",
36
- "@sentry/cli-linux-arm": "2.58.2",
37
- "@sentry/cli-linux-arm64": "2.58.2",
38
- "@sentry/cli-linux-i686": "2.58.2",
39
- "@sentry/cli-linux-x64": "2.58.2",
40
- "@sentry/cli-win32-i686": "2.58.2",
41
- "@sentry/cli-win32-x64": "2.58.2",
42
- "@sentry/cli-win32-arm64": "2.58.2"
35
+ "@sentry/cli-darwin": "2.58.3",
36
+ "@sentry/cli-linux-arm": "2.58.3",
37
+ "@sentry/cli-linux-arm64": "2.58.3",
38
+ "@sentry/cli-linux-i686": "2.58.3",
39
+ "@sentry/cli-linux-x64": "2.58.3",
40
+ "@sentry/cli-win32-i686": "2.58.3",
41
+ "@sentry/cli-win32-x64": "2.58.3",
42
+ "@sentry/cli-win32-arm64": "2.58.3"
43
43
  },
44
44
  "scripts": {
45
- "postinstall": "node ./scripts/install.js",
45
+ "postinstall": "npm run install-cli",
46
+ "build": "tsc",
47
+ "install-cli": "node ./scripts/install.js",
48
+ "prepack": "npm run build",
46
49
  "fix": "npm-run-all fix:eslint fix:prettier",
47
- "fix:eslint": "eslint --fix bin/* scripts/**/*.js js/**/*.js",
48
- "fix:prettier": "prettier --write bin/* scripts/**/*.js js/**/*.js",
50
+ "fix:eslint": "eslint --fix bin/* scripts/**/*.js lib/**/*.js",
51
+ "fix:prettier": "prettier --write bin/* scripts/**/*.js lib/**/*.js",
49
52
  "test": "npm-run-all test:jest test:eslint test:prettier test:vercel-nft",
50
53
  "test:jest": "jest",
51
54
  "test:watch": "jest --watch --notify",
52
- "test:eslint": "eslint bin/* scripts/**/*.js js/**/*.js",
53
- "test:prettier": "prettier --check bin/* scripts/**/*.js js/**/*.js",
55
+ "test:eslint": "eslint bin/* scripts/**/*.js lib/**/*.js",
56
+ "test:prettier": "prettier --check bin/* scripts/**/*.js lib/**/*.js",
54
57
  "check:types": "tsc --noEmit",
55
58
  "test:vercel-nft": "node scripts/test-vercel-nft.js"
56
59
  },