@codingame/monaco-vscode-task-service-override 26.2.2 → 27.0.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 +2 -2
- package/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.js +143 -147
- package/vscode/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.js +8 -8
- package/vscode/src/vs/workbench/contrib/tasks/browser/task.contribution.js +47 -47
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskQuickPick.js +17 -17
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskService.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/browser/taskTerminalStatus.js +11 -11
- package/vscode/src/vs/workbench/contrib/tasks/browser/tasksQuickAccess.js +2 -2
- package/vscode/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.js +51 -35
- package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchemaCommon.js +41 -41
- package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v1.js +13 -9
- package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v2.js +94 -83
- package/vscode/src/vs/workbench/contrib/tasks/common/problemCollectors.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/tasks/common/problemCollectors.js +33 -12
- package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.d.ts +8 -7
- package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.js +93 -83
- package/vscode/src/vs/workbench/contrib/tasks/common/taskConfiguration.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/tasks/common/taskConfiguration.js +30 -24
- package/vscode/src/vs/workbench/contrib/tasks/common/taskSystem.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/taskTemplates.js +4 -4
|
@@ -170,7 +170,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
170
170
|
this._hasReconnected = false;
|
|
171
171
|
this._terminalTabActions = [{
|
|
172
172
|
id: RerunForActiveTerminalCommandId,
|
|
173
|
-
label: ( localize(
|
|
173
|
+
label: ( localize(12575, "Rerun Task")),
|
|
174
174
|
icon: rerunTaskIcon
|
|
175
175
|
}];
|
|
176
176
|
this._taskStartTimes = ( new Map());
|
|
@@ -181,7 +181,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
181
181
|
this._terminals = Object.create(null);
|
|
182
182
|
this._idleTaskTerminals = ( new LinkedMap());
|
|
183
183
|
this._sameTaskTerminals = Object.create(null);
|
|
184
|
-
this._onDidStateChange = ( new Emitter());
|
|
184
|
+
this._onDidStateChange = this._register(( new Emitter()));
|
|
185
185
|
this._taskSystemInfoResolver = taskSystemInfoResolver;
|
|
186
186
|
this._register(
|
|
187
187
|
this._terminalStatusManager = instantiationService.createInstance(TaskTerminalStatus)
|
|
@@ -249,7 +249,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
249
249
|
} else {
|
|
250
250
|
this._log(( error.toString()));
|
|
251
251
|
throw ( new TaskError(Severity.Error, ( localize(
|
|
252
|
-
|
|
252
|
+
12576,
|
|
253
253
|
"A unknown error has occurred while executing a task. See task output log for details."
|
|
254
254
|
)), TaskErrors.UnknownError));
|
|
255
255
|
}
|
|
@@ -258,7 +258,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
258
258
|
getTerminalsForTasks(tasks) {
|
|
259
259
|
const results = [];
|
|
260
260
|
for (const t of asArray(tasks)) {
|
|
261
|
-
for (const key
|
|
261
|
+
for (const key of ( Object.keys(this._terminals))) {
|
|
262
262
|
const value = this._terminals[key];
|
|
263
263
|
if (value.lastTask === t.getMapKey()) {
|
|
264
264
|
results.push(value.terminal.resource);
|
|
@@ -297,7 +297,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
297
297
|
});
|
|
298
298
|
const openOutput = "Show Output";
|
|
299
299
|
this._notificationService.prompt(Severity.Warning, ( localize(
|
|
300
|
-
|
|
300
|
+
12577,
|
|
301
301
|
"There are issues with task \"{0}\". See the output for more details.",
|
|
302
302
|
task._label
|
|
303
303
|
)), [{
|
|
@@ -420,9 +420,10 @@ class TerminalTaskSystem extends Disposable {
|
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
422
|
return ( new Promise((resolve, reject) => {
|
|
423
|
-
|
|
423
|
+
const onDisposedListener = terminal.onDisposed(terminal => {
|
|
424
424
|
this._fireTaskEvent(TaskEvent.terminated(task, terminal.instanceId, terminal.exitReason));
|
|
425
|
-
|
|
425
|
+
onDisposedListener.dispose();
|
|
426
|
+
});
|
|
426
427
|
const onExit = terminal.onExit(() => {
|
|
427
428
|
const task = activeTerminal.task;
|
|
428
429
|
try {
|
|
@@ -464,7 +465,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
464
465
|
return Promise.all(promises);
|
|
465
466
|
}
|
|
466
467
|
_showDependencyCycleMessage(task) {
|
|
467
|
-
this._log(( localize(
|
|
468
|
+
this._log(( localize(12578, "There is a dependency cycle. See task \"{0}\".", task._label)));
|
|
468
469
|
this._showOutput();
|
|
469
470
|
}
|
|
470
471
|
_executeTask(
|
|
@@ -527,7 +528,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
527
528
|
}
|
|
528
529
|
} else {
|
|
529
530
|
this._log(( localize(
|
|
530
|
-
|
|
531
|
+
12579,
|
|
531
532
|
"Couldn't resolve dependent task '{0}' in workspace folder '{1}'",
|
|
532
533
|
isString(dependency.task) ? dependency.task : JSON.stringify(dependency.task, undefined, 0),
|
|
533
534
|
(dependency.uri.toString())
|
|
@@ -825,7 +826,10 @@ class TerminalTaskSystem extends Disposable {
|
|
|
825
826
|
this._collectTaskVariables(variables, task);
|
|
826
827
|
let hasAllVariables = true;
|
|
827
828
|
variables.forEach(value => {
|
|
828
|
-
if (
|
|
829
|
+
if (Object.hasOwn(
|
|
830
|
+
lastTask.getVerifiedTask().resolvedVariables,
|
|
831
|
+
value.substring(2, value.length - 1)
|
|
832
|
+
)) {
|
|
829
833
|
hasAllVariables = false;
|
|
830
834
|
}
|
|
831
835
|
});
|
|
@@ -873,11 +877,12 @@ class TerminalTaskSystem extends Disposable {
|
|
|
873
877
|
problemMatchers,
|
|
874
878
|
this._markerService,
|
|
875
879
|
this._modelService,
|
|
876
|
-
this._fileService
|
|
880
|
+
this._fileService,
|
|
881
|
+
this._logService
|
|
877
882
|
));
|
|
878
883
|
if ((problemMatchers.length > 0) && !watchingProblemMatcher.isWatching()) {
|
|
879
884
|
this._appendOutput(( localize(
|
|
880
|
-
|
|
885
|
+
12580,
|
|
881
886
|
"Task {0} is a background task but uses a problem matcher without a background pattern",
|
|
882
887
|
task._label
|
|
883
888
|
)));
|
|
@@ -1044,11 +1049,12 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1044
1049
|
this._markerService,
|
|
1045
1050
|
this._modelService,
|
|
1046
1051
|
ProblemHandlingStrategy.Clean,
|
|
1047
|
-
this._fileService
|
|
1052
|
+
this._fileService,
|
|
1053
|
+
this._logService
|
|
1048
1054
|
));
|
|
1049
1055
|
this._terminalStatusManager.addTerminal(task, terminal, startStopProblemMatcher);
|
|
1050
1056
|
this._taskProblemMonitor.addTerminal(terminal, startStopProblemMatcher);
|
|
1051
|
-
|
|
1057
|
+
const problemMatcherListener = startStopProblemMatcher.onDidStateChange(event => {
|
|
1052
1058
|
if (event.kind === ProblemCollectorEventKind.BackgroundProcessingBegins) {
|
|
1053
1059
|
this._fireTaskEvent(
|
|
1054
1060
|
TaskEvent.general(TaskEventKind.ProblemMatcherStarted, task, terminal?.instanceId)
|
|
@@ -1065,7 +1071,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1065
1071
|
);
|
|
1066
1072
|
}
|
|
1067
1073
|
}
|
|
1068
|
-
})
|
|
1074
|
+
});
|
|
1069
1075
|
let processStartedSignaled = false;
|
|
1070
1076
|
terminal.processReady.then(() => {
|
|
1071
1077
|
if (!processStartedSignaled) {
|
|
@@ -1108,6 +1114,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1108
1114
|
onData.dispose();
|
|
1109
1115
|
startStopProblemMatcher.done();
|
|
1110
1116
|
startStopProblemMatcher.dispose();
|
|
1117
|
+
problemMatcherListener.dispose();
|
|
1111
1118
|
}, 100);
|
|
1112
1119
|
if (!processStartedSignaled && terminal) {
|
|
1113
1120
|
this._fireTaskEvent(TaskEvent.processStarted(task, terminal.instanceId, terminal.processId));
|
|
@@ -1306,12 +1313,12 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1306
1313
|
shellLaunchConfig.args = windowsShellArgs ? combinedShellArgs.join(" ") : combinedShellArgs;
|
|
1307
1314
|
if (task.command.presentation && task.command.presentation.echo) {
|
|
1308
1315
|
if (needsFolderQualification && workspaceFolder) {
|
|
1309
|
-
const folder = cwd && typeof cwd === "object" && "path"
|
|
1310
|
-
shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence(cwd) + formatMessageForTerminal(( localize(
|
|
1316
|
+
const folder = cwd && typeof cwd === "object" && Object.hasOwn(cwd, "path") ? basename(cwd.path) : workspaceFolder.name;
|
|
1317
|
+
shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence(cwd) + formatMessageForTerminal(( localize(12581, "Executing task in folder {0}: {1}", folder, commandLine)), {
|
|
1311
1318
|
excludeLeadingNewLine: true
|
|
1312
1319
|
}) + this.getTaskShellIntegrationOutputSequence(commandLineInfo);
|
|
1313
1320
|
} else {
|
|
1314
|
-
shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence(cwd) + formatMessageForTerminal(( localize(
|
|
1321
|
+
shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence(cwd) + formatMessageForTerminal(( localize(12582, "Executing task: {0}", commandLine)), {
|
|
1315
1322
|
excludeLeadingNewLine: true
|
|
1316
1323
|
}) + this.getTaskShellIntegrationOutputSequence(commandLineInfo);
|
|
1317
1324
|
}
|
|
@@ -1348,7 +1355,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1348
1355
|
};
|
|
1349
1356
|
if (needsFolderQualification && workspaceFolder) {
|
|
1350
1357
|
shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence(cwd) + formatMessageForTerminal(( localize(
|
|
1351
|
-
|
|
1358
|
+
12581,
|
|
1352
1359
|
"Executing task in folder {0}: {1}",
|
|
1353
1360
|
workspaceFolder.name,
|
|
1354
1361
|
`${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)}`
|
|
@@ -1357,7 +1364,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1357
1364
|
}) + this.getTaskShellIntegrationOutputSequence(undefined);
|
|
1358
1365
|
} else {
|
|
1359
1366
|
shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence(cwd) + formatMessageForTerminal(( localize(
|
|
1360
|
-
|
|
1367
|
+
12583,
|
|
1361
1368
|
"Executing task: {0}",
|
|
1362
1369
|
`${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)}`
|
|
1363
1370
|
)), {
|
|
@@ -1411,12 +1418,17 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1411
1418
|
}
|
|
1412
1419
|
async _doCreateTerminal(task, group, launchConfigs) {
|
|
1413
1420
|
const reconnectedTerminal = await this._reconnectToTerminal(task);
|
|
1414
|
-
const
|
|
1421
|
+
const registerOnDisposed = terminal => {
|
|
1422
|
+
const listener = terminal.onDisposed(() => {
|
|
1423
|
+
this._fireTaskEvent(TaskEvent.terminated(task, terminal.instanceId, terminal.exitReason));
|
|
1424
|
+
listener.dispose();
|
|
1425
|
+
});
|
|
1426
|
+
};
|
|
1415
1427
|
if (reconnectedTerminal) {
|
|
1416
|
-
if (
|
|
1428
|
+
if ((CustomTask.is(task) || ContributedTask.is(task)) && task.command.presentation) {
|
|
1417
1429
|
reconnectedTerminal.waitOnExit = getWaitOnExitValue(task.command.presentation, task.configurationProperties);
|
|
1418
1430
|
}
|
|
1419
|
-
|
|
1431
|
+
registerOnDisposed(reconnectedTerminal);
|
|
1420
1432
|
this._logService.trace("reconnected to task and terminal", task._id);
|
|
1421
1433
|
return reconnectedTerminal;
|
|
1422
1434
|
}
|
|
@@ -1431,7 +1443,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1431
1443
|
},
|
|
1432
1444
|
config: launchConfigs
|
|
1433
1445
|
});
|
|
1434
|
-
|
|
1446
|
+
registerOnDisposed(result);
|
|
1435
1447
|
if (result) {
|
|
1436
1448
|
return result;
|
|
1437
1449
|
}
|
|
@@ -1442,7 +1454,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1442
1454
|
const createdTerminal = await this._terminalService.createTerminal({
|
|
1443
1455
|
config: launchConfigs
|
|
1444
1456
|
});
|
|
1445
|
-
|
|
1457
|
+
registerOnDisposed(createdTerminal);
|
|
1446
1458
|
return createdTerminal;
|
|
1447
1459
|
}
|
|
1448
1460
|
_reconnectToTerminals() {
|
|
@@ -1465,6 +1477,10 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1465
1477
|
shellIntegrationNonce: data.shellIntegrationNonce
|
|
1466
1478
|
};
|
|
1467
1479
|
this._terminals[terminal.instanceId] = terminalData;
|
|
1480
|
+
const listener = terminal.onDisposed(() => {
|
|
1481
|
+
this._deleteTaskAndTerminal(terminal, terminalData);
|
|
1482
|
+
listener.dispose();
|
|
1483
|
+
});
|
|
1468
1484
|
this._logService.trace(
|
|
1469
1485
|
"Reconnecting to task terminal",
|
|
1470
1486
|
terminalData.lastTask,
|
|
@@ -1501,7 +1517,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1501
1517
|
customPtyImplementation: (id, cols, rows) => ( new TerminalProcessExtHostProxy(id, cols, rows, this._terminalService)),
|
|
1502
1518
|
waitOnExit,
|
|
1503
1519
|
name: this._createTerminalName(task),
|
|
1504
|
-
initialText: task.command.presentation && task.command.presentation.echo ? formatMessageForTerminal(( localize(
|
|
1520
|
+
initialText: task.command.presentation && task.command.presentation.echo ? formatMessageForTerminal(( localize(12584, "Executing task: {0}", task._label)), {
|
|
1505
1521
|
excludeLeadingNewLine: true
|
|
1506
1522
|
}) : undefined,
|
|
1507
1523
|
isFeatureTerminal: true,
|
|
@@ -1524,7 +1540,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1524
1540
|
presentationOptions
|
|
1525
1541
|
);
|
|
1526
1542
|
if (launchConfigs === undefined) {
|
|
1527
|
-
return [undefined, ( new TaskError(Severity.Error, ( localize(
|
|
1543
|
+
return [undefined, ( new TaskError(Severity.Error, ( localize(12585, "Can't execute a shell command on an UNC drive using cmd.exe.")), TaskErrors.UnknownError))];
|
|
1528
1544
|
}
|
|
1529
1545
|
}
|
|
1530
1546
|
const prefersSameTerminal = presentationOptions.panel === PanelKind.Dedicated;
|
|
@@ -1601,10 +1617,10 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1601
1617
|
group,
|
|
1602
1618
|
shellIntegrationNonce: terminal.shellLaunchConfig.shellIntegrationNonce
|
|
1603
1619
|
};
|
|
1604
|
-
const onDisposedListener =
|
|
1620
|
+
const onDisposedListener = terminal.onDisposed(() => {
|
|
1605
1621
|
this._deleteTaskAndTerminal(terminal, terminalData);
|
|
1606
1622
|
onDisposedListener.dispose();
|
|
1607
|
-
})
|
|
1623
|
+
});
|
|
1608
1624
|
this._terminals[terminalKey] = terminalData;
|
|
1609
1625
|
terminal.shellLaunchConfig.tabActions = this._terminalTabActions;
|
|
1610
1626
|
return [terminal, undefined];
|
|
@@ -1722,7 +1738,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1722
1738
|
} else if (Array.isArray(definition)) {
|
|
1723
1739
|
definition.forEach(element => this._collectDefinitionVariables(variables, element));
|
|
1724
1740
|
} else if (isObject(definition)) {
|
|
1725
|
-
for (const key
|
|
1741
|
+
for (const key of ( Object.keys(definition))) {
|
|
1726
1742
|
this._collectDefinitionVariables(variables, definition[key]);
|
|
1727
1743
|
}
|
|
1728
1744
|
}
|
|
@@ -1832,7 +1848,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1832
1848
|
}
|
|
1833
1849
|
if (!matcher) {
|
|
1834
1850
|
this._appendOutput(( localize(
|
|
1835
|
-
|
|
1851
|
+
12586,
|
|
1836
1852
|
"Problem matcher {0} can't be resolved. The matcher will be ignored"
|
|
1837
1853
|
)));
|
|
1838
1854
|
continue;
|
|
@@ -1899,7 +1915,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1899
1915
|
if (isString(value)) {
|
|
1900
1916
|
result.env[key] = await this._resolveVariable(resolver, value);
|
|
1901
1917
|
} else {
|
|
1902
|
-
result.env[key] = (
|
|
1918
|
+
result.env[key] = String(value);
|
|
1903
1919
|
}
|
|
1904
1920
|
}
|
|
1905
1921
|
}
|
|
@@ -1939,7 +1955,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1939
1955
|
return "other";
|
|
1940
1956
|
}
|
|
1941
1957
|
async getTaskForTerminal(instanceId) {
|
|
1942
|
-
for (const key
|
|
1958
|
+
for (const key of ( Object.keys(this._activeTasks))) {
|
|
1943
1959
|
const activeTask = this._activeTasks[key];
|
|
1944
1960
|
if (activeTask.terminal?.instanceId === instanceId) {
|
|
1945
1961
|
return activeTask.task;
|
|
@@ -1960,9 +1976,9 @@ function getWaitOnExitValue(presentationOptions, configurationProperties) {
|
|
|
1960
1976
|
if ((presentationOptions.close === undefined) || (presentationOptions.close === false)) {
|
|
1961
1977
|
if ((presentationOptions.reveal !== RevealKind.Never) || !configurationProperties.isBackground || (presentationOptions.close === false)) {
|
|
1962
1978
|
if (presentationOptions.panel === PanelKind.New) {
|
|
1963
|
-
return taskShellIntegrationWaitOnExitSequence(( localize(
|
|
1979
|
+
return taskShellIntegrationWaitOnExitSequence(( localize(12587, "Press any key to close the terminal.")));
|
|
1964
1980
|
} else if (presentationOptions.showReuseMessage) {
|
|
1965
|
-
return taskShellIntegrationWaitOnExitSequence(( localize(
|
|
1981
|
+
return taskShellIntegrationWaitOnExitSequence(( localize(12588, "Terminal will be reused by tasks, press any key to close it.")));
|
|
1966
1982
|
} else {
|
|
1967
1983
|
return true;
|
|
1968
1984
|
}
|
|
@@ -10,12 +10,12 @@ const schema = {
|
|
|
10
10
|
},
|
|
11
11
|
options: {
|
|
12
12
|
type: "object",
|
|
13
|
-
description: ( localize(
|
|
13
|
+
description: ( localize(12590, "Additional command options")),
|
|
14
14
|
properties: {
|
|
15
15
|
cwd: {
|
|
16
16
|
type: "string",
|
|
17
17
|
description: ( localize(
|
|
18
|
-
|
|
18
|
+
12591,
|
|
19
19
|
"The current working directory of the executed program or script. If omitted Code's current workspace root is used."
|
|
20
20
|
))
|
|
21
21
|
},
|
|
@@ -25,7 +25,7 @@ const schema = {
|
|
|
25
25
|
type: "string"
|
|
26
26
|
},
|
|
27
27
|
description: ( localize(
|
|
28
|
-
|
|
28
|
+
12592,
|
|
29
29
|
"The environment of the executed program or shell. If omitted the parent process' environment is used."
|
|
30
30
|
))
|
|
31
31
|
}
|
|
@@ -38,7 +38,7 @@ const schema = {
|
|
|
38
38
|
oneOf: [{
|
|
39
39
|
type: "string",
|
|
40
40
|
errorMessage: ( localize(
|
|
41
|
-
|
|
41
|
+
12593,
|
|
42
42
|
"Unrecognized problem matcher. Is the extension that contributes this problem matcher installed?"
|
|
43
43
|
))
|
|
44
44
|
}, Schemas.LegacyProblemMatcher, {
|
|
@@ -47,7 +47,7 @@ const schema = {
|
|
|
47
47
|
anyOf: [{
|
|
48
48
|
type: "string",
|
|
49
49
|
errorMessage: ( localize(
|
|
50
|
-
|
|
50
|
+
12593,
|
|
51
51
|
"Unrecognized problem matcher. Is the extension that contributes this problem matcher installed?"
|
|
52
52
|
))
|
|
53
53
|
}, Schemas.LegacyProblemMatcher]
|
|
@@ -57,15 +57,15 @@ const schema = {
|
|
|
57
57
|
shellConfiguration: {
|
|
58
58
|
type: "object",
|
|
59
59
|
additionalProperties: false,
|
|
60
|
-
description: ( localize(
|
|
60
|
+
description: ( localize(12594, "Configures the shell to be used.")),
|
|
61
61
|
properties: {
|
|
62
62
|
executable: {
|
|
63
63
|
type: "string",
|
|
64
|
-
description: ( localize(
|
|
64
|
+
description: ( localize(12595, "The shell to be used."))
|
|
65
65
|
},
|
|
66
66
|
args: {
|
|
67
67
|
type: "array",
|
|
68
|
-
description: ( localize(
|
|
68
|
+
description: ( localize(12596, "The shell arguments.")),
|
|
69
69
|
items: {
|
|
70
70
|
type: "string"
|
|
71
71
|
}
|
|
@@ -79,13 +79,13 @@ const schema = {
|
|
|
79
79
|
command: {
|
|
80
80
|
type: "string",
|
|
81
81
|
description: ( localize(
|
|
82
|
-
|
|
82
|
+
12597,
|
|
83
83
|
"The command to be executed. Can be an external program or a shell command."
|
|
84
84
|
))
|
|
85
85
|
},
|
|
86
86
|
args: {
|
|
87
87
|
type: "array",
|
|
88
|
-
description: ( localize(
|
|
88
|
+
description: ( localize(12598, "Arguments passed to the command when this task is invoked.")),
|
|
89
89
|
items: {
|
|
90
90
|
type: "string"
|
|
91
91
|
}
|
|
@@ -102,18 +102,18 @@ const schema = {
|
|
|
102
102
|
properties: {
|
|
103
103
|
taskName: {
|
|
104
104
|
type: "string",
|
|
105
|
-
description: ( localize(
|
|
105
|
+
description: ( localize(12599, "The task's name"))
|
|
106
106
|
},
|
|
107
107
|
command: {
|
|
108
108
|
type: "string",
|
|
109
109
|
description: ( localize(
|
|
110
|
-
|
|
110
|
+
12597,
|
|
111
111
|
"The command to be executed. Can be an external program or a shell command."
|
|
112
112
|
))
|
|
113
113
|
},
|
|
114
114
|
args: {
|
|
115
115
|
type: "array",
|
|
116
|
-
description: ( localize(
|
|
116
|
+
description: ( localize(12598, "Arguments passed to the command when this task is invoked.")),
|
|
117
117
|
items: {
|
|
118
118
|
type: "string"
|
|
119
119
|
}
|
|
@@ -124,13 +124,13 @@ const schema = {
|
|
|
124
124
|
windows: {
|
|
125
125
|
anyOf: [{
|
|
126
126
|
$ref: "#/definitions/commandConfiguration",
|
|
127
|
-
description: ( localize(
|
|
127
|
+
description: ( localize(12600, "Windows specific command configuration"))
|
|
128
128
|
}, {
|
|
129
129
|
properties: {
|
|
130
130
|
problemMatcher: {
|
|
131
131
|
$ref: "#/definitions/problemMatcherType",
|
|
132
132
|
description: ( localize(
|
|
133
|
-
|
|
133
|
+
12601,
|
|
134
134
|
"The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers."
|
|
135
135
|
))
|
|
136
136
|
}
|
|
@@ -140,13 +140,13 @@ const schema = {
|
|
|
140
140
|
osx: {
|
|
141
141
|
anyOf: [{
|
|
142
142
|
$ref: "#/definitions/commandConfiguration",
|
|
143
|
-
description: ( localize(
|
|
143
|
+
description: ( localize(12602, "Mac specific command configuration"))
|
|
144
144
|
}, {
|
|
145
145
|
properties: {
|
|
146
146
|
problemMatcher: {
|
|
147
147
|
$ref: "#/definitions/problemMatcherType",
|
|
148
148
|
description: ( localize(
|
|
149
|
-
|
|
149
|
+
12601,
|
|
150
150
|
"The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers."
|
|
151
151
|
))
|
|
152
152
|
}
|
|
@@ -156,13 +156,13 @@ const schema = {
|
|
|
156
156
|
linux: {
|
|
157
157
|
anyOf: [{
|
|
158
158
|
$ref: "#/definitions/commandConfiguration",
|
|
159
|
-
description: ( localize(
|
|
159
|
+
description: ( localize(12603, "Linux specific command configuration"))
|
|
160
160
|
}, {
|
|
161
161
|
properties: {
|
|
162
162
|
problemMatcher: {
|
|
163
163
|
$ref: "#/definitions/problemMatcherType",
|
|
164
164
|
description: ( localize(
|
|
165
|
-
|
|
165
|
+
12601,
|
|
166
166
|
"The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers."
|
|
167
167
|
))
|
|
168
168
|
}
|
|
@@ -172,7 +172,7 @@ const schema = {
|
|
|
172
172
|
suppressTaskName: {
|
|
173
173
|
type: "boolean",
|
|
174
174
|
description: ( localize(
|
|
175
|
-
|
|
175
|
+
12604,
|
|
176
176
|
"Controls whether the task name is added as an argument to the command. If omitted the globally defined value is used."
|
|
177
177
|
)),
|
|
178
178
|
default: true
|
|
@@ -180,23 +180,23 @@ const schema = {
|
|
|
180
180
|
showOutput: {
|
|
181
181
|
$ref: "#/definitions/showOutputType",
|
|
182
182
|
description: ( localize(
|
|
183
|
-
|
|
183
|
+
12605,
|
|
184
184
|
"Controls whether the output of the running task is shown or not. If omitted the globally defined value is used."
|
|
185
185
|
))
|
|
186
186
|
},
|
|
187
187
|
echoCommand: {
|
|
188
188
|
type: "boolean",
|
|
189
189
|
description: ( localize(
|
|
190
|
-
|
|
190
|
+
12606,
|
|
191
191
|
"Controls whether the executed command is echoed to the output. Default is false."
|
|
192
192
|
)),
|
|
193
193
|
default: true
|
|
194
194
|
},
|
|
195
195
|
isWatching: {
|
|
196
196
|
type: "boolean",
|
|
197
|
-
deprecationMessage: ( localize(
|
|
197
|
+
deprecationMessage: ( localize(12607, "Deprecated. Use isBackground instead.")),
|
|
198
198
|
description: ( localize(
|
|
199
|
-
|
|
199
|
+
12608,
|
|
200
200
|
"Whether the executed task is kept alive and is watching the file system."
|
|
201
201
|
)),
|
|
202
202
|
default: true
|
|
@@ -204,7 +204,7 @@ const schema = {
|
|
|
204
204
|
isBackground: {
|
|
205
205
|
type: "boolean",
|
|
206
206
|
description: ( localize(
|
|
207
|
-
|
|
207
|
+
12609,
|
|
208
208
|
"Whether the executed task is kept alive and is running in the background."
|
|
209
209
|
)),
|
|
210
210
|
default: true
|
|
@@ -212,25 +212,25 @@ const schema = {
|
|
|
212
212
|
promptOnClose: {
|
|
213
213
|
type: "boolean",
|
|
214
214
|
description: ( localize(
|
|
215
|
-
|
|
215
|
+
12610,
|
|
216
216
|
"Whether the user is prompted when VS Code closes with a running task."
|
|
217
217
|
)),
|
|
218
218
|
default: false
|
|
219
219
|
},
|
|
220
220
|
isBuildCommand: {
|
|
221
221
|
type: "boolean",
|
|
222
|
-
description: ( localize(
|
|
222
|
+
description: ( localize(12611, "Maps this task to Code's default build command.")),
|
|
223
223
|
default: true
|
|
224
224
|
},
|
|
225
225
|
isTestCommand: {
|
|
226
226
|
type: "boolean",
|
|
227
|
-
description: ( localize(
|
|
227
|
+
description: ( localize(12612, "Maps this task to Code's default test command.")),
|
|
228
228
|
default: true
|
|
229
229
|
},
|
|
230
230
|
problemMatcher: {
|
|
231
231
|
$ref: "#/definitions/problemMatcherType",
|
|
232
232
|
description: ( localize(
|
|
233
|
-
|
|
233
|
+
12601,
|
|
234
234
|
"The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers."
|
|
235
235
|
))
|
|
236
236
|
}
|
|
@@ -243,13 +243,13 @@ const schema = {
|
|
|
243
243
|
command: {
|
|
244
244
|
type: "string",
|
|
245
245
|
description: ( localize(
|
|
246
|
-
|
|
246
|
+
12597,
|
|
247
247
|
"The command to be executed. Can be an external program or a shell command."
|
|
248
248
|
))
|
|
249
249
|
},
|
|
250
250
|
args: {
|
|
251
251
|
type: "array",
|
|
252
|
-
description: ( localize(
|
|
252
|
+
description: ( localize(12613, "Additional arguments passed to the command.")),
|
|
253
253
|
items: {
|
|
254
254
|
type: "string"
|
|
255
255
|
}
|
|
@@ -260,15 +260,15 @@ const schema = {
|
|
|
260
260
|
showOutput: {
|
|
261
261
|
$ref: "#/definitions/showOutputType",
|
|
262
262
|
description: ( localize(
|
|
263
|
-
|
|
263
|
+
12614,
|
|
264
264
|
"Controls whether the output of the running task is shown or not. If omitted 'always' is used."
|
|
265
265
|
))
|
|
266
266
|
},
|
|
267
267
|
isWatching: {
|
|
268
268
|
type: "boolean",
|
|
269
|
-
deprecationMessage: ( localize(
|
|
269
|
+
deprecationMessage: ( localize(12615, "Deprecated. Use isBackground instead.")),
|
|
270
270
|
description: ( localize(
|
|
271
|
-
|
|
271
|
+
12616,
|
|
272
272
|
"Whether the executed task is kept alive and is watching the file system."
|
|
273
273
|
)),
|
|
274
274
|
default: true
|
|
@@ -276,7 +276,7 @@ const schema = {
|
|
|
276
276
|
isBackground: {
|
|
277
277
|
type: "boolean",
|
|
278
278
|
description: ( localize(
|
|
279
|
-
|
|
279
|
+
12617,
|
|
280
280
|
"Whether the executed task is kept alive and is running in the background."
|
|
281
281
|
)),
|
|
282
282
|
default: true
|
|
@@ -284,7 +284,7 @@ const schema = {
|
|
|
284
284
|
promptOnClose: {
|
|
285
285
|
type: "boolean",
|
|
286
286
|
description: ( localize(
|
|
287
|
-
|
|
287
|
+
12618,
|
|
288
288
|
"Whether the user is prompted when VS Code closes with a running background task."
|
|
289
289
|
)),
|
|
290
290
|
default: false
|
|
@@ -292,7 +292,7 @@ const schema = {
|
|
|
292
292
|
echoCommand: {
|
|
293
293
|
type: "boolean",
|
|
294
294
|
description: ( localize(
|
|
295
|
-
|
|
295
|
+
12606,
|
|
296
296
|
"Controls whether the executed command is echoed to the output. Default is false."
|
|
297
297
|
)),
|
|
298
298
|
default: true
|
|
@@ -300,26 +300,26 @@ const schema = {
|
|
|
300
300
|
suppressTaskName: {
|
|
301
301
|
type: "boolean",
|
|
302
302
|
description: ( localize(
|
|
303
|
-
|
|
303
|
+
12619,
|
|
304
304
|
"Controls whether the task name is added as an argument to the command. Default is false."
|
|
305
305
|
)),
|
|
306
306
|
default: true
|
|
307
307
|
},
|
|
308
308
|
taskSelector: {
|
|
309
309
|
type: "string",
|
|
310
|
-
description: ( localize(
|
|
310
|
+
description: ( localize(12620, "Prefix to indicate that an argument is task."))
|
|
311
311
|
},
|
|
312
312
|
problemMatcher: {
|
|
313
313
|
$ref: "#/definitions/problemMatcherType",
|
|
314
314
|
description: ( localize(
|
|
315
|
-
|
|
315
|
+
12621,
|
|
316
316
|
"The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers."
|
|
317
317
|
))
|
|
318
318
|
},
|
|
319
319
|
tasks: {
|
|
320
320
|
type: "array",
|
|
321
321
|
description: ( localize(
|
|
322
|
-
|
|
322
|
+
12622,
|
|
323
323
|
"The task configurations. Usually these are enrichments of task already defined in the external task runner."
|
|
324
324
|
)),
|
|
325
325
|
items: {
|
|
@@ -13,32 +13,32 @@ const schema = {
|
|
|
13
13
|
version: {
|
|
14
14
|
type: "string",
|
|
15
15
|
enum: ["0.1.0"],
|
|
16
|
-
deprecationMessage: ( localize(
|
|
17
|
-
description: ( localize(
|
|
16
|
+
deprecationMessage: ( localize(12623, "Task version 0.1.0 is deprecated. Please use 2.0.0")),
|
|
17
|
+
description: ( localize(12624, "The config's version number"))
|
|
18
18
|
},
|
|
19
19
|
_runner: {
|
|
20
|
-
deprecationMessage: ( localize(
|
|
20
|
+
deprecationMessage: ( localize(12625, "The runner has graduated. Use the official runner property"))
|
|
21
21
|
},
|
|
22
22
|
runner: {
|
|
23
23
|
type: "string",
|
|
24
24
|
enum: ["process", "terminal"],
|
|
25
25
|
default: "process",
|
|
26
26
|
description: ( localize(
|
|
27
|
-
|
|
27
|
+
12626,
|
|
28
28
|
"Defines whether the task is executed as a process and the output is shown in the output window or inside the terminal."
|
|
29
29
|
))
|
|
30
30
|
},
|
|
31
31
|
windows: {
|
|
32
32
|
$ref: "#/definitions/taskRunnerConfiguration",
|
|
33
|
-
description: ( localize(
|
|
33
|
+
description: ( localize(12627, "Windows specific command configuration"))
|
|
34
34
|
},
|
|
35
35
|
osx: {
|
|
36
36
|
$ref: "#/definitions/taskRunnerConfiguration",
|
|
37
|
-
description: ( localize(
|
|
37
|
+
description: ( localize(12628, "Mac specific command configuration"))
|
|
38
38
|
},
|
|
39
39
|
linux: {
|
|
40
40
|
$ref: "#/definitions/taskRunnerConfiguration",
|
|
41
|
-
description: ( localize(
|
|
41
|
+
description: ( localize(12629, "Linux specific command configuration"))
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}, {
|
|
@@ -50,7 +50,7 @@ const shellCommand = {
|
|
|
50
50
|
type: "boolean",
|
|
51
51
|
default: true,
|
|
52
52
|
description: ( localize(
|
|
53
|
-
|
|
53
|
+
12630,
|
|
54
54
|
"Specifies whether the command is a shell command or an external program. Defaults to false if omitted."
|
|
55
55
|
))
|
|
56
56
|
};
|
|
@@ -66,7 +66,11 @@ Object.getOwnPropertyNames(definitions).forEach(key => {
|
|
|
66
66
|
});
|
|
67
67
|
function fixReferences(literal) {
|
|
68
68
|
if (Array.isArray(literal)) {
|
|
69
|
-
literal.forEach(
|
|
69
|
+
literal.forEach(element => {
|
|
70
|
+
if (typeof element === "object" && element !== null) {
|
|
71
|
+
fixReferences(element);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
70
74
|
} else if (typeof literal === "object") {
|
|
71
75
|
if (literal["$ref"]) {
|
|
72
76
|
literal["$ref"] = literal["$ref"] + "1";
|