@codingame/monaco-vscode-extensions-service-override 1.83.8 → 1.83.9
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/assets/webWorkerExtensionHostIframe.html +123 -0
- package/extensions.d.ts +12 -13
- package/extensions.js +456 -0
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/override/vs/platform/dialogs/common/dialogs.js +8 -0
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +8 -0
- package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +3 -0
- package/package.json +5 -3
- package/tools/url.js +10 -0
- package/tools.js +5 -0
- package/vscode/src/vs/base/common/console.js +59 -0
- package/vscode/src/vs/base/common/prefixTree.js +131 -0
- package/vscode/src/vs/platform/files/common/watcher.js +71 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +27 -0
- package/vscode/src/vs/platform/log/browser/log.js +26 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +98 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +31 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +330 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +174 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents.js +52 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +61 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSlashCommands.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +31 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +107 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +94 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +541 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +80 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +578 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +387 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +102 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +69 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +75 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +249 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +370 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +41 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +411 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +475 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +227 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +317 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +280 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +283 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +33 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +947 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +93 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +118 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +158 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +123 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +188 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +129 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +131 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +341 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +48 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +76 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProfilContentHandlers.js +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +185 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +30 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +463 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +148 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +70 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +50 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +72 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +731 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +412 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +182 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +55 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +313 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +223 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +110 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +61 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +283 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +100 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +135 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +273 -0
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHost.api.impl.d.ts +2 -2
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostConfiguration.d.ts +3 -3
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostExtensionService.d.ts +3 -4
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostManagedSockets.d.ts +2 -2
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTerminalService.d.ts +19 -20
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTunnelService.d.ts +7 -8
- package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostWorkspace.d.ts +25 -26
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +217 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +57 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +51 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +92 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +648 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +297 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +62 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +109 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadRangeDecorator.js +109 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +331 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +380 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.js +5 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +1196 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsFilterOptions.js +19 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +334 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +543 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +178 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +101 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +57 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +145 -0
- package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +3 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +73 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +83 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +179 -0
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveHistoryService.js +5 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +144 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +482 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +6 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +85 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +56 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +110 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +260 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +616 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +309 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +38 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +167 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +80 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +70 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +108 -0
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +506 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +132 -0
- package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +103 -0
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +28 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +25 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +336 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +46 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +283 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +273 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +52 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +1093 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +41 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +25 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +643 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +274 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +58 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +80 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +64 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +49 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +220 -0
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +5 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +79 -0
- package/vscode-proposed.d.ts +0 -3872
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHost.protocol.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostExtensionActivator.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostFileSystemInfo.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostInitDataService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostLocalizationService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostRpcService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostStoragePaths.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostTypes.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/common/extHostUriTransformerService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/api/worker/extHostExtensionService.d.ts +0 -0
- /package/{dist/main/vscode → vscode}/src/vs/workbench/services/search/common/queryBuilder.d.ts +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { bufferToStream, streamToBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
2
|
+
import { CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
3
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
4
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
|
+
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
6
|
+
import { filter } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
7
|
+
import { NotebookCellsChangeType, NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
8
|
+
import { SimpleNotebookProviderInfo } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
|
|
9
|
+
|
|
10
|
+
class NotebookFileWorkingCopyModel extends Disposable {
|
|
11
|
+
constructor(_notebookModel, _notebookService, _configurationService) {
|
|
12
|
+
super();
|
|
13
|
+
this._notebookModel = _notebookModel;
|
|
14
|
+
this._notebookService = _notebookService;
|
|
15
|
+
this._configurationService = _configurationService;
|
|
16
|
+
this._onDidChangeContent = this._register(( new Emitter()));
|
|
17
|
+
this.onDidChangeContent = this._onDidChangeContent.event;
|
|
18
|
+
this.configuration = undefined;
|
|
19
|
+
this.onWillDispose = _notebookModel.onWillDispose.bind(_notebookModel);
|
|
20
|
+
this._register(_notebookModel.onDidChangeContent(e => {
|
|
21
|
+
for (const rawEvent of e.rawEvents) {
|
|
22
|
+
if (rawEvent.kind === NotebookCellsChangeType.Initialize) {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (rawEvent.transient) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
this._onDidChangeContent.fire({
|
|
29
|
+
isRedoing: false,
|
|
30
|
+
isUndoing: false,
|
|
31
|
+
isInitial: false,
|
|
32
|
+
});
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}));
|
|
36
|
+
if (_notebookModel.uri.scheme === Schemas.vscodeRemote) {
|
|
37
|
+
this.configuration = {
|
|
38
|
+
backupDelay: 10000
|
|
39
|
+
};
|
|
40
|
+
if (this._configurationService.getValue(NotebookSetting.remoteSaving)) {
|
|
41
|
+
this.save = async (options, token) => {
|
|
42
|
+
const serializer = await this.getNotebookSerializer();
|
|
43
|
+
if (token.isCancellationRequested) {
|
|
44
|
+
throw new CancellationError();
|
|
45
|
+
}
|
|
46
|
+
const stat = await serializer.save(this._notebookModel.uri, this._notebookModel.versionId, options, token);
|
|
47
|
+
return stat;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
dispose() {
|
|
53
|
+
this._notebookModel.dispose();
|
|
54
|
+
super.dispose();
|
|
55
|
+
}
|
|
56
|
+
get notebookModel() {
|
|
57
|
+
return this._notebookModel;
|
|
58
|
+
}
|
|
59
|
+
async snapshot(token) {
|
|
60
|
+
const serializer = await this.getNotebookSerializer();
|
|
61
|
+
const data = {
|
|
62
|
+
metadata: filter(this._notebookModel.metadata, key => !serializer.options.transientDocumentMetadata[key]),
|
|
63
|
+
cells: [],
|
|
64
|
+
};
|
|
65
|
+
for (const cell of this._notebookModel.cells) {
|
|
66
|
+
const cellData = {
|
|
67
|
+
cellKind: cell.cellKind,
|
|
68
|
+
language: cell.language,
|
|
69
|
+
mime: cell.mime,
|
|
70
|
+
source: cell.getValue(),
|
|
71
|
+
outputs: [],
|
|
72
|
+
internalMetadata: cell.internalMetadata
|
|
73
|
+
};
|
|
74
|
+
cellData.outputs = !serializer.options.transientOutputs ? cell.outputs : [];
|
|
75
|
+
cellData.metadata = filter(cell.metadata, key => !serializer.options.transientCellMetadata[key]);
|
|
76
|
+
data.cells.push(cellData);
|
|
77
|
+
}
|
|
78
|
+
const bytes = await serializer.notebookToData(data);
|
|
79
|
+
if (token.isCancellationRequested) {
|
|
80
|
+
throw new CancellationError();
|
|
81
|
+
}
|
|
82
|
+
return bufferToStream(bytes);
|
|
83
|
+
}
|
|
84
|
+
async update(stream, token) {
|
|
85
|
+
const serializer = await this.getNotebookSerializer();
|
|
86
|
+
const bytes = await streamToBuffer(stream);
|
|
87
|
+
const data = await serializer.dataToNotebook(bytes);
|
|
88
|
+
if (token.isCancellationRequested) {
|
|
89
|
+
throw new CancellationError();
|
|
90
|
+
}
|
|
91
|
+
this._notebookModel.reset(data.cells, data.metadata, serializer.options);
|
|
92
|
+
}
|
|
93
|
+
async getNotebookSerializer() {
|
|
94
|
+
const info = await this._notebookService.withNotebookDataProvider(this.notebookModel.viewType);
|
|
95
|
+
if (!(info instanceof SimpleNotebookProviderInfo)) {
|
|
96
|
+
throw new Error('CANNOT open file notebook with this provider');
|
|
97
|
+
}
|
|
98
|
+
return info.serializer;
|
|
99
|
+
}
|
|
100
|
+
get versionId() {
|
|
101
|
+
return this._notebookModel.alternativeVersionId;
|
|
102
|
+
}
|
|
103
|
+
pushStackElement() {
|
|
104
|
+
this._notebookModel.pushStackElement('save', undefined, undefined);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { NotebookFileWorkingCopyModel };
|
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
2
|
+
import * as types from 'monaco-editor/esm/vs/base/common/types.js';
|
|
3
|
+
import * as resources from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
4
|
+
import * as objects from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
5
|
+
import { TaskDefinitionRegistry } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskDefinitionRegistry';
|
|
6
|
+
|
|
7
|
+
const USER_TASKS_GROUP_KEY = 'settings';
|
|
8
|
+
const CUSTOMIZED_TASK_TYPE = '$customized';
|
|
9
|
+
var CommandOptions;
|
|
10
|
+
( (function(CommandOptions) {
|
|
11
|
+
CommandOptions.defaults = { cwd: '${workspaceFolder}' };
|
|
12
|
+
})(CommandOptions || (CommandOptions = {})));
|
|
13
|
+
var RevealKind;
|
|
14
|
+
( (function(RevealKind) {
|
|
15
|
+
RevealKind[RevealKind["Always"] = 1] = "Always";
|
|
16
|
+
RevealKind[RevealKind["Silent"] = 2] = "Silent";
|
|
17
|
+
RevealKind[RevealKind["Never"] = 3] = "Never";
|
|
18
|
+
})(RevealKind || (RevealKind = {})));
|
|
19
|
+
( (function(RevealKind) {
|
|
20
|
+
function fromString(value) {
|
|
21
|
+
switch (value.toLowerCase()) {
|
|
22
|
+
case 'always':
|
|
23
|
+
return RevealKind.Always;
|
|
24
|
+
case 'silent':
|
|
25
|
+
return RevealKind.Silent;
|
|
26
|
+
case 'never':
|
|
27
|
+
return RevealKind.Never;
|
|
28
|
+
default:
|
|
29
|
+
return RevealKind.Always;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
RevealKind.fromString = fromString;
|
|
33
|
+
})(RevealKind || (RevealKind = {})));
|
|
34
|
+
var RevealProblemKind;
|
|
35
|
+
( (function(RevealProblemKind) {
|
|
36
|
+
RevealProblemKind[RevealProblemKind["Never"] = 1] = "Never";
|
|
37
|
+
RevealProblemKind[RevealProblemKind["OnProblem"] = 2] = "OnProblem";
|
|
38
|
+
RevealProblemKind[RevealProblemKind["Always"] = 3] = "Always";
|
|
39
|
+
})(RevealProblemKind || (RevealProblemKind = {})));
|
|
40
|
+
( (function(RevealProblemKind) {
|
|
41
|
+
function fromString(value) {
|
|
42
|
+
switch (value.toLowerCase()) {
|
|
43
|
+
case 'always':
|
|
44
|
+
return RevealProblemKind.Always;
|
|
45
|
+
case 'never':
|
|
46
|
+
return RevealProblemKind.Never;
|
|
47
|
+
case 'onproblem':
|
|
48
|
+
return RevealProblemKind.OnProblem;
|
|
49
|
+
default:
|
|
50
|
+
return RevealProblemKind.OnProblem;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
RevealProblemKind.fromString = fromString;
|
|
54
|
+
})(RevealProblemKind || (RevealProblemKind = {})));
|
|
55
|
+
var PanelKind;
|
|
56
|
+
( (function(PanelKind) {
|
|
57
|
+
PanelKind[PanelKind["Shared"] = 1] = "Shared";
|
|
58
|
+
PanelKind[PanelKind["Dedicated"] = 2] = "Dedicated";
|
|
59
|
+
PanelKind[PanelKind["New"] = 3] = "New";
|
|
60
|
+
})(PanelKind || (PanelKind = {})));
|
|
61
|
+
( (function(PanelKind) {
|
|
62
|
+
function fromString(value) {
|
|
63
|
+
switch (value.toLowerCase()) {
|
|
64
|
+
case 'shared':
|
|
65
|
+
return PanelKind.Shared;
|
|
66
|
+
case 'dedicated':
|
|
67
|
+
return PanelKind.Dedicated;
|
|
68
|
+
case 'new':
|
|
69
|
+
return PanelKind.New;
|
|
70
|
+
default:
|
|
71
|
+
return PanelKind.Shared;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
PanelKind.fromString = fromString;
|
|
75
|
+
})(PanelKind || (PanelKind = {})));
|
|
76
|
+
var PresentationOptions;
|
|
77
|
+
( (function(PresentationOptions) {
|
|
78
|
+
PresentationOptions.defaults = {
|
|
79
|
+
echo: true, reveal: RevealKind.Always, revealProblems: RevealProblemKind.Never, focus: false, panel: PanelKind.Shared, showReuseMessage: true, clear: false
|
|
80
|
+
};
|
|
81
|
+
})(PresentationOptions || (PresentationOptions = {})));
|
|
82
|
+
var RuntimeType;
|
|
83
|
+
( (function(RuntimeType) {
|
|
84
|
+
RuntimeType[RuntimeType["Shell"] = 1] = "Shell";
|
|
85
|
+
RuntimeType[RuntimeType["Process"] = 2] = "Process";
|
|
86
|
+
RuntimeType[RuntimeType["CustomExecution"] = 3] = "CustomExecution";
|
|
87
|
+
})(RuntimeType || (RuntimeType = {})));
|
|
88
|
+
( (function(RuntimeType) {
|
|
89
|
+
function fromString(value) {
|
|
90
|
+
switch (value.toLowerCase()) {
|
|
91
|
+
case 'shell':
|
|
92
|
+
return RuntimeType.Shell;
|
|
93
|
+
case 'process':
|
|
94
|
+
return RuntimeType.Process;
|
|
95
|
+
case 'customExecution':
|
|
96
|
+
return RuntimeType.CustomExecution;
|
|
97
|
+
default:
|
|
98
|
+
return RuntimeType.Process;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
RuntimeType.fromString = fromString;
|
|
102
|
+
function toString(value) {
|
|
103
|
+
switch (value) {
|
|
104
|
+
case RuntimeType.Shell: return 'shell';
|
|
105
|
+
case RuntimeType.Process: return 'process';
|
|
106
|
+
case RuntimeType.CustomExecution: return 'customExecution';
|
|
107
|
+
default: return 'process';
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
RuntimeType.toString = toString;
|
|
111
|
+
})(RuntimeType || (RuntimeType = {})));
|
|
112
|
+
var TaskSourceKind;
|
|
113
|
+
( (function(TaskSourceKind) {
|
|
114
|
+
TaskSourceKind.Workspace = 'workspace';
|
|
115
|
+
TaskSourceKind.Extension = 'extension';
|
|
116
|
+
TaskSourceKind.InMemory = 'inMemory';
|
|
117
|
+
TaskSourceKind.WorkspaceFile = 'workspaceFile';
|
|
118
|
+
TaskSourceKind.User = 'user';
|
|
119
|
+
function toConfigurationTarget(kind) {
|
|
120
|
+
switch (kind) {
|
|
121
|
+
case TaskSourceKind.User: return 2 ;
|
|
122
|
+
case TaskSourceKind.WorkspaceFile: return 5 ;
|
|
123
|
+
default: return 6 ;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
TaskSourceKind.toConfigurationTarget = toConfigurationTarget;
|
|
127
|
+
})(TaskSourceKind || (TaskSourceKind = {})));
|
|
128
|
+
var RunOnOptions;
|
|
129
|
+
( (function(RunOnOptions) {
|
|
130
|
+
RunOnOptions[RunOnOptions["default"] = 1] = "default";
|
|
131
|
+
RunOnOptions[RunOnOptions["folderOpen"] = 2] = "folderOpen";
|
|
132
|
+
})(RunOnOptions || (RunOnOptions = {})));
|
|
133
|
+
var RunOptions;
|
|
134
|
+
( (function(RunOptions) {
|
|
135
|
+
RunOptions.defaults = { reevaluateOnRerun: true, runOn: RunOnOptions.default, instanceLimit: 1 };
|
|
136
|
+
})(RunOptions || (RunOptions = {})));
|
|
137
|
+
class CommonTask {
|
|
138
|
+
constructor(id, label, type, runOptions, configurationProperties, source) {
|
|
139
|
+
this._label = '';
|
|
140
|
+
this._id = id;
|
|
141
|
+
if (label) {
|
|
142
|
+
this._label = label;
|
|
143
|
+
}
|
|
144
|
+
if (type) {
|
|
145
|
+
this.type = type;
|
|
146
|
+
}
|
|
147
|
+
this.runOptions = runOptions;
|
|
148
|
+
this.configurationProperties = configurationProperties;
|
|
149
|
+
this._source = source;
|
|
150
|
+
}
|
|
151
|
+
getDefinition(useSource) {
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
getMapKey() {
|
|
155
|
+
return this._id;
|
|
156
|
+
}
|
|
157
|
+
getRecentlyUsedKey() {
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
getCommonTaskId() {
|
|
161
|
+
const key = { folder: this.getFolderId(), id: this._id };
|
|
162
|
+
return JSON.stringify(key);
|
|
163
|
+
}
|
|
164
|
+
clone() {
|
|
165
|
+
return this.fromObject(Object.assign({}, this));
|
|
166
|
+
}
|
|
167
|
+
getWorkspaceFolder() {
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
170
|
+
getWorkspaceFileName() {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
getTelemetryKind() {
|
|
174
|
+
return 'unknown';
|
|
175
|
+
}
|
|
176
|
+
matches(key, compareId = false) {
|
|
177
|
+
if (key === undefined) {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
if (types.isString(key)) {
|
|
181
|
+
return key === this._label || key === this.configurationProperties.identifier || (compareId && key === this._id);
|
|
182
|
+
}
|
|
183
|
+
const identifier = this.getDefinition(true);
|
|
184
|
+
return identifier !== undefined && identifier._key === key._key;
|
|
185
|
+
}
|
|
186
|
+
getQualifiedLabel() {
|
|
187
|
+
const workspaceFolder = this.getWorkspaceFolder();
|
|
188
|
+
if (workspaceFolder) {
|
|
189
|
+
return `${this._label} (${workspaceFolder.name})`;
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
return this._label;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
getTaskExecution() {
|
|
196
|
+
const result = {
|
|
197
|
+
id: this._id,
|
|
198
|
+
task: this
|
|
199
|
+
};
|
|
200
|
+
return result;
|
|
201
|
+
}
|
|
202
|
+
addTaskLoadMessages(messages) {
|
|
203
|
+
if (this._taskLoadMessages === undefined) {
|
|
204
|
+
this._taskLoadMessages = [];
|
|
205
|
+
}
|
|
206
|
+
if (messages) {
|
|
207
|
+
this._taskLoadMessages = this._taskLoadMessages.concat(messages);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
get taskLoadMessages() {
|
|
211
|
+
return this._taskLoadMessages;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
class CustomTask extends CommonTask {
|
|
215
|
+
constructor(id, source, label, type, command, hasDefinedMatchers, runOptions, configurationProperties) {
|
|
216
|
+
super(id, label, undefined, runOptions, configurationProperties, source);
|
|
217
|
+
this.command = {};
|
|
218
|
+
this._source = source;
|
|
219
|
+
this.hasDefinedMatchers = hasDefinedMatchers;
|
|
220
|
+
if (command) {
|
|
221
|
+
this.command = command;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
clone() {
|
|
225
|
+
return ( new CustomTask(
|
|
226
|
+
this._id,
|
|
227
|
+
this._source,
|
|
228
|
+
this._label,
|
|
229
|
+
this.type,
|
|
230
|
+
this.command,
|
|
231
|
+
this.hasDefinedMatchers,
|
|
232
|
+
this.runOptions,
|
|
233
|
+
this.configurationProperties
|
|
234
|
+
));
|
|
235
|
+
}
|
|
236
|
+
customizes() {
|
|
237
|
+
if (this._source && this._source.customizes) {
|
|
238
|
+
return this._source.customizes;
|
|
239
|
+
}
|
|
240
|
+
return undefined;
|
|
241
|
+
}
|
|
242
|
+
getDefinition(useSource = false) {
|
|
243
|
+
if (useSource && this._source.customizes !== undefined) {
|
|
244
|
+
return this._source.customizes;
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
let type;
|
|
248
|
+
const commandRuntime = this.command ? this.command.runtime : undefined;
|
|
249
|
+
switch (commandRuntime) {
|
|
250
|
+
case RuntimeType.Shell:
|
|
251
|
+
type = 'shell';
|
|
252
|
+
break;
|
|
253
|
+
case RuntimeType.Process:
|
|
254
|
+
type = 'process';
|
|
255
|
+
break;
|
|
256
|
+
case RuntimeType.CustomExecution:
|
|
257
|
+
type = 'customExecution';
|
|
258
|
+
break;
|
|
259
|
+
case undefined:
|
|
260
|
+
type = '$composite';
|
|
261
|
+
break;
|
|
262
|
+
default:
|
|
263
|
+
throw new Error('Unexpected task runtime');
|
|
264
|
+
}
|
|
265
|
+
const result = {
|
|
266
|
+
type,
|
|
267
|
+
_key: this._id,
|
|
268
|
+
id: this._id
|
|
269
|
+
};
|
|
270
|
+
return result;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
static is(value) {
|
|
274
|
+
return value instanceof CustomTask;
|
|
275
|
+
}
|
|
276
|
+
getMapKey() {
|
|
277
|
+
const workspaceFolder = this._source.config.workspaceFolder;
|
|
278
|
+
return workspaceFolder ? `${( workspaceFolder.uri.toString())}|${this._id}|${this.instance}` : `${this._id}|${this.instance}`;
|
|
279
|
+
}
|
|
280
|
+
getFolderId() {
|
|
281
|
+
return this._source.kind === TaskSourceKind.User ? USER_TASKS_GROUP_KEY : this._source.config.workspaceFolder?.uri.toString();
|
|
282
|
+
}
|
|
283
|
+
getCommonTaskId() {
|
|
284
|
+
return this._source.customizes ? super.getCommonTaskId() : (this.getRecentlyUsedKey() ?? super.getCommonTaskId());
|
|
285
|
+
}
|
|
286
|
+
getRecentlyUsedKey() {
|
|
287
|
+
const workspaceFolder = this.getFolderId();
|
|
288
|
+
if (!workspaceFolder) {
|
|
289
|
+
return undefined;
|
|
290
|
+
}
|
|
291
|
+
let id = this.configurationProperties.identifier;
|
|
292
|
+
if (this._source.kind !== TaskSourceKind.Workspace) {
|
|
293
|
+
id += this._source.kind;
|
|
294
|
+
}
|
|
295
|
+
const key = { type: CUSTOMIZED_TASK_TYPE, folder: workspaceFolder, id };
|
|
296
|
+
return JSON.stringify(key);
|
|
297
|
+
}
|
|
298
|
+
getWorkspaceFolder() {
|
|
299
|
+
return this._source.config.workspaceFolder;
|
|
300
|
+
}
|
|
301
|
+
getWorkspaceFileName() {
|
|
302
|
+
return (this._source.config.workspace && this._source.config.workspace.configuration) ? resources.basename(this._source.config.workspace.configuration) : undefined;
|
|
303
|
+
}
|
|
304
|
+
getTelemetryKind() {
|
|
305
|
+
if (this._source.customizes) {
|
|
306
|
+
return 'workspace>extension';
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
return 'workspace';
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
fromObject(object) {
|
|
313
|
+
return ( new CustomTask(
|
|
314
|
+
object._id,
|
|
315
|
+
object._source,
|
|
316
|
+
object._label,
|
|
317
|
+
object.type,
|
|
318
|
+
object.command,
|
|
319
|
+
object.hasDefinedMatchers,
|
|
320
|
+
object.runOptions,
|
|
321
|
+
object.configurationProperties
|
|
322
|
+
));
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
class ConfiguringTask extends CommonTask {
|
|
326
|
+
constructor(id, source, label, type, configures, runOptions, configurationProperties) {
|
|
327
|
+
super(id, label, type, runOptions, configurationProperties, source);
|
|
328
|
+
this._source = source;
|
|
329
|
+
this.configures = configures;
|
|
330
|
+
}
|
|
331
|
+
static is(value) {
|
|
332
|
+
return value instanceof ConfiguringTask;
|
|
333
|
+
}
|
|
334
|
+
fromObject(object) {
|
|
335
|
+
return object;
|
|
336
|
+
}
|
|
337
|
+
getDefinition() {
|
|
338
|
+
return this.configures;
|
|
339
|
+
}
|
|
340
|
+
getWorkspaceFileName() {
|
|
341
|
+
return (this._source.config.workspace && this._source.config.workspace.configuration) ? resources.basename(this._source.config.workspace.configuration) : undefined;
|
|
342
|
+
}
|
|
343
|
+
getWorkspaceFolder() {
|
|
344
|
+
return this._source.config.workspaceFolder;
|
|
345
|
+
}
|
|
346
|
+
getFolderId() {
|
|
347
|
+
return this._source.kind === TaskSourceKind.User ? USER_TASKS_GROUP_KEY : this._source.config.workspaceFolder?.uri.toString();
|
|
348
|
+
}
|
|
349
|
+
getRecentlyUsedKey() {
|
|
350
|
+
const workspaceFolder = this.getFolderId();
|
|
351
|
+
if (!workspaceFolder) {
|
|
352
|
+
return undefined;
|
|
353
|
+
}
|
|
354
|
+
let id = this.configurationProperties.identifier;
|
|
355
|
+
if (this._source.kind !== TaskSourceKind.Workspace) {
|
|
356
|
+
id += this._source.kind;
|
|
357
|
+
}
|
|
358
|
+
const key = { type: CUSTOMIZED_TASK_TYPE, folder: workspaceFolder, id };
|
|
359
|
+
return JSON.stringify(key);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
class ContributedTask extends CommonTask {
|
|
363
|
+
constructor(id, source, label, type, defines, command, hasDefinedMatchers, runOptions, configurationProperties) {
|
|
364
|
+
super(id, label, type, runOptions, configurationProperties, source);
|
|
365
|
+
this.defines = defines;
|
|
366
|
+
this.hasDefinedMatchers = hasDefinedMatchers;
|
|
367
|
+
this.command = command;
|
|
368
|
+
this.icon = configurationProperties.icon;
|
|
369
|
+
this.hide = configurationProperties.hide;
|
|
370
|
+
}
|
|
371
|
+
clone() {
|
|
372
|
+
return ( new ContributedTask(
|
|
373
|
+
this._id,
|
|
374
|
+
this._source,
|
|
375
|
+
this._label,
|
|
376
|
+
this.type,
|
|
377
|
+
this.defines,
|
|
378
|
+
this.command,
|
|
379
|
+
this.hasDefinedMatchers,
|
|
380
|
+
this.runOptions,
|
|
381
|
+
this.configurationProperties
|
|
382
|
+
));
|
|
383
|
+
}
|
|
384
|
+
getDefinition() {
|
|
385
|
+
return this.defines;
|
|
386
|
+
}
|
|
387
|
+
static is(value) {
|
|
388
|
+
return value instanceof ContributedTask;
|
|
389
|
+
}
|
|
390
|
+
getMapKey() {
|
|
391
|
+
const workspaceFolder = this._source.workspaceFolder;
|
|
392
|
+
return workspaceFolder
|
|
393
|
+
? `${( this._source.scope.toString())}|${( workspaceFolder.uri.toString())}|${this._id}|${this.instance}`
|
|
394
|
+
: `${( this._source.scope.toString())}|${this._id}|${this.instance}`;
|
|
395
|
+
}
|
|
396
|
+
getFolderId() {
|
|
397
|
+
if (this._source.scope === 3 && this._source.workspaceFolder) {
|
|
398
|
+
return ( this._source.workspaceFolder.uri.toString());
|
|
399
|
+
}
|
|
400
|
+
return undefined;
|
|
401
|
+
}
|
|
402
|
+
getRecentlyUsedKey() {
|
|
403
|
+
const key = { type: 'contributed', scope: this._source.scope, id: this._id };
|
|
404
|
+
key.folder = this.getFolderId();
|
|
405
|
+
return JSON.stringify(key);
|
|
406
|
+
}
|
|
407
|
+
getWorkspaceFolder() {
|
|
408
|
+
return this._source.workspaceFolder;
|
|
409
|
+
}
|
|
410
|
+
getTelemetryKind() {
|
|
411
|
+
return 'extension';
|
|
412
|
+
}
|
|
413
|
+
fromObject(object) {
|
|
414
|
+
return ( new ContributedTask(
|
|
415
|
+
object._id,
|
|
416
|
+
object._source,
|
|
417
|
+
object._label,
|
|
418
|
+
object.type,
|
|
419
|
+
object.defines,
|
|
420
|
+
object.command,
|
|
421
|
+
object.hasDefinedMatchers,
|
|
422
|
+
object.runOptions,
|
|
423
|
+
object.configurationProperties
|
|
424
|
+
));
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
var KeyedTaskIdentifier;
|
|
428
|
+
( (function(KeyedTaskIdentifier) {
|
|
429
|
+
function sortedStringify(literal) {
|
|
430
|
+
const keys = ( Object.keys(literal)).sort();
|
|
431
|
+
let result = '';
|
|
432
|
+
for (const key of keys) {
|
|
433
|
+
let stringified = literal[key];
|
|
434
|
+
if (stringified instanceof Object) {
|
|
435
|
+
stringified = sortedStringify(stringified);
|
|
436
|
+
}
|
|
437
|
+
else if (typeof stringified === 'string') {
|
|
438
|
+
stringified = stringified.replace(/,/g, ',,');
|
|
439
|
+
}
|
|
440
|
+
result += key + ',' + stringified + ',';
|
|
441
|
+
}
|
|
442
|
+
return result;
|
|
443
|
+
}
|
|
444
|
+
function create(value) {
|
|
445
|
+
const resultKey = sortedStringify(value);
|
|
446
|
+
const result = { _key: resultKey, type: value.taskType };
|
|
447
|
+
Object.assign(result, value);
|
|
448
|
+
return result;
|
|
449
|
+
}
|
|
450
|
+
KeyedTaskIdentifier.create = create;
|
|
451
|
+
})(KeyedTaskIdentifier || (KeyedTaskIdentifier = {})));
|
|
452
|
+
var TaskDefinition;
|
|
453
|
+
( (function(TaskDefinition) {
|
|
454
|
+
function createTaskIdentifier(external, reporter) {
|
|
455
|
+
const definition = TaskDefinitionRegistry.get(external.type);
|
|
456
|
+
if (definition === undefined) {
|
|
457
|
+
const copy = objects.deepClone(external);
|
|
458
|
+
delete copy._key;
|
|
459
|
+
return KeyedTaskIdentifier.create(copy);
|
|
460
|
+
}
|
|
461
|
+
const literal = Object.create(null);
|
|
462
|
+
literal.type = definition.taskType;
|
|
463
|
+
const required = ( new Set());
|
|
464
|
+
definition.required.forEach(element => required.add(element));
|
|
465
|
+
const properties = definition.properties;
|
|
466
|
+
for (const property of ( Object.keys(properties))) {
|
|
467
|
+
const value = external[property];
|
|
468
|
+
if (value !== undefined && value !== null) {
|
|
469
|
+
literal[property] = value;
|
|
470
|
+
}
|
|
471
|
+
else if (( required.has(property))) {
|
|
472
|
+
const schema = properties[property];
|
|
473
|
+
if (schema.default !== undefined) {
|
|
474
|
+
literal[property] = objects.deepClone(schema.default);
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
switch (schema.type) {
|
|
478
|
+
case 'boolean':
|
|
479
|
+
literal[property] = false;
|
|
480
|
+
break;
|
|
481
|
+
case 'number':
|
|
482
|
+
case 'integer':
|
|
483
|
+
literal[property] = 0;
|
|
484
|
+
break;
|
|
485
|
+
case 'string':
|
|
486
|
+
literal[property] = '';
|
|
487
|
+
break;
|
|
488
|
+
default:
|
|
489
|
+
reporter.error(( nls.localizeWithPath(
|
|
490
|
+
'vs/workbench/contrib/tasks/common/tasks',
|
|
491
|
+
'TaskDefinition.missingRequiredProperty',
|
|
492
|
+
'Error: the task identifier \'{0}\' is missing the required property \'{1}\'. The task identifier will be ignored.',
|
|
493
|
+
JSON.stringify(external, undefined, 0),
|
|
494
|
+
property
|
|
495
|
+
)));
|
|
496
|
+
return undefined;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
return KeyedTaskIdentifier.create(literal);
|
|
502
|
+
}
|
|
503
|
+
TaskDefinition.createTaskIdentifier = createTaskIdentifier;
|
|
504
|
+
})(TaskDefinition || (TaskDefinition = {})));
|
|
505
|
+
|
|
506
|
+
export { CUSTOMIZED_TASK_TYPE, CommandOptions, CommonTask, ConfiguringTask, ContributedTask, CustomTask, KeyedTaskIdentifier, PanelKind, PresentationOptions, RevealKind, RevealProblemKind, RunOnOptions, RunOptions, RuntimeType, TaskDefinition, TaskSourceKind, USER_TASKS_GROUP_KEY };
|