@codingame/monaco-vscode-task-service-override 1.85.2

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 (25) hide show
  1. package/external/tslib/tslib.es6.js +11 -0
  2. package/index.d.ts +1 -0
  3. package/index.js +1 -0
  4. package/override/vs/platform/dialogs/common/dialogs.js +8 -0
  5. package/package.json +24 -0
  6. package/task.d.ts +5 -0
  7. package/task.js +12 -0
  8. package/vscode/src/vs/base/common/parsers.js +44 -0
  9. package/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.js +3851 -0
  10. package/vscode/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.js +167 -0
  11. package/vscode/src/vs/workbench/contrib/tasks/browser/task.contribution.js +694 -0
  12. package/vscode/src/vs/workbench/contrib/tasks/browser/taskQuickPick.js +452 -0
  13. package/vscode/src/vs/workbench/contrib/tasks/browser/taskService.js +36 -0
  14. package/vscode/src/vs/workbench/contrib/tasks/browser/taskTerminalStatus.js +191 -0
  15. package/vscode/src/vs/workbench/contrib/tasks/browser/tasksQuickAccess.js +121 -0
  16. package/vscode/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.js +1713 -0
  17. package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchemaCommon.js +440 -0
  18. package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v1.js +125 -0
  19. package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v2.js +901 -0
  20. package/vscode/src/vs/workbench/contrib/tasks/common/problemCollectors.js +464 -0
  21. package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.js +1796 -0
  22. package/vscode/src/vs/workbench/contrib/tasks/common/taskConfiguration.js +1581 -0
  23. package/vscode/src/vs/workbench/contrib/tasks/common/taskSystem.js +15 -0
  24. package/vscode/src/vs/workbench/contrib/tasks/common/taskTemplates.js +145 -0
  25. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEscapeSequences.js +13 -0
