@codingame/monaco-vscode-task-service-override 28.4.1 → 29.1.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.
Files changed (22) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/base/common/parsers.d.ts +32 -0
  3. package/vscode/src/vs/base/common/parsers.js +54 -0
  4. package/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.d.ts +1 -1
  5. package/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.js +114 -114
  6. package/vscode/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.js +7 -7
  7. package/vscode/src/vs/workbench/contrib/tasks/browser/task.contribution.js +48 -48
  8. package/vscode/src/vs/workbench/contrib/tasks/browser/taskQuickPick.js +19 -19
  9. package/vscode/src/vs/workbench/contrib/tasks/browser/taskService.js +1 -1
  10. package/vscode/src/vs/workbench/contrib/tasks/browser/taskTerminalStatus.js +10 -10
  11. package/vscode/src/vs/workbench/contrib/tasks/browser/tasksQuickAccess.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.js +17 -17
  13. package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchemaCommon.js +42 -42
  14. package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v1.js +9 -9
  15. package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v2.js +86 -86
  16. package/vscode/src/vs/workbench/contrib/tasks/common/problemCollectors.d.ts +1 -1
  17. package/vscode/src/vs/workbench/contrib/tasks/common/problemCollectors.js +1 -1
  18. package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.d.ts +433 -0
  19. package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.js +1637 -0
  20. package/vscode/src/vs/workbench/contrib/tasks/common/taskConfiguration.d.ts +514 -0
  21. package/vscode/src/vs/workbench/contrib/tasks/common/taskConfiguration.js +1798 -0
  22. package/vscode/src/vs/workbench/contrib/tasks/common/taskTemplates.js +4 -4
