@sentry/cli 2.58.4 → 3.0.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 +21 -0
- package/bin/sentry-cli +1 -1
- package/checksums.txt +10 -10
- package/js/helper.d.ts +60 -94
- package/js/helper.js +36 -67
- package/js/index.d.ts +24 -43
- package/js/index.js +16 -23
- package/js/logger.d.ts +4 -5
- package/js/logger.js +8 -4
- package/js/releases/index.d.ts +30 -60
- package/js/releases/index.js +33 -64
- package/js/releases/options/deploys.d.ts +29 -2
- package/js/releases/options/deploys.js +5 -2
- package/js/releases/options/uploadSourcemaps.d.ts +58 -2
- package/js/releases/options/uploadSourcemaps.js +5 -6
- package/js/types.d.ts +8 -40
- package/js/types.js +2 -1
- package/package.json +12 -13
- package/scripts/install.js +23 -30
package/js/releases/index.d.ts
CHANGED
|
@@ -1,61 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @typedef {import('../types').SentryCliUploadSourceMapsOptions} SentryCliUploadSourceMapsOptions
|
|
4
|
-
* @typedef {import('../types').SourceMapsPathDescriptor} SourceMapsPathDescriptor
|
|
5
|
-
* @typedef {import('../types').SentryCliNewDeployOptions} SentryCliNewDeployOptions
|
|
6
|
-
* @typedef {import('../types').SentryCliCommitsOptions} SentryCliCommitsOptions
|
|
7
|
-
*/
|
|
1
|
+
import { SentryCliCommitsOptions, SentryCliNewDeployOptions, SentryCliOptions, SentryCliUploadSourceMapsOptions } from '../types';
|
|
8
2
|
/**
|
|
9
3
|
* Manages releases and release artifacts on Sentry.
|
|
10
|
-
* @namespace SentryReleases
|
|
11
4
|
*/
|
|
12
|
-
declare class Releases {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @param {Object} [options] More options to pass to the CLI
|
|
17
|
-
*/
|
|
18
|
-
constructor(options?: any);
|
|
19
|
-
options: any;
|
|
20
|
-
configFile: any;
|
|
5
|
+
export declare class Releases {
|
|
6
|
+
options: SentryCliOptions;
|
|
7
|
+
private configFile;
|
|
8
|
+
constructor(options: SentryCliOptions, configFile: string | null);
|
|
21
9
|
/**
|
|
22
10
|
* Registers a new release with sentry.
|
|
23
11
|
*
|
|
24
12
|
* The given release name should be unique and deterministic. It can later be used to
|
|
25
13
|
* upload artifacts, such as source maps.
|
|
26
14
|
*
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
29
|
-
* @returns
|
|
30
|
-
* @memberof SentryReleases
|
|
15
|
+
* @param release Unique name of the new release.
|
|
16
|
+
* @param options The list of project slugs for a release.
|
|
17
|
+
* @returns A promise that resolves when the release has been created.
|
|
31
18
|
*/
|
|
32
|
-
|
|
19
|
+
new(release: string, options: {
|
|
33
20
|
projects?: string[];
|
|
34
21
|
}): Promise<string>;
|
|
35
22
|
/**
|
|
36
23
|
* Specifies the set of commits covered in this release.
|
|
37
24
|
*
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
40
|
-
* @returns
|
|
41
|
-
* @memberof SentryReleases
|
|
25
|
+
* @param release Unique name of the release
|
|
26
|
+
* @param options A set of options to configure the commits to include
|
|
27
|
+
* @returns A promise that resolves when the commits have been associated
|
|
42
28
|
*/
|
|
43
29
|
setCommits(release: string, options: SentryCliCommitsOptions): Promise<string>;
|
|
44
30
|
/**
|
|
45
31
|
* Marks this release as complete. This should be called once all artifacts has been
|
|
46
32
|
* uploaded.
|
|
47
33
|
*
|
|
48
|
-
* @param
|
|
49
|
-
* @returns
|
|
50
|
-
* @memberof SentryReleases
|
|
34
|
+
* @param release Unique name of the release.
|
|
35
|
+
* @returns A promise that resolves when the release has been finalized.
|
|
51
36
|
*/
|
|
52
37
|
finalize(release: string): Promise<string>;
|
|
53
38
|
/**
|
|
54
39
|
* Creates a unique, deterministic version identifier based on the project type and
|
|
55
40
|
* source files. This identifier can be used as release name.
|
|
56
41
|
*
|
|
57
|
-
* @returns
|
|
58
|
-
* @memberof SentryReleases
|
|
42
|
+
* @returns A promise that resolves to the version string.
|
|
59
43
|
*/
|
|
60
44
|
proposeVersion(): Promise<string>;
|
|
61
45
|
/**
|
|
@@ -85,23 +69,18 @@ declare class Releases {
|
|
|
85
69
|
* ext: ['js', 'map', 'jsbundle', 'bundle'], // override file extensions to scan for
|
|
86
70
|
* projects: ['node'], // provide a list of projects
|
|
87
71
|
* decompress: false // decompress gzip files before uploading
|
|
88
|
-
* live: true // whether to inherit stdio to display `sentry-cli` output directly.
|
|
89
72
|
* });
|
|
90
73
|
*
|
|
91
|
-
* @param
|
|
92
|
-
* @param
|
|
93
|
-
* @returns
|
|
94
|
-
* @memberof SentryReleases
|
|
74
|
+
* @param release Unique name of the release.
|
|
75
|
+
* @param options Options to configure the source map upload.
|
|
76
|
+
* @returns A promise that resolves when the upload has completed successfully.
|
|
95
77
|
*/
|
|
96
|
-
uploadSourceMaps(release: string, options: SentryCliUploadSourceMapsOptions
|
|
97
|
-
live?: boolean | "rejectOnError";
|
|
98
|
-
}): Promise<string[]>;
|
|
78
|
+
uploadSourceMaps(release: string, options: SentryCliUploadSourceMapsOptions): Promise<string[]>;
|
|
99
79
|
/**
|
|
100
80
|
* List all deploys for a given release.
|
|
101
81
|
*
|
|
102
|
-
* @param
|
|
103
|
-
* @returns
|
|
104
|
-
* @memberof SentryReleases
|
|
82
|
+
* @param release Unique name of the release.
|
|
83
|
+
* @returns A promise that resolves when the list comes back from the server.
|
|
105
84
|
*/
|
|
106
85
|
listDeploys(release: string): Promise<string>;
|
|
107
86
|
/**
|
|
@@ -121,28 +100,19 @@ declare class Releases {
|
|
|
121
100
|
* url: 'https://example.com', // URL that points to the deployment
|
|
122
101
|
* });
|
|
123
102
|
*
|
|
124
|
-
* @param
|
|
125
|
-
* @param
|
|
126
|
-
* @returns
|
|
127
|
-
* @memberof SentryReleases
|
|
103
|
+
* @param release Unique name of the release.
|
|
104
|
+
* @param options Options to configure the new release deploy.
|
|
105
|
+
* @returns A promise that resolves when the deploy has been created.
|
|
128
106
|
*/
|
|
129
107
|
newDeploy(release: string, options: SentryCliNewDeployOptions): Promise<string>;
|
|
130
108
|
/**
|
|
131
109
|
* See {helper.execute} docs.
|
|
132
|
-
* @param
|
|
133
|
-
* @param
|
|
134
|
-
* - `true` to inherit stdio
|
|
135
|
-
* - `false` to not inherit stdio and return the output as a string.
|
|
136
|
-
* - `'rejectOnError'` to inherit stdio and reject the promise if the command
|
|
110
|
+
* @param args Command line arguments passed to `sentry-cli`.
|
|
111
|
+
* @param live can be set to:
|
|
112
|
+
* - `true` to inherit stdio and reject the promise if the command
|
|
137
113
|
* exits with a non-zero exit code.
|
|
138
|
-
*
|
|
114
|
+
* - `false` to not inherit stdio and return the output as a string.
|
|
115
|
+
* @returns A promise that resolves to the standard output.
|
|
139
116
|
*/
|
|
140
|
-
execute(args: string[], live: boolean
|
|
141
|
-
}
|
|
142
|
-
declare namespace Releases {
|
|
143
|
-
export { SentryCliUploadSourceMapsOptions, SourceMapsPathDescriptor, SentryCliNewDeployOptions, SentryCliCommitsOptions };
|
|
117
|
+
execute(args: string[], live: boolean): Promise<string>;
|
|
144
118
|
}
|
|
145
|
-
type SentryCliUploadSourceMapsOptions = import("../types").SentryCliUploadSourceMapsOptions;
|
|
146
|
-
type SourceMapsPathDescriptor = import("../types").SourceMapsPathDescriptor;
|
|
147
|
-
type SentryCliNewDeployOptions = import("../types").SentryCliNewDeployOptions;
|
|
148
|
-
type SentryCliCommitsOptions = import("../types").SentryCliCommitsOptions;
|
package/js/releases/index.js
CHANGED
|
@@ -8,44 +8,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Releases = void 0;
|
|
13
|
+
const deploys_1 = require("./options/deploys");
|
|
14
|
+
const uploadSourcemaps_1 = require("./options/uploadSourcemaps");
|
|
15
|
+
const helper = require("../helper");
|
|
12
16
|
/**
|
|
13
17
|
* Default arguments for the `--ignore` option.
|
|
14
|
-
* @type {string[]}
|
|
15
18
|
*/
|
|
16
19
|
const DEFAULT_IGNORE = ['node_modules'];
|
|
17
|
-
/**
|
|
18
|
-
* Schema for the `upload-sourcemaps` command.
|
|
19
|
-
* @type {import('../helper').OptionsSchema}
|
|
20
|
-
*/
|
|
21
|
-
const SOURCEMAPS_SCHEMA = require('./options/uploadSourcemaps');
|
|
22
|
-
/**
|
|
23
|
-
* Schema for the `deploys new` command.
|
|
24
|
-
* @type {import('../helper').OptionsSchema}
|
|
25
|
-
*/
|
|
26
|
-
const DEPLOYS_SCHEMA = require('./options/deploys');
|
|
27
|
-
/**
|
|
28
|
-
* @typedef {import('../types').SentryCliUploadSourceMapsOptions} SentryCliUploadSourceMapsOptions
|
|
29
|
-
* @typedef {import('../types').SourceMapsPathDescriptor} SourceMapsPathDescriptor
|
|
30
|
-
* @typedef {import('../types').SentryCliNewDeployOptions} SentryCliNewDeployOptions
|
|
31
|
-
* @typedef {import('../types').SentryCliCommitsOptions} SentryCliCommitsOptions
|
|
32
|
-
*/
|
|
33
20
|
/**
|
|
34
21
|
* Manages releases and release artifacts on Sentry.
|
|
35
|
-
* @namespace SentryReleases
|
|
36
22
|
*/
|
|
37
23
|
class Releases {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* @param {Object} [options] More options to pass to the CLI
|
|
42
|
-
*/
|
|
43
|
-
constructor(options) {
|
|
44
|
-
this.options = options || {};
|
|
45
|
-
if (typeof this.options.configFile === 'string') {
|
|
46
|
-
this.configFile = this.options.configFile;
|
|
47
|
-
}
|
|
48
|
-
delete this.options.configFile;
|
|
24
|
+
constructor(options = {}, configFile) {
|
|
25
|
+
this.options = options;
|
|
26
|
+
this.configFile = configFile;
|
|
49
27
|
}
|
|
50
28
|
/**
|
|
51
29
|
* Registers a new release with sentry.
|
|
@@ -53,10 +31,9 @@ class Releases {
|
|
|
53
31
|
* The given release name should be unique and deterministic. It can later be used to
|
|
54
32
|
* upload artifacts, such as source maps.
|
|
55
33
|
*
|
|
56
|
-
* @param
|
|
57
|
-
* @param
|
|
58
|
-
* @returns
|
|
59
|
-
* @memberof SentryReleases
|
|
34
|
+
* @param release Unique name of the new release.
|
|
35
|
+
* @param options The list of project slugs for a release.
|
|
36
|
+
* @returns A promise that resolves when the release has been created.
|
|
60
37
|
*/
|
|
61
38
|
new(release, options) {
|
|
62
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -67,10 +44,9 @@ class Releases {
|
|
|
67
44
|
/**
|
|
68
45
|
* Specifies the set of commits covered in this release.
|
|
69
46
|
*
|
|
70
|
-
* @param
|
|
71
|
-
* @param
|
|
72
|
-
* @returns
|
|
73
|
-
* @memberof SentryReleases
|
|
47
|
+
* @param release Unique name of the release
|
|
48
|
+
* @param options A set of options to configure the commits to include
|
|
49
|
+
* @returns A promise that resolves when the commits have been associated
|
|
74
50
|
*/
|
|
75
51
|
setCommits(release, options) {
|
|
76
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -97,9 +73,8 @@ class Releases {
|
|
|
97
73
|
* Marks this release as complete. This should be called once all artifacts has been
|
|
98
74
|
* uploaded.
|
|
99
75
|
*
|
|
100
|
-
* @param
|
|
101
|
-
* @returns
|
|
102
|
-
* @memberof SentryReleases
|
|
76
|
+
* @param release Unique name of the release.
|
|
77
|
+
* @returns A promise that resolves when the release has been finalized.
|
|
103
78
|
*/
|
|
104
79
|
finalize(release) {
|
|
105
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -110,8 +85,7 @@ class Releases {
|
|
|
110
85
|
* Creates a unique, deterministic version identifier based on the project type and
|
|
111
86
|
* source files. This identifier can be used as release name.
|
|
112
87
|
*
|
|
113
|
-
* @returns
|
|
114
|
-
* @memberof SentryReleases
|
|
88
|
+
* @returns A promise that resolves to the version string.
|
|
115
89
|
*/
|
|
116
90
|
proposeVersion() {
|
|
117
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -146,13 +120,11 @@ class Releases {
|
|
|
146
120
|
* ext: ['js', 'map', 'jsbundle', 'bundle'], // override file extensions to scan for
|
|
147
121
|
* projects: ['node'], // provide a list of projects
|
|
148
122
|
* decompress: false // decompress gzip files before uploading
|
|
149
|
-
* live: true // whether to inherit stdio to display `sentry-cli` output directly.
|
|
150
123
|
* });
|
|
151
124
|
*
|
|
152
|
-
* @param
|
|
153
|
-
* @param
|
|
154
|
-
* @returns
|
|
155
|
-
* @memberof SentryReleases
|
|
125
|
+
* @param release Unique name of the release.
|
|
126
|
+
* @param options Options to configure the source map upload.
|
|
127
|
+
* @returns A promise that resolves when the upload has completed successfully.
|
|
156
128
|
*/
|
|
157
129
|
uploadSourceMaps(release, options) {
|
|
158
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -188,7 +160,7 @@ class Releases {
|
|
|
188
160
|
.concat(['--release', release]);
|
|
189
161
|
return uploadPaths.map((path) =>
|
|
190
162
|
// `execute()` is async and thus we're returning a promise here
|
|
191
|
-
this.execute(helper.prepareCommand([...args, path],
|
|
163
|
+
this.execute(helper.prepareCommand([...args, path], uploadSourcemaps_1.SOURCEMAPS_OPTIONS, newOptions), true));
|
|
192
164
|
});
|
|
193
165
|
// `uploads` is an array of Promise arrays, which needs to be flattened
|
|
194
166
|
// before being passed to `Promise.all()`. (`Array.flat()` doesn't exist in
|
|
@@ -201,9 +173,8 @@ class Releases {
|
|
|
201
173
|
/**
|
|
202
174
|
* List all deploys for a given release.
|
|
203
175
|
*
|
|
204
|
-
* @param
|
|
205
|
-
* @returns
|
|
206
|
-
* @memberof SentryReleases
|
|
176
|
+
* @param release Unique name of the release.
|
|
177
|
+
* @returns A promise that resolves when the list comes back from the server.
|
|
207
178
|
*/
|
|
208
179
|
listDeploys(release) {
|
|
209
180
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -227,10 +198,9 @@ class Releases {
|
|
|
227
198
|
* url: 'https://example.com', // URL that points to the deployment
|
|
228
199
|
* });
|
|
229
200
|
*
|
|
230
|
-
* @param
|
|
231
|
-
* @param
|
|
232
|
-
* @returns
|
|
233
|
-
* @memberof SentryReleases
|
|
201
|
+
* @param release Unique name of the release.
|
|
202
|
+
* @param options Options to configure the new release deploy.
|
|
203
|
+
* @returns A promise that resolves when the deploy has been created.
|
|
234
204
|
*/
|
|
235
205
|
newDeploy(release, options) {
|
|
236
206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -238,18 +208,17 @@ class Releases {
|
|
|
238
208
|
throw new Error('options.env must be a valid name');
|
|
239
209
|
}
|
|
240
210
|
const args = ['releases', 'deploys', release, 'new'];
|
|
241
|
-
return this.execute(helper.prepareCommand(args,
|
|
211
|
+
return this.execute(helper.prepareCommand(args, deploys_1.DEPLOYS_OPTIONS, options), null);
|
|
242
212
|
});
|
|
243
213
|
}
|
|
244
214
|
/**
|
|
245
215
|
* See {helper.execute} docs.
|
|
246
|
-
* @param
|
|
247
|
-
* @param
|
|
248
|
-
* - `true` to inherit stdio
|
|
249
|
-
* - `false` to not inherit stdio and return the output as a string.
|
|
250
|
-
* - `'rejectOnError'` to inherit stdio and reject the promise if the command
|
|
216
|
+
* @param args Command line arguments passed to `sentry-cli`.
|
|
217
|
+
* @param live can be set to:
|
|
218
|
+
* - `true` to inherit stdio and reject the promise if the command
|
|
251
219
|
* exits with a non-zero exit code.
|
|
252
|
-
*
|
|
220
|
+
* - `false` to not inherit stdio and return the output as a string.
|
|
221
|
+
* @returns A promise that resolves to the standard output.
|
|
253
222
|
*/
|
|
254
223
|
execute(args, live) {
|
|
255
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -257,4 +226,4 @@ class Releases {
|
|
|
257
226
|
});
|
|
258
227
|
}
|
|
259
228
|
}
|
|
260
|
-
|
|
229
|
+
exports.Releases = Releases;
|
|
@@ -1,2 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Schema for the `deploys new` command.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DEPLOYS_OPTIONS: {
|
|
5
|
+
env: {
|
|
6
|
+
param: string;
|
|
7
|
+
type: "string";
|
|
8
|
+
};
|
|
9
|
+
started: {
|
|
10
|
+
param: string;
|
|
11
|
+
type: "number";
|
|
12
|
+
};
|
|
13
|
+
finished: {
|
|
14
|
+
param: string;
|
|
15
|
+
type: "number";
|
|
16
|
+
};
|
|
17
|
+
time: {
|
|
18
|
+
param: string;
|
|
19
|
+
type: "number";
|
|
20
|
+
};
|
|
21
|
+
name: {
|
|
22
|
+
param: string;
|
|
23
|
+
type: "string";
|
|
24
|
+
};
|
|
25
|
+
url: {
|
|
26
|
+
param: string;
|
|
27
|
+
type: "string";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEPLOYS_OPTIONS = void 0;
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
5
|
+
* Schema for the `deploys new` command.
|
|
3
6
|
*/
|
|
4
|
-
|
|
7
|
+
exports.DEPLOYS_OPTIONS = {
|
|
5
8
|
env: {
|
|
6
9
|
param: '--env',
|
|
7
10
|
type: 'string',
|
|
@@ -1,2 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Schema for the `upload-sourcemaps` command.
|
|
3
|
+
*/
|
|
4
|
+
export declare const SOURCEMAPS_OPTIONS: {
|
|
5
|
+
ignore: {
|
|
6
|
+
param: string;
|
|
7
|
+
type: "array";
|
|
8
|
+
};
|
|
9
|
+
ignoreFile: {
|
|
10
|
+
param: string;
|
|
11
|
+
type: "string";
|
|
12
|
+
};
|
|
13
|
+
dist: {
|
|
14
|
+
param: string;
|
|
15
|
+
type: "string";
|
|
16
|
+
};
|
|
17
|
+
decompress: {
|
|
18
|
+
param: string;
|
|
19
|
+
type: "boolean";
|
|
20
|
+
};
|
|
21
|
+
rewrite: {
|
|
22
|
+
param: string;
|
|
23
|
+
invertedParam: string;
|
|
24
|
+
type: "boolean";
|
|
25
|
+
};
|
|
26
|
+
sourceMapReference: {
|
|
27
|
+
invertedParam: string;
|
|
28
|
+
type: "boolean";
|
|
29
|
+
};
|
|
30
|
+
dedupe: {
|
|
31
|
+
invertedParam: string;
|
|
32
|
+
type: "boolean";
|
|
33
|
+
};
|
|
34
|
+
stripPrefix: {
|
|
35
|
+
param: string;
|
|
36
|
+
type: "array";
|
|
37
|
+
};
|
|
38
|
+
stripCommonPrefix: {
|
|
39
|
+
param: string;
|
|
40
|
+
type: "boolean";
|
|
41
|
+
};
|
|
42
|
+
validate: {
|
|
43
|
+
param: string;
|
|
44
|
+
type: "boolean";
|
|
45
|
+
};
|
|
46
|
+
urlPrefix: {
|
|
47
|
+
param: string;
|
|
48
|
+
type: "string";
|
|
49
|
+
};
|
|
50
|
+
urlSuffix: {
|
|
51
|
+
param: string;
|
|
52
|
+
type: "string";
|
|
53
|
+
};
|
|
54
|
+
ext: {
|
|
55
|
+
param: string;
|
|
56
|
+
type: "array";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SOURCEMAPS_OPTIONS = void 0;
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
5
|
+
* Schema for the `upload-sourcemaps` command.
|
|
3
6
|
*/
|
|
4
|
-
|
|
7
|
+
exports.SOURCEMAPS_OPTIONS = {
|
|
5
8
|
ignore: {
|
|
6
9
|
param: '--ignore',
|
|
7
10
|
type: 'array',
|
|
@@ -55,8 +58,4 @@ module.exports = {
|
|
|
55
58
|
param: '--ext',
|
|
56
59
|
type: 'array',
|
|
57
60
|
},
|
|
58
|
-
useArtifactBundle: {
|
|
59
|
-
param: '--use-artifact-bundle',
|
|
60
|
-
type: 'boolean',
|
|
61
|
-
},
|
|
62
61
|
};
|
package/js/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Options for configuring the Sentry CLI
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type SentryCliOptions = {
|
|
8
8
|
/**
|
|
9
9
|
* The URL of the Sentry instance you are connecting to. Defaults to https://sentry.io/.
|
|
10
10
|
* This value will update `SENTRY_URL` env variable.
|
|
@@ -15,13 +15,6 @@ export interface SentryCliOptions {
|
|
|
15
15
|
* This value will update `SENTRY_AUTH_TOKEN` env variable.
|
|
16
16
|
*/
|
|
17
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
18
|
/**
|
|
26
19
|
* Sentry DSN.
|
|
27
20
|
* This value will update `SENTRY_DSN` env variable.
|
|
@@ -56,7 +49,7 @@ export interface SentryCliOptions {
|
|
|
56
49
|
* This value does not set any env variable, and is overridden by `customHeader`.
|
|
57
50
|
*/
|
|
58
51
|
headers?: Record<string, string>;
|
|
59
|
-
}
|
|
52
|
+
};
|
|
60
53
|
/**
|
|
61
54
|
* Custom upload-sourcemaps options for a particular `include` path. In this
|
|
62
55
|
* case `paths` takes the place of `include` in the options so as to make it
|
|
@@ -68,7 +61,7 @@ export type SourceMapsPathDescriptor = Omit<SentryCliUploadSourceMapsOptions, 'i
|
|
|
68
61
|
/**
|
|
69
62
|
* Options for uploading source maps
|
|
70
63
|
*/
|
|
71
|
-
export
|
|
64
|
+
export type SentryCliUploadSourceMapsOptions = {
|
|
72
65
|
/**
|
|
73
66
|
* One or more paths that Sentry CLI should scan recursively for sources.
|
|
74
67
|
* It will upload all .map files and match associated .js files.
|
|
@@ -141,19 +134,11 @@ export interface SentryCliUploadSourceMapsOptions {
|
|
|
141
134
|
* Usually your build number.
|
|
142
135
|
*/
|
|
143
136
|
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
|
-
}
|
|
137
|
+
};
|
|
153
138
|
/**
|
|
154
139
|
* Options for creating a new deployment
|
|
155
140
|
*/
|
|
156
|
-
export
|
|
141
|
+
export type SentryCliNewDeployOptions = {
|
|
157
142
|
/**
|
|
158
143
|
* Environment for this release. Values that make sense here would be `production` or `staging`.
|
|
159
144
|
*/
|
|
@@ -178,11 +163,11 @@ export interface SentryCliNewDeployOptions {
|
|
|
178
163
|
* URL that points to the deployment.
|
|
179
164
|
*/
|
|
180
165
|
url?: string;
|
|
181
|
-
}
|
|
166
|
+
};
|
|
182
167
|
/**
|
|
183
168
|
* Options for setting commits on a release
|
|
184
169
|
*/
|
|
185
|
-
export
|
|
170
|
+
export type SentryCliCommitsOptions = {
|
|
186
171
|
/**
|
|
187
172
|
* Automatically choose the associated commit (uses the current commit). Overrides other setCommit options.
|
|
188
173
|
*/
|
|
@@ -210,21 +195,4 @@ export interface SentryCliCommitsOptions {
|
|
|
210
195
|
* 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
196
|
*/
|
|
212
197
|
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
|
-
}
|
|
198
|
+
};
|
package/js/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.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/",
|
|
7
7
|
"author": "Sentry",
|
|
8
8
|
"license": "FSL-1.1-MIT",
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": ">=
|
|
10
|
+
"node": ">= 18"
|
|
11
11
|
},
|
|
12
12
|
"main": "js/index.js",
|
|
13
13
|
"types": "js/index.d.ts",
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
"sentry-cli": "bin/sentry-cli"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"https-proxy-agent": "^5.0.0",
|
|
19
|
-
"node-fetch": "^2.6.7",
|
|
20
18
|
"progress": "^2.0.3",
|
|
21
19
|
"proxy-from-env": "^1.1.0",
|
|
20
|
+
"undici": "^6.22.0",
|
|
22
21
|
"which": "^2.0.2"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
@@ -29,22 +28,22 @@
|
|
|
29
28
|
"jest": "^27.5.1",
|
|
30
29
|
"npm-run-all": "^4.1.5",
|
|
31
30
|
"prettier": "2.8.8",
|
|
31
|
+
"ts-jest": "^27.1.5",
|
|
32
32
|
"typescript": "5.8.3"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"@sentry/cli-darwin": "
|
|
36
|
-
"@sentry/cli-linux-arm": "
|
|
37
|
-
"@sentry/cli-linux-arm64": "
|
|
38
|
-
"@sentry/cli-linux-i686": "
|
|
39
|
-
"@sentry/cli-linux-x64": "
|
|
40
|
-
"@sentry/cli-win32-i686": "
|
|
41
|
-
"@sentry/cli-win32-x64": "
|
|
42
|
-
"@sentry/cli-win32-arm64": "
|
|
35
|
+
"@sentry/cli-darwin": "3.0.0",
|
|
36
|
+
"@sentry/cli-linux-arm": "3.0.0",
|
|
37
|
+
"@sentry/cli-linux-arm64": "3.0.0",
|
|
38
|
+
"@sentry/cli-linux-i686": "3.0.0",
|
|
39
|
+
"@sentry/cli-linux-x64": "3.0.0",
|
|
40
|
+
"@sentry/cli-win32-i686": "3.0.0",
|
|
41
|
+
"@sentry/cli-win32-x64": "3.0.0",
|
|
42
|
+
"@sentry/cli-win32-arm64": "3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"postinstall": "node ./scripts/install.js",
|
|
46
46
|
"build": "tsc",
|
|
47
|
-
"install-cli": "node ./scripts/install.js",
|
|
48
47
|
"prepack": "npm run build",
|
|
49
48
|
"fix": "npm-run-all fix:eslint fix:prettier",
|
|
50
49
|
"fix:eslint": "eslint --fix bin/* scripts/**/*.js lib/**/*.js",
|