@codingame/monaco-vscode-extensions-service-override 11.1.2 → 12.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/index.d.ts +40 -2
- package/index.js +266 -1
- package/package.json +81 -11
- package/vscode/src/vs/base/common/console.d.ts +22 -0
- package/vscode/src/vs/base/common/console.js +3 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.d.ts +24 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +54 -53
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.d.ts +14 -0
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +4 -2
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.d.ts +1 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +1 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.d.ts +30 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +73 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +67 -39
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +12 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +65 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +33 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +169 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +50 -58
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +13 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +82 -75
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.d.ts +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.d.ts +14 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +58 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +40 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +23 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +8 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.d.ts +65 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +15 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +37 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +53 -52
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +60 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +97 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.d.ts +34 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.d.ts +6 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +42 -45
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.d.ts +32 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +64 -60
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +108 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +31 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +23 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +6 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +46 -47
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.d.ts +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.d.ts +26 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +39 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +13 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.d.ts +19 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +52 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +11 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.d.ts +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +9 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +6 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.d.ts +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +174 -195
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +80 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +27 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +7 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.d.ts +44 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +6 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.d.ts +16 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.d.ts +45 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +41 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.d.ts +44 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +29 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +21 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.d.ts +6 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.d.ts +26 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +19 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +10 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +71 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +34 -35
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.d.ts +12 -0
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +1 -0
- package/vscode/src/vs/workbench/common/comments.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +14 -12
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +6 -4
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.d.ts +25 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +62 -60
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +74 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +63 -45
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +57 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +16 -12
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.d.ts +20 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +3 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +203 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +217 -180
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +4 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +68 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +37 -39
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +40 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +38 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +15 -14
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.d.ts +2 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +4 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.d.ts +14 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +18 -19
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.d.ts +3 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +8 -7
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.d.ts +54 -0
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +4 -3
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.d.ts +4 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.d.ts +68 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +12 -9
- package/_virtual/semver.js +0 -5
- package/extensions.js +0 -257
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
- package/tools/url.js +0 -10
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
4
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
4
5
|
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
5
6
|
import { isString } from 'vscode/vscode/vs/base/common/types';
|
|
6
|
-
import { platform } from 'vscode/vscode/vs/base/common/platform';
|
|
7
|
+
import { platform, Platform } from 'vscode/vscode/vs/base/common/platform';
|
|
7
8
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
9
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
9
|
-
import { TaskDefinition, PresentationOptions, RunOptions, CommandOptions, RuntimeType, TaskSourceKind, CustomTask, ContributedTask, ConfiguringTask } from 'vscode/vscode/vs/workbench/contrib/tasks/common/tasks';
|
|
10
|
+
import { TaskDefinition, PresentationOptions, RunOptions, CommandOptions, RuntimeType, TaskSourceKind, TaskScope, CustomTask, ContributedTask, ConfiguringTask, TaskEventKind } from 'vscode/vscode/vs/workbench/contrib/tasks/common/tasks';
|
|
10
11
|
import { ITaskService } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskService.service';
|
|
11
12
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
12
13
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
@@ -14,7 +15,7 @@ import { IConfigurationResolverService } from 'vscode/vscode/vs/workbench/servic
|
|
|
14
15
|
import { ErrorNoTelemetry } from 'vscode/vscode/vs/base/common/errors';
|
|
15
16
|
|
|
16
17
|
var TaskExecutionDTO;
|
|
17
|
-
( (
|
|
18
|
+
(function (TaskExecutionDTO) {
|
|
18
19
|
function from(value) {
|
|
19
20
|
return {
|
|
20
21
|
id: value.id,
|
|
@@ -22,9 +23,9 @@ var TaskExecutionDTO;
|
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
TaskExecutionDTO.from = from;
|
|
25
|
-
})(TaskExecutionDTO || (TaskExecutionDTO = {}))
|
|
26
|
+
})(TaskExecutionDTO || (TaskExecutionDTO = {}));
|
|
26
27
|
var TaskProcessStartedDTO;
|
|
27
|
-
( (
|
|
28
|
+
(function (TaskProcessStartedDTO) {
|
|
28
29
|
function from(value, processId) {
|
|
29
30
|
return {
|
|
30
31
|
id: value.id,
|
|
@@ -32,9 +33,9 @@ var TaskProcessStartedDTO;
|
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
TaskProcessStartedDTO.from = from;
|
|
35
|
-
})(TaskProcessStartedDTO || (TaskProcessStartedDTO = {}))
|
|
36
|
+
})(TaskProcessStartedDTO || (TaskProcessStartedDTO = {}));
|
|
36
37
|
var TaskProcessEndedDTO;
|
|
37
|
-
( (
|
|
38
|
+
(function (TaskProcessEndedDTO) {
|
|
38
39
|
function from(value, exitCode) {
|
|
39
40
|
return {
|
|
40
41
|
id: value.id,
|
|
@@ -42,9 +43,9 @@ var TaskProcessEndedDTO;
|
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
TaskProcessEndedDTO.from = from;
|
|
45
|
-
})(TaskProcessEndedDTO || (TaskProcessEndedDTO = {}))
|
|
46
|
+
})(TaskProcessEndedDTO || (TaskProcessEndedDTO = {}));
|
|
46
47
|
var TaskDefinitionDTO;
|
|
47
|
-
( (
|
|
48
|
+
(function (TaskDefinitionDTO) {
|
|
48
49
|
function from(value) {
|
|
49
50
|
const result = Object.assign(Object.create(null), value);
|
|
50
51
|
delete result._key;
|
|
@@ -62,9 +63,9 @@ var TaskDefinitionDTO;
|
|
|
62
63
|
return result;
|
|
63
64
|
}
|
|
64
65
|
TaskDefinitionDTO.to = to;
|
|
65
|
-
})(TaskDefinitionDTO || (TaskDefinitionDTO = {}))
|
|
66
|
+
})(TaskDefinitionDTO || (TaskDefinitionDTO = {}));
|
|
66
67
|
var TaskPresentationOptionsDTO;
|
|
67
|
-
( (
|
|
68
|
+
(function (TaskPresentationOptionsDTO) {
|
|
68
69
|
function from(value) {
|
|
69
70
|
if (value === undefined || value === null) {
|
|
70
71
|
return undefined;
|
|
@@ -79,9 +80,9 @@ var TaskPresentationOptionsDTO;
|
|
|
79
80
|
return Object.assign(Object.create(null), PresentationOptions.defaults, value);
|
|
80
81
|
}
|
|
81
82
|
TaskPresentationOptionsDTO.to = to;
|
|
82
|
-
})(TaskPresentationOptionsDTO || (TaskPresentationOptionsDTO = {}))
|
|
83
|
+
})(TaskPresentationOptionsDTO || (TaskPresentationOptionsDTO = {}));
|
|
83
84
|
var RunOptionsDTO;
|
|
84
|
-
( (
|
|
85
|
+
(function (RunOptionsDTO) {
|
|
85
86
|
function from(value) {
|
|
86
87
|
if (value === undefined || value === null) {
|
|
87
88
|
return undefined;
|
|
@@ -96,9 +97,9 @@ var RunOptionsDTO;
|
|
|
96
97
|
return Object.assign(Object.create(null), RunOptions.defaults, value);
|
|
97
98
|
}
|
|
98
99
|
RunOptionsDTO.to = to;
|
|
99
|
-
})(RunOptionsDTO || (RunOptionsDTO = {}))
|
|
100
|
+
})(RunOptionsDTO || (RunOptionsDTO = {}));
|
|
100
101
|
var ProcessExecutionOptionsDTO;
|
|
101
|
-
( (
|
|
102
|
+
(function (ProcessExecutionOptionsDTO) {
|
|
102
103
|
function from(value) {
|
|
103
104
|
if (value === undefined || value === null) {
|
|
104
105
|
return undefined;
|
|
@@ -119,9 +120,9 @@ var ProcessExecutionOptionsDTO;
|
|
|
119
120
|
};
|
|
120
121
|
}
|
|
121
122
|
ProcessExecutionOptionsDTO.to = to;
|
|
122
|
-
})(ProcessExecutionOptionsDTO || (ProcessExecutionOptionsDTO = {}))
|
|
123
|
+
})(ProcessExecutionOptionsDTO || (ProcessExecutionOptionsDTO = {}));
|
|
123
124
|
var ProcessExecutionDTO;
|
|
124
|
-
( (
|
|
125
|
+
(function (ProcessExecutionDTO) {
|
|
125
126
|
function is(value) {
|
|
126
127
|
const candidate = value;
|
|
127
128
|
return candidate && !!candidate.process;
|
|
@@ -129,7 +130,7 @@ var ProcessExecutionDTO;
|
|
|
129
130
|
ProcessExecutionDTO.is = is;
|
|
130
131
|
function from(value) {
|
|
131
132
|
const process = isString(value.name) ? value.name : value.name.value;
|
|
132
|
-
const args = value.args ? (
|
|
133
|
+
const args = value.args ? ( value.args.map(value => isString(value) ? value : value.value)) : [];
|
|
133
134
|
const result = {
|
|
134
135
|
process: process,
|
|
135
136
|
args: args
|
|
@@ -151,9 +152,9 @@ var ProcessExecutionDTO;
|
|
|
151
152
|
return result;
|
|
152
153
|
}
|
|
153
154
|
ProcessExecutionDTO.to = to;
|
|
154
|
-
})(ProcessExecutionDTO || (ProcessExecutionDTO = {}))
|
|
155
|
+
})(ProcessExecutionDTO || (ProcessExecutionDTO = {}));
|
|
155
156
|
var ShellExecutionOptionsDTO;
|
|
156
|
-
( (
|
|
157
|
+
(function (ShellExecutionOptionsDTO) {
|
|
157
158
|
function from(value) {
|
|
158
159
|
if (value === undefined || value === null) {
|
|
159
160
|
return undefined;
|
|
@@ -192,9 +193,9 @@ var ShellExecutionOptionsDTO;
|
|
|
192
193
|
return result;
|
|
193
194
|
}
|
|
194
195
|
ShellExecutionOptionsDTO.to = to;
|
|
195
|
-
})(ShellExecutionOptionsDTO || (ShellExecutionOptionsDTO = {}))
|
|
196
|
+
})(ShellExecutionOptionsDTO || (ShellExecutionOptionsDTO = {}));
|
|
196
197
|
var ShellExecutionDTO;
|
|
197
|
-
( (
|
|
198
|
+
(function (ShellExecutionDTO) {
|
|
198
199
|
function is(value) {
|
|
199
200
|
const candidate = value;
|
|
200
201
|
return candidate && (!!candidate.commandLine || !!candidate.command);
|
|
@@ -228,9 +229,9 @@ var ShellExecutionDTO;
|
|
|
228
229
|
return result;
|
|
229
230
|
}
|
|
230
231
|
ShellExecutionDTO.to = to;
|
|
231
|
-
})(ShellExecutionDTO || (ShellExecutionDTO = {}))
|
|
232
|
+
})(ShellExecutionDTO || (ShellExecutionDTO = {}));
|
|
232
233
|
var CustomExecutionDTO;
|
|
233
|
-
( (
|
|
234
|
+
(function (CustomExecutionDTO) {
|
|
234
235
|
function is(value) {
|
|
235
236
|
const candidate = value;
|
|
236
237
|
return candidate && candidate.customExecution === 'customExecution';
|
|
@@ -249,9 +250,9 @@ var CustomExecutionDTO;
|
|
|
249
250
|
};
|
|
250
251
|
}
|
|
251
252
|
CustomExecutionDTO.to = to;
|
|
252
|
-
})(CustomExecutionDTO || (CustomExecutionDTO = {}))
|
|
253
|
+
})(CustomExecutionDTO || (CustomExecutionDTO = {}));
|
|
253
254
|
var TaskSourceDTO;
|
|
254
|
-
( (
|
|
255
|
+
(function (TaskSourceDTO) {
|
|
255
256
|
function from(value) {
|
|
256
257
|
const result = {
|
|
257
258
|
label: value.label
|
|
@@ -267,7 +268,7 @@ var TaskSourceDTO;
|
|
|
267
268
|
}
|
|
268
269
|
else if (value.kind === TaskSourceKind.Workspace) {
|
|
269
270
|
result.extensionId = '$core';
|
|
270
|
-
result.scope = value.config.workspaceFolder ? value.config.workspaceFolder.uri :
|
|
271
|
+
result.scope = value.config.workspaceFolder ? value.config.workspaceFolder.uri : TaskScope.Global;
|
|
271
272
|
}
|
|
272
273
|
return result;
|
|
273
274
|
}
|
|
@@ -275,13 +276,13 @@ var TaskSourceDTO;
|
|
|
275
276
|
function to(value, workspace) {
|
|
276
277
|
let scope;
|
|
277
278
|
let workspaceFolder;
|
|
278
|
-
if ((value.scope === undefined) || ((typeof value.scope === 'number') && (
|
|
279
|
+
if ((value.scope === undefined) || ((typeof value.scope === 'number') && (value.scope !== TaskScope.Global))) {
|
|
279
280
|
if (workspace.getWorkspace().folders.length === 0) {
|
|
280
|
-
scope =
|
|
281
|
+
scope = TaskScope.Global;
|
|
281
282
|
workspaceFolder = undefined;
|
|
282
283
|
}
|
|
283
284
|
else {
|
|
284
|
-
scope =
|
|
285
|
+
scope = TaskScope.Folder;
|
|
285
286
|
workspaceFolder = workspace.getWorkspace().folders[0];
|
|
286
287
|
}
|
|
287
288
|
}
|
|
@@ -289,7 +290,7 @@ var TaskSourceDTO;
|
|
|
289
290
|
scope = value.scope;
|
|
290
291
|
}
|
|
291
292
|
else {
|
|
292
|
-
scope =
|
|
293
|
+
scope = TaskScope.Folder;
|
|
293
294
|
workspaceFolder = workspace.getWorkspaceFolder(URI.revive(value.scope)) ?? undefined;
|
|
294
295
|
}
|
|
295
296
|
const result = {
|
|
@@ -302,17 +303,17 @@ var TaskSourceDTO;
|
|
|
302
303
|
return result;
|
|
303
304
|
}
|
|
304
305
|
TaskSourceDTO.to = to;
|
|
305
|
-
})(TaskSourceDTO || (TaskSourceDTO = {}))
|
|
306
|
+
})(TaskSourceDTO || (TaskSourceDTO = {}));
|
|
306
307
|
var TaskHandleDTO;
|
|
307
|
-
( (
|
|
308
|
+
(function (TaskHandleDTO) {
|
|
308
309
|
function is(value) {
|
|
309
310
|
const candidate = value;
|
|
310
311
|
return candidate && isString(candidate.id) && !!candidate.workspaceFolder;
|
|
311
312
|
}
|
|
312
313
|
TaskHandleDTO.is = is;
|
|
313
|
-
})(TaskHandleDTO || (TaskHandleDTO = {}))
|
|
314
|
+
})(TaskHandleDTO || (TaskHandleDTO = {}));
|
|
314
315
|
var TaskDTO;
|
|
315
|
-
( (
|
|
316
|
+
(function (TaskDTO) {
|
|
316
317
|
function from(task) {
|
|
317
318
|
if (task === undefined || task === null || (!CustomTask.is(task) && !ContributedTask.is(task) && !ConfiguringTask.is(task))) {
|
|
318
319
|
return undefined;
|
|
@@ -377,36 +378,26 @@ var TaskDTO;
|
|
|
377
378
|
}
|
|
378
379
|
command.presentation = TaskPresentationOptionsDTO.to(task.presentationOptions);
|
|
379
380
|
const source = TaskSourceDTO.to(task.source, workspace);
|
|
380
|
-
const label = ( localize(
|
|
381
|
+
const label = ( localize(2299, '{0}: {1}', source.label, task.name));
|
|
381
382
|
const definition = TaskDefinitionDTO.to(task.definition, executeOnly);
|
|
382
383
|
const id = (CustomExecutionDTO.is(task.execution) && task._id) ? task._id : `${task.source.extensionId}.${definition._key}`;
|
|
383
|
-
const result = ( (
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
name: task.name,
|
|
395
|
-
identifier: label,
|
|
396
|
-
group: task.group,
|
|
397
|
-
isBackground: !!task.isBackground,
|
|
398
|
-
problemMatchers: task.problemMatchers.slice(),
|
|
399
|
-
detail: task.detail,
|
|
400
|
-
icon,
|
|
401
|
-
hide
|
|
402
|
-
}
|
|
403
|
-
)));
|
|
384
|
+
const result = ( new ContributedTask(
|
|
385
|
+
id, source, label, definition.type, definition, command, task.hasDefinedMatchers, RunOptionsDTO.to(task.runOptions), {
|
|
386
|
+
name: task.name,
|
|
387
|
+
identifier: label,
|
|
388
|
+
group: task.group,
|
|
389
|
+
isBackground: !!task.isBackground,
|
|
390
|
+
problemMatchers: task.problemMatchers.slice(),
|
|
391
|
+
detail: task.detail,
|
|
392
|
+
icon,
|
|
393
|
+
hide
|
|
394
|
+
}));
|
|
404
395
|
return result;
|
|
405
396
|
}
|
|
406
397
|
TaskDTO.to = to;
|
|
407
|
-
})(TaskDTO || (TaskDTO = {}))
|
|
398
|
+
})(TaskDTO || (TaskDTO = {}));
|
|
408
399
|
var TaskGroupDTO;
|
|
409
|
-
( (
|
|
400
|
+
(function (TaskGroupDTO) {
|
|
410
401
|
function from(value) {
|
|
411
402
|
if (value === undefined) {
|
|
412
403
|
return undefined;
|
|
@@ -417,9 +408,9 @@ var TaskGroupDTO;
|
|
|
417
408
|
};
|
|
418
409
|
}
|
|
419
410
|
TaskGroupDTO.from = from;
|
|
420
|
-
})(TaskGroupDTO || (TaskGroupDTO = {}))
|
|
411
|
+
})(TaskGroupDTO || (TaskGroupDTO = {}));
|
|
421
412
|
var TaskFilterDTO;
|
|
422
|
-
( (
|
|
413
|
+
(function (TaskFilterDTO) {
|
|
423
414
|
function from(value) {
|
|
424
415
|
return value;
|
|
425
416
|
}
|
|
@@ -428,21 +419,21 @@ var TaskFilterDTO;
|
|
|
428
419
|
return value;
|
|
429
420
|
}
|
|
430
421
|
TaskFilterDTO.to = to;
|
|
431
|
-
})(TaskFilterDTO || (TaskFilterDTO = {}))
|
|
422
|
+
})(TaskFilterDTO || (TaskFilterDTO = {}));
|
|
432
423
|
let MainThreadTask = class MainThreadTask extends Disposable {
|
|
433
424
|
constructor(extHostContext, _taskService, _workspaceContextServer, _configurationResolverService) {
|
|
434
425
|
super();
|
|
435
426
|
this._taskService = _taskService;
|
|
436
427
|
this._workspaceContextServer = _workspaceContextServer;
|
|
437
428
|
this._configurationResolverService = _configurationResolverService;
|
|
438
|
-
this._proxy = (
|
|
439
|
-
this._providers = (
|
|
429
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostTask));
|
|
430
|
+
this._providers = ( new Map());
|
|
440
431
|
this._register(this._taskService.onDidStateChange(async (event) => {
|
|
441
|
-
if (event.kind ===
|
|
432
|
+
if (event.kind === TaskEventKind.Changed) {
|
|
442
433
|
return;
|
|
443
434
|
}
|
|
444
435
|
const task = event.__task;
|
|
445
|
-
if (event.kind ===
|
|
436
|
+
if (event.kind === TaskEventKind.Start) {
|
|
446
437
|
const execution = TaskExecutionDTO.from(task.getTaskExecution());
|
|
447
438
|
let resolvedDefinition = execution.task.definition;
|
|
448
439
|
if (execution.task?.execution && CustomExecutionDTO.is(execution.task.execution) && event.resolvedVariables) {
|
|
@@ -454,36 +445,34 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
454
445
|
}
|
|
455
446
|
this._proxy.$onDidStartTask(execution, event.terminalId, resolvedDefinition);
|
|
456
447
|
}
|
|
457
|
-
else if (event.kind ===
|
|
448
|
+
else if (event.kind === TaskEventKind.ProcessStarted) {
|
|
458
449
|
this._proxy.$onDidStartTaskProcess(TaskProcessStartedDTO.from(task.getTaskExecution(), event.processId));
|
|
459
450
|
}
|
|
460
|
-
else if (event.kind ===
|
|
451
|
+
else if (event.kind === TaskEventKind.ProcessEnded) {
|
|
461
452
|
this._proxy.$onDidEndTaskProcess(TaskProcessEndedDTO.from(task.getTaskExecution(), event.exitCode));
|
|
462
453
|
}
|
|
463
|
-
else if (event.kind ===
|
|
454
|
+
else if (event.kind === TaskEventKind.End) {
|
|
464
455
|
this._proxy.$OnDidEndTask(TaskExecutionDTO.from(task.getTaskExecution()));
|
|
465
456
|
}
|
|
466
457
|
}));
|
|
467
458
|
}
|
|
468
459
|
dispose() {
|
|
469
|
-
for (const value of (
|
|
460
|
+
for (const value of ( this._providers.values())) {
|
|
470
461
|
value.disposable.dispose();
|
|
471
462
|
}
|
|
472
463
|
this._providers.clear();
|
|
473
464
|
super.dispose();
|
|
474
465
|
}
|
|
475
466
|
$createTaskId(taskDTO) {
|
|
476
|
-
return (
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}))
|
|
486
|
-
);
|
|
467
|
+
return ( new Promise((resolve, reject) => {
|
|
468
|
+
const task = TaskDTO.to(taskDTO, this._workspaceContextServer, true);
|
|
469
|
+
if (task) {
|
|
470
|
+
resolve(task._id);
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
reject(( new Error('Task could not be created from DTO')));
|
|
474
|
+
}
|
|
475
|
+
}));
|
|
487
476
|
}
|
|
488
477
|
$registerTaskProvider(handle, type) {
|
|
489
478
|
const provider = {
|
|
@@ -555,7 +544,7 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
555
544
|
else {
|
|
556
545
|
const workspaceObject = this._workspaceContextServer.getWorkspace();
|
|
557
546
|
const uri = URI.revive(value);
|
|
558
|
-
if (workspaceObject.configuration?.toString() === (
|
|
547
|
+
if (workspaceObject.configuration?.toString() === ( uri.toString())) {
|
|
559
548
|
workspace = workspaceObject;
|
|
560
549
|
}
|
|
561
550
|
else {
|
|
@@ -575,10 +564,10 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
575
564
|
task: TaskDTO.from(task)
|
|
576
565
|
};
|
|
577
566
|
}
|
|
578
|
-
throw (
|
|
567
|
+
throw ( new Error('Task not found'));
|
|
579
568
|
}
|
|
580
569
|
else {
|
|
581
|
-
throw (
|
|
570
|
+
throw ( new Error('No workspace folder'));
|
|
582
571
|
}
|
|
583
572
|
}
|
|
584
573
|
else {
|
|
@@ -590,101 +579,95 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
590
579
|
}
|
|
591
580
|
}
|
|
592
581
|
$executeTask(value) {
|
|
593
|
-
return (
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
else {
|
|
620
|
-
reject(( (new Error('No workspace folder'))));
|
|
621
|
-
}
|
|
582
|
+
return ( new Promise((resolve, reject) => {
|
|
583
|
+
if (TaskHandleDTO.is(value)) {
|
|
584
|
+
const workspace = this.getWorkspace(value.workspaceFolder);
|
|
585
|
+
if (workspace) {
|
|
586
|
+
this._taskService.getTask(workspace, value.id, true).then((task) => {
|
|
587
|
+
if (!task) {
|
|
588
|
+
reject(( new Error('Task not found')));
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
const result = {
|
|
592
|
+
id: value.id,
|
|
593
|
+
task: TaskDTO.from(task)
|
|
594
|
+
};
|
|
595
|
+
this._taskService.run(task).then(summary => {
|
|
596
|
+
if ((summary?.exitCode === undefined) || (summary.exitCode !== 0)) {
|
|
597
|
+
this._proxy.$OnDidEndTask(result);
|
|
598
|
+
}
|
|
599
|
+
}, reason => {
|
|
600
|
+
});
|
|
601
|
+
resolve(result);
|
|
602
|
+
}
|
|
603
|
+
}, (_error) => {
|
|
604
|
+
reject(( new Error('Task not found')));
|
|
605
|
+
});
|
|
622
606
|
}
|
|
623
607
|
else {
|
|
624
|
-
|
|
625
|
-
this._taskService.run(task).then(undefined, reason => {
|
|
626
|
-
});
|
|
627
|
-
const result = {
|
|
628
|
-
id: task._id,
|
|
629
|
-
task: TaskDTO.from(task)
|
|
630
|
-
};
|
|
631
|
-
resolve(result);
|
|
608
|
+
reject(( new Error('No workspace folder')));
|
|
632
609
|
}
|
|
633
|
-
}
|
|
634
|
-
|
|
610
|
+
}
|
|
611
|
+
else {
|
|
612
|
+
const task = TaskDTO.to(value, this._workspaceContextServer, true);
|
|
613
|
+
this._taskService.run(task).then(undefined, reason => {
|
|
614
|
+
});
|
|
615
|
+
const result = {
|
|
616
|
+
id: task._id,
|
|
617
|
+
task: TaskDTO.from(task)
|
|
618
|
+
};
|
|
619
|
+
resolve(result);
|
|
620
|
+
}
|
|
621
|
+
}));
|
|
635
622
|
}
|
|
636
623
|
$customExecutionComplete(id, result) {
|
|
637
|
-
return (
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
624
|
+
return ( new Promise((resolve, reject) => {
|
|
625
|
+
this._taskService.getActiveTasks().then((tasks) => {
|
|
626
|
+
for (const task of tasks) {
|
|
627
|
+
if (id === task._id) {
|
|
628
|
+
this._taskService.extensionCallbackTaskComplete(task, result).then((value) => {
|
|
629
|
+
resolve(undefined);
|
|
630
|
+
}, (error) => {
|
|
631
|
+
reject(error);
|
|
632
|
+
});
|
|
633
|
+
return;
|
|
649
634
|
}
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
})
|
|
653
|
-
);
|
|
635
|
+
}
|
|
636
|
+
reject(( new Error('Task to mark as complete not found')));
|
|
637
|
+
});
|
|
638
|
+
}));
|
|
654
639
|
}
|
|
655
640
|
$terminateTask(id) {
|
|
656
|
-
return (
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
return;
|
|
667
|
-
}
|
|
641
|
+
return ( new Promise((resolve, reject) => {
|
|
642
|
+
this._taskService.getActiveTasks().then((tasks) => {
|
|
643
|
+
for (const task of tasks) {
|
|
644
|
+
if (id === task._id) {
|
|
645
|
+
this._taskService.terminate(task).then((value) => {
|
|
646
|
+
resolve(undefined);
|
|
647
|
+
}, (error) => {
|
|
648
|
+
reject(undefined);
|
|
649
|
+
});
|
|
650
|
+
return;
|
|
668
651
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
})
|
|
672
|
-
);
|
|
652
|
+
}
|
|
653
|
+
reject(( new ErrorNoTelemetry('Task to terminate not found')));
|
|
654
|
+
});
|
|
655
|
+
}));
|
|
673
656
|
}
|
|
674
657
|
$registerTaskSystem(key, info) {
|
|
675
658
|
let platform$1;
|
|
676
659
|
switch (info.platform) {
|
|
677
660
|
case 'Web':
|
|
678
|
-
platform$1 =
|
|
661
|
+
platform$1 = Platform.Web;
|
|
679
662
|
break;
|
|
680
663
|
case 'win32':
|
|
681
|
-
platform$1 =
|
|
664
|
+
platform$1 = Platform.Windows;
|
|
682
665
|
break;
|
|
683
666
|
case 'darwin':
|
|
684
|
-
platform$1 =
|
|
667
|
+
platform$1 = Platform.Mac;
|
|
685
668
|
break;
|
|
686
669
|
case 'linux':
|
|
687
|
-
platform$1 =
|
|
670
|
+
platform$1 = Platform.Linux;
|
|
688
671
|
break;
|
|
689
672
|
default:
|
|
690
673
|
platform$1 = platform;
|
|
@@ -692,47 +675,43 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
692
675
|
this._taskService.registerTaskSystem(key, {
|
|
693
676
|
platform: platform$1,
|
|
694
677
|
uriProvider: (path) => {
|
|
695
|
-
return (
|
|
696
|
-
(URI.from({ scheme: info.scheme, authority: info.authority, path }))
|
|
697
|
-
);
|
|
678
|
+
return ( URI.from({ scheme: info.scheme, authority: info.authority, path }));
|
|
698
679
|
},
|
|
699
680
|
context: this._extHostContext,
|
|
700
681
|
resolveVariables: (workspaceFolder, toResolve, target) => {
|
|
701
682
|
const vars = [];
|
|
702
683
|
toResolve.variables.forEach(item => vars.push(item));
|
|
703
684
|
return Promise.resolve(this._proxy.$resolveVariables(workspaceFolder.uri, { process: toResolve.process, variables: vars })).then(values => {
|
|
704
|
-
const partiallyResolvedVars = Array.from((
|
|
705
|
-
return (
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
result.variables.set(variableName, resolved);
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
else {
|
|
724
|
-
result.variables.set(variableName, partiallyResolvedVars[i]);
|
|
685
|
+
const partiallyResolvedVars = Array.from(( Object.values(values.variables)));
|
|
686
|
+
return ( new Promise((resolve, reject) => {
|
|
687
|
+
this._configurationResolverService.resolveWithInteraction(workspaceFolder, partiallyResolvedVars, 'tasks', undefined, target).then(resolvedVars => {
|
|
688
|
+
if (!resolvedVars) {
|
|
689
|
+
resolve(undefined);
|
|
690
|
+
}
|
|
691
|
+
const result = {
|
|
692
|
+
process: undefined,
|
|
693
|
+
variables: ( new Map())
|
|
694
|
+
};
|
|
695
|
+
for (let i = 0; i < partiallyResolvedVars.length; i++) {
|
|
696
|
+
const variableName = vars[i].substring(2, vars[i].length - 1);
|
|
697
|
+
if (resolvedVars && values.variables[vars[i]] === vars[i]) {
|
|
698
|
+
const resolved = resolvedVars.get(variableName);
|
|
699
|
+
if (typeof resolved === 'string') {
|
|
700
|
+
result.variables.set(variableName, resolved);
|
|
725
701
|
}
|
|
726
702
|
}
|
|
727
|
-
|
|
728
|
-
result.
|
|
703
|
+
else {
|
|
704
|
+
result.variables.set(variableName, partiallyResolvedVars[i]);
|
|
729
705
|
}
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
|
|
706
|
+
}
|
|
707
|
+
if (isString(values.process)) {
|
|
708
|
+
result.process = values.process;
|
|
709
|
+
}
|
|
710
|
+
resolve(result);
|
|
711
|
+
}, reason => {
|
|
712
|
+
reject(reason);
|
|
713
|
+
});
|
|
714
|
+
}));
|
|
736
715
|
});
|
|
737
716
|
},
|
|
738
717
|
findExecutable: (command, cwd, paths) => {
|
|
@@ -746,9 +725,9 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
746
725
|
};
|
|
747
726
|
MainThreadTask = __decorate([
|
|
748
727
|
extHostNamedCustomer(MainContext.MainThreadTask),
|
|
749
|
-
(
|
|
750
|
-
(
|
|
751
|
-
(
|
|
728
|
+
( __param(1, ITaskService)),
|
|
729
|
+
( __param(2, IWorkspaceContextService)),
|
|
730
|
+
( __param(3, IConfigurationResolverService))
|
|
752
731
|
], MainThreadTask);
|
|
753
732
|
|
|
754
733
|
export { MainThreadTask };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { IEnvironmentService } from "vscode/vscode/vs/platform/environment/common/environment.service";
|
|
4
|
+
import { IProductService } from "vscode/vscode/vs/platform/product/common/productService.service";
|
|
5
|
+
import { ClassifiedEvent, IGDPRProperty, OmitMetadata, StrictPropertyCheck } from "vscode/vscode/vs/platform/telemetry/common/gdprTypings";
|
|
6
|
+
import { ITelemetryService } from "vscode/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
7
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
8
|
+
import { MainThreadTelemetryShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
9
|
+
export declare class MainThreadTelemetry extends Disposable implements MainThreadTelemetryShape {
|
|
10
|
+
private readonly _telemetryService;
|
|
11
|
+
private readonly _configurationService;
|
|
12
|
+
private readonly _environmentService;
|
|
13
|
+
private readonly _productService;
|
|
14
|
+
private readonly _proxy;
|
|
15
|
+
private static readonly _name;
|
|
16
|
+
constructor(extHostContext: IExtHostContext, _telemetryService: ITelemetryService, _configurationService: IConfigurationService, _environmentService: IEnvironmentService, _productService: IProductService);
|
|
17
|
+
private get telemetryLevel();
|
|
18
|
+
$publicLog(eventName: string, data?: any): void;
|
|
19
|
+
$publicLog2<E extends ClassifiedEvent<OmitMetadata<T>> = never, T extends IGDPRProperty = never>(eventName: string, data?: StrictPropertyCheck<T, E>): void;
|
|
20
|
+
}
|