@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,514 @@
1
+ import { IStringDictionary } from "@codingame/monaco-vscode-api/vscode/vs/base/common/collections";
2
+ import { Platform } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
3
+ import * as Types from "@codingame/monaco-vscode-api/vscode/vs/base/common/types";
4
+ import { ValidationStatus, IProblemReporter as IProblemReporterBase } from "../../../../base/common/parsers.js";
5
+ import { INamedProblemMatcher, Config as ProblemMatcherConfig, ProblemMatcher } from "./problemMatcher.js";
6
+ import { IWorkspaceFolder, IWorkspace } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace";
7
+ import * as Tasks from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/tasks";
8
+ import { ITaskDefinitionRegistry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/taskDefinitionRegistry";
9
+ import { ConfiguredInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolver";
10
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
11
+ export declare enum ShellQuoting {
12
+ /**
13
+ * Default is character escaping.
14
+ */
15
+ escape = 1,
16
+ /**
17
+ * Default is strong quoting
18
+ */
19
+ strong = 2,
20
+ /**
21
+ * Default is weak quoting.
22
+ */
23
+ weak = 3
24
+ }
25
+ export interface IShellQuotingOptions {
26
+ /**
27
+ * The character used to do character escaping.
28
+ */
29
+ escape?: string | {
30
+ escapeChar: string;
31
+ charsToEscape: string;
32
+ };
33
+ /**
34
+ * The character used for string quoting.
35
+ */
36
+ strong?: string;
37
+ /**
38
+ * The character used for weak quoting.
39
+ */
40
+ weak?: string;
41
+ }
42
+ export interface IShellConfiguration {
43
+ executable?: string;
44
+ args?: string[];
45
+ quoting?: IShellQuotingOptions;
46
+ }
47
+ export interface ICommandOptionsConfig {
48
+ /**
49
+ * The current working directory of the executed program or shell.
50
+ * If omitted VSCode's current workspace root is used.
51
+ */
52
+ cwd?: string;
53
+ /**
54
+ * The additional environment of the executed program or shell. If omitted
55
+ * the parent process' environment is used.
56
+ */
57
+ env?: IStringDictionary<string>;
58
+ /**
59
+ * The shell configuration;
60
+ */
61
+ shell?: IShellConfiguration;
62
+ }
63
+ export interface IPresentationOptionsConfig {
64
+ /**
65
+ * Controls whether the terminal executing a task is brought to front or not.
66
+ * Defaults to `RevealKind.Always`.
67
+ */
68
+ reveal?: string;
69
+ /**
70
+ * Controls whether the problems panel is revealed when running this task or not.
71
+ * Defaults to `RevealKind.Never`.
72
+ */
73
+ revealProblems?: string;
74
+ /**
75
+ * Controls whether the executed command is printed to the output window or terminal as well.
76
+ */
77
+ echo?: boolean;
78
+ /**
79
+ * Controls whether the terminal is focus when this task is executed
80
+ */
81
+ focus?: boolean;
82
+ /**
83
+ * Controls whether the task runs in a new terminal
84
+ */
85
+ panel?: string;
86
+ /**
87
+ * Controls whether to show the "Terminal will be reused by tasks, press any key to close it" message.
88
+ */
89
+ showReuseMessage?: boolean;
90
+ /**
91
+ * Controls whether the terminal should be cleared before running the task.
92
+ */
93
+ clear?: boolean;
94
+ /**
95
+ * Controls whether the task is executed in a specific terminal group using split panes.
96
+ */
97
+ group?: string;
98
+ /**
99
+ * Controls whether the terminal that the task runs in is closed when the task completes.
100
+ * Note that if the terminal process exits with a non-zero exit code, it will not close.
101
+ */
102
+ close?: boolean;
103
+ /**
104
+ * Controls whether to preserve the task name in the terminal after task completion.
105
+ */
106
+ preserveTerminalName?: boolean;
107
+ }
108
+ export interface IRunOptionsConfig {
109
+ reevaluateOnRerun?: boolean;
110
+ runOn?: string;
111
+ instanceLimit?: number;
112
+ instancePolicy?: Tasks.InstancePolicy;
113
+ }
114
+ export interface ITaskIdentifier {
115
+ type?: string;
116
+ [name: string]: unknown;
117
+ }
118
+ export declare namespace ITaskIdentifier {
119
+ function is(value: unknown): value is ITaskIdentifier;
120
+ }
121
+ export interface ILegacyTaskProperties {
122
+ /**
123
+ * @deprecated Use `isBackground` instead.
124
+ * Whether the executed command is kept alive and is watching the file system.
125
+ */
126
+ isWatching?: boolean;
127
+ /**
128
+ * @deprecated Use `group` instead.
129
+ * Whether this task maps to the default build command.
130
+ */
131
+ isBuildCommand?: boolean;
132
+ /**
133
+ * @deprecated Use `group` instead.
134
+ * Whether this task maps to the default test command.
135
+ */
136
+ isTestCommand?: boolean;
137
+ }
138
+ export interface ILegacyCommandProperties {
139
+ /**
140
+ * Whether this is a shell or process
141
+ */
142
+ type?: string;
143
+ /**
144
+ * @deprecated Use presentation options
145
+ * Controls whether the output view of the running tasks is brought to front or not.
146
+ * See BaseTaskRunnerConfiguration#showOutput for details.
147
+ */
148
+ showOutput?: string;
149
+ /**
150
+ * @deprecated Use presentation options
151
+ * Controls whether the executed command is printed to the output windows as well.
152
+ */
153
+ echoCommand?: boolean;
154
+ /**
155
+ * @deprecated Use presentation instead
156
+ */
157
+ terminal?: IPresentationOptionsConfig;
158
+ /**
159
+ * @deprecated Use inline commands.
160
+ * See BaseTaskRunnerConfiguration#suppressTaskName for details.
161
+ */
162
+ suppressTaskName?: boolean;
163
+ /**
164
+ * Some commands require that the task argument is highlighted with a special
165
+ * prefix (e.g. /t: for msbuild). This property can be used to control such
166
+ * a prefix.
167
+ */
168
+ taskSelector?: string;
169
+ /**
170
+ * @deprecated use the task type instead.
171
+ * Specifies whether the command is a shell command and therefore must
172
+ * be executed in a shell interpreter (e.g. cmd.exe, bash, ...).
173
+ *
174
+ * Defaults to false if omitted.
175
+ */
176
+ isShellCommand?: boolean | IShellConfiguration;
177
+ }
178
+ export type CommandString = Types.SingleOrMany<string> | {
179
+ value: Types.SingleOrMany<string>;
180
+ quoting: "escape" | "strong" | "weak";
181
+ };
182
+ export declare namespace CommandString {
183
+ function value(value: CommandString): string;
184
+ }
185
+ export interface IBaseCommandProperties {
186
+ /**
187
+ * The command to be executed. Can be an external program or a shell
188
+ * command.
189
+ */
190
+ command?: CommandString;
191
+ /**
192
+ * The command options used when the command is executed. Can be omitted.
193
+ */
194
+ options?: ICommandOptionsConfig;
195
+ /**
196
+ * The arguments passed to the command or additional arguments passed to the
197
+ * command when using a global command.
198
+ */
199
+ args?: CommandString[];
200
+ }
201
+ export interface ICommandProperties extends IBaseCommandProperties {
202
+ /**
203
+ * Windows specific command properties
204
+ */
205
+ windows?: IBaseCommandProperties;
206
+ /**
207
+ * OSX specific command properties
208
+ */
209
+ osx?: IBaseCommandProperties;
210
+ /**
211
+ * linux specific command properties
212
+ */
213
+ linux?: IBaseCommandProperties;
214
+ }
215
+ export interface IGroupKind {
216
+ kind?: string;
217
+ isDefault?: boolean | string;
218
+ }
219
+ export interface IConfigurationProperties {
220
+ /**
221
+ * The task's name
222
+ */
223
+ taskName?: string;
224
+ /**
225
+ * The UI label used for the task.
226
+ */
227
+ label?: string;
228
+ /**
229
+ * An optional identifier which can be used to reference a task
230
+ * in a dependsOn or other attributes.
231
+ */
232
+ identifier?: string;
233
+ /**
234
+ * Whether the executed command is kept alive and runs in the background.
235
+ */
236
+ isBackground?: boolean;
237
+ /**
238
+ * Whether the task should prompt on close for confirmation if running.
239
+ */
240
+ promptOnClose?: boolean;
241
+ /**
242
+ * Defines the group the task belongs too.
243
+ */
244
+ group?: string | IGroupKind;
245
+ /**
246
+ * A description of the task.
247
+ */
248
+ detail?: string;
249
+ /**
250
+ * The other tasks the task depend on
251
+ */
252
+ dependsOn?: string | ITaskIdentifier | Array<string | ITaskIdentifier>;
253
+ /**
254
+ * The order the dependsOn tasks should be executed in.
255
+ */
256
+ dependsOrder?: string;
257
+ /**
258
+ * Controls the behavior of the used terminal
259
+ */
260
+ presentation?: IPresentationOptionsConfig;
261
+ /**
262
+ * Controls shell options.
263
+ */
264
+ options?: ICommandOptionsConfig;
265
+ /**
266
+ * The problem matcher(s) to use to capture problems in the tasks
267
+ * output.
268
+ */
269
+ problemMatcher?: ProblemMatcherConfig.ProblemMatcherType;
270
+ /**
271
+ * Task run options. Control run related properties.
272
+ */
273
+ runOptions?: IRunOptionsConfig;
274
+ /**
275
+ * The icon for this task in the terminal tabs list
276
+ */
277
+ icon?: {
278
+ id: string;
279
+ color?: string;
280
+ };
281
+ /**
282
+ * The icon's color in the terminal tabs list
283
+ */
284
+ color?: string;
285
+ /**
286
+ * Do not show this task in the run task quickpick
287
+ */
288
+ hide?: boolean;
289
+ /**
290
+ * Show this task in the Agent Sessions run action dropdown
291
+ */
292
+ inSessions?: boolean;
293
+ }
294
+ export interface ICustomTask extends ICommandProperties, IConfigurationProperties {
295
+ /**
296
+ * Custom tasks have the type CUSTOMIZED_TASK_TYPE
297
+ */
298
+ type?: string;
299
+ }
300
+ export interface IConfiguringTask extends IConfigurationProperties {
301
+ /**
302
+ * The contributed type of the task
303
+ */
304
+ type?: string;
305
+ }
306
+ /**
307
+ * The base task runner configuration
308
+ */
309
+ export interface IBaseTaskRunnerConfiguration {
310
+ /**
311
+ * The command to be executed. Can be an external program or a shell
312
+ * command.
313
+ */
314
+ command?: CommandString;
315
+ /**
316
+ * @deprecated Use type instead
317
+ *
318
+ * Specifies whether the command is a shell command and therefore must
319
+ * be executed in a shell interpreter (e.g. cmd.exe, bash, ...).
320
+ *
321
+ * Defaults to false if omitted.
322
+ */
323
+ isShellCommand?: boolean;
324
+ /**
325
+ * The task type
326
+ */
327
+ type?: string;
328
+ /**
329
+ * The command options used when the command is executed. Can be omitted.
330
+ */
331
+ options?: ICommandOptionsConfig;
332
+ /**
333
+ * The arguments passed to the command. Can be omitted.
334
+ */
335
+ args?: CommandString[];
336
+ /**
337
+ * Controls whether the output view of the running tasks is brought to front or not.
338
+ * Valid values are:
339
+ * "always": bring the output window always to front when a task is executed.
340
+ * "silent": only bring it to front if no problem matcher is defined for the task executed.
341
+ * "never": never bring the output window to front.
342
+ *
343
+ * If omitted "always" is used.
344
+ */
345
+ showOutput?: string;
346
+ /**
347
+ * Controls whether the executed command is printed to the output windows as well.
348
+ */
349
+ echoCommand?: boolean;
350
+ /**
351
+ * The group
352
+ */
353
+ group?: string | IGroupKind;
354
+ /**
355
+ * Controls the behavior of the used terminal
356
+ */
357
+ presentation?: IPresentationOptionsConfig;
358
+ /**
359
+ * If set to false the task name is added as an additional argument to the
360
+ * command when executed. If set to true the task name is suppressed. If
361
+ * omitted false is used.
362
+ */
363
+ suppressTaskName?: boolean;
364
+ /**
365
+ * Some commands require that the task argument is highlighted with a special
366
+ * prefix (e.g. /t: for msbuild). This property can be used to control such
367
+ * a prefix.
368
+ */
369
+ taskSelector?: string;
370
+ /**
371
+ * The problem matcher(s) to used if a global command is executed (e.g. no tasks
372
+ * are defined). A tasks.json file can either contain a global problemMatcher
373
+ * property or a tasks property but not both.
374
+ */
375
+ problemMatcher?: ProblemMatcherConfig.ProblemMatcherType;
376
+ /**
377
+ * @deprecated Use `isBackground` instead.
378
+ *
379
+ * Specifies whether a global command is a watching the filesystem. A task.json
380
+ * file can either contain a global isWatching property or a tasks property
381
+ * but not both.
382
+ */
383
+ isWatching?: boolean;
384
+ /**
385
+ * Specifies whether a global command is a background task.
386
+ */
387
+ isBackground?: boolean;
388
+ /**
389
+ * Whether the task should prompt on close for confirmation if running.
390
+ */
391
+ promptOnClose?: boolean;
392
+ /**
393
+ * The configuration of the available tasks. A tasks.json file can either
394
+ * contain a global problemMatcher property or a tasks property but not both.
395
+ */
396
+ tasks?: Array<ICustomTask | IConfiguringTask>;
397
+ /**
398
+ * Problem matcher declarations.
399
+ */
400
+ declares?: ProblemMatcherConfig.INamedProblemMatcher[];
401
+ /**
402
+ * Optional user input variables.
403
+ */
404
+ inputs?: ConfiguredInput[];
405
+ }
406
+ /**
407
+ * A configuration of an external build system. BuildConfiguration.buildSystem
408
+ * must be set to 'program'
409
+ */
410
+ export interface IExternalTaskRunnerConfiguration extends IBaseTaskRunnerConfiguration {
411
+ _runner?: string;
412
+ /**
413
+ * Determines the runner to use
414
+ */
415
+ runner?: string;
416
+ /**
417
+ * The config's version number
418
+ */
419
+ version: string;
420
+ /**
421
+ * Windows specific task configuration
422
+ */
423
+ windows?: IBaseTaskRunnerConfiguration;
424
+ /**
425
+ * Mac specific task configuration
426
+ */
427
+ osx?: IBaseTaskRunnerConfiguration;
428
+ /**
429
+ * Linux specific task configuration
430
+ */
431
+ linux?: IBaseTaskRunnerConfiguration;
432
+ }
433
+ type TaskConfigurationValueWithErrors<T> = {
434
+ value?: T;
435
+ errors?: string[];
436
+ };
437
+ export declare namespace RunOnOptions {
438
+ function fromString(value: string | undefined): Tasks.RunOnOptions;
439
+ }
440
+ export declare namespace RunOptions {
441
+ function fromConfiguration(value: IRunOptionsConfig | undefined): Tasks.IRunOptions;
442
+ function assignProperties(target: Tasks.IRunOptions, source: Tasks.IRunOptions | undefined): Tasks.IRunOptions;
443
+ function fillProperties(target: Tasks.IRunOptions, source: Tasks.IRunOptions | undefined): Tasks.IRunOptions;
444
+ }
445
+ export declare namespace InstancePolicy {
446
+ function fromString(value: string | undefined): Tasks.InstancePolicy;
447
+ }
448
+ export interface IParseContext {
449
+ workspaceFolder: IWorkspaceFolder;
450
+ workspace: IWorkspace | undefined;
451
+ problemReporter: IProblemReporter;
452
+ namedProblemMatchers: IStringDictionary<INamedProblemMatcher>;
453
+ uuidMap: UUIDMap;
454
+ engine: Tasks.ExecutionEngine;
455
+ schemaVersion: Tasks.JsonSchemaVersion;
456
+ platform: Platform;
457
+ taskLoadIssues: string[];
458
+ contextKeyService: IContextKeyService;
459
+ }
460
+ export declare namespace ProblemMatcherConverter {
461
+ function namedFrom(this: void, declares: ProblemMatcherConfig.INamedProblemMatcher[] | undefined, context: IParseContext): IStringDictionary<INamedProblemMatcher>;
462
+ function fromWithOsConfig(this: void, external: IConfigurationProperties & {
463
+ [key: string]: unknown;
464
+ }, context: IParseContext): TaskConfigurationValueWithErrors<ProblemMatcher[]>;
465
+ function from(this: void, config: ProblemMatcherConfig.ProblemMatcherType | undefined, context: IParseContext): TaskConfigurationValueWithErrors<ProblemMatcher[]>;
466
+ }
467
+ export declare namespace GroupKind {
468
+ function from(this: void, external: string | IGroupKind | undefined): Tasks.TaskGroup | undefined;
469
+ function to(group: Tasks.TaskGroup | string): IGroupKind | string;
470
+ }
471
+ export interface ITaskParseResult {
472
+ custom: Tasks.CustomTask[];
473
+ configured: Tasks.ConfiguringTask[];
474
+ }
475
+ export declare namespace TaskParser {
476
+ function from(this: void, externals: Array<ICustomTask | IConfiguringTask> | undefined, globals: IGlobals, context: IParseContext, source: TaskConfigSource, registry?: Partial<ITaskDefinitionRegistry>): ITaskParseResult;
477
+ function assignTasks(target: Tasks.CustomTask[], source: Tasks.CustomTask[]): Tasks.CustomTask[];
478
+ }
479
+ export interface IGlobals {
480
+ command?: Tasks.ICommandConfiguration;
481
+ problemMatcher?: ProblemMatcher[];
482
+ promptOnClose?: boolean;
483
+ suppressTaskName?: boolean;
484
+ }
485
+ export declare namespace ExecutionEngine {
486
+ function from(config: IExternalTaskRunnerConfiguration): Tasks.ExecutionEngine;
487
+ }
488
+ export declare namespace JsonSchemaVersion {
489
+ function from(config: IExternalTaskRunnerConfiguration): Tasks.JsonSchemaVersion;
490
+ }
491
+ export interface IParseResult {
492
+ validationStatus: ValidationStatus;
493
+ custom: Tasks.CustomTask[];
494
+ configured: Tasks.ConfiguringTask[];
495
+ engine: Tasks.ExecutionEngine;
496
+ }
497
+ export interface IProblemReporter extends IProblemReporterBase {
498
+ }
499
+ export declare class UUIDMap {
500
+ private last;
501
+ private current;
502
+ constructor(other?: UUIDMap);
503
+ start(): void;
504
+ getUUID(identifier: string): string;
505
+ finish(): void;
506
+ }
507
+ export declare enum TaskConfigSource {
508
+ TasksJson = 0,
509
+ WorkspaceFile = 1,
510
+ User = 2
511
+ }
512
+ export declare function parse(workspaceFolder: IWorkspaceFolder, workspace: IWorkspace | undefined, platform: Platform, configuration: IExternalTaskRunnerConfiguration, logger: IProblemReporter, source: TaskConfigSource, contextKeyService: IContextKeyService, isRecents?: boolean): IParseResult;
513
+ export declare function createCustomTask(contributedTask: Tasks.ContributedTask, configuredProps: Tasks.ConfiguringTask | Tasks.CustomTask): Tasks.CustomTask;
514
+ export {};