@codingame/monaco-vscode-extensions-service-override 34.1.3 → 35.0.1
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.js +2 -0
- package/package.json +3 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.d.ts +23 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.js +47 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +30 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +12 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +5 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +70 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +61 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +13 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.d.ts +7 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +46 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.d.ts +0 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +4 -7
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
- package/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html +12 -3
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +5 -5
|
@@ -116,13 +116,13 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
116
116
|
}
|
|
117
117
|
async elevationPrompt(tunnelOptions, tunnel, source) {
|
|
118
118
|
return this.notificationService.prompt(Severity.Info, ( localize(
|
|
119
|
-
|
|
119
|
+
2799,
|
|
120
120
|
"The extension {0} has forwarded port {1}. You'll need to run as superuser to use port {2} locally.",
|
|
121
121
|
source,
|
|
122
122
|
tunnelOptions.remoteAddress.port,
|
|
123
123
|
tunnelOptions.localAddressPort
|
|
124
124
|
)), [{
|
|
125
|
-
label: ( localize(
|
|
125
|
+
label: ( localize(2800, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
|
|
126
126
|
run: async () => {
|
|
127
127
|
this.elevateionRetry = true;
|
|
128
128
|
await this.remoteExplorerService.close({
|
|
@@ -61,7 +61,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
61
61
|
}, token);
|
|
62
62
|
} catch (e) {
|
|
63
63
|
if (!isCancellationError(e)) {
|
|
64
|
-
const openDefaultAction = ( new Action("default", ( localize(
|
|
64
|
+
const openDefaultAction = ( new Action("default", ( localize(2801, "Open using default opener")), undefined, undefined, async () => {
|
|
65
65
|
await this.openerService.open(uri, {
|
|
66
66
|
allowTunneling: false,
|
|
67
67
|
allowContributedOpeners: defaultExternalUriOpenerId
|
|
@@ -70,7 +70,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
70
70
|
openDefaultAction.tooltip = ( uri.toString());
|
|
71
71
|
this.notificationService.notify({
|
|
72
72
|
severity: Severity.Error,
|
|
73
|
-
message: ( localize(
|
|
73
|
+
message: ( localize(2802, "Could not open uri with '{0}': {1}", id, (e.toString()))),
|
|
74
74
|
actions: {
|
|
75
75
|
primary: [openDefaultAction]
|
|
76
76
|
}
|
|
@@ -118,7 +118,7 @@ let MainThreadWebviews = class MainThreadWebviews extends Disposable {
|
|
|
118
118
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
119
119
|
<meta http-equiv="Content-Security-Policy" content="default-src 'none';">
|
|
120
120
|
</head>
|
|
121
|
-
<body>${( localize(
|
|
121
|
+
<body>${( localize(2803, "An error occurred while loading view: {0}", escape(viewType)))}</body>
|
|
122
122
|
</html>`;
|
|
123
123
|
}
|
|
124
124
|
};
|
|
@@ -114,10 +114,10 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
114
114
|
const wantsToDelete = removeCount > 0;
|
|
115
115
|
if (wantsToAdd && !wantsToDelete) {
|
|
116
116
|
if (addCount === 1) {
|
|
117
|
-
message = ( localize(
|
|
117
|
+
message = ( localize(2804, "Extension '{0}' added 1 folder to the workspace", extensionName));
|
|
118
118
|
} else {
|
|
119
119
|
message = ( localize(
|
|
120
|
-
|
|
120
|
+
2805,
|
|
121
121
|
"Extension '{0}' added {1} folders to the workspace",
|
|
122
122
|
extensionName,
|
|
123
123
|
addCount
|
|
@@ -126,10 +126,10 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
126
126
|
}
|
|
127
127
|
else if (wantsToDelete && !wantsToAdd) {
|
|
128
128
|
if (removeCount === 1) {
|
|
129
|
-
message = ( localize(
|
|
129
|
+
message = ( localize(2806, "Extension '{0}' removed 1 folder from the workspace", extensionName));
|
|
130
130
|
} else {
|
|
131
131
|
message = ( localize(
|
|
132
|
-
|
|
132
|
+
2807,
|
|
133
133
|
"Extension '{0}' removed {1} folders from the workspace",
|
|
134
134
|
extensionName,
|
|
135
135
|
removeCount
|
|
@@ -137,7 +137,7 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
else {
|
|
140
|
-
message = ( localize(
|
|
140
|
+
message = ( localize(2808, "Extension '{0}' changed folders of the workspace", extensionName));
|
|
141
141
|
}
|
|
142
142
|
return message;
|
|
143
143
|
}
|
|
@@ -60,7 +60,7 @@ let CustomTextEditorModel = CustomTextEditorModel_1 = class CustomTextEditorMode
|
|
|
60
60
|
}));
|
|
61
61
|
this._register(extensionService.onWillStop(e => {
|
|
62
62
|
e.veto(true, ( localize(
|
|
63
|
-
|
|
63
|
+
9348,
|
|
64
64
|
"An extension provided text editor for '{0}' is still open that would close otherwise.",
|
|
65
65
|
this.name
|
|
66
66
|
)));
|
|
@@ -169,11 +169,11 @@ let ExtensionBisectUi = class ExtensionBisectUi {
|
|
|
169
169
|
}
|
|
170
170
|
_showBisectPrompt() {
|
|
171
171
|
const goodPrompt = {
|
|
172
|
-
label: ( localize(
|
|
172
|
+
label: ( localize(17540, "I can't reproduce")),
|
|
173
173
|
run: () => this._commandService.executeCommand("extension.bisect.next", false)
|
|
174
174
|
};
|
|
175
175
|
const badPrompt = {
|
|
176
|
-
label: ( localize(
|
|
176
|
+
label: ( localize(17541, "I can reproduce")),
|
|
177
177
|
run: () => this._commandService.executeCommand("extension.bisect.next", true)
|
|
178
178
|
};
|
|
179
179
|
const stop = {
|
|
@@ -181,10 +181,10 @@ let ExtensionBisectUi = class ExtensionBisectUi {
|
|
|
181
181
|
run: () => this._commandService.executeCommand("extension.bisect.stop")
|
|
182
182
|
};
|
|
183
183
|
const message = this._extensionBisectService.disabledCount === 1 ? ( localize(
|
|
184
|
-
|
|
184
|
+
17542,
|
|
185
185
|
"Extension Bisect is active and has disabled 1 extension. Check if you can still reproduce the problem and proceed by selecting from these options."
|
|
186
186
|
)) : ( localize(
|
|
187
|
-
|
|
187
|
+
17543,
|
|
188
188
|
"Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
|
|
189
189
|
this._extensionBisectService.disabledCount
|
|
190
190
|
));
|
|
@@ -200,7 +200,7 @@ registerAction2(class extends Action2 {
|
|
|
200
200
|
constructor() {
|
|
201
201
|
super({
|
|
202
202
|
id: "extension.bisect.start",
|
|
203
|
-
title: ( localize2(
|
|
203
|
+
title: ( localize2(17544, "Start Extension Bisect")),
|
|
204
204
|
category: Categories.Help,
|
|
205
205
|
f1: true,
|
|
206
206
|
precondition: ( ExtensionBisectUi.ctxIsBisectActive.negate()),
|
|
@@ -220,13 +220,13 @@ registerAction2(class extends Action2 {
|
|
|
220
220
|
const extensionsBisect = accessor.get(IExtensionBisectService);
|
|
221
221
|
const extensions = (await extensionManagement.getInstalled(ExtensionType.User)).filter(ext => extensionEnablementService.isEnabled(ext));
|
|
222
222
|
const res = await dialogService.confirm({
|
|
223
|
-
message: ( localize(
|
|
223
|
+
message: ( localize(17545, "Extension Bisect")),
|
|
224
224
|
detail: ( localize(
|
|
225
|
-
|
|
225
|
+
17546,
|
|
226
226
|
"Extension Bisect will use binary search to find an extension that causes a problem. During the process the window reloads repeatedly (~{0} times). Each time you must confirm if you are still seeing problems.",
|
|
227
227
|
2 + Math.log2(extensions.length) | 0
|
|
228
228
|
)),
|
|
229
|
-
primaryButton: ( localize(
|
|
229
|
+
primaryButton: ( localize(17547, "&&Start Extension Bisect"))
|
|
230
230
|
});
|
|
231
231
|
if (res.confirmed) {
|
|
232
232
|
await extensionsBisect.start(extensions);
|
|
@@ -238,7 +238,7 @@ registerAction2(class extends Action2 {
|
|
|
238
238
|
constructor() {
|
|
239
239
|
super({
|
|
240
240
|
id: "extension.bisect.next",
|
|
241
|
-
title: ( localize2(
|
|
241
|
+
title: ( localize2(17548, "Continue Extension Bisect")),
|
|
242
242
|
category: Categories.Help,
|
|
243
243
|
f1: true,
|
|
244
244
|
precondition: ExtensionBisectUi.ctxIsBisectActive
|
|
@@ -272,24 +272,24 @@ registerAction2(class extends Action2 {
|
|
|
272
272
|
return;
|
|
273
273
|
}
|
|
274
274
|
if (done.bad) {
|
|
275
|
-
await dialogService.info(( localize(
|
|
276
|
-
|
|
275
|
+
await dialogService.info(( localize(17549, "Extension Bisect")), ( localize(
|
|
276
|
+
17550,
|
|
277
277
|
"Extension Bisect is done but no extension has been identified. This might be a problem with {0}.",
|
|
278
278
|
productService.nameShort
|
|
279
279
|
)));
|
|
280
280
|
} else {
|
|
281
281
|
const res = await dialogService.confirm({
|
|
282
282
|
type: Severity.Info,
|
|
283
|
-
message: ( localize(
|
|
284
|
-
primaryButton: ( localize(
|
|
285
|
-
cancelButton: ( localize(
|
|
283
|
+
message: ( localize(17549, "Extension Bisect")),
|
|
284
|
+
primaryButton: ( localize(17551, "&&Report Issue & Continue")),
|
|
285
|
+
cancelButton: ( localize(17552, "Continue")),
|
|
286
286
|
detail: ( localize(
|
|
287
|
-
|
|
287
|
+
17553,
|
|
288
288
|
"Extension Bisect is done and has identified {0} as the extension causing the problem.",
|
|
289
289
|
done.id
|
|
290
290
|
)),
|
|
291
291
|
checkbox: {
|
|
292
|
-
label: ( localize(
|
|
292
|
+
label: ( localize(17554, "Keep this extension disabled")),
|
|
293
293
|
checked: true
|
|
294
294
|
}
|
|
295
295
|
});
|
|
@@ -310,24 +310,24 @@ registerAction2(class extends Action2 {
|
|
|
310
310
|
result
|
|
311
311
|
} = await dialogService.prompt({
|
|
312
312
|
type: Severity.Info,
|
|
313
|
-
message: ( localize(
|
|
313
|
+
message: ( localize(17555, "Extension Bisect")),
|
|
314
314
|
detail: ( localize(
|
|
315
|
-
|
|
315
|
+
17556,
|
|
316
316
|
"Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
|
|
317
317
|
bisectService.disabledCount
|
|
318
318
|
)),
|
|
319
319
|
buttons: [{
|
|
320
|
-
label: ( localize(
|
|
320
|
+
label: ( localize(17557, "I ca&&n't reproduce")),
|
|
321
321
|
run: () => false
|
|
322
322
|
}, {
|
|
323
|
-
label: ( localize(
|
|
323
|
+
label: ( localize(17558, "I can &&reproduce")),
|
|
324
324
|
run: () => true
|
|
325
325
|
}, {
|
|
326
|
-
label: ( localize(
|
|
326
|
+
label: ( localize(17559, "&&Stop Bisect")),
|
|
327
327
|
run: () => undefined
|
|
328
328
|
}],
|
|
329
329
|
cancelButton: {
|
|
330
|
-
label: ( localize(
|
|
330
|
+
label: ( localize(17560, "&&Cancel Bisect")),
|
|
331
331
|
run: () => null
|
|
332
332
|
}
|
|
333
333
|
});
|
|
@@ -338,7 +338,7 @@ registerAction2(class extends Action2 {
|
|
|
338
338
|
constructor() {
|
|
339
339
|
super({
|
|
340
340
|
id: "extension.bisect.stop",
|
|
341
|
-
title: ( localize2(
|
|
341
|
+
title: ( localize2(17561, "Stop Extension Bisect")),
|
|
342
342
|
category: Categories.Help,
|
|
343
343
|
f1: true,
|
|
344
344
|
precondition: ExtensionBisectUi.ctxIsBisectActive
|
|
@@ -34,7 +34,6 @@ export declare class WebExtensionsScannerService extends Disposable implements I
|
|
|
34
34
|
private readonly systemExtensionsCacheResource;
|
|
35
35
|
private readonly customBuiltinExtensionsCacheResource;
|
|
36
36
|
private readonly resourcesAccessQueueMap;
|
|
37
|
-
private readonly extensionsEnabledWithApiProposalVersion;
|
|
38
37
|
constructor(environmentService: IBrowserWorkbenchEnvironmentService, builtinExtensionsScannerService: IBuiltinExtensionsScannerService, fileService: IFileService, logService: ILogService, galleryService: IExtensionGalleryService, extensionManifestPropertiesService: IExtensionManifestPropertiesService, extensionResourceLoaderService: IExtensionResourceLoaderService, extensionStorageService: IExtensionStorageService, storageService: IStorageService, productService: IProductService, userDataProfilesService: IUserDataProfilesService, uriIdentityService: IUriIdentityService, lifecycleService: ILifecycleService);
|
|
39
38
|
private _customBuiltinExtensionsInfoPromise;
|
|
40
39
|
private readCustomBuiltinExtensionsInfoFromEnv;
|
package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js
CHANGED
|
@@ -95,7 +95,6 @@ let WebExtensionsScannerService = class WebExtensionsScannerService extends Disp
|
|
|
95
95
|
);
|
|
96
96
|
lifecycleService.when(LifecyclePhase.Eventually).then(() => this.updateCaches());
|
|
97
97
|
}
|
|
98
|
-
this.extensionsEnabledWithApiProposalVersion = productService.extensionsEnabledWithApiProposalVersion?.map(id => id.toLowerCase()) ?? [];
|
|
99
98
|
}
|
|
100
99
|
readCustomBuiltinExtensionsInfoFromEnv() {
|
|
101
100
|
if (!this._customBuiltinExtensionsInfoPromise) {
|
|
@@ -768,7 +767,7 @@ let WebExtensionsScannerService = class WebExtensionsScannerService extends Disp
|
|
|
768
767
|
}
|
|
769
768
|
if (!this.extensionManifestPropertiesService.canExecuteOnWeb(manifest)) {
|
|
770
769
|
throw ( new Error(( localize(
|
|
771
|
-
|
|
770
|
+
17576,
|
|
772
771
|
"Cannot add '{0}' because this extension is not a web extension.",
|
|
773
772
|
manifest.displayName || manifest.name
|
|
774
773
|
))));
|
|
@@ -830,14 +829,12 @@ let WebExtensionsScannerService = class WebExtensionsScannerService extends Disp
|
|
|
830
829
|
manifest = await this.translateManifest(manifest, fallbackPackageNLS);
|
|
831
830
|
}
|
|
832
831
|
const uuid = webExtension.metadata?.id;
|
|
833
|
-
const validateApiVersion = this.extensionsEnabledWithApiProposalVersion.includes(webExtension.identifier.id.toLowerCase());
|
|
834
832
|
validations.push(...validateExtensionManifest(
|
|
835
833
|
this.productService.version,
|
|
836
834
|
this.productService.date,
|
|
837
835
|
webExtension.location,
|
|
838
836
|
manifest,
|
|
839
|
-
false
|
|
840
|
-
validateApiVersion
|
|
837
|
+
false
|
|
841
838
|
));
|
|
842
839
|
let isValid = true;
|
|
843
840
|
for (const [severity, message] of validations) {
|
|
@@ -846,7 +843,7 @@ let WebExtensionsScannerService = class WebExtensionsScannerService extends Disp
|
|
|
846
843
|
this.logService.error(message);
|
|
847
844
|
}
|
|
848
845
|
}
|
|
849
|
-
if (manifest.enabledApiProposals
|
|
846
|
+
if (manifest.enabledApiProposals) {
|
|
850
847
|
manifest.enabledApiProposals = parseEnabledApiProposalNames([...manifest.enabledApiProposals]);
|
|
851
848
|
}
|
|
852
849
|
return {
|
|
@@ -1049,7 +1046,7 @@ if (isWeb) {
|
|
|
1049
1046
|
constructor() {
|
|
1050
1047
|
super({
|
|
1051
1048
|
id: "workbench.extensions.action.openInstalledWebExtensionsResource",
|
|
1052
|
-
title: ( localize2(
|
|
1049
|
+
title: ( localize2(17577, "Open Installed Web Extensions Resource")),
|
|
1053
1050
|
category: Categories.Developer,
|
|
1054
1051
|
f1: true,
|
|
1055
1052
|
precondition: IsWebContext
|
|
@@ -222,13 +222,13 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
222
222
|
}
|
|
223
223
|
}, {
|
|
224
224
|
id: "join.disconnectRemote",
|
|
225
|
-
label: ( localize(
|
|
225
|
+
label: ( localize(17643, "Disconnect Remote Agent")),
|
|
226
226
|
order: WillShutdownJoinerOrder.Last
|
|
227
227
|
});
|
|
228
228
|
} else {
|
|
229
229
|
event.join(this._doStopExtensionHosts(), {
|
|
230
230
|
id: "join.stopExtensionHosts",
|
|
231
|
-
label: ( localize(
|
|
231
|
+
label: ( localize(17644, "Stopping Extension Hosts"))
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
}));
|
|
@@ -301,7 +301,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
301
301
|
this._notificationService.notify({
|
|
302
302
|
severity: Severity.Error,
|
|
303
303
|
message: ( localize(
|
|
304
|
-
|
|
304
|
+
17645,
|
|
305
305
|
"The following extensions contain dependency loops and have been disabled: {0}",
|
|
306
306
|
( result.removedDueToLooping.map(e => `'${e.identifier.value}'`)).join(", ")
|
|
307
307
|
))
|
|
@@ -538,7 +538,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
538
538
|
this._notificationService.notify({
|
|
539
539
|
severity: Severity.Error,
|
|
540
540
|
message: ( localize(
|
|
541
|
-
|
|
541
|
+
17645,
|
|
542
542
|
"The following extensions contain dependency loops and have been disabled: {0}",
|
|
543
543
|
( result.removedDueToLooping.map(e => `'${e.identifier.value}'`)).join(", ")
|
|
544
544
|
))
|
|
@@ -553,7 +553,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
553
553
|
const extensionHostManager = this.findTestExtensionHost(this._environmentService.extensionTestsLocationURI);
|
|
554
554
|
if (!extensionHostManager) {
|
|
555
555
|
const msg = ( localize(
|
|
556
|
-
|
|
556
|
+
17646,
|
|
557
557
|
"No extension host found that can launch the test runner at {0}.",
|
|
558
558
|
(this._environmentService.extensionTestsLocationURI.toString())
|
|
559
559
|
));
|
|
@@ -723,7 +723,7 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
723
723
|
vetoReasons.add(reason);
|
|
724
724
|
}
|
|
725
725
|
}).catch(error => {
|
|
726
|
-
vetoReasons.add(( localize(
|
|
726
|
+
vetoReasons.add(( localize(17647, "{0} (Error: {1})", reason, toErrorMessage(error))));
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
}
|
|
@@ -741,9 +741,9 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
741
741
|
confirmed
|
|
742
742
|
} = await this._dialogService.confirm({
|
|
743
743
|
type: Severity.Warning,
|
|
744
|
-
message: ( localize(
|
|
744
|
+
message: ( localize(17648, "Please confirm restart of extensions.")),
|
|
745
745
|
detail: vetoReasonsArray.length === 1 ? vetoReasonsArray[0] : vetoReasonsArray.join("\n -"),
|
|
746
|
-
primaryButton: ( localize(
|
|
746
|
+
primaryButton: ( localize(17649, "Restart Anyway"))
|
|
747
747
|
});
|
|
748
748
|
if (confirmed) {
|
|
749
749
|
return true;
|
|
@@ -857,16 +857,16 @@ let AbstractExtensionService = AbstractExtensionService_1 = class AbstractExtens
|
|
|
857
857
|
this._remoteCrashTracker.registerCrash();
|
|
858
858
|
if (this._remoteCrashTracker.shouldAutomaticallyRestart()) {
|
|
859
859
|
this._logService.info(`Automatically restarting the remote extension host.`);
|
|
860
|
-
this._notificationService.status(( localize(
|
|
860
|
+
this._notificationService.status(( localize(17650, "The remote extension host terminated unexpectedly. Restarting...")), {
|
|
861
861
|
hideAfter: 5000
|
|
862
862
|
});
|
|
863
863
|
this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
|
|
864
864
|
} else {
|
|
865
865
|
this._notificationService.prompt(Severity.Error, ( localize(
|
|
866
|
-
|
|
866
|
+
17651,
|
|
867
867
|
"Remote Extension host terminated unexpectedly 3 times within the last 5 minutes."
|
|
868
868
|
)), [{
|
|
869
|
-
label: ( localize(
|
|
869
|
+
label: ( localize(17652, "Restart Remote Extension Host")),
|
|
870
870
|
run: () => {
|
|
871
871
|
this._startExtensionHostsIfNecessary(false, Array.from(( this._allRequestedActivateEvents.keys())));
|
|
872
872
|
}
|
|
@@ -1414,7 +1414,7 @@ class ActivationFeatureMarkdowneRenderer extends Disposable {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
1416
1416
|
id: "activationEvents",
|
|
1417
|
-
label: ( localize(
|
|
1417
|
+
label: ( localize(17653, "Activation Events")),
|
|
1418
1418
|
access: {
|
|
1419
1419
|
canToggle: false
|
|
1420
1420
|
},
|
|
@@ -485,7 +485,7 @@ registerAction2(class MeasureExtHostLatencyAction extends Action2 {
|
|
|
485
485
|
constructor() {
|
|
486
486
|
super({
|
|
487
487
|
id: "editor.action.measureExtHostLatency",
|
|
488
|
-
title: ( localize2(
|
|
488
|
+
title: ( localize2(17654, "Measure Extension Host Latency")),
|
|
489
489
|
category: Categories.Developer,
|
|
490
490
|
f1: true
|
|
491
491
|
});
|
|
@@ -110,7 +110,7 @@ class ApiProposalsMarkdowneRenderer extends Disposable {
|
|
|
110
110
|
}
|
|
111
111
|
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
112
112
|
id: "enabledApiProposals",
|
|
113
|
-
label: ( localize(
|
|
113
|
+
label: ( localize(17655, "API Proposals")),
|
|
114
114
|
access: {
|
|
115
115
|
canToggle: false
|
|
116
116
|
},
|
|
@@ -9,7 +9,7 @@ function dedupExtensions(system, user, workspace, development, logService) {
|
|
|
9
9
|
const extension = result.get(systemExtension.identifier);
|
|
10
10
|
if (extension) {
|
|
11
11
|
logService.warn(( localize(
|
|
12
|
-
|
|
12
|
+
17744,
|
|
13
13
|
"Overwriting extension {0} with {1}.",
|
|
14
14
|
extension.extensionLocation.fsPath,
|
|
15
15
|
systemExtension.extensionLocation.fsPath
|
|
@@ -30,7 +30,7 @@ function dedupExtensions(system, user, workspace, development, logService) {
|
|
|
30
30
|
userExtension.isBuiltin = true;
|
|
31
31
|
} else {
|
|
32
32
|
logService.warn(( localize(
|
|
33
|
-
|
|
33
|
+
17744,
|
|
34
34
|
"Overwriting extension {0} with {1}.",
|
|
35
35
|
extension.extensionLocation.fsPath,
|
|
36
36
|
userExtension.extensionLocation.fsPath
|
|
@@ -48,7 +48,7 @@ function dedupExtensions(system, user, workspace, development, logService) {
|
|
|
48
48
|
const extension = result.get(workspaceExtension.identifier);
|
|
49
49
|
if (extension) {
|
|
50
50
|
logService.warn(( localize(
|
|
51
|
-
|
|
51
|
+
17745,
|
|
52
52
|
"Overwriting {0} with Workspace Extension {1}.",
|
|
53
53
|
extension.extensionLocation.fsPath,
|
|
54
54
|
workspaceExtension.extensionLocation.fsPath
|
|
@@ -58,7 +58,7 @@ function dedupExtensions(system, user, workspace, development, logService) {
|
|
|
58
58
|
});
|
|
59
59
|
development.forEach(developedExtension => {
|
|
60
60
|
logService.info(( localize(
|
|
61
|
-
|
|
61
|
+
17746,
|
|
62
62
|
"Loading development extension at {0}",
|
|
63
63
|
developedExtension.extensionLocation.fsPath
|
|
64
64
|
)));
|
package/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta http-equiv="Content-Security-Policy" content="
|
|
5
5
|
default-src 'none';
|
|
6
6
|
child-src 'self' data: blob:;
|
|
7
|
-
script-src 'self' 'unsafe-eval' 'sha256-
|
|
7
|
+
script-src 'self' 'unsafe-eval' 'sha256-LfSEPWgJAtrOdr34EHjreixgIIu+NHGT7RYTpV0eCBA=' data: extension-file: https: http://localhost:* blob:;
|
|
8
8
|
connect-src 'self' data: extension-file: https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -13,14 +13,23 @@
|
|
|
13
13
|
const searchParams = new URL(document.location.href).searchParams;
|
|
14
14
|
const vscodeWebWorkerExtHostId = searchParams.get('vscodeWebWorkerExtHostId') || '';
|
|
15
15
|
const name = searchParams.get('debugged') ? 'DebugExtensionHostWorker' : 'ExtensionHostWorker';
|
|
16
|
-
const
|
|
16
|
+
const parentOriginParam = searchParams.get('parentOrigin');
|
|
17
|
+
const parentOrigin = parentOriginParam || window.origin;
|
|
17
18
|
const salt = searchParams.get('salt');
|
|
18
19
|
|
|
19
20
|
(async function () {
|
|
20
21
|
const hostnameValidationMarker = 'v--';
|
|
21
22
|
const hostname = location.hostname;
|
|
22
23
|
if (!hostname.startsWith(hostnameValidationMarker)) {
|
|
23
|
-
//
|
|
24
|
+
// Validation not requested by the hosting origin. In this configuration the iframe is
|
|
25
|
+
// expected to be same-origin with its parent, so a caller-supplied `parentOrigin` that
|
|
26
|
+
// differs from `window.origin` must be rejected. Otherwise an attacker who can trick a
|
|
27
|
+
// user into navigating to this static page could supply their own `parentOrigin`, receive
|
|
28
|
+
// the bootstrap handshake, and cause the iframe to `import()` attacker-controlled worker
|
|
29
|
+
// code inside the authenticated origin.
|
|
30
|
+
if (parentOriginParam && parentOriginParam !== window.origin) {
|
|
31
|
+
return sendError(new Error(`Refusing to load: 'parentOrigin' does not match window origin and hostname validation is not enabled.`));
|
|
32
|
+
}
|
|
24
33
|
return start();
|
|
25
34
|
}
|
|
26
35
|
if (!crypto.subtle) {
|
|
@@ -22,14 +22,14 @@ const CSS_CACHE_STORAGE_KEY = "workbench.contrib.css.cache";
|
|
|
22
22
|
const cssExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
23
23
|
extensionPoint: "css",
|
|
24
24
|
jsonSchema: {
|
|
25
|
-
description: ( localize(
|
|
25
|
+
description: ( localize(17969, "Contributes CSS files to be loaded in the workbench.")),
|
|
26
26
|
type: "array",
|
|
27
27
|
items: {
|
|
28
28
|
type: "object",
|
|
29
29
|
properties: {
|
|
30
30
|
path: {
|
|
31
31
|
description: ( localize(
|
|
32
|
-
|
|
32
|
+
17970,
|
|
33
33
|
"Path to the CSS file. The path is relative to the extension folder."
|
|
34
34
|
)),
|
|
35
35
|
type: "string"
|
|
@@ -121,7 +121,7 @@ let CSSExtensionPoint = class CSSExtensionPoint {
|
|
|
121
121
|
const extensionValue = extension.value;
|
|
122
122
|
const collector = extension.collector;
|
|
123
123
|
if (!extensionValue || !Array.isArray(extensionValue)) {
|
|
124
|
-
collector.error(( localize(
|
|
124
|
+
collector.error(( localize(17971, "'contributes.css' must be an array.")));
|
|
125
125
|
continue;
|
|
126
126
|
}
|
|
127
127
|
const extensionId = extension.description.identifier.value;
|
|
@@ -166,13 +166,13 @@ let CSSExtensionPoint = class CSSExtensionPoint {
|
|
|
166
166
|
const cssLocations = [];
|
|
167
167
|
for (const cssContribution of extensionValue) {
|
|
168
168
|
if (!cssContribution.path || typeof cssContribution.path !== "string") {
|
|
169
|
-
collector.error(( localize(
|
|
169
|
+
collector.error(( localize(17972, "'contributes.css.path' must be a string.")));
|
|
170
170
|
continue;
|
|
171
171
|
}
|
|
172
172
|
const cssLocation = joinPath(extensionLocation, cssContribution.path);
|
|
173
173
|
if (!isEqualOrParent(cssLocation, extensionLocation)) {
|
|
174
174
|
collector.warn(( localize(
|
|
175
|
-
|
|
175
|
+
17973,
|
|
176
176
|
"Expected 'contributes.css.path' ({0}) to be included inside extension's folder ({1}).",
|
|
177
177
|
cssLocation.path,
|
|
178
178
|
extensionLocation.path
|