@codingame/monaco-vscode-task-service-override 20.1.0 → 20.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-task-service-override",
3
- "version": "20.1.0",
3
+ "version": "20.2.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - task service-override",
6
6
  "keywords": [],
@@ -15,16 +15,16 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "20.1.0",
19
- "@codingame/monaco-vscode-262ed59d-4f76-57cd-9e9f-1877f26ae049-common": "20.1.0",
20
- "@codingame/monaco-vscode-6883db80-c313-54eb-8fbc-5872c56b0326-common": "20.1.0",
21
- "@codingame/monaco-vscode-a17e9d37-b6c1-5556-8402-5db73960fae3-common": "20.1.0",
22
- "@codingame/monaco-vscode-ab07af84-42e8-5a0f-8aef-b83fb90ede21-common": "20.1.0",
23
- "@codingame/monaco-vscode-api": "20.1.0",
24
- "@codingame/monaco-vscode-bf94ddb5-e436-506a-9763-5ab86b642508-common": "20.1.0",
25
- "@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common": "20.1.0",
26
- "@codingame/monaco-vscode-ce7c734f-7712-563c-9335-d7acb43306af-common": "20.1.0",
27
- "@codingame/monaco-vscode-ec8fe440-1fd1-523d-ad0f-c0f5a80cf451-common": "20.1.0"
18
+ "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "20.2.0",
19
+ "@codingame/monaco-vscode-262ed59d-4f76-57cd-9e9f-1877f26ae049-common": "20.2.0",
20
+ "@codingame/monaco-vscode-6883db80-c313-54eb-8fbc-5872c56b0326-common": "20.2.0",
21
+ "@codingame/monaco-vscode-a17e9d37-b6c1-5556-8402-5db73960fae3-common": "20.2.0",
22
+ "@codingame/monaco-vscode-ab07af84-42e8-5a0f-8aef-b83fb90ede21-common": "20.2.0",
23
+ "@codingame/monaco-vscode-api": "20.2.0",
24
+ "@codingame/monaco-vscode-bf94ddb5-e436-506a-9763-5ab86b642508-common": "20.2.0",
25
+ "@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common": "20.2.0",
26
+ "@codingame/monaco-vscode-ce7c734f-7712-563c-9335-d7acb43306af-common": "20.2.0",
27
+ "@codingame/monaco-vscode-ec8fe440-1fd1-523d-ad0f-c0f5a80cf451-common": "20.2.0"
28
28
  },
29
29
  "main": "index.js",
30
30
  "module": "index.js",
@@ -169,6 +169,9 @@ export declare abstract class AbstractTaskService extends Disposable implements
169
169
  registerTaskSystem(key: string, info: ITaskSystemInfo): void;
170
170
  private _getTaskSystemInfo;
171
171
  extensionCallbackTaskComplete(task: Task, result: number): Promise<void>;
172
+ /**
173
+ * Get a subset of workspace tasks that match a certain predicate.
174
+ */
172
175
  private _findWorkspaceTasks;
173
176
  private _findWorkspaceTasksInGroup;
174
177
  getTask(folder: IWorkspace | IWorkspaceFolder | string, identifier: string | ITaskIdentifier, compareId?: boolean, type?: string | undefined): Promise<Task | undefined>;
@@ -272,6 +275,12 @@ export declare abstract class AbstractTaskService extends Disposable implements
272
275
  private _doRunTaskCommand;
273
276
  rerun(terminalInstanceId: number): void;
274
277
  private _reRunTaskCommand;
278
+ /**
279
+ *
280
+ * @param tasks - The tasks which need to be filtered
281
+ * @param tasksInList - This tells splitPerGroupType to filter out globbed tasks (into defaults)
282
+ * @returns
283
+ */
275
284
  private _getDefaultTasks;
276
285
  private _runTaskGroupCommand;
277
286
  private _getGlobTasks;