@@ -0,0 +1,433 @@
1
+ import * as Types from "@codingame/monaco-vscode-api/vscode/vs/base/common/types";
2
+ import Severity from "@codingame/monaco-vscode-api/vscode/vs/base/common/severity";
3
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
+ import { IJSONSchema } from "@codingame/monaco-vscode-api/vscode/vs/base/common/jsonSchema";
5
+ import { ValidationStatus, IProblemReporter, Parser } from "../../../../base/common/parsers.js";
6
+ import { IMarkerData } from "@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers";
7
+ import { ExtensionMessageCollector } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionsRegistry";
8
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
9
+ import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
10
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
11
+ export declare enum FileLocationKind {
12
+ Default = 0,
13
+ Relative = 1,
14
+ Absolute = 2,
15
+ AutoDetect = 3,
16
+ Search = 4
17
+ }
18
+ export declare namespace FileLocationKind {
19
+ function fromString(value: string): FileLocationKind | undefined;
20
+ }
21
+ export declare enum ProblemLocationKind {
22
+ File = 0,
23
+ Location = 1
24
+ }
25
+ export declare namespace ProblemLocationKind {
26
+ function fromString(value: string): ProblemLocationKind | undefined;
27
+ }
28
+ export interface IProblemPattern {
29
+ regexp: RegExp;
30
+ kind?: ProblemLocationKind;
31
+ file?: number;
32
+ message?: number;
33
+ location?: number;
34
+ line?: number;
35
+ character?: number;
36
+ endLine?: number;
37
+ endCharacter?: number;
38
+ code?: number;
39
+ severity?: number;
40
+ loop?: boolean;
41
+ }
42
+ export interface INamedProblemPattern extends IProblemPattern {
43
+ name: string;
44
+ }
45
+ export type MultiLineProblemPattern = IProblemPattern[];
46
+ export interface IWatchingPattern {
47
+ regexp: RegExp;
48
+ file?: number;
49
+ }
50
+ export interface IWatchingMatcher {
51
+ activeOnStart: boolean;
52
+ beginsPattern: IWatchingPattern;
53
+ endsPattern: IWatchingPattern;
54
+ }
55
+ export declare enum ApplyToKind {
56
+ allDocuments = 0,
57
+ openDocuments = 1,
58
+ closedDocuments = 2
59
+ }
60
+ export declare namespace ApplyToKind {
61
+ function fromString(value: string): ApplyToKind | undefined;
62
+ }
63
+ export interface ProblemMatcher {
64
+ owner: string;
65
+ source?: string;
66
+ applyTo: ApplyToKind;
67
+ fileLocation: FileLocationKind;
68
+ filePrefix?: string | Config.SearchFileLocationArgs;
69
+ pattern: Types.SingleOrMany<IProblemPattern>;
70
+ severity?: Severity;
71
+ watching?: IWatchingMatcher;
72
+ uriProvider?: (path: string) => URI;
73
+ }
74
+ export interface INamedProblemMatcher extends ProblemMatcher {
75
+ name: string;
76
+ label: string;
77
+ deprecated?: boolean;
78
+ }
79
+ export interface INamedMultiLineProblemPattern {
80
+ name: string;
81
+ label: string;
82
+ patterns: MultiLineProblemPattern;
83
+ }
84
+ export declare function isNamedProblemMatcher(value: ProblemMatcher | undefined): value is INamedProblemMatcher;
85
+ export interface IProblemMatch {
86
+ resource: Promise<URI>;
87
+ marker: IMarkerData;
88
+ description: ProblemMatcher;
89
+ }
90
+ export interface IHandleResult {
91
+ match: IProblemMatch | null;
92
+ continue: boolean;
93
+ }
94
+ export declare function getResource(filename: string, matcher: ProblemMatcher, fileService?: IFileService): Promise<URI>;
95
+ export interface ILineMatcher {
96
+ matchLength: number;
97
+ next(line: string): IProblemMatch | null;
98
+ handle(lines: string[], start?: number): IHandleResult;
99
+ }
100
+ export declare function createLineMatcher(matcher: ProblemMatcher, fileService?: IFileService, logService?: ILogService): ILineMatcher;
101
+ export declare namespace Config {
102
+ interface IProblemPattern {
103
+ /**
104
+ * The regular expression to find a problem in the console output of an
105
+ * executed task.
106
+ */
107
+ regexp?: string;
108
+ /**
109
+ * Whether the pattern matches a whole file, or a location (file/line)
110
+ *
111
+ * The default is to match for a location. Only valid on the
112
+ * first problem pattern in a multi line problem matcher.
113
+ */
114
+ kind?: string;
115
+ /**
116
+ * The match group index of the filename.
117
+ * If omitted 1 is used.
118
+ */
119
+ file?: number;
120
+ /**
121
+ * The match group index of the problem's location. Valid location
122
+ * patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn).
123
+ * If omitted the line and column properties are used.
124
+ */
125
+ location?: number;
126
+ /**
127
+ * The match group index of the problem's line in the source file.
128
+ *
129
+ * Defaults to 2.
130
+ */
131
+ line?: number;
132
+ /**
133
+ * The match group index of the problem's column in the source file.
134
+ *
135
+ * Defaults to 3.
136
+ */
137
+ column?: number;
138
+ /**
139
+ * The match group index of the problem's end line in the source file.
140
+ *
141
+ * Defaults to undefined. No end line is captured.
142
+ */
143
+ endLine?: number;
144
+ /**
145
+ * The match group index of the problem's end column in the source file.
146
+ *
147
+ * Defaults to undefined. No end column is captured.
148
+ */
149
+ endColumn?: number;
150
+ /**
151
+ * The match group index of the problem's severity.
152
+ *
153
+ * Defaults to undefined. In this case the problem matcher's severity
154
+ * is used.
155
+ */
156
+ severity?: number;
157
+ /**
158
+ * The match group index of the problem's code.
159
+ *
160
+ * Defaults to undefined. No code is captured.
161
+ */
162
+ code?: number;
163
+ /**
164
+ * The match group index of the message. If omitted it defaults
165
+ * to 4 if location is specified. Otherwise it defaults to 5.
166
+ */
167
+ message?: number;
168
+ /**
169
+ * Specifies if the last pattern in a multi line problem matcher should
170
+ * loop as long as it does match a line consequently. Only valid on the
171
+ * last problem pattern in a multi line problem matcher.
172
+ */
173
+ loop?: boolean;
174
+ }
175
+ interface ICheckedProblemPattern extends IProblemPattern {
176
+ /**
177
+ * The regular expression to find a problem in the console output of an
178
+ * executed task.
179
+ */
180
+ regexp: string;
181
+ }
182
+ namespace CheckedProblemPattern {
183
+ function is(value: unknown): value is ICheckedProblemPattern;
184
+ }
185
+ interface INamedProblemPattern extends IProblemPattern {
186
+ /**
187
+ * The name of the problem pattern.
188
+ */
189
+ name: string;
190
+ /**
191
+ * A human readable label
192
+ */
193
+ label?: string;
194
+ }
195
+ namespace NamedProblemPattern {
196
+ function is(value: unknown): value is INamedProblemPattern;
197
+ }
198
+ interface INamedCheckedProblemPattern extends INamedProblemPattern {
199
+ /**
200
+ * The regular expression to find a problem in the console output of an
201
+ * executed task.
202
+ */
203
+ regexp: string;
204
+ }
205
+ namespace NamedCheckedProblemPattern {
206
+ function is(value: unknown): value is INamedCheckedProblemPattern;
207
+ }
208
+ type MultiLineProblemPattern = IProblemPattern[];
209
+ namespace MultiLineProblemPattern {
210
+ function is(value: unknown): value is MultiLineProblemPattern;
211
+ }
212
+ type MultiLineCheckedProblemPattern = ICheckedProblemPattern[];
213
+ namespace MultiLineCheckedProblemPattern {
214
+ function is(value: unknown): value is MultiLineCheckedProblemPattern;
215
+ }
216
+ interface INamedMultiLineCheckedProblemPattern {
217
+ /**
218
+ * The name of the problem pattern.
219
+ */
220
+ name: string;
221
+ /**
222
+ * A human readable label
223
+ */
224
+ label?: string;
225
+ /**
226
+ * The actual patterns
227
+ */
228
+ patterns: MultiLineCheckedProblemPattern;
229
+ }
230
+ namespace NamedMultiLineCheckedProblemPattern {
231
+ function is(value: unknown): value is INamedMultiLineCheckedProblemPattern;
232
+ }
233
+ type NamedProblemPatterns = (Config.INamedProblemPattern | Config.INamedMultiLineCheckedProblemPattern)[];
234
+ /**
235
+ * A watching pattern
236
+ */
237
+ interface IWatchingPattern {
238
+ /**
239
+ * The actual regular expression
240
+ */
241
+ regexp?: string;
242
+ /**
243
+ * The match group index of the filename. If provided the expression
244
+ * is matched for that file only.
245
+ */
246
+ file?: number;
247
+ }
248
+ /**
249
+ * A description to track the start and end of a watching task.
250
+ */
251
+ interface IBackgroundMonitor {
252
+ /**
253
+ * If set to true the watcher starts in active mode. This is the
254
+ * same as outputting a line that matches beginsPattern when the
255
+ * task starts.
256
+ */
257
+ activeOnStart?: boolean;
258
+ /**
259
+ * If matched in the output the start of a watching task is signaled.
260
+ */
261
+ beginsPattern?: string | IWatchingPattern;
262
+ /**
263
+ * If matched in the output the end of a watching task is signaled.
264
+ */
265
+ endsPattern?: string | IWatchingPattern;
266
+ }
267
+ /**
268
+ * A description of a problem matcher that detects problems
269
+ * in build output.
270
+ */
271
+ interface ProblemMatcher {
272
+ /**
273
+ * The name of a base problem matcher to use. If specified the
274
+ * base problem matcher will be used as a template and properties
275
+ * specified here will replace properties of the base problem
276
+ * matcher
277
+ */
278
+ base?: string;
279
+ /**
280
+ * The owner of the produced VSCode problem. This is typically
281
+ * the identifier of a VSCode language service if the problems are
282
+ * to be merged with the one produced by the language service
283
+ * or a generated internal id. Defaults to the generated internal id.
284
+ */
285
+ owner?: string;
286
+ /**
287
+ * A human-readable string describing the source of this problem.
288
+ * E.g. 'typescript' or 'super lint'.
289
+ */
290
+ source?: string;
291
+ /**
292
+ * Specifies to which kind of documents the problems found by this
293
+ * matcher are applied. Valid values are:
294
+ *
295
+ * "allDocuments": problems found in all documents are applied.
296
+ * "openDocuments": problems found in documents that are open
297
+ * are applied.
298
+ * "closedDocuments": problems found in closed documents are
299
+ * applied.
300
+ */
301
+ applyTo?: string;
302
+ /**
303
+ * The severity of the VSCode problem produced by this problem matcher.
304
+ *
305
+ * Valid values are:
306
+ * "error": to produce errors.
307
+ * "warning": to produce warnings.
308
+ * "info": to produce infos.
309
+ *
310
+ * The value is used if a pattern doesn't specify a severity match group.
311
+ * Defaults to "error" if omitted.
312
+ */
313
+ severity?: string;
314
+ /**
315
+ * Defines how filename reported in a problem pattern
316
+ * should be read. Valid values are:
317
+ * - "absolute": the filename is always treated absolute.
318
+ * - "relative": the filename is always treated relative to
319
+ * the current working directory. This is the default.
320
+ * - ["relative", "path value"]: the filename is always
321
+ * treated relative to the given path value.
322
+ * - "autodetect": the filename is treated relative to
323
+ * the current workspace directory, and if the file
324
+ * does not exist, it is treated as absolute.
325
+ * - ["autodetect", "path value"]: the filename is treated
326
+ * relative to the given path value, and if it does not
327
+ * exist, it is treated as absolute.
328
+ * - ["search", { include?: "" | []; exclude?: "" | [] }]: The filename
329
+ * needs to be searched under the directories named by the "include"
330
+ * property and their nested subdirectories. With "exclude" property
331
+ * present, the directories should be removed from the search. When
332
+ * `include` is not unprovided, the current workspace directory should
333
+ * be used as the default.
334
+ */
335
+ fileLocation?: Types.SingleOrMany<string> | [
336
+ "search",
337
+ SearchFileLocationArgs
338
+ ];
339
+ /**
340
+ * The name of a predefined problem pattern, the inline definition
341
+ * of a problem pattern or an array of problem patterns to match
342
+ * problems spread over multiple lines.
343
+ */
344
+ pattern?: string | Types.SingleOrMany<IProblemPattern>;
345
+ /**
346
+ * A regular expression signaling that a watched tasks begins executing
347
+ * triggered through file watching.
348
+ */
349
+ watchedTaskBeginsRegExp?: string;
350
+ /**
351
+ * A regular expression signaling that a watched tasks ends executing.
352
+ */
353
+ watchedTaskEndsRegExp?: string;
354
+ /**
355
+ * @deprecated Use background instead.
356
+ */
357
+ watching?: IBackgroundMonitor;
358
+ background?: IBackgroundMonitor;
359
+ }
360
+ type SearchFileLocationArgs = {
361
+ include?: Types.SingleOrMany<string>;
362
+ exclude?: Types.SingleOrMany<string>;
363
+ };
364
+ type ProblemMatcherType = string | ProblemMatcher | Array<string | ProblemMatcher>;
365
+ interface INamedProblemMatcher extends ProblemMatcher {
366
+ /**
367
+ * This name can be used to refer to the
368
+ * problem matcher from within a task.
369
+ */
370
+ name: string;
371
+ /**
372
+ * A human readable label.
373
+ */
374
+ label?: string;
375
+ }
376
+ function isNamedProblemMatcher(value: ProblemMatcher): value is INamedProblemMatcher;
377
+ }
378
+ export declare class ProblemPatternParser extends Parser {
379
+ constructor(logger: IProblemReporter);
380
+ parse(value: Config.IProblemPattern): IProblemPattern;
381
+ parse(value: Config.MultiLineProblemPattern): MultiLineProblemPattern;
382
+ parse(value: Config.INamedProblemPattern): INamedProblemPattern;
383
+ parse(value: Config.INamedMultiLineCheckedProblemPattern): INamedMultiLineProblemPattern;
384
+ private createSingleProblemPattern;
385
+ private createNamedMultiLineProblemPattern;
386
+ private createMultiLineProblemPattern;
387
+ private doCreateSingleProblemPattern;
388
+ private validateProblemPattern;
389
+ private createRegularExpression;
390
+ }
391
+ export declare class ExtensionRegistryReporter implements IProblemReporter {
392
+ private _collector;
393
+ private _validationStatus;
394
+ constructor(_collector: ExtensionMessageCollector, _validationStatus?: ValidationStatus);
395
+ info(message: string): void;
396
+ warn(message: string): void;
397
+ error(message: string): void;
398
+ fatal(message: string): void;
399
+ get status(): ValidationStatus;
400
+ }
401
+ export declare namespace Schemas {
402
+ const ProblemPattern: IJSONSchema;
403
+ const NamedProblemPattern: IJSONSchema;
404
+ const MultiLineProblemPattern: IJSONSchema;
405
+ const NamedMultiLineProblemPattern: IJSONSchema;
406
+ const WatchingPattern: IJSONSchema;
407
+ const PatternType: IJSONSchema;
408
+ const ProblemMatcher: IJSONSchema;
409
+ const LegacyProblemMatcher: IJSONSchema;
410
+ const NamedProblemMatcher: IJSONSchema;
411
+ }
412
+ export interface IProblemPatternRegistry {
413
+ onReady(): Promise<void>;
414
+ get(key: string): IProblemPattern | MultiLineProblemPattern;
415
+ }
416
+ export declare const ProblemPatternRegistry: IProblemPatternRegistry;
417
+ export declare class ProblemMatcherParser extends Parser {
418
+ constructor(logger: IProblemReporter);
419
+ parse(json: Config.ProblemMatcher): ProblemMatcher | undefined;
420
+ private checkProblemMatcherValid;
421
+ private createProblemMatcher;
422
+ private createProblemPattern;
423
+ private addWatchingMatcher;
424
+ private createWatchingPattern;
425
+ private createRegularExpression;
426
+ }
427
+ export interface IProblemMatcherRegistry {
428
+ onReady(): Promise<void>;
429
+ get(name: string): INamedProblemMatcher;
430
+ keys(): string[];
431
+ readonly onMatcherChanged: Event<void>;
432
+ }
433
+ export declare const ProblemMatcherRegistry: IProblemMatcherRegistry;