@@ -0,0 +1,440 @@
1
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
2
+ import { Schemas } from './problemMatcher.js';
3
+
4
+ const schema = {
5
+ definitions: {
6
+ showOutputType: {
7
+ type: 'string',
8
+ enum: ['always', 'silent', 'never']
9
+ },
10
+ options: {
11
+ type: 'object',
12
+ description: ( nls.localizeWithPath(
13
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
14
+ 'JsonSchema.options',
15
+ 'Additional command options'
16
+ )),
17
+ properties: {
18
+ cwd: {
19
+ type: 'string',
20
+ description: ( nls.localizeWithPath(
21
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
22
+ 'JsonSchema.options.cwd',
23
+ 'The current working directory of the executed program or script. If omitted Code\'s current workspace root is used.'
24
+ ))
25
+ },
26
+ env: {
27
+ type: 'object',
28
+ additionalProperties: {
29
+ type: 'string'
30
+ },
31
+ description: ( nls.localizeWithPath(
32
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
33
+ 'JsonSchema.options.env',
34
+ 'The environment of the executed program or shell. If omitted the parent process\' environment is used.'
35
+ ))
36
+ }
37
+ },
38
+ additionalProperties: {
39
+ type: ['string', 'array', 'object']
40
+ }
41
+ },
42
+ problemMatcherType: {
43
+ oneOf: [
44
+ {
45
+ type: 'string',
46
+ errorMessage: ( nls.localizeWithPath(
47
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
48
+ 'JsonSchema.tasks.matcherError',
49
+ 'Unrecognized problem matcher. Is the extension that contributes this problem matcher installed?'
50
+ ))
51
+ },
52
+ Schemas.LegacyProblemMatcher,
53
+ {
54
+ type: 'array',
55
+ items: {
56
+ anyOf: [
57
+ {
58
+ type: 'string',
59
+ errorMessage: ( nls.localizeWithPath(
60
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
61
+ 'JsonSchema.tasks.matcherError',
62
+ 'Unrecognized problem matcher. Is the extension that contributes this problem matcher installed?'
63
+ ))
64
+ },
65
+ Schemas.LegacyProblemMatcher
66
+ ]
67
+ }
68
+ }
69
+ ]
70
+ },
71
+ shellConfiguration: {
72
+ type: 'object',
73
+ additionalProperties: false,
74
+ description: ( nls.localizeWithPath(
75
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
76
+ 'JsonSchema.shellConfiguration',
77
+ 'Configures the shell to be used.'
78
+ )),
79
+ properties: {
80
+ executable: {
81
+ type: 'string',
82
+ description: ( nls.localizeWithPath(
83
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
84
+ 'JsonSchema.shell.executable',
85
+ 'The shell to be used.'
86
+ ))
87
+ },
88
+ args: {
89
+ type: 'array',
90
+ description: ( nls.localizeWithPath(
91
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
92
+ 'JsonSchema.shell.args',
93
+ 'The shell arguments.'
94
+ )),
95
+ items: {
96
+ type: 'string'
97
+ }
98
+ }
99
+ }
100
+ },
101
+ commandConfiguration: {
102
+ type: 'object',
103
+ additionalProperties: false,
104
+ properties: {
105
+ command: {
106
+ type: 'string',
107
+ description: ( nls.localizeWithPath(
108
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
109
+ 'JsonSchema.command',
110
+ 'The command to be executed. Can be an external program or a shell command.'
111
+ ))
112
+ },
113
+ args: {
114
+ type: 'array',
115
+ description: ( nls.localizeWithPath(
116
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
117
+ 'JsonSchema.tasks.args',
118
+ 'Arguments passed to the command when this task is invoked.'
119
+ )),
120
+ items: {
121
+ type: 'string'
122
+ }
123
+ },
124
+ options: {
125
+ $ref: '#/definitions/options'
126
+ }
127
+ }
128
+ },
129
+ taskDescription: {
130
+ type: 'object',
131
+ required: ['taskName'],
132
+ additionalProperties: false,
133
+ properties: {
134
+ taskName: {
135
+ type: 'string',
136
+ description: ( nls.localizeWithPath(
137
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
138
+ 'JsonSchema.tasks.taskName',
139
+ "The task's name"
140
+ ))
141
+ },
142
+ command: {
143
+ type: 'string',
144
+ description: ( nls.localizeWithPath(
145
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
146
+ 'JsonSchema.command',
147
+ 'The command to be executed. Can be an external program or a shell command.'
148
+ ))
149
+ },
150
+ args: {
151
+ type: 'array',
152
+ description: ( nls.localizeWithPath(
153
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
154
+ 'JsonSchema.tasks.args',
155
+ 'Arguments passed to the command when this task is invoked.'
156
+ )),
157
+ items: {
158
+ type: 'string'
159
+ }
160
+ },
161
+ options: {
162
+ $ref: '#/definitions/options'
163
+ },
164
+ windows: {
165
+ anyOf: [
166
+ {
167
+ $ref: '#/definitions/commandConfiguration',
168
+ description: ( nls.localizeWithPath(
169
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
170
+ 'JsonSchema.tasks.windows',
171
+ 'Windows specific command configuration'
172
+ )),
173
+ },
174
+ {
175
+ properties: {
176
+ problemMatcher: {
177
+ $ref: '#/definitions/problemMatcherType',
178
+ description: ( nls.localizeWithPath(
179
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
180
+ 'JsonSchema.tasks.matchers',
181
+ 'The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers.'
182
+ ))
183
+ }
184
+ }
185
+ }
186
+ ]
187
+ },
188
+ osx: {
189
+ anyOf: [
190
+ {
191
+ $ref: '#/definitions/commandConfiguration',
192
+ description: ( nls.localizeWithPath(
193
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
194
+ 'JsonSchema.tasks.mac',
195
+ 'Mac specific command configuration'
196
+ ))
197
+ },
198
+ {
199
+ properties: {
200
+ problemMatcher: {
201
+ $ref: '#/definitions/problemMatcherType',
202
+ description: ( nls.localizeWithPath(
203
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
204
+ 'JsonSchema.tasks.matchers',
205
+ 'The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers.'
206
+ ))
207
+ }
208
+ }
209
+ }
210
+ ]
211
+ },
212
+ linux: {
213
+ anyOf: [
214
+ {
215
+ $ref: '#/definitions/commandConfiguration',
216
+ description: ( nls.localizeWithPath(
217
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
218
+ 'JsonSchema.tasks.linux',
219
+ 'Linux specific command configuration'
220
+ ))
221
+ },
222
+ {
223
+ properties: {
224
+ problemMatcher: {
225
+ $ref: '#/definitions/problemMatcherType',
226
+ description: ( nls.localizeWithPath(
227
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
228
+ 'JsonSchema.tasks.matchers',
229
+ 'The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers.'
230
+ ))
231
+ }
232
+ }
233
+ }
234
+ ]
235
+ },
236
+ suppressTaskName: {
237
+ type: 'boolean',
238
+ description: ( nls.localizeWithPath(
239
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
240
+ 'JsonSchema.tasks.suppressTaskName',
241
+ 'Controls whether the task name is added as an argument to the command. If omitted the globally defined value is used.'
242
+ )),
243
+ default: true
244
+ },
245
+ showOutput: {
246
+ $ref: '#/definitions/showOutputType',
247
+ description: ( nls.localizeWithPath(
248
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
249
+ 'JsonSchema.tasks.showOutput',
250
+ 'Controls whether the output of the running task is shown or not. If omitted the globally defined value is used.'
251
+ ))
252
+ },
253
+ echoCommand: {
254
+ type: 'boolean',
255
+ description: ( nls.localizeWithPath(
256
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
257
+ 'JsonSchema.echoCommand',
258
+ 'Controls whether the executed command is echoed to the output. Default is false.'
259
+ )),
260
+ default: true
261
+ },
262
+ isWatching: {
263
+ type: 'boolean',
264
+ deprecationMessage: ( nls.localizeWithPath(
265
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
266
+ 'JsonSchema.tasks.watching.deprecation',
267
+ 'Deprecated. Use isBackground instead.'
268
+ )),
269
+ description: ( nls.localizeWithPath(
270
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
271
+ 'JsonSchema.tasks.watching',
272
+ 'Whether the executed task is kept alive and is watching the file system.'
273
+ )),
274
+ default: true
275
+ },
276
+ isBackground: {
277
+ type: 'boolean',
278
+ description: ( nls.localizeWithPath(
279
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
280
+ 'JsonSchema.tasks.background',
281
+ 'Whether the executed task is kept alive and is running in the background.'
282
+ )),
283
+ default: true
284
+ },
285
+ promptOnClose: {
286
+ type: 'boolean',
287
+ description: ( nls.localizeWithPath(
288
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
289
+ 'JsonSchema.tasks.promptOnClose',
290
+ 'Whether the user is prompted when VS Code closes with a running task.'
291
+ )),
292
+ default: false
293
+ },
294
+ isBuildCommand: {
295
+ type: 'boolean',
296
+ description: ( nls.localizeWithPath(
297
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
298
+ 'JsonSchema.tasks.build',
299
+ 'Maps this task to Code\'s default build command.'
300
+ )),
301
+ default: true
302
+ },
303
+ isTestCommand: {
304
+ type: 'boolean',
305
+ description: ( nls.localizeWithPath(
306
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
307
+ 'JsonSchema.tasks.test',
308
+ 'Maps this task to Code\'s default test command.'
309
+ )),
310
+ default: true
311
+ },
312
+ problemMatcher: {
313
+ $ref: '#/definitions/problemMatcherType',
314
+ description: ( nls.localizeWithPath(
315
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
316
+ 'JsonSchema.tasks.matchers',
317
+ 'The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers.'
318
+ ))
319
+ }
320
+ }
321
+ },
322
+ taskRunnerConfiguration: {
323
+ type: 'object',
324
+ required: [],
325
+ properties: {
326
+ command: {
327
+ type: 'string',
328
+ description: ( nls.localizeWithPath(
329
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
330
+ 'JsonSchema.command',
331
+ 'The command to be executed. Can be an external program or a shell command.'
332
+ ))
333
+ },
334
+ args: {
335
+ type: 'array',
336
+ description: ( nls.localizeWithPath(
337
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
338
+ 'JsonSchema.args',
339
+ 'Additional arguments passed to the command.'
340
+ )),
341
+ items: {
342
+ type: 'string'
343
+ }
344
+ },
345
+ options: {
346
+ $ref: '#/definitions/options'
347
+ },
348
+ showOutput: {
349
+ $ref: '#/definitions/showOutputType',
350
+ description: ( nls.localizeWithPath(
351
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
352
+ 'JsonSchema.showOutput',
353
+ 'Controls whether the output of the running task is shown or not. If omitted \'always\' is used.'
354
+ ))
355
+ },
356
+ isWatching: {
357
+ type: 'boolean',
358
+ deprecationMessage: ( nls.localizeWithPath(
359
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
360
+ 'JsonSchema.watching.deprecation',
361
+ 'Deprecated. Use isBackground instead.'
362
+ )),
363
+ description: ( nls.localizeWithPath(
364
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
365
+ 'JsonSchema.watching',
366
+ 'Whether the executed task is kept alive and is watching the file system.'
367
+ )),
368
+ default: true
369
+ },
370
+ isBackground: {
371
+ type: 'boolean',
372
+ description: ( nls.localizeWithPath(
373
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
374
+ 'JsonSchema.background',
375
+ 'Whether the executed task is kept alive and is running in the background.'
376
+ )),
377
+ default: true
378
+ },
379
+ promptOnClose: {
380
+ type: 'boolean',
381
+ description: ( nls.localizeWithPath(
382
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
383
+ 'JsonSchema.promptOnClose',
384
+ 'Whether the user is prompted when VS Code closes with a running background task.'
385
+ )),
386
+ default: false
387
+ },
388
+ echoCommand: {
389
+ type: 'boolean',
390
+ description: ( nls.localizeWithPath(
391
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
392
+ 'JsonSchema.echoCommand',
393
+ 'Controls whether the executed command is echoed to the output. Default is false.'
394
+ )),
395
+ default: true
396
+ },
397
+ suppressTaskName: {
398
+ type: 'boolean',
399
+ description: ( nls.localizeWithPath(
400
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
401
+ 'JsonSchema.suppressTaskName',
402
+ 'Controls whether the task name is added as an argument to the command. Default is false.'
403
+ )),
404
+ default: true
405
+ },
406
+ taskSelector: {
407
+ type: 'string',
408
+ description: ( nls.localizeWithPath(
409
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
410
+ 'JsonSchema.taskSelector',
411
+ 'Prefix to indicate that an argument is task.'
412
+ ))
413
+ },
414
+ problemMatcher: {
415
+ $ref: '#/definitions/problemMatcherType',
416
+ description: ( nls.localizeWithPath(
417
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
418
+ 'JsonSchema.matchers',
419
+ 'The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers.'
420
+ ))
421
+ },
422
+ tasks: {
423
+ type: 'array',
424
+ description: ( nls.localizeWithPath(
425
+ 'vs/workbench/contrib/tasks/common/jsonSchemaCommon',
426
+ 'JsonSchema.tasks',
427
+ 'The task configurations. Usually these are enrichments of task already defined in the external task runner.'
428
+ )),
429
+ items: {
430
+ type: 'object',
431
+ $ref: '#/definitions/taskDescription'
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
437
+ };
438
+ var commonSchema = schema;
439
+
440
+ export { commonSchema as default };
@@ -0,0 +1,125 @@
1
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
2
+ import * as Objects from 'monaco-editor/esm/vs/base/common/objects.js';
3
+ import { ProblemMatcherRegistry } from './problemMatcher.js';
4
+ import commonSchema from './jsonSchemaCommon.js';
5
+
6
+ const schema = {
7
+ oneOf: [
8
+ {
9
+ allOf: [
10
+ {
11
+ type: 'object',
12
+ required: ['version'],
13
+ properties: {
14
+ version: {
15
+ type: 'string',
16
+ enum: ['0.1.0'],
17
+ deprecationMessage: ( nls.localizeWithPath(
18
+ 'vs/workbench/contrib/tasks/common/jsonSchema_v1',
19
+ 'JsonSchema.version.deprecated',
20
+ 'Task version 0.1.0 is deprecated. Please use 2.0.0'
21
+ )),
22
+ description: ( nls.localizeWithPath(
23
+ 'vs/workbench/contrib/tasks/common/jsonSchema_v1',
24
+ 'JsonSchema.version',
25
+ 'The config\'s version number'
26
+ ))
27
+ },
28
+ _runner: {
29
+ deprecationMessage: ( nls.localizeWithPath(
30
+ 'vs/workbench/contrib/tasks/common/jsonSchema_v1',
31
+ 'JsonSchema._runner',
32
+ 'The runner has graduated. Use the official runner property'
33
+ ))
34
+ },
35
+ runner: {
36
+ type: 'string',
37
+ enum: ['process', 'terminal'],
38
+ default: 'process',
39
+ description: ( nls.localizeWithPath(
40
+ 'vs/workbench/contrib/tasks/common/jsonSchema_v1',
41
+ 'JsonSchema.runner',
42
+ 'Defines whether the task is executed as a process and the output is shown in the output window or inside the terminal.'
43
+ ))
44
+ },
45
+ windows: {
46
+ $ref: '#/definitions/taskRunnerConfiguration',
47
+ description: ( nls.localizeWithPath(
48
+ 'vs/workbench/contrib/tasks/common/jsonSchema_v1',
49
+ 'JsonSchema.windows',
50
+ 'Windows specific command configuration'
51
+ ))
52
+ },
53
+ osx: {
54
+ $ref: '#/definitions/taskRunnerConfiguration',
55
+ description: ( nls.localizeWithPath(
56
+ 'vs/workbench/contrib/tasks/common/jsonSchema_v1',
57
+ 'JsonSchema.mac',
58
+ 'Mac specific command configuration'
59
+ ))
60
+ },
61
+ linux: {
62
+ $ref: '#/definitions/taskRunnerConfiguration',
63
+ description: ( nls.localizeWithPath(
64
+ 'vs/workbench/contrib/tasks/common/jsonSchema_v1',
65
+ 'JsonSchema.linux',
66
+ 'Linux specific command configuration'
67
+ ))
68
+ }
69
+ }
70
+ },
71
+ {
72
+ $ref: '#/definitions/taskRunnerConfiguration'
73
+ }
74
+ ]
75
+ }
76
+ ]
77
+ };
78
+ const shellCommand = {
79
+ type: 'boolean',
80
+ default: true,
81
+ description: ( nls.localizeWithPath(
82
+ 'vs/workbench/contrib/tasks/common/jsonSchema_v1',
83
+ 'JsonSchema.shell',
84
+ 'Specifies whether the command is a shell command or an external program. Defaults to false if omitted.'
85
+ ))
86
+ };
87
+ schema.definitions = Objects.deepClone(commonSchema.definitions);
88
+ const definitions = schema.definitions;
89
+ definitions['commandConfiguration']['properties']['isShellCommand'] = Objects.deepClone(shellCommand);
90
+ definitions['taskDescription']['properties']['isShellCommand'] = Objects.deepClone(shellCommand);
91
+ definitions['taskRunnerConfiguration']['properties']['isShellCommand'] = Objects.deepClone(shellCommand);
92
+ Object.getOwnPropertyNames(definitions).forEach(key => {
93
+ const newKey = key + '1';
94
+ definitions[newKey] = definitions[key];
95
+ delete definitions[key];
96
+ });
97
+ function fixReferences(literal) {
98
+ if (Array.isArray(literal)) {
99
+ literal.forEach(fixReferences);
100
+ }
101
+ else if (typeof literal === 'object') {
102
+ if (literal['$ref']) {
103
+ literal['$ref'] = literal['$ref'] + '1';
104
+ }
105
+ Object.getOwnPropertyNames(literal).forEach(property => {
106
+ const value = literal[property];
107
+ if (Array.isArray(value) || typeof value === 'object') {
108
+ fixReferences(value);
109
+ }
110
+ });
111
+ }
112
+ }
113
+ fixReferences(schema);
114
+ ProblemMatcherRegistry.onReady().then(() => {
115
+ try {
116
+ const matcherIds = ( ( ProblemMatcherRegistry.keys()).map(key => '$' + key));
117
+ definitions.problemMatcherType1.oneOf[0].enum = matcherIds;
118
+ definitions.problemMatcherType1.oneOf[2].items.anyOf[1].enum = matcherIds;
119
+ }
120
+ catch (err) {
121
+ console.log('Installing problem matcher ids failed');
122
+ }
123
+ });
124
+
125
+ export { schema as default };