@@ -98,33 +98,106 @@ export interface ILineMatcher {
98
98
  export declare function createLineMatcher(matcher: ProblemMatcher, fileService?: IFileService): ILineMatcher;
99
99
  export declare namespace Config {
100
100
  interface IProblemPattern {
101
+ /**
102
+ * The regular expression to find a problem in the console output of an
103
+ * executed task.
104
+ */
101
105
  regexp?: string;
106
+ /**
107
+ * Whether the pattern matches a whole file, or a location (file/line)
108
+ *
109
+ * The default is to match for a location. Only valid on the
110
+ * first problem pattern in a multi line problem matcher.
111
+ */
102
112
  kind?: string;
113
+ /**
114
+ * The match group index of the filename.
115
+ * If omitted 1 is used.
116
+ */
103
117
  file?: number;
118
+ /**
119
+ * The match group index of the problem's location. Valid location
120
+ * patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn).
121
+ * If omitted the line and column properties are used.
122
+ */
104
123
  location?: number;
124
+ /**
125
+ * The match group index of the problem's line in the source file.
126
+ *
127
+ * Defaults to 2.
128
+ */
105
129
  line?: number;
130
+ /**
131
+ * The match group index of the problem's column in the source file.
132
+ *
133
+ * Defaults to 3.
134
+ */
106
135
  column?: number;
136
+ /**
137
+ * The match group index of the problem's end line in the source file.
138
+ *
139
+ * Defaults to undefined. No end line is captured.
140
+ */
107
141
  endLine?: number;
142
+ /**
143
+ * The match group index of the problem's end column in the source file.
144
+ *
145
+ * Defaults to undefined. No end column is captured.
146
+ */
108
147
  endColumn?: number;
148
+ /**
149
+ * The match group index of the problem's severity.
150
+ *
151
+ * Defaults to undefined. In this case the problem matcher's severity
152
+ * is used.
153
+ */
109
154
  severity?: number;
155
+ /**
156
+ * The match group index of the problem's code.
157
+ *
158
+ * Defaults to undefined. No code is captured.
159
+ */
110
160
  code?: number;
161
+ /**
162
+ * The match group index of the message. If omitted it defaults
163
+ * to 4 if location is specified. Otherwise it defaults to 5.
164
+ */
111
165
  message?: number;
166
+ /**
167
+ * Specifies if the last pattern in a multi line problem matcher should
168
+ * loop as long as it does match a line consequently. Only valid on the
169
+ * last problem pattern in a multi line problem matcher.
170
+ */
112
171
  loop?: boolean;
113
172
  }
114
173
  interface ICheckedProblemPattern extends IProblemPattern {
174
+ /**
175
+ * The regular expression to find a problem in the console output of an
176
+ * executed task.
177
+ */
115
178
  regexp: string;
116
179
  }
117
180
  namespace CheckedProblemPattern {
118
181
  function is(value: any): value is ICheckedProblemPattern;
119
182
  }
120
183
  interface INamedProblemPattern extends IProblemPattern {
184
+ /**
185
+ * The name of the problem pattern.
186
+ */
121
187
  name: string;
188
+ /**
189
+ * A human readable label
190
+ */
122
191
  label?: string;
123
192
  }
124
193
  namespace NamedProblemPattern {
125
194
  function is(value: any): value is INamedProblemPattern;
126
195
  }
127
196
  interface INamedCheckedProblemPattern extends INamedProblemPattern {
197
+ /**
198
+ * The regular expression to find a problem in the console output of an
199
+ * executed task.
200
+ */
128
201
  regexp: string;
129
202
  }
130
203
  namespace NamedCheckedProblemPattern {
@@ -139,36 +212,146 @@ export declare namespace Config {
139
212
  function is(value: any): value is MultiLineCheckedProblemPattern;
140
213
  }
141
214
  interface INamedMultiLineCheckedProblemPattern {
215
+ /**
216
+ * The name of the problem pattern.
217
+ */
142
218
  name: string;
219
+ /**
220
+ * A human readable label
221
+ */
143
222
  label?: string;
223
+ /**
224
+ * The actual patterns
225
+ */
144
226
  patterns: MultiLineCheckedProblemPattern;
145
227
  }
146
228
  namespace NamedMultiLineCheckedProblemPattern {
147
229
  function is(value: any): value is INamedMultiLineCheckedProblemPattern;
148
230
  }
149
231
  type NamedProblemPatterns = (Config.INamedProblemPattern | Config.INamedMultiLineCheckedProblemPattern)[];
232
+ /**
233
+ * A watching pattern
234
+ */
150
235
  interface IWatchingPattern {
236
+ /**
237
+ * The actual regular expression
238
+ */
151
239
  regexp?: string;
240
+ /**
241
+ * The match group index of the filename. If provided the expression
242
+ * is matched for that file only.
243
+ */
152
244
  file?: number;
153
245
  }
246
+ /**
247
+ * A description to track the start and end of a watching task.
248
+ */
154
249
  interface IBackgroundMonitor {
250
+ /**
251
+ * If set to true the watcher starts in active mode. This is the
252
+ * same as outputting a line that matches beginsPattern when the
253
+ * task starts.
254
+ */
155
255
  activeOnStart?: boolean;
256
+ /**
257
+ * If matched in the output the start of a watching task is signaled.
258
+ */
156
259
  beginsPattern?: string | IWatchingPattern;
260
+ /**
261
+ * If matched in the output the end of a watching task is signaled.
262
+ */
157
263
  endsPattern?: string | IWatchingPattern;
158
264
  }
265
+ /**
266
+ * A description of a problem matcher that detects problems
267
+ * in build output.
268
+ */
159
269
  interface ProblemMatcher {
270
+ /**
271
+ * The name of a base problem matcher to use. If specified the
272
+ * base problem matcher will be used as a template and properties
273
+ * specified here will replace properties of the base problem
274
+ * matcher
275
+ */
160
276
  base?: string;
277
+ /**
278
+ * The owner of the produced VSCode problem. This is typically
279
+ * the identifier of a VSCode language service if the problems are
280
+ * to be merged with the one produced by the language service
281
+ * or a generated internal id. Defaults to the generated internal id.
282
+ */
161
283
  owner?: string;
284
+ /**
285
+ * A human-readable string describing the source of this problem.
286
+ * E.g. 'typescript' or 'super lint'.
287
+ */
162
288
  source?: string;
289
+ /**
290
+ * Specifies to which kind of documents the problems found by this
291
+ * matcher are applied. Valid values are:
292
+ *
293
+ * "allDocuments": problems found in all documents are applied.
294
+ * "openDocuments": problems found in documents that are open
295
+ * are applied.
296
+ * "closedDocuments": problems found in closed documents are
297
+ * applied.
298
+ */
163
299
  applyTo?: string;
300
+ /**
301
+ * The severity of the VSCode problem produced by this problem matcher.
302
+ *
303
+ * Valid values are:
304
+ * "error": to produce errors.
305
+ * "warning": to produce warnings.
306
+ * "info": to produce infos.
307
+ *
308
+ * The value is used if a pattern doesn't specify a severity match group.
309
+ * Defaults to "error" if omitted.
310
+ */
164
311
  severity?: string;
312
+ /**
313
+ * Defines how filename reported in a problem pattern
314
+ * should be read. Valid values are:
315
+ * - "absolute": the filename is always treated absolute.
316
+ * - "relative": the filename is always treated relative to
317
+ * the current working directory. This is the default.
318
+ * - ["relative", "path value"]: the filename is always
319
+ * treated relative to the given path value.
320
+ * - "autodetect": the filename is treated relative to
321
+ * the current workspace directory, and if the file
322
+ * does not exist, it is treated as absolute.
323
+ * - ["autodetect", "path value"]: the filename is treated
324
+ * relative to the given path value, and if it does not
325
+ * exist, it is treated as absolute.
326
+ * - ["search", { include?: "" | []; exclude?: "" | [] }]: The filename
327
+ * needs to be searched under the directories named by the "include"
328
+ * property and their nested subdirectories. With "exclude" property
329
+ * present, the directories should be removed from the search. When
330
+ * `include` is not unprovided, the current workspace directory should
331
+ * be used as the default.
332
+ */
165
333
  fileLocation?: string | string[] | [
166
334
  "search",
167
335
  SearchFileLocationArgs
168
336
  ];
337
+ /**
338
+ * The name of a predefined problem pattern, the inline definition
339
+ * of a problem pattern or an array of problem patterns to match
340
+ * problems spread over multiple lines.
341
+ */
169
342
  pattern?: string | IProblemPattern | IProblemPattern[];
343
+ /**
344
+ * A regular expression signaling that a watched tasks begins executing
345
+ * triggered through file watching.
346
+ */
170
347
  watchedTaskBeginsRegExp?: string;
348
+ /**
349
+ * A regular expression signaling that a watched tasks ends executing.
350
+ */
171
351
  watchedTaskEndsRegExp?: string;
352
+ /**
353
+ * @deprecated Use background instead.
354
+ */
172
355
  watching?: IBackgroundMonitor;
173
356
  background?: IBackgroundMonitor;
174
357
  }
@@ -178,7 +361,14 @@ export declare namespace Config {
178
361
  };
179
362
  type ProblemMatcherType = string | ProblemMatcher | Array<string | ProblemMatcher>;
180
363
  interface INamedProblemMatcher extends ProblemMatcher {
364
+ /**
365
+ * This name can be used to refer to the
366
+ * problem matcher from within a task.
367
+ */
181
368
  name: string;
369
+ /**
370
+ * A human readable label.
371
+ */
182
372
  label?: string;
183
373
  }
184
374
  function isNamedProblemMatcher(value: ProblemMatcher): value is INamedProblemMatcher;
@@ -8,16 +8,34 @@ import { ITaskDefinitionRegistry } from "@codingame/monaco-vscode-api/vscode/vs/
8
8
  import { ConfiguredInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolver";
9
9
  import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
10
10
  export declare enum ShellQuoting {
11
+ /**
12
+ * Default is character escaping.
13
+ */
11
14
  escape = 1,
15
+ /**
16
+ * Default is strong quoting
17
+ */
12
18
  strong = 2,
19
+ /**
20
+ * Default is weak quoting.
21
+ */
13
22
  weak = 3
14
23
  }
15
24
  export interface IShellQuotingOptions {
25
+ /**
26
+ * The character used to do character escaping.
27
+ */
16
28
  escape?: string | {
17
29
  escapeChar: string;
18
30
  charsToEscape: string;
19
31
  };
32
+ /**
33
+ * The character used for string quoting.
34
+ */
20
35
  strong?: string;
36
+ /**
37
+ * The character used for weak quoting.
38
+ */
21
39
  weak?: string;
22
40
  }
23
41
  export interface IShellConfiguration {
@@ -26,19 +44,60 @@ export interface IShellConfiguration {
26
44
  quoting?: IShellQuotingOptions;
27
45
  }
28
46
  export interface ICommandOptionsConfig {
47
+ /**
48
+ * The current working directory of the executed program or shell.
49
+ * If omitted VSCode's current workspace root is used.
50
+ */
29
51
  cwd?: string;
52
+ /**
53
+ * The additional environment of the executed program or shell. If omitted
54
+ * the parent process' environment is used.
55
+ */
30
56
  env?: IStringDictionary<string>;
57
+ /**
58
+ * The shell configuration;
59
+ */
31
60
  shell?: IShellConfiguration;
32
61
  }
33
62
  export interface IPresentationOptionsConfig {
63
+ /**
64
+ * Controls whether the terminal executing a task is brought to front or not.
65
+ * Defaults to `RevealKind.Always`.
66
+ */
34
67
  reveal?: string;
68
+ /**
69
+ * Controls whether the problems panel is revealed when running this task or not.
70
+ * Defaults to `RevealKind.Never`.
71
+ */
35
72
  revealProblems?: string;
73
+ /**
74
+ * Controls whether the executed command is printed to the output window or terminal as well.
75
+ */
36
76
  echo?: boolean;
77
+ /**
78
+ * Controls whether the terminal is focus when this task is executed
79
+ */
37
80
  focus?: boolean;
81
+ /**
82
+ * Controls whether the task runs in a new terminal
83
+ */
38
84
  panel?: string;
85
+ /**
86
+ * Controls whether to show the "Terminal will be reused by tasks, press any key to close it" message.
87
+ */
39
88
  showReuseMessage?: boolean;
89
+ /**
90
+ * Controls whether the terminal should be cleared before running the task.
91
+ */
40
92
  clear?: boolean;
93
+ /**
94
+ * Controls whether the task is executed in a specific terminal group using split panes.
95
+ */
41
96
  group?: string;
97
+ /**
98
+ * Controls whether the terminal that the task runs in is closed when the task completes.
99
+ * Note that if the terminal process exits with a non-zero exit code, it will not close.
100
+ */
42
101
  close?: boolean;
43
102
  }
44
103
  export interface IRunOptionsConfig {
@@ -55,17 +114,60 @@ export declare namespace ITaskIdentifier {
55
114
  function is(value: any): value is ITaskIdentifier;
56
115
  }
57
116
  export interface ILegacyTaskProperties {
117
+ /**
118
+ * @deprecated Use `isBackground` instead.
119
+ * Whether the executed command is kept alive and is watching the file system.
120
+ */
58
121
  isWatching?: boolean;
122
+ /**
123
+ * @deprecated Use `group` instead.
124
+ * Whether this task maps to the default build command.
125
+ */
59
126
  isBuildCommand?: boolean;
127
+ /**
128
+ * @deprecated Use `group` instead.
129
+ * Whether this task maps to the default test command.
130
+ */
60
131
  isTestCommand?: boolean;
61
132
  }
62
133
  export interface ILegacyCommandProperties {
134
+ /**
135
+ * Whether this is a shell or process
136
+ */
63
137
  type?: string;
138
+ /**
139
+ * @deprecated Use presentation options
140
+ * Controls whether the output view of the running tasks is brought to front or not.
141
+ * See BaseTaskRunnerConfiguration#showOutput for details.
142
+ */
64
143
  showOutput?: string;
144
+ /**
145
+ * @deprecated Use presentation options
146
+ * Controls whether the executed command is printed to the output windows as well.
147
+ */
65
148
  echoCommand?: boolean;
149
+ /**
150
+ * @deprecated Use presentation instead
151
+ */
66
152
  terminal?: IPresentationOptionsConfig;
153
+ /**
154
+ * @deprecated Use inline commands.
155
+ * See BaseTaskRunnerConfiguration#suppressTaskName for details.
156
+ */
67
157
  suppressTaskName?: boolean;
158
+ /**
159
+ * Some commands require that the task argument is highlighted with a special
160
+ * prefix (e.g. /t: for msbuild). This property can be used to control such
161
+ * a prefix.
162
+ */
68
163
  taskSelector?: string;
164
+ /**
165
+ * @deprecated use the task type instead.
166
+ * Specifies whether the command is a shell command and therefore must
167
+ * be executed in a shell interpreter (e.g. cmd.exe, bash, ...).
168
+ *
169
+ * Defaults to false if omitted.
170
+ */
69
171
  isShellCommand?: boolean | IShellConfiguration;
70
172
  }
71
173
  export type CommandString = string | string[] | {
@@ -76,13 +178,33 @@ export declare namespace CommandString {
76
178
  function value(value: CommandString): string;
77
179
  }
78
180
  export interface IBaseCommandProperties {
181
+ /**
182
+ * The command to be executed. Can be an external program or a shell
183
+ * command.
184
+ */
79
185
  command?: CommandString;
186
+ /**
187
+ * The command options used when the command is executed. Can be omitted.
188
+ */
80
189
  options?: ICommandOptionsConfig;
190
+ /**
191
+ * The arguments passed to the command or additional arguments passed to the
192
+ * command when using a global command.
193
+ */
81
194
  args?: CommandString[];
82
195
  }
83
196
  export interface ICommandProperties extends IBaseCommandProperties {
197
+ /**
198
+ * Windows specific command properties
199
+ */
84
200
  windows?: IBaseCommandProperties;
201
+ /**
202
+ * OSX specific command properties
203
+ */
85
204
  osx?: IBaseCommandProperties;
205
+ /**
206
+ * linux specific command properties
207
+ */
86
208
  linux?: IBaseCommandProperties;
87
209
  }
88
210
  export interface IGroupKind {
@@ -90,58 +212,213 @@ export interface IGroupKind {
90
212
  isDefault?: boolean | string;
91
213
  }
92
214
  export interface IConfigurationProperties {
215
+ /**
216
+ * The task's name
217
+ */
93
218
  taskName?: string;
219
+ /**
220
+ * The UI label used for the task.
221
+ */
94
222
  label?: string;
223
+ /**
224
+ * An optional identifier which can be used to reference a task
225
+ * in a dependsOn or other attributes.
226
+ */
95
227
  identifier?: string;
228
+ /**
229
+ * Whether the executed command is kept alive and runs in the background.
230
+ */
96
231
  isBackground?: boolean;
232
+ /**
233
+ * Whether the task should prompt on close for confirmation if running.
234
+ */
97
235
  promptOnClose?: boolean;
236
+ /**
237
+ * Defines the group the task belongs too.
238
+ */
98
239
  group?: string | IGroupKind;
240
+ /**
241
+ * A description of the task.
242
+ */
99
243
  detail?: string;
244
+ /**
245
+ * The other tasks the task depend on
246
+ */
100
247
  dependsOn?: string | ITaskIdentifier | Array<string | ITaskIdentifier>;
248
+ /**
249
+ * The order the dependsOn tasks should be executed in.
250
+ */
101
251
  dependsOrder?: string;
252
+ /**
253
+ * Controls the behavior of the used terminal
254
+ */
102
255
  presentation?: IPresentationOptionsConfig;
256
+ /**
257
+ * Controls shell options.
258
+ */
103
259
  options?: ICommandOptionsConfig;
260
+ /**
261
+ * The problem matcher(s) to use to capture problems in the tasks
262
+ * output.
263
+ */
104
264
  problemMatcher?: ProblemMatcherConfig.ProblemMatcherType;
265
+ /**
266
+ * Task run options. Control run related properties.
267
+ */
105
268
  runOptions?: IRunOptionsConfig;
269
+ /**
270
+ * The icon for this task in the terminal tabs list
271
+ */
106
272
  icon?: {
107
273
  id: string;
108
274
  color?: string;
109
275
  };
276
+ /**
277
+ * The icon's color in the terminal tabs list
278
+ */
110
279
  color?: string;
280
+ /**
281
+ * Do not show this task in the run task quickpick
282
+ */
111
283
  hide?: boolean;
112
284
  }
113
285
  export interface ICustomTask extends ICommandProperties, IConfigurationProperties {
286
+ /**
287
+ * Custom tasks have the type CUSTOMIZED_TASK_TYPE
288
+ */
114
289
  type?: string;
115
290
  }
116
291
  export interface IConfiguringTask extends IConfigurationProperties {
292
+ /**
293
+ * The contributed type of the task
294
+ */
117
295
  type?: string;
118
296
  }
297
+ /**
298
+ * The base task runner configuration
299
+ */
119
300
  export interface IBaseTaskRunnerConfiguration {
301
+ /**
302
+ * The command to be executed. Can be an external program or a shell
303
+ * command.
304
+ */
120
305
  command?: CommandString;
306
+ /**
307
+ * @deprecated Use type instead
308
+ *
309
+ * Specifies whether the command is a shell command and therefore must
310
+ * be executed in a shell interpreter (e.g. cmd.exe, bash, ...).
311
+ *
312
+ * Defaults to false if omitted.
313
+ */
121
314
  isShellCommand?: boolean;
315
+ /**
316
+ * The task type
317
+ */
122
318
  type?: string;
319
+ /**
320
+ * The command options used when the command is executed. Can be omitted.
321
+ */
123
322
  options?: ICommandOptionsConfig;
323
+ /**
324
+ * The arguments passed to the command. Can be omitted.
325
+ */
124
326
  args?: CommandString[];
327
+ /**
328
+ * Controls whether the output view of the running tasks is brought to front or not.
329
+ * Valid values are:
330
+ * "always": bring the output window always to front when a task is executed.
331
+ * "silent": only bring it to front if no problem matcher is defined for the task executed.
332
+ * "never": never bring the output window to front.
333
+ *
334
+ * If omitted "always" is used.
335
+ */
125
336
  showOutput?: string;
337
+ /**
338
+ * Controls whether the executed command is printed to the output windows as well.
339
+ */
126
340
  echoCommand?: boolean;
341
+ /**
342
+ * The group
343
+ */
127
344
  group?: string | IGroupKind;
345
+ /**
346
+ * Controls the behavior of the used terminal
347
+ */
128
348
  presentation?: IPresentationOptionsConfig;
349
+ /**
350
+ * If set to false the task name is added as an additional argument to the
351
+ * command when executed. If set to true the task name is suppressed. If
352
+ * omitted false is used.
353
+ */
129
354
  suppressTaskName?: boolean;
355
+ /**
356
+ * Some commands require that the task argument is highlighted with a special
357
+ * prefix (e.g. /t: for msbuild). This property can be used to control such
358
+ * a prefix.
359
+ */
130
360
  taskSelector?: string;
361
+ /**
362
+ * The problem matcher(s) to used if a global command is executed (e.g. no tasks
363
+ * are defined). A tasks.json file can either contain a global problemMatcher
364
+ * property or a tasks property but not both.
365
+ */
131
366
  problemMatcher?: ProblemMatcherConfig.ProblemMatcherType;
367
+ /**
368
+ * @deprecated Use `isBackground` instead.
369
+ *
370
+ * Specifies whether a global command is a watching the filesystem. A task.json
371
+ * file can either contain a global isWatching property or a tasks property
372
+ * but not both.
373
+ */
132
374
  isWatching?: boolean;
375
+ /**
376
+ * Specifies whether a global command is a background task.
377
+ */
133
378
  isBackground?: boolean;
379
+ /**
380
+ * Whether the task should prompt on close for confirmation if running.
381
+ */
134
382
  promptOnClose?: boolean;
383
+ /**
384
+ * The configuration of the available tasks. A tasks.json file can either
385
+ * contain a global problemMatcher property or a tasks property but not both.
386
+ */
135
387
  tasks?: Array<ICustomTask | IConfiguringTask>;
388
+ /**
389
+ * Problem matcher declarations.
390
+ */
136
391
  declares?: ProblemMatcherConfig.INamedProblemMatcher[];
392
+ /**
393
+ * Optional user input variables.
394
+ */
137
395
  inputs?: ConfiguredInput[];
138
396
  }
397
+ /**
398
+ * A configuration of an external build system. BuildConfiguration.buildSystem
399
+ * must be set to 'program'
400
+ */
139
401
  export interface IExternalTaskRunnerConfiguration extends IBaseTaskRunnerConfiguration {
140
402
  _runner?: string;
403
+ /**
404
+ * Determines the runner to use
405
+ */
141
406
  runner?: string;
407
+ /**
408
+ * The config's version number
409
+ */
142
410
  version: string;
411
+ /**
412
+ * Windows specific task configuration
413
+ */
143
414
  windows?: IBaseTaskRunnerConfiguration;
415
+ /**
416
+ * Mac specific task configuration
417
+ */
144
418
  osx?: IBaseTaskRunnerConfiguration;
419
+ /**
420
+ * Linux specific task configuration
421
+ */
145
422
  linux?: IBaseTaskRunnerConfiguration;
146
423
  }
147
424
  type TaskConfigurationValueWithErrors<T> = {
@@ -49,6 +49,9 @@ export declare namespace Triggers {
49
49
  const reconnect: string;
50
50
  }
51
51
  export interface ITaskSummary {
52
+ /**
53
+ * Exit code of the process.
54
+ */
52
55
  exitCode?: number;
53
56
  }
54
57
  export declare enum TaskExecuteKind {
@@ -5,3 +5,221 @@ export interface ITaskEntry extends IQuickPickItem {
5
5
  content: string;
6
6
  }
7
7
  export declare function getTemplates(): ITaskEntry[];
8
+ /** Version 1.0 templates
9
+ *
10
+ const gulp: TaskEntry = {
11
+ id: 'gulp',
12
+ label: 'Gulp',
13
+ autoDetect: true,
14
+ content: [
15
+ '{',
16
+ '\t// See https://go.microsoft.com/fwlink/?LinkId=733558',
17
+ '\t// for the documentation about the tasks.json format',
18
+ '\t"version": "0.1.0",',
19
+ '\t"command": "gulp",',
20
+ '\t"isShellCommand": true,',
21
+ '\t"args": ["--no-color"],',
22
+ '\t"showOutput": "always"',
23
+ '}'
24
+ ].join('\n')
25
+ };
26
+
27
+ const grunt: TaskEntry = {
28
+ id: 'grunt',
29
+ label: 'Grunt',
30
+ autoDetect: true,
31
+ content: [
32
+ '{',
33
+ '\t// See https://go.microsoft.com/fwlink/?LinkId=733558',
34
+ '\t// for the documentation about the tasks.json format',
35
+ '\t"version": "0.1.0",',
36
+ '\t"command": "grunt",',
37
+ '\t"isShellCommand": true,',
38
+ '\t"args": ["--no-color"],',
39
+ '\t"showOutput": "always"',
40
+ '}'
41
+ ].join('\n')
42
+ };
43
+
44
+ const npm: TaskEntry = {
45
+ id: 'npm',
46
+ label: 'npm',
47
+ sort: 'NPM',
48
+ autoDetect: false,
49
+ content: [
50
+ '{',
51
+ '\t// See https://go.microsoft.com/fwlink/?LinkId=733558',
52
+ '\t// for the documentation about the tasks.json format',
53
+ '\t"version": "0.1.0",',
54
+ '\t"command": "npm",',
55
+ '\t"isShellCommand": true,',
56
+ '\t"showOutput": "always",',
57
+ '\t"suppressTaskName": true,',
58
+ '\t"tasks": [',
59
+ '\t\t{',
60
+ '\t\t\t"taskName": "install",',
61
+ '\t\t\t"args": ["install"]',
62
+ '\t\t},',
63
+ '\t\t{',
64
+ '\t\t\t"taskName": "update",',
65
+ '\t\t\t"args": ["update"]',
66
+ '\t\t},',
67
+ '\t\t{',
68
+ '\t\t\t"taskName": "test",',
69
+ '\t\t\t"args": ["run", "test"]',
70
+ '\t\t}',
71
+ '\t]',
72
+ '}'
73
+ ].join('\n')
74
+ };
75
+
76
+ const tscConfig: TaskEntry = {
77
+ id: 'tsc.config',
78
+ label: 'TypeScript - tsconfig.json',
79
+ autoDetect: false,
80
+ description: nls.localize('tsc.config', 'Compiles a TypeScript project'),
81
+ content: [
82
+ '{',
83
+ '\t// See https://go.microsoft.com/fwlink/?LinkId=733558',
84
+ '\t// for the documentation about the tasks.json format',
85
+ '\t"version": "0.1.0",',
86
+ '\t"command": "tsc",',
87
+ '\t"isShellCommand": true,',
88
+ '\t"args": ["-p", "."],',
89
+ '\t"showOutput": "silent",',
90
+ '\t"problemMatcher": "$tsc"',
91
+ '}'
92
+ ].join('\n')
93
+ };
94
+
95
+ const tscWatch: TaskEntry = {
96
+ id: 'tsc.watch',
97
+ label: 'TypeScript - Watch Mode',
98
+ autoDetect: false,
99
+ description: nls.localize('tsc.watch', 'Compiles a TypeScript project in watch mode'),
100
+ content: [
101
+ '{',
102
+ '\t// See https://go.microsoft.com/fwlink/?LinkId=733558',
103
+ '\t// for the documentation about the tasks.json format',
104
+ '\t"version": "0.1.0",',
105
+ '\t"command": "tsc",',
106
+ '\t"isShellCommand": true,',
107
+ '\t"args": ["-w", "-p", "."],',
108
+ '\t"showOutput": "silent",',
109
+ '\t"isBackground": true,',
110
+ '\t"problemMatcher": "$tsc-watch"',
111
+ '}'
112
+ ].join('\n')
113
+ };
114
+
115
+ const dotnetBuild: TaskEntry = {
116
+ id: 'dotnetCore',
117
+ label: '.NET Core',
118
+ sort: 'NET Core',
119
+ autoDetect: false,
120
+ description: nls.localize('dotnetCore', 'Executes .NET Core build command'),
121
+ content: [
122
+ '{',
123
+ '\t// See https://go.microsoft.com/fwlink/?LinkId=733558',
124
+ '\t// for the documentation about the tasks.json format',
125
+ '\t"version": "0.1.0",',
126
+ '\t"command": "dotnet",',
127
+ '\t"isShellCommand": true,',
128
+ '\t"args": [],',
129
+ '\t"tasks": [',
130
+ '\t\t{',
131
+ '\t\t\t"taskName": "build",',
132
+ '\t\t\t"args": [ ],',
133
+ '\t\t\t"isBuildCommand": true,',
134
+ '\t\t\t"showOutput": "silent",',
135
+ '\t\t\t"problemMatcher": "$msCompile"',
136
+ '\t\t}',
137
+ '\t]',
138
+ '}'
139
+ ].join('\n')
140
+ };
141
+
142
+ const msbuild: TaskEntry = {
143
+ id: 'msbuild',
144
+ label: 'MSBuild',
145
+ autoDetect: false,
146
+ description: nls.localize('msbuild', 'Executes the build target'),
147
+ content: [
148
+ '{',
149
+ '\t// See https://go.microsoft.com/fwlink/?LinkId=733558',
150
+ '\t// for the documentation about the tasks.json format',
151
+ '\t"version": "0.1.0",',
152
+ '\t"command": "msbuild",',
153
+ '\t"args": [',
154
+ '\t\t// Ask msbuild to generate full paths for file names.',
155
+ '\t\t"/property:GenerateFullPaths=true"',
156
+ '\t],',
157
+ '\t"taskSelector": "/t:",',
158
+ '\t"showOutput": "silent",',
159
+ '\t"tasks": [',
160
+ '\t\t{',
161
+ '\t\t\t"taskName": "build",',
162
+ '\t\t\t// Show the output window only if unrecognized errors occur.',
163
+ '\t\t\t"showOutput": "silent",',
164
+ '\t\t\t// Use the standard MS compiler pattern to detect errors, warnings and infos',
165
+ '\t\t\t"problemMatcher": "$msCompile"',
166
+ '\t\t}',
167
+ '\t]',
168
+ '}'
169
+ ].join('\n')
170
+ };
171
+
172
+ const command: TaskEntry = {
173
+ id: 'externalCommand',
174
+ label: 'Others',
175
+ autoDetect: false,
176
+ description: nls.localize('externalCommand', 'Example to run an arbitrary external command'),
177
+ content: [
178
+ '{',
179
+ '\t// See https://go.microsoft.com/fwlink/?LinkId=733558',
180
+ '\t// for the documentation about the tasks.json format',
181
+ '\t"version": "0.1.0",',
182
+ '\t"command": "echo",',
183
+ '\t"isShellCommand": true,',
184
+ '\t"args": ["Hello World"],',
185
+ '\t"showOutput": "always"',
186
+ '}'
187
+ ].join('\n')
188
+ };
189
+
190
+ const maven: TaskEntry = {
191
+ id: 'maven',
192
+ label: 'maven',
193
+ sort: 'MVN',
194
+ autoDetect: false,
195
+ description: nls.localize('Maven', 'Executes common maven commands'),
196
+ content: [
197
+ '{',
198
+ '\t// See https://go.microsoft.com/fwlink/?LinkId=733558',
199
+ '\t// for the documentation about the tasks.json format',
200
+ '\t"version": "0.1.0",',
201
+ '\t"command": "mvn",',
202
+ '\t"isShellCommand": true,',
203
+ '\t"showOutput": "always",',
204
+ '\t"suppressTaskName": true,',
205
+ '\t"tasks": [',
206
+ '\t\t{',
207
+ '\t\t\t"taskName": "verify",',
208
+ '\t\t\t"args": ["-B", "verify"],',
209
+ '\t\t\t"isBuildCommand": true',
210
+ '\t\t},',
211
+ '\t\t{',
212
+ '\t\t\t"taskName": "test",',
213
+ '\t\t\t"args": ["-B", "test"],',
214
+ '\t\t\t"isTestCommand": true',
215
+ '\t\t}',
216
+ '\t]',
217
+ '}'
218
+ ].join('\n')
219
+ };
220
+
221
+ export let templates: TaskEntry[] = [gulp, grunt, tscConfig, tscWatch, dotnetBuild, msbuild, npm, maven].sort((a, b) => {
222
+ return (a.sort || a.label).localeCompare(b.sort || b.label);
223
+ });
224
+ templates.push(command);
225
+ */
@@ -1,20 +1,70 @@
1
+ /**
2
+ * VS Code-specific shell integration sequences. Some of these are based on common alternatives like
3
+ * those pioneered in FinalTerm. The decision to move to entirely custom sequences was to try to
4
+ * improve reliability and prevent the possibility of applications confusing the terminal.
5
+ */
1
6
  export declare enum VSCodeOscPt {
7
+ /**
8
+ * The start of the prompt, this is expected to always appear at the start of a line.
9
+ * Based on FinalTerm's `OSC 133 ; A ST`.
10
+ */
2
11
  PromptStart = "A",
12
+ /**
13
+ * The start of a command, ie. where the user inputs their command.
14
+ * Based on FinalTerm's `OSC 133 ; B ST`.
15
+ */
3
16
  CommandStart = "B",
17
+ /**
18
+ * Sent just before the command output begins.
19
+ * Based on FinalTerm's `OSC 133 ; C ST`.
20
+ */
4
21
  CommandExecuted = "C",
22
+ /**
23
+ * Sent just after a command has finished. The exit code is optional, when not specified it
24
+ * means no command was run (ie. enter on empty prompt or ctrl+c).
25
+ * Based on FinalTerm's `OSC 133 ; D [; <ExitCode>] ST`.
26
+ */
5
27
  CommandFinished = "D",
28
+ /**
29
+ * Explicitly set the command line. This helps workaround problems with conpty not having a
30
+ * passthrough mode by providing an option on Windows to send the command that was run. With
31
+ * this sequence there's no need for the guessing based on the unreliable cursor positions that
32
+ * would otherwise be required.
33
+ */
6
34
  CommandLine = "E",
35
+ /**
36
+ * Similar to prompt start but for line continuations.
37
+ */
7
38
  ContinuationStart = "F",
39
+ /**
40
+ * Similar to command start but for line continuations.
41
+ */
8
42
  ContinuationEnd = "G",
43
+ /**
44
+ * The start of the right prompt.
45
+ */
9
46
  RightPromptStart = "H",
47
+ /**
48
+ * The end of the right prompt.
49
+ */
10
50
  RightPromptEnd = "I",
51
+ /**
52
+ * Set an arbitrary property: `OSC 633 ; P ; <Property>=<Value> ST`, only known properties will
53
+ * be handled.
54
+ */
11
55
  Property = "P"
12
56
  }
13
57
  export declare enum VSCodeOscProperty {
14
58
  Task = "Task",
15
59
  Cwd = "Cwd"
16
60
  }
61
+ /**
62
+ * ITerm sequences
63
+ */
17
64
  export declare enum ITermOscPt {
65
+ /**
66
+ * Based on ITerm's `OSC 1337 ; SetMark` sets a mark on the scrollbar
67
+ */
18
68
  SetMark = "SetMark"
19
69
  }
20
70
  export declare function VSCodeSequence(osc: VSCodeOscPt, data?: string | VSCodeOscProperty): string;