@codingame/monaco-vscode-task-service-override 2.0.3 → 2.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-task-service-override",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@2.0
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@2.1.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -57,7 +57,8 @@ import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeServi
|
|
|
57
57
|
import { IWorkspaceTrustRequestService, IWorkspaceTrustManagementService } from 'vscode/vscode/vs/platform/workspace/common/workspaceTrust';
|
|
58
58
|
import { VirtualWorkspaceContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
59
59
|
import { EditorResourceAccessor } from 'vscode/vscode/vs/workbench/common/editor';
|
|
60
|
-
import {
|
|
60
|
+
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
61
|
+
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
|
|
61
62
|
import { isWorkspaceFolder, QUICKOPEN_DETAIL_CONFIG, TaskQuickPick, QUICKOPEN_SKIP_CONFIG, configureTaskIcon } from './taskQuickPick.js';
|
|
62
63
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
63
64
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
@@ -5,7 +5,7 @@ import { isUNC } from 'vscode/vscode/vs/base/common/extpath';
|
|
|
5
5
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { LinkedMap } from 'vscode/vscode/vs/base/common/map';
|
|
7
7
|
import { deepClone } from 'vscode/vscode/vs/base/common/objects';
|
|
8
|
-
import { delimiter, join, isAbsolute, posix, parse, sep } from 'vscode/vscode/vs/base/common/path';
|
|
8
|
+
import { delimiter, join, isAbsolute, posix, basename, parse, sep } from 'vscode/vscode/vs/base/common/path';
|
|
9
9
|
import { isWindows, platform, PlatformToString } from 'vscode/vscode/vs/base/common/platform';
|
|
10
10
|
import { toLocalResource } from 'vscode/vscode/vs/base/common/resources';
|
|
11
11
|
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
@@ -855,14 +855,6 @@ class TerminalTaskSystem extends Disposable {
|
|
|
855
855
|
if (!terminal) {
|
|
856
856
|
return Promise.reject(( new Error(`Failed to create terminal for task ${task._label}`)));
|
|
857
857
|
}
|
|
858
|
-
let processStartedSignaled = false;
|
|
859
|
-
terminal.processReady.then(() => {
|
|
860
|
-
if (!processStartedSignaled) {
|
|
861
|
-
this._fireTaskEvent(TaskEvent.processStarted(task, terminal.instanceId, terminal.processId));
|
|
862
|
-
processStartedSignaled = true;
|
|
863
|
-
}
|
|
864
|
-
}, (_error) => {
|
|
865
|
-
});
|
|
866
858
|
this._fireTaskEvent(TaskEvent.start(task, terminal.instanceId, resolver.values));
|
|
867
859
|
const mapKey = task.getMapKey();
|
|
868
860
|
this._busyTasks[mapKey] = task;
|
|
@@ -876,6 +868,14 @@ class TerminalTaskSystem extends Disposable {
|
|
|
876
868
|
this._fileService
|
|
877
869
|
));
|
|
878
870
|
this._terminalStatusManager.addTerminal(task, terminal, startStopProblemMatcher);
|
|
871
|
+
let processStartedSignaled = false;
|
|
872
|
+
terminal.processReady.then(() => {
|
|
873
|
+
if (!processStartedSignaled) {
|
|
874
|
+
this._fireTaskEvent(TaskEvent.processStarted(task, terminal.instanceId, terminal.processId));
|
|
875
|
+
processStartedSignaled = true;
|
|
876
|
+
}
|
|
877
|
+
}, (_error) => {
|
|
878
|
+
});
|
|
879
879
|
const onData = terminal.onLineData((line) => {
|
|
880
880
|
startStopProblemMatcher.processLine(line);
|
|
881
881
|
});
|
|
@@ -1023,27 +1023,27 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
const shellArgs = Array.isArray(shellLaunchConfig.args) ? shellLaunchConfig.args.slice(0) : [shellLaunchConfig.args];
|
|
1025
1025
|
const toAdd = [];
|
|
1026
|
-
const basename = posix.basename((await this._pathService.fileURI(shellLaunchConfig.executable)).path).toLowerCase();
|
|
1027
|
-
const commandLine = this._buildShellCommandLine(platform, basename, shellOptions, command, originalCommand, args);
|
|
1026
|
+
const basename$1 = posix.basename((await this._pathService.fileURI(shellLaunchConfig.executable)).path).toLowerCase();
|
|
1027
|
+
const commandLine = this._buildShellCommandLine(platform, basename$1, shellOptions, command, originalCommand, args);
|
|
1028
1028
|
let windowsShellArgs = false;
|
|
1029
1029
|
if (platform === 3 ) {
|
|
1030
1030
|
windowsShellArgs = true;
|
|
1031
1031
|
const userHome = await this._pathService.userHome();
|
|
1032
|
-
if (basename === 'cmd.exe' && ((options.cwd && isUNC(options.cwd)) || (!options.cwd && isUNC(userHome.fsPath)))) {
|
|
1032
|
+
if (basename$1 === 'cmd.exe' && ((options.cwd && isUNC(options.cwd)) || (!options.cwd && isUNC(userHome.fsPath)))) {
|
|
1033
1033
|
return undefined;
|
|
1034
1034
|
}
|
|
1035
|
-
if ((basename === 'powershell.exe') || (basename === 'pwsh.exe')) {
|
|
1035
|
+
if ((basename$1 === 'powershell.exe') || (basename$1 === 'pwsh.exe')) {
|
|
1036
1036
|
if (!shellSpecified) {
|
|
1037
1037
|
toAdd.push('-Command');
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
|
-
else if ((basename === 'bash.exe') || (basename === 'zsh.exe')) {
|
|
1040
|
+
else if ((basename$1 === 'bash.exe') || (basename$1 === 'zsh.exe')) {
|
|
1041
1041
|
windowsShellArgs = false;
|
|
1042
1042
|
if (!shellSpecified) {
|
|
1043
1043
|
toAdd.push('-c');
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
|
-
else if (basename === 'wsl.exe') {
|
|
1046
|
+
else if (basename$1 === 'wsl.exe') {
|
|
1047
1047
|
if (!shellSpecified) {
|
|
1048
1048
|
toAdd.push('-e');
|
|
1049
1049
|
}
|
|
@@ -1064,7 +1064,7 @@ class TerminalTaskSystem extends Disposable {
|
|
|
1064
1064
|
shellLaunchConfig.args = windowsShellArgs ? combinedShellArgs.join(' ') : combinedShellArgs;
|
|
1065
1065
|
if (task.command.presentation && task.command.presentation.echo) {
|
|
1066
1066
|
if (needsFolderQualification && workspaceFolder) {
|
|
1067
|
-
const folder = cwd ?
|
|
1067
|
+
const folder = cwd && typeof cwd === 'object' && 'path' in cwd ? basename(cwd.path) : workspaceFolder.name;
|
|
1068
1068
|
shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence(cwd) + formatMessageForTerminal(( localizeWithPath('vs/workbench/contrib/tasks/browser/terminalTaskSystem', {
|
|
1069
1069
|
key: 'task.executingInFolder',
|
|
1070
1070
|
comment: ['The workspace folder the task is running in', 'The task command line or label']
|
|
@@ -334,7 +334,7 @@ class WatchingProblemCollector extends AbstractProblemCollector {
|
|
|
334
334
|
this.modelListeners.add(this.modelService.onModelRemoved(modelEvent => {
|
|
335
335
|
let markerChanged = Event.debounce(this.markerService.onMarkerChanged, (last, e) => {
|
|
336
336
|
return (last ?? []).concat(e);
|
|
337
|
-
}, 500)(async (markerEvent) => {
|
|
337
|
+
}, 500, false, true)(async (markerEvent) => {
|
|
338
338
|
markerChanged?.dispose();
|
|
339
339
|
markerChanged = undefined;
|
|
340
340
|
if (!markerEvent.includes(modelEvent.uri) || (this.markerService.read({ resource: modelEvent.uri }).length !== 0)) {
|
|
@@ -346,8 +346,9 @@ class WatchingProblemCollector extends AbstractProblemCollector {
|
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
348
|
setTimeout(async () => {
|
|
349
|
-
markerChanged
|
|
349
|
+
const _markerChanged = markerChanged;
|
|
350
350
|
markerChanged = undefined;
|
|
351
|
+
_markerChanged?.dispose();
|
|
351
352
|
}, 600);
|
|
352
353
|
}));
|
|
353
354
|
}
|