@codingame/monaco-vscode-extensions-service-override 3.2.3 → 4.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/extensions.js +6 -87
- package/override/vs/platform/dialogs/common/dialogs.js +2 -0
- package/package.json +9 -9
- package/_virtual/semver.js +0 -3
- package/external/vscode-semver/semver.js +0 -985
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -8
- package/vscode/src/vs/base/common/console.js +0 -59
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +0 -497
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +0 -44
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +0 -27
- package/vscode/src/vs/platform/remote/common/managedSocket.js +0 -98
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +0 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +0 -227
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +0 -103
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -83
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +0 -203
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +0 -201
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +0 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +0 -107
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +0 -98
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +0 -545
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +0 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +0 -578
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +0 -424
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +0 -102
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +0 -69
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +0 -79
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +0 -253
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +0 -370
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +0 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +0 -414
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +0 -482
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +0 -227
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +0 -317
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +0 -208
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +0 -374
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +0 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +0 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +0 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +0 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +0 -991
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +0 -78
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +0 -78
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +0 -93
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +0 -137
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +0 -194
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +0 -123
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +0 -188
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +0 -129
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +0 -131
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +0 -374
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +0 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +0 -48
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +0 -76
- package/vscode/src/vs/workbench/api/browser/mainThreadProfilContentHandlers.js +0 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +0 -42
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +0 -185
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +0 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +0 -493
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +0 -49
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +0 -146
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +0 -70
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +0 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +0 -99
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +0 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +0 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +0 -731
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +0 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +0 -408
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +0 -195
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +0 -55
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +0 -312
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +0 -223
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +0 -110
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +0 -61
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +0 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +0 -283
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +0 -100
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +0 -135
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +0 -57
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +0 -268
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +0 -35
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +0 -73
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +0 -83
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +0 -284
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +0 -276
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +0 -52
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +0 -1138
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +0 -41
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +0 -25
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +0 -512
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +0 -274
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +0 -58
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +0 -80
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +0 -64
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +0 -161
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +0 -49
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +0 -222
package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js
DELETED
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
3
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
4
|
-
import { ExtensionIdentifierMap } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
5
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
6
|
-
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
7
|
-
import { determineExtensionHostKinds } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionHostKind';
|
|
8
|
-
import { IExtensionManifestPropertiesService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService';
|
|
9
|
-
import { RemoteRunningLocation, LocalProcessRunningLocation, LocalWebWorkerRunningLocation } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionRunningLocation';
|
|
10
|
-
|
|
11
|
-
let ExtensionRunningLocationTracker = class ExtensionRunningLocationTracker {
|
|
12
|
-
get maxLocalProcessAffinity() {
|
|
13
|
-
return this._maxLocalProcessAffinity;
|
|
14
|
-
}
|
|
15
|
-
get maxLocalWebWorkerAffinity() {
|
|
16
|
-
return this._maxLocalWebWorkerAffinity;
|
|
17
|
-
}
|
|
18
|
-
constructor(_registry, _extensionHostKindPicker, _environmentService, _configurationService, _logService, _extensionManifestPropertiesService) {
|
|
19
|
-
this._registry = _registry;
|
|
20
|
-
this._extensionHostKindPicker = _extensionHostKindPicker;
|
|
21
|
-
this._environmentService = _environmentService;
|
|
22
|
-
this._configurationService = _configurationService;
|
|
23
|
-
this._logService = _logService;
|
|
24
|
-
this._extensionManifestPropertiesService = _extensionManifestPropertiesService;
|
|
25
|
-
this._runningLocation = ( new ExtensionIdentifierMap());
|
|
26
|
-
this._maxLocalProcessAffinity = 0;
|
|
27
|
-
this._maxLocalWebWorkerAffinity = 0;
|
|
28
|
-
}
|
|
29
|
-
set(extensionId, runningLocation) {
|
|
30
|
-
this._runningLocation.set(extensionId, runningLocation);
|
|
31
|
-
}
|
|
32
|
-
readExtensionKinds(extensionDescription) {
|
|
33
|
-
if (extensionDescription.isUnderDevelopment && this._environmentService.extensionDevelopmentKind) {
|
|
34
|
-
return this._environmentService.extensionDevelopmentKind;
|
|
35
|
-
}
|
|
36
|
-
return this._extensionManifestPropertiesService.getExtensionKind(extensionDescription);
|
|
37
|
-
}
|
|
38
|
-
getRunningLocation(extensionId) {
|
|
39
|
-
return this._runningLocation.get(extensionId) || null;
|
|
40
|
-
}
|
|
41
|
-
filterByRunningLocation(extensions, desiredRunningLocation) {
|
|
42
|
-
return filterExtensionDescriptions(extensions, this._runningLocation, extRunningLocation => desiredRunningLocation.equals(extRunningLocation));
|
|
43
|
-
}
|
|
44
|
-
filterByExtensionHostKind(extensions, desiredExtensionHostKind) {
|
|
45
|
-
return filterExtensionDescriptions(extensions, this._runningLocation, extRunningLocation => extRunningLocation.kind === desiredExtensionHostKind);
|
|
46
|
-
}
|
|
47
|
-
filterByExtensionHostManager(extensions, extensionHostManager) {
|
|
48
|
-
return filterExtensionDescriptions(extensions, this._runningLocation, extRunningLocation => extensionHostManager.representsRunningLocation(extRunningLocation));
|
|
49
|
-
}
|
|
50
|
-
_computeAffinity(inputExtensions, extensionHostKind, isInitialAllocation) {
|
|
51
|
-
const extensions = ( new ExtensionIdentifierMap());
|
|
52
|
-
for (const extension of inputExtensions) {
|
|
53
|
-
if (extension.main || extension.browser) {
|
|
54
|
-
extensions.set(extension.identifier, extension);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
for (const extension of this._registry.getAllExtensionDescriptions()) {
|
|
58
|
-
if (extension.main || extension.browser) {
|
|
59
|
-
const runningLocation = this._runningLocation.get(extension.identifier);
|
|
60
|
-
if (runningLocation && runningLocation.kind === extensionHostKind) {
|
|
61
|
-
extensions.set(extension.identifier, extension);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const groups = ( new ExtensionIdentifierMap());
|
|
66
|
-
let groupNumber = 0;
|
|
67
|
-
for (const [_, extension] of extensions) {
|
|
68
|
-
groups.set(extension.identifier, ++groupNumber);
|
|
69
|
-
}
|
|
70
|
-
const changeGroup = (from, to) => {
|
|
71
|
-
for (const [key, group] of groups) {
|
|
72
|
-
if (group === from) {
|
|
73
|
-
groups.set(key, to);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
for (const [_, extension] of extensions) {
|
|
78
|
-
if (!extension.extensionDependencies) {
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
const myGroup = groups.get(extension.identifier);
|
|
82
|
-
for (const depId of extension.extensionDependencies) {
|
|
83
|
-
const depGroup = groups.get(depId);
|
|
84
|
-
if (!depGroup) {
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
if (depGroup === myGroup) {
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
changeGroup(depGroup, myGroup);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
const resultingAffinities = ( new Map());
|
|
94
|
-
let lastAffinity = 0;
|
|
95
|
-
for (const [_, extension] of extensions) {
|
|
96
|
-
const runningLocation = this._runningLocation.get(extension.identifier);
|
|
97
|
-
if (runningLocation) {
|
|
98
|
-
const group = groups.get(extension.identifier);
|
|
99
|
-
resultingAffinities.set(group, runningLocation.affinity);
|
|
100
|
-
lastAffinity = Math.max(lastAffinity, runningLocation.affinity);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
if (!this._environmentService.isExtensionDevelopment) {
|
|
104
|
-
const configuredAffinities = this._configurationService.getValue('extensions.experimental.affinity') || {};
|
|
105
|
-
const configuredExtensionIds = ( Object.keys(configuredAffinities));
|
|
106
|
-
const configuredAffinityToResultingAffinity = ( new Map());
|
|
107
|
-
for (const extensionId of configuredExtensionIds) {
|
|
108
|
-
const configuredAffinity = configuredAffinities[extensionId];
|
|
109
|
-
if (typeof configuredAffinity !== 'number' || configuredAffinity <= 0 || Math.floor(configuredAffinity) !== configuredAffinity) {
|
|
110
|
-
this._logService.info(`Ignoring configured affinity for '${extensionId}' because the value is not a positive integer.`);
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
const group = groups.get(extensionId);
|
|
114
|
-
if (!group) {
|
|
115
|
-
continue;
|
|
116
|
-
}
|
|
117
|
-
const affinity1 = resultingAffinities.get(group);
|
|
118
|
-
if (affinity1) {
|
|
119
|
-
configuredAffinityToResultingAffinity.set(configuredAffinity, affinity1);
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
const affinity2 = configuredAffinityToResultingAffinity.get(configuredAffinity);
|
|
123
|
-
if (affinity2) {
|
|
124
|
-
resultingAffinities.set(group, affinity2);
|
|
125
|
-
continue;
|
|
126
|
-
}
|
|
127
|
-
if (!isInitialAllocation) {
|
|
128
|
-
this._logService.info(`Ignoring configured affinity for '${extensionId}' because extension host(s) are already running. Reload window.`);
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
const affinity3 = ++lastAffinity;
|
|
132
|
-
configuredAffinityToResultingAffinity.set(configuredAffinity, affinity3);
|
|
133
|
-
resultingAffinities.set(group, affinity3);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
const result = ( new ExtensionIdentifierMap());
|
|
137
|
-
for (const extension of inputExtensions) {
|
|
138
|
-
const group = groups.get(extension.identifier) || 0;
|
|
139
|
-
const affinity = resultingAffinities.get(group) || 0;
|
|
140
|
-
result.set(extension.identifier, affinity);
|
|
141
|
-
}
|
|
142
|
-
if (lastAffinity > 0 && isInitialAllocation) {
|
|
143
|
-
for (let affinity = 1; affinity <= lastAffinity; affinity++) {
|
|
144
|
-
const extensionIds = [];
|
|
145
|
-
for (const extension of inputExtensions) {
|
|
146
|
-
if (result.get(extension.identifier) === affinity) {
|
|
147
|
-
extensionIds.push(extension.identifier);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
this._logService.info(`Placing extension(s) ${( extensionIds.map(e => e.value)).join(', ')} on a separate extension host.`);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
return { affinities: result, maxAffinity: lastAffinity };
|
|
154
|
-
}
|
|
155
|
-
computeRunningLocation(localExtensions, remoteExtensions, isInitialAllocation) {
|
|
156
|
-
return this._doComputeRunningLocation(this._runningLocation, localExtensions, remoteExtensions, isInitialAllocation).runningLocation;
|
|
157
|
-
}
|
|
158
|
-
_doComputeRunningLocation(existingRunningLocation, localExtensions, remoteExtensions, isInitialAllocation) {
|
|
159
|
-
localExtensions = localExtensions.filter(extension => !( existingRunningLocation.has(extension.identifier)));
|
|
160
|
-
remoteExtensions = remoteExtensions.filter(extension => !( existingRunningLocation.has(extension.identifier)));
|
|
161
|
-
const extensionHostKinds = determineExtensionHostKinds(localExtensions, remoteExtensions, (extension) => this.readExtensionKinds(extension), (extensionId, extensionKinds, isInstalledLocally, isInstalledRemotely, preference) => this._extensionHostKindPicker.pickExtensionHostKind(extensionId, extensionKinds, isInstalledLocally, isInstalledRemotely, preference));
|
|
162
|
-
const extensions = ( new ExtensionIdentifierMap());
|
|
163
|
-
for (const extension of localExtensions) {
|
|
164
|
-
extensions.set(extension.identifier, extension);
|
|
165
|
-
}
|
|
166
|
-
for (const extension of remoteExtensions) {
|
|
167
|
-
extensions.set(extension.identifier, extension);
|
|
168
|
-
}
|
|
169
|
-
const result = ( new ExtensionIdentifierMap());
|
|
170
|
-
const localProcessExtensions = [];
|
|
171
|
-
const localWebWorkerExtensions = [];
|
|
172
|
-
for (const [extensionIdKey, extensionHostKind] of extensionHostKinds) {
|
|
173
|
-
let runningLocation = null;
|
|
174
|
-
if (extensionHostKind === 1 ) {
|
|
175
|
-
const extensionDescription = extensions.get(extensionIdKey);
|
|
176
|
-
if (extensionDescription) {
|
|
177
|
-
localProcessExtensions.push(extensionDescription);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
else if (extensionHostKind === 2 ) {
|
|
181
|
-
const extensionDescription = extensions.get(extensionIdKey);
|
|
182
|
-
if (extensionDescription) {
|
|
183
|
-
localWebWorkerExtensions.push(extensionDescription);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
else if (extensionHostKind === 3 ) {
|
|
187
|
-
runningLocation = ( new RemoteRunningLocation());
|
|
188
|
-
}
|
|
189
|
-
result.set(extensionIdKey, runningLocation);
|
|
190
|
-
}
|
|
191
|
-
const { affinities, maxAffinity } = this._computeAffinity(localProcessExtensions, 1 , isInitialAllocation);
|
|
192
|
-
for (const extension of localProcessExtensions) {
|
|
193
|
-
const affinity = affinities.get(extension.identifier) || 0;
|
|
194
|
-
result.set(extension.identifier, ( new LocalProcessRunningLocation(affinity)));
|
|
195
|
-
}
|
|
196
|
-
const { affinities: localWebWorkerAffinities, maxAffinity: maxLocalWebWorkerAffinity } = this._computeAffinity(localWebWorkerExtensions, 2 , isInitialAllocation);
|
|
197
|
-
for (const extension of localWebWorkerExtensions) {
|
|
198
|
-
const affinity = localWebWorkerAffinities.get(extension.identifier) || 0;
|
|
199
|
-
result.set(extension.identifier, ( new LocalWebWorkerRunningLocation(affinity)));
|
|
200
|
-
}
|
|
201
|
-
for (const [extensionIdKey, runningLocation] of existingRunningLocation) {
|
|
202
|
-
if (runningLocation) {
|
|
203
|
-
result.set(extensionIdKey, runningLocation);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return { runningLocation: result, maxLocalProcessAffinity: maxAffinity, maxLocalWebWorkerAffinity: maxLocalWebWorkerAffinity };
|
|
207
|
-
}
|
|
208
|
-
initializeRunningLocation(localExtensions, remoteExtensions) {
|
|
209
|
-
const { runningLocation, maxLocalProcessAffinity, maxLocalWebWorkerAffinity } = this._doComputeRunningLocation(this._runningLocation, localExtensions, remoteExtensions, true);
|
|
210
|
-
this._runningLocation = runningLocation;
|
|
211
|
-
this._maxLocalProcessAffinity = maxLocalProcessAffinity;
|
|
212
|
-
this._maxLocalWebWorkerAffinity = maxLocalWebWorkerAffinity;
|
|
213
|
-
}
|
|
214
|
-
deltaExtensions(toAdd, toRemove) {
|
|
215
|
-
const removedRunningLocation = ( new ExtensionIdentifierMap());
|
|
216
|
-
for (const extensionId of toRemove) {
|
|
217
|
-
const extensionKey = extensionId;
|
|
218
|
-
removedRunningLocation.set(extensionKey, this._runningLocation.get(extensionKey) || null);
|
|
219
|
-
this._runningLocation.delete(extensionKey);
|
|
220
|
-
}
|
|
221
|
-
this._updateRunningLocationForAddedExtensions(toAdd);
|
|
222
|
-
return removedRunningLocation;
|
|
223
|
-
}
|
|
224
|
-
_updateRunningLocationForAddedExtensions(toAdd) {
|
|
225
|
-
const localProcessExtensions = [];
|
|
226
|
-
const localWebWorkerExtensions = [];
|
|
227
|
-
for (const extension of toAdd) {
|
|
228
|
-
const extensionKind = this.readExtensionKinds(extension);
|
|
229
|
-
const isRemote = extension.extensionLocation.scheme === Schemas.vscodeRemote;
|
|
230
|
-
const extensionHostKind = this._extensionHostKindPicker.pickExtensionHostKind(extension.identifier, extensionKind, !isRemote, isRemote, 0 );
|
|
231
|
-
let runningLocation = null;
|
|
232
|
-
if (extensionHostKind === 1 ) {
|
|
233
|
-
localProcessExtensions.push(extension);
|
|
234
|
-
}
|
|
235
|
-
else if (extensionHostKind === 2 ) {
|
|
236
|
-
localWebWorkerExtensions.push(extension);
|
|
237
|
-
}
|
|
238
|
-
else if (extensionHostKind === 3 ) {
|
|
239
|
-
runningLocation = ( new RemoteRunningLocation());
|
|
240
|
-
}
|
|
241
|
-
this._runningLocation.set(extension.identifier, runningLocation);
|
|
242
|
-
}
|
|
243
|
-
const { affinities } = this._computeAffinity(localProcessExtensions, 1 , false);
|
|
244
|
-
for (const extension of localProcessExtensions) {
|
|
245
|
-
const affinity = affinities.get(extension.identifier) || 0;
|
|
246
|
-
this._runningLocation.set(extension.identifier, ( new LocalProcessRunningLocation(affinity)));
|
|
247
|
-
}
|
|
248
|
-
const { affinities: webWorkerExtensionsAffinities } = this._computeAffinity(localWebWorkerExtensions, 2 , false);
|
|
249
|
-
for (const extension of localWebWorkerExtensions) {
|
|
250
|
-
const affinity = webWorkerExtensionsAffinities.get(extension.identifier) || 0;
|
|
251
|
-
this._runningLocation.set(extension.identifier, ( new LocalWebWorkerRunningLocation(affinity)));
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
ExtensionRunningLocationTracker = ( __decorate([
|
|
256
|
-
( __param(2, IWorkbenchEnvironmentService)),
|
|
257
|
-
( __param(3, IConfigurationService)),
|
|
258
|
-
( __param(4, ILogService)),
|
|
259
|
-
( __param(5, IExtensionManifestPropertiesService))
|
|
260
|
-
], ExtensionRunningLocationTracker));
|
|
261
|
-
function filterExtensionDescriptions(extensions, runningLocation, predicate) {
|
|
262
|
-
return extensions.filter((ext) => {
|
|
263
|
-
const extRunningLocation = runningLocation.get(ext.identifier);
|
|
264
|
-
return extRunningLocation && predicate(extRunningLocation);
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
function filterExtensionIdentifiers(extensions, runningLocation, predicate) {
|
|
268
|
-
return extensions.filter((ext) => {
|
|
269
|
-
const extRunningLocation = runningLocation.get(ext);
|
|
270
|
-
return extRunningLocation && predicate(extRunningLocation);
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export { ExtensionRunningLocationTracker, filterExtensionDescriptions, filterExtensionIdentifiers };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { getErrorMessage } from 'vscode/vscode/vs/base/common/errors';
|
|
2
|
-
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment';
|
|
3
|
-
import { IExtensionStorageService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionStorage';
|
|
4
|
-
import { IFileService, FileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
5
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
6
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
7
|
-
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
|
|
8
|
-
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
9
|
-
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
10
|
-
|
|
11
|
-
async function migrateExtensionStorage(fromExtensionId, toExtensionId, global, instantionService) {
|
|
12
|
-
return instantionService.invokeFunction(async (serviceAccessor) => {
|
|
13
|
-
const environmentService = serviceAccessor.get(IEnvironmentService);
|
|
14
|
-
const userDataProfilesService = serviceAccessor.get(IUserDataProfilesService);
|
|
15
|
-
const extensionStorageService = serviceAccessor.get(IExtensionStorageService);
|
|
16
|
-
const storageService = serviceAccessor.get(IStorageService);
|
|
17
|
-
const uriIdentityService = serviceAccessor.get(IUriIdentityService);
|
|
18
|
-
const fileService = serviceAccessor.get(IFileService);
|
|
19
|
-
const workspaceContextService = serviceAccessor.get(IWorkspaceContextService);
|
|
20
|
-
const logService = serviceAccessor.get(ILogService);
|
|
21
|
-
const storageMigratedKey = `extensionStorage.migrate.${fromExtensionId}-${toExtensionId}`;
|
|
22
|
-
const migrateLowerCaseStorageKey = fromExtensionId.toLowerCase() === toExtensionId.toLowerCase() ? `extension.storage.migrateFromLowerCaseKey.${fromExtensionId.toLowerCase()}` : undefined;
|
|
23
|
-
if (fromExtensionId === toExtensionId) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const getExtensionStorageLocation = (extensionId, global) => {
|
|
27
|
-
if (global) {
|
|
28
|
-
return uriIdentityService.extUri.joinPath(userDataProfilesService.defaultProfile.globalStorageHome, extensionId.toLowerCase() );
|
|
29
|
-
}
|
|
30
|
-
return uriIdentityService.extUri.joinPath(environmentService.workspaceStorageHome, workspaceContextService.getWorkspace().id, extensionId);
|
|
31
|
-
};
|
|
32
|
-
const storageScope = global ? 0 : 1 ;
|
|
33
|
-
if (!storageService.getBoolean(storageMigratedKey, storageScope, false) && !(migrateLowerCaseStorageKey && storageService.getBoolean(migrateLowerCaseStorageKey, storageScope, false))) {
|
|
34
|
-
logService.info(`Migrating ${global ? 'global' : 'workspace'} extension storage from ${fromExtensionId} to ${toExtensionId}...`);
|
|
35
|
-
const value = extensionStorageService.getExtensionState(fromExtensionId, global);
|
|
36
|
-
if (value) {
|
|
37
|
-
extensionStorageService.setExtensionState(toExtensionId, value, global);
|
|
38
|
-
extensionStorageService.setExtensionState(fromExtensionId, undefined, global);
|
|
39
|
-
}
|
|
40
|
-
const fromPath = getExtensionStorageLocation(fromExtensionId, global);
|
|
41
|
-
const toPath = getExtensionStorageLocation(toExtensionId, global);
|
|
42
|
-
if (!uriIdentityService.extUri.isEqual(fromPath, toPath)) {
|
|
43
|
-
try {
|
|
44
|
-
await fileService.move(fromPath, toPath, true);
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
if (error.code !== FileSystemProviderErrorCode.FileNotFound) {
|
|
48
|
-
logService.info(`Error while migrating ${global ? 'global' : 'workspace'} file storage from '${fromExtensionId}' to '${toExtensionId}'`, getErrorMessage(error));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
logService.info(`Migrated ${global ? 'global' : 'workspace'} extension storage from ${fromExtensionId} to ${toExtensionId}`);
|
|
53
|
-
storageService.store(storageMigratedKey, true, storageScope, 1 );
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { migrateExtensionStorage };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { isNonEmptyArray } from 'vscode/vscode/vs/base/common/arrays';
|
|
3
|
-
import { ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
4
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
5
|
-
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
|
|
6
|
-
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
7
|
-
import { allApiProposals } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsApiProposals';
|
|
8
|
-
|
|
9
|
-
let ExtensionsProposedApi = class ExtensionsProposedApi {
|
|
10
|
-
constructor(_logService, _environmentService, productService) {
|
|
11
|
-
this._logService = _logService;
|
|
12
|
-
this._environmentService = _environmentService;
|
|
13
|
-
this._envEnabledExtensions = ( new Set(( (_environmentService.extensionEnabledProposedApi ?? []).map(id => ExtensionIdentifier.toKey(id)))));
|
|
14
|
-
this._envEnablesProposedApiForAll =
|
|
15
|
-
!_environmentService.isBuilt ||
|
|
16
|
-
(_environmentService.isExtensionDevelopment && productService.quality !== 'stable') ||
|
|
17
|
-
(this._envEnabledExtensions.size === 0 && Array.isArray(_environmentService.extensionEnabledProposedApi));
|
|
18
|
-
this._productEnabledExtensions = ( new Map());
|
|
19
|
-
if (productService.extensionEnabledApiProposals) {
|
|
20
|
-
for (const [k, value] of Object.entries(productService.extensionEnabledApiProposals)) {
|
|
21
|
-
const key = ExtensionIdentifier.toKey(k);
|
|
22
|
-
const proposalNames = value.filter(name => {
|
|
23
|
-
if (!allApiProposals[name]) {
|
|
24
|
-
_logService.warn(`Via 'product.json#extensionEnabledApiProposals' extension '${key}' wants API proposal '${name}' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.`);
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
return true;
|
|
28
|
-
});
|
|
29
|
-
this._productEnabledExtensions.set(key, proposalNames);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
updateEnabledApiProposals(extensions) {
|
|
34
|
-
for (const extension of extensions) {
|
|
35
|
-
this.doUpdateEnabledApiProposals(extension);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
doUpdateEnabledApiProposals(_extension) {
|
|
39
|
-
const extension = _extension;
|
|
40
|
-
const key = ExtensionIdentifier.toKey(_extension.identifier);
|
|
41
|
-
if (isNonEmptyArray(extension.enabledApiProposals)) {
|
|
42
|
-
extension.enabledApiProposals = extension.enabledApiProposals.filter(name => {
|
|
43
|
-
const result = Boolean(allApiProposals[name]);
|
|
44
|
-
if (!result) {
|
|
45
|
-
this._logService.error(`Extension '${key}' wants API proposal '${name}' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.`);
|
|
46
|
-
}
|
|
47
|
-
return result;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
if (( this._productEnabledExtensions.has(key))) {
|
|
51
|
-
const productEnabledProposals = this._productEnabledExtensions.get(key);
|
|
52
|
-
const productSet = ( new Set(productEnabledProposals));
|
|
53
|
-
const extensionSet = ( new Set(extension.enabledApiProposals));
|
|
54
|
-
const diff = ( new Set([...extensionSet].filter(a => !( productSet.has(a)))));
|
|
55
|
-
if (diff.size > 0) {
|
|
56
|
-
this._logService.error(`Extension '${key}' appears in product.json but enables LESS API proposals than the extension wants.\npackage.json (LOSES): ${[...extensionSet].join(', ')}\nproduct.json (WINS): ${[...productSet].join(', ')}`);
|
|
57
|
-
if (this._environmentService.isExtensionDevelopment) {
|
|
58
|
-
this._logService.error(`Proceeding with EXTRA proposals (${[...diff].join(', ')}) because extension is in development mode. Still, this EXTENSION WILL BE BROKEN unless product.json is updated.`);
|
|
59
|
-
productEnabledProposals.push(...diff);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
extension.enabledApiProposals = productEnabledProposals;
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
if (this._envEnablesProposedApiForAll || ( this._envEnabledExtensions.has(key))) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
if (!extension.isBuiltin && isNonEmptyArray(extension.enabledApiProposals)) {
|
|
69
|
-
this._logService.error(`Extension '${extension.identifier.value} CANNOT USE these API proposals '${extension.enabledApiProposals?.join(', ') || '*'}'. You MUST start in extension development mode or use the --enable-proposed-api command line flag`);
|
|
70
|
-
extension.enabledApiProposals = [];
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
ExtensionsProposedApi = ( __decorate([
|
|
75
|
-
( __param(0, ILogService)),
|
|
76
|
-
( __param(1, IWorkbenchEnvironmentService)),
|
|
77
|
-
( __param(2, IProductService))
|
|
78
|
-
], ExtensionsProposedApi));
|
|
79
|
-
|
|
80
|
-
export { ExtensionsProposedApi };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { ExtensionIdentifierMap } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
2
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { semverExports } from '../../../../../../../external/vscode-semver/semver.js';
|
|
4
|
-
|
|
5
|
-
function dedupExtensions(system, user, development, logService) {
|
|
6
|
-
const result = ( new ExtensionIdentifierMap());
|
|
7
|
-
system.forEach((systemExtension) => {
|
|
8
|
-
const extension = result.get(systemExtension.identifier);
|
|
9
|
-
if (extension) {
|
|
10
|
-
logService.warn(( localizeWithPath(
|
|
11
|
-
'vs/workbench/services/extensions/common/extensionsUtil',
|
|
12
|
-
'overwritingExtension',
|
|
13
|
-
"Overwriting extension {0} with {1}.",
|
|
14
|
-
extension.extensionLocation.fsPath,
|
|
15
|
-
systemExtension.extensionLocation.fsPath
|
|
16
|
-
)));
|
|
17
|
-
}
|
|
18
|
-
result.set(systemExtension.identifier, systemExtension);
|
|
19
|
-
});
|
|
20
|
-
user.forEach((userExtension) => {
|
|
21
|
-
const extension = result.get(userExtension.identifier);
|
|
22
|
-
if (extension) {
|
|
23
|
-
if (extension.isBuiltin) {
|
|
24
|
-
if (semverExports.gte(extension.version, userExtension.version)) {
|
|
25
|
-
logService.warn(`Skipping extension ${userExtension.extensionLocation.path} in favour of the builtin extension ${extension.extensionLocation.path}.`);
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
userExtension.isBuiltin = true;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
logService.warn(( localizeWithPath(
|
|
32
|
-
'vs/workbench/services/extensions/common/extensionsUtil',
|
|
33
|
-
'overwritingExtension',
|
|
34
|
-
"Overwriting extension {0} with {1}.",
|
|
35
|
-
extension.extensionLocation.fsPath,
|
|
36
|
-
userExtension.extensionLocation.fsPath
|
|
37
|
-
)));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else if (userExtension.isBuiltin) {
|
|
41
|
-
logService.warn(`Skipping obsolete builtin extension ${userExtension.extensionLocation.path}`);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
result.set(userExtension.identifier, userExtension);
|
|
45
|
-
});
|
|
46
|
-
development.forEach(developedExtension => {
|
|
47
|
-
logService.info(( localizeWithPath(
|
|
48
|
-
'vs/workbench/services/extensions/common/extensionsUtil',
|
|
49
|
-
'extensionUnderDevelopment',
|
|
50
|
-
"Loading development extension at {0}",
|
|
51
|
-
developedExtension.extensionLocation.fsPath
|
|
52
|
-
)));
|
|
53
|
-
const extension = result.get(developedExtension.identifier);
|
|
54
|
-
if (extension) {
|
|
55
|
-
if (extension.isBuiltin) {
|
|
56
|
-
developedExtension.isBuiltin = true;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
result.set(developedExtension.identifier, developedExtension);
|
|
60
|
-
});
|
|
61
|
-
return Array.from(( result.values()));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export { dedupExtensions };
|
package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Barrier } from 'vscode/vscode/vs/base/common/async';
|
|
3
|
-
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
7
|
-
import { RemoteAuthorityResolverErrorCode } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
8
|
-
import { friendlyExtHostName, ExtensionHostManager } from './extensionHostManager.js';
|
|
9
|
-
import { ExtensionHostExtensions } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
10
|
-
|
|
11
|
-
let LazyCreateExtensionHostManager = class LazyCreateExtensionHostManager extends Disposable {
|
|
12
|
-
get pid() {
|
|
13
|
-
if (this._actual) {
|
|
14
|
-
return this._actual.pid;
|
|
15
|
-
}
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
get kind() {
|
|
19
|
-
return this._extensionHost.runningLocation.kind;
|
|
20
|
-
}
|
|
21
|
-
get startup() {
|
|
22
|
-
return this._extensionHost.startup;
|
|
23
|
-
}
|
|
24
|
-
get friendyName() {
|
|
25
|
-
return friendlyExtHostName(this.kind, this.pid);
|
|
26
|
-
}
|
|
27
|
-
constructor(extensionHost, _internalExtensionService, _instantiationService, _logService) {
|
|
28
|
-
super();
|
|
29
|
-
this._internalExtensionService = _internalExtensionService;
|
|
30
|
-
this._instantiationService = _instantiationService;
|
|
31
|
-
this._logService = _logService;
|
|
32
|
-
this._onDidChangeResponsiveState = this._register(( new Emitter()));
|
|
33
|
-
this.onDidChangeResponsiveState = this._onDidChangeResponsiveState.event;
|
|
34
|
-
this._extensionHost = extensionHost;
|
|
35
|
-
this.onDidExit = extensionHost.onExit;
|
|
36
|
-
this._startCalled = ( new Barrier());
|
|
37
|
-
this._actual = null;
|
|
38
|
-
this._lazyStartExtensions = null;
|
|
39
|
-
}
|
|
40
|
-
_createActual(reason) {
|
|
41
|
-
this._logService.info(`Creating lazy extension host (${this.friendyName}). Reason: ${reason}`);
|
|
42
|
-
this._actual = this._register(this._instantiationService.createInstance(ExtensionHostManager, this._extensionHost, [], this._internalExtensionService));
|
|
43
|
-
this._register(this._actual.onDidChangeResponsiveState((e) => this._onDidChangeResponsiveState.fire(e)));
|
|
44
|
-
return this._actual;
|
|
45
|
-
}
|
|
46
|
-
async _getOrCreateActualAndStart(reason) {
|
|
47
|
-
if (this._actual) {
|
|
48
|
-
return this._actual;
|
|
49
|
-
}
|
|
50
|
-
const actual = this._createActual(reason);
|
|
51
|
-
await actual.start(this._lazyStartExtensions.versionId, this._lazyStartExtensions.allExtensions, this._lazyStartExtensions.myExtensions);
|
|
52
|
-
return actual;
|
|
53
|
-
}
|
|
54
|
-
async ready() {
|
|
55
|
-
await this._startCalled.wait();
|
|
56
|
-
if (this._actual) {
|
|
57
|
-
await this._actual.ready();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
representsRunningLocation(runningLocation) {
|
|
61
|
-
return this._extensionHost.runningLocation.equals(runningLocation);
|
|
62
|
-
}
|
|
63
|
-
async deltaExtensions(extensionsDelta) {
|
|
64
|
-
await this._startCalled.wait();
|
|
65
|
-
if (this._actual) {
|
|
66
|
-
return this._actual.deltaExtensions(extensionsDelta);
|
|
67
|
-
}
|
|
68
|
-
this._lazyStartExtensions.delta(extensionsDelta);
|
|
69
|
-
if (extensionsDelta.myToAdd.length > 0) {
|
|
70
|
-
const actual = this._createActual(`contains ${extensionsDelta.myToAdd.length} new extension(s) (installed or enabled): ${( extensionsDelta.myToAdd.map(extId => extId.value))}`);
|
|
71
|
-
await actual.start(this._lazyStartExtensions.versionId, this._lazyStartExtensions.allExtensions, this._lazyStartExtensions.myExtensions);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
containsExtension(extensionId) {
|
|
76
|
-
return this._extensionHost.extensions?.containsExtension(extensionId) ?? false;
|
|
77
|
-
}
|
|
78
|
-
async activate(extension, reason) {
|
|
79
|
-
await this._startCalled.wait();
|
|
80
|
-
if (this._actual) {
|
|
81
|
-
return this._actual.activate(extension, reason);
|
|
82
|
-
}
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
async activateByEvent(activationEvent, activationKind) {
|
|
86
|
-
if (activationKind === 1 ) {
|
|
87
|
-
if (this._actual) {
|
|
88
|
-
return this._actual.activateByEvent(activationEvent, activationKind);
|
|
89
|
-
}
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
await this._startCalled.wait();
|
|
93
|
-
if (this._actual) {
|
|
94
|
-
return this._actual.activateByEvent(activationEvent, activationKind);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
activationEventIsDone(activationEvent) {
|
|
98
|
-
if (!this._startCalled.isOpen()) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
if (this._actual) {
|
|
102
|
-
return this._actual.activationEventIsDone(activationEvent);
|
|
103
|
-
}
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
async getInspectPort(tryEnableInspector) {
|
|
107
|
-
await this._startCalled.wait();
|
|
108
|
-
if (this._actual) {
|
|
109
|
-
return this._actual.getInspectPort(tryEnableInspector);
|
|
110
|
-
}
|
|
111
|
-
return 0;
|
|
112
|
-
}
|
|
113
|
-
async resolveAuthority(remoteAuthority, resolveAttempt) {
|
|
114
|
-
await this._startCalled.wait();
|
|
115
|
-
if (this._actual) {
|
|
116
|
-
return this._actual.resolveAuthority(remoteAuthority, resolveAttempt);
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
type: 'error',
|
|
120
|
-
error: {
|
|
121
|
-
message: `Cannot resolve authority`,
|
|
122
|
-
code: RemoteAuthorityResolverErrorCode.Unknown,
|
|
123
|
-
detail: undefined
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
async getCanonicalURI(remoteAuthority, uri) {
|
|
128
|
-
await this._startCalled.wait();
|
|
129
|
-
if (this._actual) {
|
|
130
|
-
return this._actual.getCanonicalURI(remoteAuthority, uri);
|
|
131
|
-
}
|
|
132
|
-
throw new Error(`Cannot resolve canonical URI`);
|
|
133
|
-
}
|
|
134
|
-
async start(extensionRegistryVersionId, allExtensions, myExtensions) {
|
|
135
|
-
if (myExtensions.length > 0) {
|
|
136
|
-
const actual = this._createActual(`contains ${myExtensions.length} extension(s): ${( myExtensions.map(extId => extId.value))}.`);
|
|
137
|
-
const result = actual.start(extensionRegistryVersionId, allExtensions, myExtensions);
|
|
138
|
-
this._startCalled.open();
|
|
139
|
-
return result;
|
|
140
|
-
}
|
|
141
|
-
this._lazyStartExtensions = ( new ExtensionHostExtensions(extensionRegistryVersionId, allExtensions, myExtensions));
|
|
142
|
-
this._startCalled.open();
|
|
143
|
-
}
|
|
144
|
-
async extensionTestsExecute() {
|
|
145
|
-
await this._startCalled.wait();
|
|
146
|
-
const actual = await this._getOrCreateActualAndStart(`execute tests.`);
|
|
147
|
-
return actual.extensionTestsExecute();
|
|
148
|
-
}
|
|
149
|
-
async setRemoteEnvironment(env) {
|
|
150
|
-
await this._startCalled.wait();
|
|
151
|
-
if (this._actual) {
|
|
152
|
-
return this._actual.setRemoteEnvironment(env);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
LazyCreateExtensionHostManager = ( __decorate([
|
|
157
|
-
( __param(2, IInstantiationService)),
|
|
158
|
-
( __param(3, ILogService))
|
|
159
|
-
], LazyCreateExtensionHostManager));
|
|
160
|
-
|
|
161
|
-
export { LazyCreateExtensionHostManager };
|