forked from getsentry/sentry-webpack-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
153 lines (127 loc) · 4.46 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import { Plugin, Compiler } from 'webpack';
export interface SentryCliPluginOptions {
/**
* Unique name of a release, must be a string, should uniquely identify your release,
* defaults to sentry-cli releases propose-version command which should always return the correct version
* (requires access to git CLI and root directory to be a valid repository).
*/
release?: string;
/**
* One or more paths that Sentry CLI should scan recursively for sources.
* It will upload all .map files and match associated .js files.
*/
include: string | string[];
/**
* A filter for entry points that should be processed.
* By default, the release will be injected into all entry points.
*/
entries?: string[] | RegExp | ((key: string) => boolean);
/**
* Path to a file containing list of files/directories to ignore.
* Can point to .gitignore or anything with same format.
*/
ignoreFile?: string;
/**
* One or more paths to ignore during upload. Overrides entries in ignoreFile file.
* If neither ignoreFile or ignore are present, defaults to ['node_modules'].
*/
ignore?: string | string[];
/**
* Path to Sentry CLI config properties, as described in https://docs.sentry.io/learn/cli/configuration/#properties-files.
* By default, the config file is looked for upwards from the current path and defaults from ~/.sentryclirc are always loaded.
*/
configFile?: string;
/**
* This sets the file extensions to be considered.
* By default the following file extensions are processed: js, map, jsbundle and bundle.
*/
ext?: string[];
/**
* This sets an URL prefix at the beginning of all files.
* This defaults to `~/` but you might want to set this to the full URL.
* This is also useful if your files are stored in a sub folder. eg: url-prefix `~/static/js`.
*/
urlPrefix?: string;
/**
* This sets an URL suffix at the end of all files.
* Useful for appending query parameters.
*/
urlSuffix?: string;
/**
* This attempts sourcemap validation before upload when rewriting is not enabled.
* It will spot a variety of issues with source maps and cancel the upload if any are found.
* This is not the default as this can cause false positives.
*/
validate?: boolean;
/**
* When paired with rewrite this will chop-off a prefix from uploaded files.
* For instance you can use this to remove a path that is build machine specific.
*/
stripPrefix?: string[];
/**
* When paired with rewrite this will add ~ to the stripPrefix array.
*/
stripCommonPrefix?: boolean;
/**
* This prevents the automatic detection of sourcemap references.
*/
sourceMapReference?: boolean;
/**
* Enables rewriting of matching sourcemaps so that indexed maps are flattened
* and missing sources are inlined if possible., defaults to `true`.
*/
rewrite?: boolean;
/**
* Determines whether processed release should be automatically finalized after artifacts upload.
* Defaults to `true`.
*/
finalize?: boolean;
/**
* Attempts a dry run (useful for dev environments).
*/
dryRun?: boolean;
/**
* Print some useful debug information.
*/
debug?: boolean;
/**
* If true, all logs are suppressed (useful for --json option).
*/
silent?: boolean;
/**
* when Cli error occurs, plugin calls this function.
* webpack compilation failure can be chosen by calling invokeErr callback or not.
* defaults to `(err, invokeErr) => { invokeErr() }`
*/
errorHandler?: (err: Error, invokeErr: () => void) => void;
/**
* Adds commits to sentry
*/
setCommits?: {
/**
* The full repo name as defined in Sentry.
* Required if auto option is not true.
*/
repo?: string;
/**
* The current (last) commit in the release.
* Required if auto option is not true.
*/
commit?: string;
/**
* The commit before the beginning of this release (in other words, the last commit of the previous release).
* If omitted, this will default to the last commit of the previous release in Sentry.
* If there was no previous release, the last 10 commits will be used.
*/
previousCommit?: string;
/**
* Automatically choose the associated commit (uses the current commit). Overrides other setCommit options.
*/
auto?: boolean;
};
}
declare class SentryCliPlugin extends Plugin {
constructor(options: SentryCliPluginOptions);
apply(compiler: Compiler): void;
}
export default SentryCliPlugin;