@codingame/monaco-vscode-extension-gallery-service-override 36.2.7 → 37.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js +15 -15
- package/vscode/src/vs/platform/extensionManagement/common/allowedExtensionsService.js +5 -5
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js +4 -6
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +36 -33
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/runtimeExtensionsEditor.css +20 -12
- package/vscode/src/vs/workbench/contrib/extensions/common/reportExtensionIssueAction.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +17 -16
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.js +4 -4
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js +46 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-extension-gallery-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "37.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - extension-gallery service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "37.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js
CHANGED
|
@@ -35,7 +35,7 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
35
35
|
});
|
|
36
36
|
if (allowedToInstall !== true) {
|
|
37
37
|
return (new MarkdownString(localize(
|
|
38
|
-
|
|
38
|
+
2160,
|
|
39
39
|
"This extension cannot be installed because {0}",
|
|
40
40
|
allowedToInstall.value
|
|
41
41
|
)));
|
|
@@ -43,12 +43,12 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
43
43
|
if (!(await this.isExtensionPlatformCompatible(extension))) {
|
|
44
44
|
const learnLink = isWeb ? "https://aka.ms/vscode-web-extensions-guide" : "https://aka.ms/vscode-platform-specific-extensions";
|
|
45
45
|
return (new MarkdownString(`${( localize(
|
|
46
|
-
|
|
46
|
+
2161,
|
|
47
47
|
"The '{0}' extension is not available in {1} for the {2} platform.",
|
|
48
48
|
extension.displayName ?? extension.identifier.id,
|
|
49
49
|
this.productService.nameLong,
|
|
50
50
|
TargetPlatformToString(await this.getTargetPlatform())
|
|
51
|
-
))} [${( localize(
|
|
51
|
+
))} [${( localize(2162, "Learn Why"))}](${learnLink})`));
|
|
52
52
|
}
|
|
53
53
|
return true;
|
|
54
54
|
}
|
|
@@ -145,7 +145,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
145
145
|
}
|
|
146
146
|
async installGalleryExtensions(extensions) {
|
|
147
147
|
if (!this.galleryService.isEnabled()) {
|
|
148
|
-
throw ( new ExtensionManagementError(( localize(
|
|
148
|
+
throw ( new ExtensionManagementError(( localize(2163, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
|
|
149
149
|
}
|
|
150
150
|
const results = [];
|
|
151
151
|
const installableExtensions = [];
|
|
@@ -832,7 +832,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
832
832
|
const extensionsControlManifest = await this.getExtensionsControlManifest();
|
|
833
833
|
if (isMalicious(extension.identifier, extensionsControlManifest.malicious)) {
|
|
834
834
|
throw ( new ExtensionManagementError(( localize(
|
|
835
|
-
|
|
835
|
+
2164,
|
|
836
836
|
"Can't install '{0}' extension since it was reported to be problematic.",
|
|
837
837
|
extension.identifier.id
|
|
838
838
|
)), ExtensionManagementErrorCode.Malicious));
|
|
@@ -852,7 +852,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
852
852
|
}, CancellationToken.None))[0];
|
|
853
853
|
if (!compatibleExtension) {
|
|
854
854
|
throw ( new ExtensionManagementError(( localize(
|
|
855
|
-
|
|
855
|
+
2165,
|
|
856
856
|
"Can't install '{0}' extension since it was deprecated and the replacement extension '{1}' can't be found.",
|
|
857
857
|
extension.identifier.id,
|
|
858
858
|
deprecationInfo.extension.id
|
|
@@ -862,7 +862,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
862
862
|
if ((await this.canInstall(extension)) !== true) {
|
|
863
863
|
const targetPlatform = await this.getTargetPlatform();
|
|
864
864
|
throw ( new ExtensionManagementError(( localize(
|
|
865
|
-
|
|
865
|
+
2161,
|
|
866
866
|
"The '{0}' extension is not available in {1} for the {2} platform.",
|
|
867
867
|
extension.identifier.id,
|
|
868
868
|
this.productService.nameLong,
|
|
@@ -873,13 +873,13 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
873
873
|
if (!compatibleExtension) {
|
|
874
874
|
if (!installPreRelease && extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
|
|
875
875
|
throw ( new ExtensionManagementError(( localize(
|
|
876
|
-
|
|
876
|
+
2166,
|
|
877
877
|
"Can't install release version of '{0}' extension because it has no release version.",
|
|
878
878
|
extension.displayName ?? extension.identifier.id
|
|
879
879
|
)), ExtensionManagementErrorCode.ReleaseVersionNotFound));
|
|
880
880
|
}
|
|
881
881
|
throw ( new ExtensionManagementError(( localize(
|
|
882
|
-
|
|
882
|
+
2167,
|
|
883
883
|
"Can't install '{0}' extension because it is not compatible with the current version of {1} (version {2}).",
|
|
884
884
|
extension.identifier.id,
|
|
885
885
|
this.productService.nameLong,
|
|
@@ -1199,7 +1199,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1199
1199
|
if (extensionToUninstall === dependingExtension) {
|
|
1200
1200
|
if (dependents.length === 1) {
|
|
1201
1201
|
return localize(
|
|
1202
|
-
|
|
1202
|
+
2168,
|
|
1203
1203
|
"Cannot uninstall '{0}' extension. '{1}' extension depends on this.",
|
|
1204
1204
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1205
1205
|
dependents[0].manifest.displayName || dependents[0].manifest.name
|
|
@@ -1207,7 +1207,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1207
1207
|
}
|
|
1208
1208
|
if (dependents.length === 2) {
|
|
1209
1209
|
return localize(
|
|
1210
|
-
|
|
1210
|
+
2169,
|
|
1211
1211
|
"Cannot uninstall '{0}' extension. '{1}' and '{2}' extensions depend on this.",
|
|
1212
1212
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1213
1213
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -1215,7 +1215,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1215
1215
|
);
|
|
1216
1216
|
}
|
|
1217
1217
|
return localize(
|
|
1218
|
-
|
|
1218
|
+
2170,
|
|
1219
1219
|
"Cannot uninstall '{0}' extension. '{1}', '{2}' and other extension depend on this.",
|
|
1220
1220
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1221
1221
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -1224,7 +1224,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1224
1224
|
}
|
|
1225
1225
|
if (dependents.length === 1) {
|
|
1226
1226
|
return localize(
|
|
1227
|
-
|
|
1227
|
+
2171,
|
|
1228
1228
|
"Cannot uninstall '{0}' extension . It includes uninstalling '{1}' extension and '{2}' extension depends on this.",
|
|
1229
1229
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1230
1230
|
dependingExtension.manifest.displayName || dependingExtension.manifest.name,
|
|
@@ -1233,7 +1233,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1233
1233
|
}
|
|
1234
1234
|
if (dependents.length === 2) {
|
|
1235
1235
|
return localize(
|
|
1236
|
-
|
|
1236
|
+
2172,
|
|
1237
1237
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}' and '{3}' extensions depend on this.",
|
|
1238
1238
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1239
1239
|
dependingExtension.manifest.displayName || dependingExtension.manifest.name,
|
|
@@ -1242,7 +1242,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1242
1242
|
);
|
|
1243
1243
|
}
|
|
1244
1244
|
return localize(
|
|
1245
|
-
|
|
1245
|
+
2173,
|
|
1246
1246
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}', '{3}' and other extensions depend on this.",
|
|
1247
1247
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1248
1248
|
dependingExtension.manifest.displayName || dependingExtension.manifest.name,
|
|
@@ -77,14 +77,14 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
77
77
|
query: `@id:${AllowedExtensionsConfigKey}`
|
|
78
78
|
}).toString());
|
|
79
79
|
const extensionValue = this._allowedExtensionsConfigValue[id];
|
|
80
|
-
const extensionReason = ( new MarkdownString(( localize(
|
|
80
|
+
const extensionReason = ( new MarkdownString(( localize(2174, "it is not in the [allowed list]({0})", settingsCommandLink))));
|
|
81
81
|
if (!isUndefined(extensionValue)) {
|
|
82
82
|
if (isBoolean(extensionValue)) {
|
|
83
83
|
return extensionValue ? true : extensionReason;
|
|
84
84
|
}
|
|
85
85
|
if (extensionValue === "stable" && prerelease) {
|
|
86
86
|
return (new MarkdownString(localize(
|
|
87
|
-
|
|
87
|
+
2175,
|
|
88
88
|
"the pre-release versions of this extension are not in the [allowed list]({0})",
|
|
89
89
|
settingsCommandLink
|
|
90
90
|
)));
|
|
@@ -107,7 +107,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
107
107
|
return false;
|
|
108
108
|
}))) {
|
|
109
109
|
return (new MarkdownString(localize(
|
|
110
|
-
|
|
110
|
+
2176,
|
|
111
111
|
"the version {0} of this extension is not in the [allowed list]({1})",
|
|
112
112
|
version,
|
|
113
113
|
settingsCommandLink
|
|
@@ -120,7 +120,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
120
120
|
if (!isUndefined(publisherValue)) {
|
|
121
121
|
if (isBoolean(publisherValue)) {
|
|
122
122
|
return publisherValue ? true : ( new MarkdownString(( localize(
|
|
123
|
-
|
|
123
|
+
2177,
|
|
124
124
|
"the extensions from this publisher are not in the [allowed list]({1})",
|
|
125
125
|
publisherKey,
|
|
126
126
|
settingsCommandLink
|
|
@@ -128,7 +128,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
128
128
|
}
|
|
129
129
|
if (publisherValue === "stable" && prerelease) {
|
|
130
130
|
return (new MarkdownString(localize(
|
|
131
|
-
|
|
131
|
+
2178,
|
|
132
132
|
"the pre-release versions from this publisher are not in the [allowed list]({1})",
|
|
133
133
|
publisherKey,
|
|
134
134
|
settingsCommandLink
|
|
@@ -555,7 +555,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
555
555
|
if (!EXTENSION_IDENTIFIER_REGEX.test(extensionInfo.id)) {
|
|
556
556
|
continue;
|
|
557
557
|
}
|
|
558
|
-
if (extensionInfo.version) {
|
|
558
|
+
if (extensionInfo.version || !extensionInfo.uuid) {
|
|
559
559
|
toQuery.push(extensionInfo);
|
|
560
560
|
} else {
|
|
561
561
|
toFetchLatest.push(extensionInfo);
|
|
@@ -615,6 +615,9 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
615
615
|
if (!rawGalleryExtension) {
|
|
616
616
|
return "NOT_FOUND";
|
|
617
617
|
}
|
|
618
|
+
if (!Array.isArray(rawGalleryExtension.versions) || ( rawGalleryExtension.versions.some(version => !Array.isArray(version.files)))) {
|
|
619
|
+
return "INVALID_RESPONSE";
|
|
620
|
+
}
|
|
618
621
|
const allTargetPlatforms = getAllTargetPlatforms(rawGalleryExtension);
|
|
619
622
|
const rawGalleryExtensionVersion = await this.getValidRawGalleryExtensionVersionFromLatestVersions(
|
|
620
623
|
rawGalleryExtension,
|
|
@@ -1305,11 +1308,6 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1305
1308
|
if (!resourceApi.fallback) {
|
|
1306
1309
|
throw error;
|
|
1307
1310
|
}
|
|
1308
|
-
} finally {
|
|
1309
|
-
this.telemetryService.publicLog2("galleryService:getmarketplacelatest", {
|
|
1310
|
-
extension: extensionInfo.id,
|
|
1311
|
-
errorCode
|
|
1312
|
-
});
|
|
1313
1311
|
}
|
|
1314
1312
|
this.logService.error(
|
|
1315
1313
|
`Error while getting the latest version for the extension ${extensionInfo.id} from ${resourceApi.uri}. Trying the fallback ${resourceApi.fallback}`,
|
package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js
CHANGED
|
@@ -272,19 +272,19 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
|
|
|
272
272
|
const activationId = activationTimes.activationReason.extensionId.value;
|
|
273
273
|
const activationEvent = activationTimes.activationReason.activationEvent;
|
|
274
274
|
if (activationEvent === "*") {
|
|
275
|
-
title = ( localize(
|
|
275
|
+
title = ( localize(11974, "Activated by {0} on start-up", activationId));
|
|
276
276
|
} else if (/^workspaceContains:/.test(activationEvent)) {
|
|
277
277
|
const fileNameOrGlob = activationEvent.substr("workspaceContains:".length);
|
|
278
278
|
if (fileNameOrGlob.indexOf("*") >= 0 || fileNameOrGlob.indexOf("?") >= 0) {
|
|
279
279
|
title = ( localize(
|
|
280
|
-
|
|
280
|
+
11975,
|
|
281
281
|
"Activated by {1} because a file matching {0} exists in your workspace",
|
|
282
282
|
fileNameOrGlob,
|
|
283
283
|
activationId
|
|
284
284
|
));
|
|
285
285
|
} else {
|
|
286
286
|
title = ( localize(
|
|
287
|
-
|
|
287
|
+
11976,
|
|
288
288
|
"Activated by {1} because file {0} exists in your workspace",
|
|
289
289
|
fileNameOrGlob,
|
|
290
290
|
activationId
|
|
@@ -293,26 +293,26 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
|
|
|
293
293
|
} else if (/^workspaceContainsTimeout:/.test(activationEvent)) {
|
|
294
294
|
const glob = activationEvent.substr("workspaceContainsTimeout:".length);
|
|
295
295
|
title = ( localize(
|
|
296
|
-
|
|
296
|
+
11977,
|
|
297
297
|
"Activated by {1} because searching for {0} took too long",
|
|
298
298
|
glob,
|
|
299
299
|
activationId
|
|
300
300
|
));
|
|
301
301
|
} else if (activationEvent === "onStartupFinished") {
|
|
302
|
-
title = ( localize(
|
|
302
|
+
title = ( localize(11978, "Activated by {0} after start-up finished", activationId));
|
|
303
303
|
} else if (/^onLanguage:/.test(activationEvent)) {
|
|
304
304
|
const language = activationEvent.substr("onLanguage:".length);
|
|
305
305
|
title = ( localize(
|
|
306
|
-
|
|
306
|
+
11979,
|
|
307
307
|
"Activated by {1} because you opened a {0} file",
|
|
308
308
|
language,
|
|
309
309
|
activationId
|
|
310
310
|
));
|
|
311
311
|
} else {
|
|
312
|
-
title = ( localize(
|
|
312
|
+
title = ( localize(11980, "Activated by {1} on {0}", activationEvent, activationId));
|
|
313
313
|
}
|
|
314
314
|
} else {
|
|
315
|
-
title = ( localize(
|
|
315
|
+
title = ( localize(11981, "Extension is activating..."));
|
|
316
316
|
}
|
|
317
317
|
data.elementDisposables.push(
|
|
318
318
|
this._hoverService.setupManagedHover(getDefaultHoverDelegate("mouse"), data.activationTime, title)
|
|
@@ -320,14 +320,14 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
|
|
|
320
320
|
clearNode(data.msgContainer);
|
|
321
321
|
if (this._getUnresponsiveProfile(element.description.identifier)) {
|
|
322
322
|
const el = $("span", undefined, ...renderLabelWithIcons(` $(alert) Unresponsive`));
|
|
323
|
-
const extensionHostFreezTitle = ( localize(
|
|
323
|
+
const extensionHostFreezTitle = ( localize(11982, "Extension has caused the extension host to freeze."));
|
|
324
324
|
data.elementDisposables.push(
|
|
325
325
|
this._hoverService.setupManagedHover(getDefaultHoverDelegate("mouse"), el, extensionHostFreezTitle)
|
|
326
326
|
);
|
|
327
327
|
data.msgContainer.appendChild(el);
|
|
328
328
|
}
|
|
329
329
|
if (isNonEmptyArray(element.status.runtimeErrors)) {
|
|
330
|
-
const el = $("span", undefined, ...renderLabelWithIcons(`$(bug) ${( localize(
|
|
330
|
+
const el = $("span", undefined, ...renderLabelWithIcons(`$(bug) ${( localize(11983, "{0} uncaught errors", element.status.runtimeErrors.length))}`));
|
|
331
331
|
data.msgContainer.appendChild(el);
|
|
332
332
|
}
|
|
333
333
|
if (element.status.messages && element.status.messages.length > 0) {
|
|
@@ -368,14 +368,14 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
|
|
|
368
368
|
}
|
|
369
369
|
if (accessData?.accessTimes.length > 0) {
|
|
370
370
|
const element = $("span", undefined, `${( localize(
|
|
371
|
-
|
|
371
|
+
11984,
|
|
372
372
|
"{0} Usage: {1} Requests",
|
|
373
373
|
feature.label,
|
|
374
374
|
accessData.accessTimes.length
|
|
375
|
-
))}${accessData.current ? ( localize(
|
|
375
|
+
))}${accessData.current ? ( localize(11985, ", {0} Requests (Session)", accessData.current.accessTimes.length)) : ""}`);
|
|
376
376
|
if (accessData.current) {
|
|
377
377
|
const title = ( localize(
|
|
378
|
-
|
|
378
|
+
11986,
|
|
379
379
|
"Last request was {0}.",
|
|
380
380
|
fromNow(accessData.current.lastAccessed, true, true)
|
|
381
381
|
));
|
|
@@ -395,31 +395,34 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
|
|
|
395
395
|
},
|
|
396
396
|
disposeTemplate: data => {
|
|
397
397
|
data.disposables = dispose(data.disposables);
|
|
398
|
+
data.elementDisposables = dispose(data.elementDisposables);
|
|
398
399
|
}
|
|
399
400
|
};
|
|
400
|
-
this._list = this.
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
401
|
+
this._list = this._register(
|
|
402
|
+
this._instantiationService.createInstance(WorkbenchList, "RuntimeExtensions", parent, delegate, [renderer], {
|
|
403
|
+
multipleSelectionSupport: false,
|
|
404
|
+
setRowLineHeight: false,
|
|
405
|
+
horizontalScrolling: false,
|
|
406
|
+
overrideStyles: {
|
|
407
|
+
listBackground: editorBackground
|
|
408
|
+
},
|
|
409
|
+
accessibilityProvider: new (class {
|
|
410
|
+
getWidgetAriaLabel() {
|
|
411
|
+
return localize(11987, "Runtime Extensions");
|
|
412
|
+
}
|
|
413
|
+
getAriaLabel(element) {
|
|
414
|
+
return element.description.name;
|
|
415
|
+
}
|
|
416
|
+
})()
|
|
417
|
+
})
|
|
418
|
+
);
|
|
416
419
|
this._list.splice(0, this._list.length, this._elements || undefined);
|
|
417
420
|
this._register(this._list.onContextMenu(e => {
|
|
418
421
|
if (!e.element) {
|
|
419
422
|
return;
|
|
420
423
|
}
|
|
421
424
|
const actions = [];
|
|
422
|
-
actions.push(( new Action("runtimeExtensionsEditor.action.copyId", ( localize(
|
|
425
|
+
actions.push(( new Action("runtimeExtensionsEditor.action.copyId", ( localize(11988, "Copy id ({0})", e.element.description.identifier.value)), undefined, true, () => {
|
|
423
426
|
this._clipboardService.writeText(e.element.description.identifier.value);
|
|
424
427
|
})));
|
|
425
428
|
const reportExtensionIssueAction = this._createReportExtensionIssueAction(e.element);
|
|
@@ -428,8 +431,8 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
|
|
|
428
431
|
}
|
|
429
432
|
actions.push(( new Separator()));
|
|
430
433
|
if (e.element.marketplaceInfo) {
|
|
431
|
-
actions.push(( new Action("runtimeExtensionsEditor.action.disableWorkspace", ( localize(
|
|
432
|
-
actions.push(( new Action("runtimeExtensionsEditor.action.disable", ( localize(
|
|
434
|
+
actions.push(( new Action("runtimeExtensionsEditor.action.disableWorkspace", ( localize(11989, "Disable (Workspace)")), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element.marketplaceInfo, EnablementState.DisabledWorkspace))));
|
|
435
|
+
actions.push(( new Action("runtimeExtensionsEditor.action.disable", ( localize(11990, "Disable")), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element.marketplaceInfo, EnablementState.DisabledGlobally))));
|
|
433
436
|
}
|
|
434
437
|
actions.push(( new Separator()));
|
|
435
438
|
const menuActions = this._menuService.getMenuActions(MenuId.ExtensionEditorContextMenu, this.contextKeyService);
|
|
@@ -449,7 +452,7 @@ class ShowRuntimeExtensionsAction extends Action2 {
|
|
|
449
452
|
constructor() {
|
|
450
453
|
super({
|
|
451
454
|
id: "workbench.action.showRuntimeExtensions",
|
|
452
|
-
title: ( localize2(
|
|
455
|
+
title: ( localize2(11991, "Show Running Extensions")),
|
|
453
456
|
category: Categories.Developer,
|
|
454
457
|
f1: true,
|
|
455
458
|
menu: {
|
|
@@ -10,7 +10,7 @@ import { EditorExtensions } from '@codingame/monaco-vscode-api/vscode/vs/workben
|
|
|
10
10
|
import { ShowRuntimeExtensionsAction } from './abstractRuntimeExtensionsEditor.js';
|
|
11
11
|
|
|
12
12
|
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
13
|
-
EditorPaneDescriptor.create(RuntimeExtensionsEditor, RuntimeExtensionsEditor.ID, ( localize(
|
|
13
|
+
EditorPaneDescriptor.create(RuntimeExtensionsEditor, RuntimeExtensionsEditor.ID, ( localize(12220, "Running Extensions"))),
|
|
14
14
|
[( new SyncDescriptor(RuntimeExtensionsInput))]
|
|
15
15
|
);
|
|
16
16
|
registerAction2(ShowRuntimeExtensionsAction);
|
package/vscode/src/vs/workbench/contrib/extensions/browser/media/runtimeExtensionsEditor.css
CHANGED
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
|
|
10
10
|
.runtime-extensions-editor .extension {
|
|
11
11
|
display: flex;
|
|
12
|
-
padding
|
|
13
|
-
|
|
12
|
+
padding: 0 var(--vscode-spacing-size200);
|
|
13
|
+
height: 100%;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.runtime-extensions-editor .extension .desc {
|
|
17
17
|
flex: 1;
|
|
18
|
-
padding:
|
|
18
|
+
padding: var(--vscode-spacing-size120) 0 var(--vscode-spacing-size80) 0;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.runtime-extensions-editor .extension .desc .name {
|
|
22
|
-
font-weight:
|
|
22
|
+
font-weight: var(--vscode-fontWeight-semiBold);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.runtime-extensions-editor .extension .desc .msg .codicon {
|
|
@@ -27,14 +27,16 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.runtime-extensions-editor .extension .time {
|
|
30
|
-
padding:
|
|
30
|
+
padding: var(--vscode-spacing-size120) var(--vscode-spacing-size40);
|
|
31
31
|
text-align: right;
|
|
32
|
+
font-size: var(--vscode-fontSize-label1);
|
|
33
|
+
color: var(--vscode-descriptionForeground);
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
.runtime-extensions-editor .extension .desc > .msg > span:not(:last-child)::after {
|
|
35
37
|
content: '\2022';
|
|
36
|
-
padding: 0
|
|
37
|
-
|
|
38
|
+
padding: 0 var(--vscode-spacing-size40);
|
|
39
|
+
color: var(--vscode-descriptionForeground);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
.runtime-extensions-editor .monaco-action-bar {
|
|
@@ -49,8 +51,14 @@
|
|
|
49
51
|
position: relative;
|
|
50
52
|
}
|
|
51
53
|
|
|
54
|
+
.runtime-extensions-editor .extension > .icon-container > .extension-icon {
|
|
55
|
+
height: 100%;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
}
|
|
59
|
+
|
|
52
60
|
.runtime-extensions-editor .extension > .icon-container > .extension-icon .icon {
|
|
53
|
-
padding:
|
|
61
|
+
padding: var(--vscode-spacing-size100) var(--vscode-spacing-size100) var(--vscode-spacing-size100) 0;
|
|
54
62
|
}
|
|
55
63
|
|
|
56
64
|
.runtime-extensions-editor .extension > .icon-container .extension-icon-badge .codicon {
|
|
@@ -72,15 +80,15 @@
|
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
.runtime-extensions-editor .extension > .desc > .header-container > .header > .name {
|
|
75
|
-
font-weight:
|
|
83
|
+
font-weight: var(--vscode-fontWeight-semiBold);
|
|
76
84
|
white-space: nowrap;
|
|
77
85
|
text-overflow: ellipsis;
|
|
78
86
|
overflow: hidden;
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
.runtime-extensions-editor .extension > .desc > .header-container > .header > .version {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
padding-left:
|
|
90
|
+
font-size: var(--vscode-fontSize-label3);
|
|
91
|
+
color: var(--vscode-descriptionForeground);
|
|
92
|
+
padding-left: var(--vscode-spacing-size80);
|
|
85
93
|
min-width: fit-content;
|
|
86
94
|
}
|
|
@@ -13,7 +13,7 @@ let ReportExtensionIssueAction = class ReportExtensionIssueAction extends Action
|
|
|
13
13
|
this._id = "workbench.extensions.action.reportExtensionIssue";
|
|
14
14
|
}
|
|
15
15
|
static {
|
|
16
|
-
this._label = ( localize(
|
|
16
|
+
this._label = ( localize(12605, "Report Issue"));
|
|
17
17
|
}
|
|
18
18
|
constructor(extension, issueService) {
|
|
19
19
|
super(
|
|
@@ -6,7 +6,7 @@ import { EditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/co
|
|
|
6
6
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
7
7
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
8
8
|
|
|
9
|
-
const RuntimeExtensionsEditorIcon = registerIcon("runtime-extensions-editor-label-icon", Codicon.extensions, ( localize(
|
|
9
|
+
const RuntimeExtensionsEditorIcon = registerIcon("runtime-extensions-editor-label-icon", Codicon.extensions, ( localize(12606, "Icon of the runtime extensions editor label.")));
|
|
10
10
|
class RuntimeExtensionsInput extends EditorInput {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
@@ -31,7 +31,7 @@ class RuntimeExtensionsInput extends EditorInput {
|
|
|
31
31
|
return RuntimeExtensionsInput._instance;
|
|
32
32
|
}
|
|
33
33
|
getName() {
|
|
34
|
-
return localize(
|
|
34
|
+
return localize(12607, "Running Extensions");
|
|
35
35
|
}
|
|
36
36
|
getIcon() {
|
|
37
37
|
return RuntimeExtensionsEditorIcon;
|
package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js
CHANGED
|
@@ -15,6 +15,7 @@ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
15
15
|
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
16
16
|
import { isAuthenticationProviderExtension, isLanguagePackExtension, ExtensionType, isResolverExtension } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
17
17
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
18
|
+
import { ChatAIDisabledSettingId } from '@codingame/monaco-vscode-api/vscode/vs/platform/chat/common/chatSettings';
|
|
18
19
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
19
20
|
import { StorageManager } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionEnablementService';
|
|
20
21
|
import { webWorkerExtHostConfig } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
|
|
@@ -151,8 +152,8 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
151
152
|
}));
|
|
152
153
|
if (this.allUserExtensionsDisabled) {
|
|
153
154
|
this.lifecycleService.when(LifecyclePhase.Eventually).then(() => {
|
|
154
|
-
this.notificationService.prompt(Severity.Info, ( localize(
|
|
155
|
-
label: ( localize(
|
|
155
|
+
this.notificationService.prompt(Severity.Info, ( localize(19329, "All installed extensions are temporarily disabled.")), [{
|
|
156
|
+
label: ( localize(19330, "Reload and Enable Extensions")),
|
|
156
157
|
run: () => hostService.reload({
|
|
157
158
|
disableExtensions: false
|
|
158
159
|
})
|
|
@@ -186,9 +187,9 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
186
187
|
if (this._isDisabledGlobally({
|
|
187
188
|
id: this._chatExtensionId
|
|
188
189
|
})) {
|
|
189
|
-
if (this.configurationService.getValue(
|
|
190
|
+
if (this.configurationService.getValue(ChatAIDisabledSettingId) !== true) {
|
|
190
191
|
this.logService.debug("Disabling AI features because builtin chat extension is disabled");
|
|
191
|
-
this.configurationService.updateValue(
|
|
192
|
+
this.configurationService.updateValue(ChatAIDisabledSettingId, true).catch(err => this.logService.error(
|
|
192
193
|
"Failed to update chat.disableAIFeatures setting during builtin chat extension enablement migration",
|
|
193
194
|
err
|
|
194
195
|
));
|
|
@@ -268,21 +269,21 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
268
269
|
throwErrorIfCannotChangeEnablement(extension, donotCheckDependencies) {
|
|
269
270
|
if (isLanguagePackExtension(extension.manifest)) {
|
|
270
271
|
throw ( new Error(( localize(
|
|
271
|
-
|
|
272
|
+
19331,
|
|
272
273
|
"Cannot change enablement of {0} extension because it contributes language packs.",
|
|
273
274
|
extension.manifest.displayName || extension.identifier.id
|
|
274
275
|
))));
|
|
275
276
|
}
|
|
276
277
|
if (this.isDefaultOrSettingsSyncAuthProviderExtension(extension.manifest)) {
|
|
277
278
|
throw ( new Error(( localize(
|
|
278
|
-
|
|
279
|
+
19332,
|
|
279
280
|
"Cannot change enablement of {0} extension because Settings Sync depends on it.",
|
|
280
281
|
extension.manifest.displayName || extension.identifier.id
|
|
281
282
|
))));
|
|
282
283
|
}
|
|
283
284
|
if (this._isEnabledInEnv(extension)) {
|
|
284
285
|
throw ( new Error(( localize(
|
|
285
|
-
|
|
286
|
+
19333,
|
|
286
287
|
"Cannot change enablement of {0} extension because it is enabled in environment",
|
|
287
288
|
extension.manifest.displayName || extension.identifier.id
|
|
288
289
|
))));
|
|
@@ -293,37 +294,37 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
293
294
|
switch (enablementStateOfExtension) {
|
|
294
295
|
case EnablementState.DisabledByEnvironment:
|
|
295
296
|
throw ( new Error(( localize(
|
|
296
|
-
|
|
297
|
+
19334,
|
|
297
298
|
"Cannot change enablement of {0} extension because it is disabled in environment",
|
|
298
299
|
extension.manifest.displayName || extension.identifier.id
|
|
299
300
|
))));
|
|
300
301
|
case EnablementState.DisabledByMalicious:
|
|
301
302
|
throw ( new Error(( localize(
|
|
302
|
-
|
|
303
|
+
19335,
|
|
303
304
|
"Cannot change enablement of {0} extension because it is malicious",
|
|
304
305
|
extension.manifest.displayName || extension.identifier.id
|
|
305
306
|
))));
|
|
306
307
|
case EnablementState.DisabledByVirtualWorkspace:
|
|
307
308
|
throw ( new Error(( localize(
|
|
308
|
-
|
|
309
|
+
19336,
|
|
309
310
|
"Cannot change enablement of {0} extension because it does not support virtual workspaces",
|
|
310
311
|
extension.manifest.displayName || extension.identifier.id
|
|
311
312
|
))));
|
|
312
313
|
case EnablementState.DisabledByExtensionKind:
|
|
313
314
|
throw ( new Error(( localize(
|
|
314
|
-
|
|
315
|
+
19337,
|
|
315
316
|
"Cannot change enablement of {0} extension because of its extension kind",
|
|
316
317
|
extension.manifest.displayName || extension.identifier.id
|
|
317
318
|
))));
|
|
318
319
|
case EnablementState.DisabledByAllowlist:
|
|
319
320
|
throw ( new Error(( localize(
|
|
320
|
-
|
|
321
|
+
19338,
|
|
321
322
|
"Cannot change enablement of {0} extension because it is disallowed",
|
|
322
323
|
extension.manifest.displayName || extension.identifier.id
|
|
323
324
|
))));
|
|
324
325
|
case EnablementState.DisabledByInvalidExtension:
|
|
325
326
|
throw ( new Error(( localize(
|
|
326
|
-
|
|
327
|
+
19339,
|
|
327
328
|
"Cannot change enablement of {0} extension because of it is invalid",
|
|
328
329
|
extension.manifest.displayName || extension.identifier.id
|
|
329
330
|
))));
|
|
@@ -336,7 +337,7 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
336
337
|
continue;
|
|
337
338
|
}
|
|
338
339
|
throw ( new Error(( localize(
|
|
339
|
-
|
|
340
|
+
19340,
|
|
340
341
|
"Cannot enable '{0}' extension because it depends on '{1}' extension that cannot be enabled",
|
|
341
342
|
extension.manifest.displayName || extension.identifier.id,
|
|
342
343
|
dependency.manifest.displayName || dependency.identifier.id
|
|
@@ -346,11 +347,11 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
346
347
|
}
|
|
347
348
|
throwErrorIfCannotChangeWorkspaceEnablement(extension) {
|
|
348
349
|
if (!this.hasWorkspace) {
|
|
349
|
-
throw ( new Error(( localize(
|
|
350
|
+
throw ( new Error(( localize(19341, "No workspace."))));
|
|
350
351
|
}
|
|
351
352
|
if (this.isDefaultOrSettingsSyncAuthProviderExtension(extension.manifest)) {
|
|
352
353
|
throw ( new Error(( localize(
|
|
353
|
-
|
|
354
|
+
19342,
|
|
354
355
|
"Cannot change enablement of {0} extension in workspace because Settings Sync depends on it.",
|
|
355
356
|
extension.manifest.displayName || extension.identifier.id
|
|
356
357
|
))));
|
|
@@ -96,17 +96,17 @@ let ExtensionFeaturesManagementService = class ExtensionFeaturesManagementServic
|
|
|
96
96
|
if (feature.access.requireUserConsent) {
|
|
97
97
|
const extensionDescription = this.extensionService.extensions.find(e => ExtensionIdentifier.equals(e.identifier, extension));
|
|
98
98
|
const confirmationResult = await this.dialogService.confirm({
|
|
99
|
-
title: ( localize(
|
|
99
|
+
title: ( localize(19345, "Access '{0}' Feature", feature.label)),
|
|
100
100
|
message: ( localize(
|
|
101
|
-
|
|
101
|
+
19346,
|
|
102
102
|
"'{0}' extension would like to access the '{1}' feature.",
|
|
103
103
|
extensionDescription?.displayName ?? extension._lower,
|
|
104
104
|
feature.label
|
|
105
105
|
)),
|
|
106
106
|
detail: justification ?? feature.description,
|
|
107
107
|
custom: true,
|
|
108
|
-
primaryButton: ( localize(
|
|
109
|
-
cancelButton: ( localize(
|
|
108
|
+
primaryButton: ( localize(19347, "Allow")),
|
|
109
|
+
cancelButton: ( localize(19348, "Don't Allow"))
|
|
110
110
|
});
|
|
111
111
|
enabled = confirmationResult.confirmed;
|
|
112
112
|
}
|
|
@@ -26,7 +26,7 @@ let ExtensionManagementServerService = class ExtensionManagementServerService {
|
|
|
26
26
|
id: "remote",
|
|
27
27
|
extensionManagementService,
|
|
28
28
|
get label() {
|
|
29
|
-
return labelService.getHostLabel(Schemas.vscodeRemote, remoteAgentConnection.remoteAuthority) || ( localize(
|
|
29
|
+
return labelService.getHostLabel(Schemas.vscodeRemote, remoteAgentConnection.remoteAuthority) || ( localize(19349, "Remote"));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
}
|
|
@@ -35,7 +35,7 @@ let ExtensionManagementServerService = class ExtensionManagementServerService {
|
|
|
35
35
|
this.webExtensionManagementServer = {
|
|
36
36
|
id: "web",
|
|
37
37
|
extensionManagementService,
|
|
38
|
-
label: ( localize(
|
|
38
|
+
label: ( localize(19350, "Browser"))
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
}
|
package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js
CHANGED
|
@@ -279,7 +279,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
279
279
|
getDependentsErrorMessage(extension, dependents) {
|
|
280
280
|
if (dependents.length === 1) {
|
|
281
281
|
return localize(
|
|
282
|
-
|
|
282
|
+
19351,
|
|
283
283
|
"Cannot uninstall extension '{0}'. Extension '{1}' depends on this.",
|
|
284
284
|
extension.manifest.displayName || extension.manifest.name,
|
|
285
285
|
dependents[0].manifest.displayName || dependents[0].manifest.name
|
|
@@ -287,7 +287,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
287
287
|
}
|
|
288
288
|
if (dependents.length === 2) {
|
|
289
289
|
return localize(
|
|
290
|
-
|
|
290
|
+
19352,
|
|
291
291
|
"Cannot uninstall extension '{0}'. Extensions '{1}' and '{2}' depend on this.",
|
|
292
292
|
extension.manifest.displayName || extension.manifest.name,
|
|
293
293
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -295,7 +295,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
297
|
return localize(
|
|
298
|
-
|
|
298
|
+
19353,
|
|
299
299
|
"Cannot uninstall extension '{0}'. Extensions '{1}', '{2}' and others depend on this.",
|
|
300
300
|
extension.manifest.displayName || extension.manifest.name,
|
|
301
301
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -407,7 +407,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
407
407
|
}
|
|
408
408
|
const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None);
|
|
409
409
|
if (!manifest) {
|
|
410
|
-
return ( new MarkdownString()).appendText(( localize(
|
|
410
|
+
return ( new MarkdownString()).appendText(( localize(19354, "Manifest is not found")));
|
|
411
411
|
}
|
|
412
412
|
if (this.extensionManagementServerService.remoteExtensionManagementServer && (await this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.canInstall(gallery)) === true && this.extensionManifestPropertiesService.canExecuteOnWorkspace(manifest)) {
|
|
413
413
|
return true;
|
|
@@ -416,7 +416,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
416
416
|
return true;
|
|
417
417
|
}
|
|
418
418
|
return ( new MarkdownString()).appendText(( localize(
|
|
419
|
-
|
|
419
|
+
19355,
|
|
420
420
|
"Cannot install the '{0}' extension because it is not available in this setup.",
|
|
421
421
|
gallery.displayName || gallery.name
|
|
422
422
|
)));
|
|
@@ -432,7 +432,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
432
432
|
return true;
|
|
433
433
|
}
|
|
434
434
|
return ( new MarkdownString()).appendText(( localize(
|
|
435
|
-
|
|
435
|
+
19355,
|
|
436
436
|
"Cannot install the '{0}' extension because it is not available in this setup.",
|
|
437
437
|
extension.manifest.displayName ?? extension.identifier.id
|
|
438
438
|
)));
|
|
@@ -469,7 +469,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
469
469
|
const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
|
|
470
470
|
if (!manifest) {
|
|
471
471
|
throw ( new Error(( localize(
|
|
472
|
-
|
|
472
|
+
19356,
|
|
473
473
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
474
474
|
extension.displayName || extension.name
|
|
475
475
|
))));
|
|
@@ -495,7 +495,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
495
495
|
const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
|
|
496
496
|
if (!manifest) {
|
|
497
497
|
throw ( new Error(( localize(
|
|
498
|
-
|
|
498
|
+
19356,
|
|
499
499
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
500
500
|
extension.displayName || extension.name
|
|
501
501
|
))));
|
|
@@ -544,7 +544,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
544
544
|
const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None);
|
|
545
545
|
if (!manifest) {
|
|
546
546
|
throw ( new Error(( localize(
|
|
547
|
-
|
|
547
|
+
19356,
|
|
548
548
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
549
549
|
gallery.displayName || gallery.name
|
|
550
550
|
))));
|
|
@@ -659,7 +659,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
659
659
|
const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None);
|
|
660
660
|
if (!manifest) {
|
|
661
661
|
return Promise.reject(( localize(
|
|
662
|
-
|
|
662
|
+
19356,
|
|
663
663
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
664
664
|
gallery.displayName || gallery.name
|
|
665
665
|
)));
|
|
@@ -715,7 +715,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
715
715
|
for (const server of servers) {
|
|
716
716
|
if (!installableServers.includes(server)) {
|
|
717
717
|
const error = ( new Error(( localize(
|
|
718
|
-
|
|
718
|
+
19357,
|
|
719
719
|
"Cannot install the '{0}' extension because it is not available in the '{1}' setup.",
|
|
720
720
|
gallery.displayName || gallery.name,
|
|
721
721
|
server.label
|
|
@@ -740,7 +740,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
740
740
|
}
|
|
741
741
|
if (!servers.length) {
|
|
742
742
|
const error = ( new Error(( localize(
|
|
743
|
-
|
|
743
|
+
19355,
|
|
744
744
|
"Cannot install the '{0}' extension because it is not available in this setup.",
|
|
745
745
|
gallery.displayName || gallery.name
|
|
746
746
|
))));
|
|
@@ -780,20 +780,20 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
780
780
|
result
|
|
781
781
|
} = await this.dialogService.prompt({
|
|
782
782
|
type: Severity.Info,
|
|
783
|
-
message: extensions.length === 1 ? ( localize(
|
|
783
|
+
message: extensions.length === 1 ? ( localize(19358, "Install Extension")) : ( localize(19359, "Install Extensions")),
|
|
784
784
|
detail: extensions.length === 1 ? ( localize(
|
|
785
|
-
|
|
785
|
+
19360,
|
|
786
786
|
"Would you like to install and synchronize '{0}' extension across your devices?",
|
|
787
787
|
extensions[0].displayName
|
|
788
788
|
)) : ( localize(
|
|
789
|
-
|
|
789
|
+
19361,
|
|
790
790
|
"Would you like to install and synchronize extensions across your devices?"
|
|
791
791
|
)),
|
|
792
792
|
buttons: [{
|
|
793
|
-
label: ( localize(
|
|
793
|
+
label: ( localize(19362, "&&Install")),
|
|
794
794
|
run: () => false
|
|
795
795
|
}, {
|
|
796
|
-
label: ( localize(
|
|
796
|
+
label: ( localize(19363, "Install (Do &¬ sync)")),
|
|
797
797
|
run: () => true
|
|
798
798
|
}],
|
|
799
799
|
cancelButton: {
|
|
@@ -845,7 +845,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
845
845
|
const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
|
|
846
846
|
if (!manifest) {
|
|
847
847
|
throw ( new Error(( localize(
|
|
848
|
-
|
|
848
|
+
19356,
|
|
849
849
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
850
850
|
extension.displayName || extension.name
|
|
851
851
|
))));
|
|
@@ -886,7 +886,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
886
886
|
const unverfiiedPublishers = allPublishers.filter(p => !p.publisherDomain?.verified);
|
|
887
887
|
const verifiedPublishers = allPublishers.filter(p => p.publisherDomain?.verified);
|
|
888
888
|
const installButton = {
|
|
889
|
-
label: allPublishers.length > 1 ? ( localize(
|
|
889
|
+
label: allPublishers.length > 1 ? ( localize(19364, "Trust Publishers & &&Install")) : ( localize(19365, "Trust Publisher & &&Install")),
|
|
890
890
|
run: () => {
|
|
891
891
|
this.telemetryService.publicLog2("extensions:trustPublisher", {
|
|
892
892
|
action: "trust",
|
|
@@ -899,7 +899,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
899
899
|
}
|
|
900
900
|
};
|
|
901
901
|
const learnMoreButton = {
|
|
902
|
-
label: ( localize(
|
|
902
|
+
label: ( localize(19366, "&&Learn More")),
|
|
903
903
|
run: () => {
|
|
904
904
|
this.telemetryService.publicLog2("extensions:trustPublisher", {
|
|
905
905
|
action: "learn",
|
|
@@ -921,16 +921,16 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
921
921
|
};
|
|
922
922
|
const unverifiedLink = "https://aka.ms/vscode-verify-publisher";
|
|
923
923
|
const title = allPublishers.length === 1 ? ( localize(
|
|
924
|
-
|
|
924
|
+
19367,
|
|
925
925
|
"Do you trust the publisher \"{0}\"?",
|
|
926
926
|
allPublishers[0].publisherDisplayName
|
|
927
927
|
)) : allPublishers.length === 2 ? ( localize(
|
|
928
|
-
|
|
928
|
+
19368,
|
|
929
929
|
"Do you trust publishers \"{0}\" and \"{1}\"?",
|
|
930
930
|
allPublishers[0].publisherDisplayName,
|
|
931
931
|
allPublishers[1].publisherDisplayName
|
|
932
932
|
)) : ( localize(
|
|
933
|
-
|
|
933
|
+
19369,
|
|
934
934
|
"Do you trust the publisher \"{0}\" and {1} others?",
|
|
935
935
|
allPublishers[0].publisherDisplayName,
|
|
936
936
|
allPublishers.length - 1
|
|
@@ -944,7 +944,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
944
944
|
const manifest = untrustedExtensionManifests[0];
|
|
945
945
|
if (otherUntrustedPublishers.length) {
|
|
946
946
|
customMessage.appendMarkdown(( localize(
|
|
947
|
-
|
|
947
|
+
19370,
|
|
948
948
|
"The extension {0} is published by {1}.",
|
|
949
949
|
`[${extension.displayName}](${extension.detailsLink})`,
|
|
950
950
|
getPublisherLink(extension)
|
|
@@ -957,14 +957,14 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
957
957
|
).toString());
|
|
958
958
|
if (otherUntrustedPublishers.length === 1) {
|
|
959
959
|
customMessage.appendMarkdown(( localize(
|
|
960
|
-
|
|
960
|
+
19371,
|
|
961
961
|
"Installing this extension will also install [extensions]({0}) published by {1}.",
|
|
962
962
|
commandUri,
|
|
963
963
|
getPublisherLink(otherUntrustedPublishers[0])
|
|
964
964
|
)));
|
|
965
965
|
} else {
|
|
966
966
|
customMessage.appendMarkdown(( localize(
|
|
967
|
-
|
|
967
|
+
19372,
|
|
968
968
|
"Installing this extension will also install [extensions]({0}) published by {1} and {2}.",
|
|
969
969
|
commandUri,
|
|
970
970
|
( otherUntrustedPublishers.slice(0, otherUntrustedPublishers.length - 1).map(p => getPublisherLink(p))).join(", "),
|
|
@@ -973,12 +973,12 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
973
973
|
}
|
|
974
974
|
customMessage.appendMarkdown(" ");
|
|
975
975
|
customMessage.appendMarkdown(( localize(
|
|
976
|
-
|
|
976
|
+
19373,
|
|
977
977
|
"This is the first time you're installing extensions from these publishers."
|
|
978
978
|
)));
|
|
979
979
|
} else {
|
|
980
980
|
customMessage.appendMarkdown(( localize(
|
|
981
|
-
|
|
981
|
+
19374,
|
|
982
982
|
"The extension {0} is published by {1}. This is the first extension you're installing from this publisher.",
|
|
983
983
|
`[${extension.displayName}](${extension.detailsLink})`,
|
|
984
984
|
getPublisherLink(extension)
|
|
@@ -986,7 +986,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
986
986
|
}
|
|
987
987
|
} else {
|
|
988
988
|
customMessage.appendMarkdown(( localize(
|
|
989
|
-
|
|
989
|
+
19375,
|
|
990
990
|
"This is the first time you're installing extensions from publishers {0} and {1}.",
|
|
991
991
|
getPublisherLink(allPublishers[0]),
|
|
992
992
|
getPublisherLink(allPublishers[allPublishers.length - 1])
|
|
@@ -996,7 +996,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
996
996
|
for (const publisher of verifiedPublishers) {
|
|
997
997
|
customMessage.appendText("\n");
|
|
998
998
|
const publisherVerifiedMessage = ( localize(
|
|
999
|
-
|
|
999
|
+
19376,
|
|
1000
1000
|
"{0} has verified ownership of {1}.",
|
|
1001
1001
|
getPublisherLink(publisher),
|
|
1002
1002
|
`[$(link-external) ${( URI.parse(publisher.publisherDomain.link)).authority}](${publisher.publisherDomain.link})`
|
|
@@ -1007,14 +1007,14 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1007
1007
|
customMessage.appendText("\n");
|
|
1008
1008
|
if (unverfiiedPublishers.length === 1) {
|
|
1009
1009
|
customMessage.appendMarkdown(`$(${Codicon.unverified.id}) ${( localize(
|
|
1010
|
-
|
|
1010
|
+
19377,
|
|
1011
1011
|
"{0} is [**not** verified]({1}).",
|
|
1012
1012
|
getPublisherLink(unverfiiedPublishers[0]),
|
|
1013
1013
|
unverifiedLink
|
|
1014
1014
|
))}`);
|
|
1015
1015
|
} else {
|
|
1016
1016
|
customMessage.appendMarkdown(`$(${Codicon.unverified.id}) ${( localize(
|
|
1017
|
-
|
|
1017
|
+
19378,
|
|
1018
1018
|
"{0} and {1} are [**not** verified]({2}).",
|
|
1019
1019
|
( unverfiiedPublishers.slice(0, unverfiiedPublishers.length - 1).map(p => getPublisherLink(p))).join(", "),
|
|
1020
1020
|
getPublisherLink(unverfiiedPublishers[unverfiiedPublishers.length - 1]),
|
|
@@ -1024,18 +1024,18 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1024
1024
|
}
|
|
1025
1025
|
} else {
|
|
1026
1026
|
customMessage.appendText("\n");
|
|
1027
|
-
customMessage.appendMarkdown(`$(${Codicon.unverified.id}) ${( localize(
|
|
1027
|
+
customMessage.appendMarkdown(`$(${Codicon.unverified.id}) ${( localize(19379, "All publishers are [**not** verified]({0}).", unverifiedLink))}`);
|
|
1028
1028
|
}
|
|
1029
1029
|
customMessage.appendText("\n");
|
|
1030
1030
|
if (allPublishers.length > 1) {
|
|
1031
1031
|
customMessage.appendMarkdown(( localize(
|
|
1032
|
-
|
|
1032
|
+
19380,
|
|
1033
1033
|
"{0} has no control over the behavior of third-party extensions, including how they manage your personal data. Proceed only if you trust the publishers.",
|
|
1034
1034
|
this.productService.nameLong
|
|
1035
1035
|
)));
|
|
1036
1036
|
} else {
|
|
1037
1037
|
customMessage.appendMarkdown(( localize(
|
|
1038
|
-
|
|
1038
|
+
19381,
|
|
1039
1039
|
"{0} has no control over the behavior of third-party extensions, including how they manage your personal data. Proceed only if you trust the publisher.",
|
|
1040
1040
|
this.productService.nameLong
|
|
1041
1041
|
)));
|
|
@@ -1126,21 +1126,21 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1126
1126
|
if (requireTrust || this.extensionManifestPropertiesService.getExtensionUntrustedWorkspaceSupportType(manifest) === false) {
|
|
1127
1127
|
const buttons = [];
|
|
1128
1128
|
buttons.push({
|
|
1129
|
-
label: ( localize(
|
|
1129
|
+
label: ( localize(19382, "Trust Workspace & Install")),
|
|
1130
1130
|
type: "ContinueWithTrust"
|
|
1131
1131
|
});
|
|
1132
1132
|
if (!requireTrust) {
|
|
1133
1133
|
buttons.push({
|
|
1134
|
-
label: ( localize(
|
|
1134
|
+
label: ( localize(19383, "Install")),
|
|
1135
1135
|
type: "ContinueWithoutTrust"
|
|
1136
1136
|
});
|
|
1137
1137
|
}
|
|
1138
1138
|
buttons.push({
|
|
1139
|
-
label: ( localize(
|
|
1139
|
+
label: ( localize(19384, "Learn More")),
|
|
1140
1140
|
type: "Manage"
|
|
1141
1141
|
});
|
|
1142
1142
|
const trustState = await this.workspaceTrustRequestService.requestWorkspaceTrust({
|
|
1143
|
-
message: ( localize(
|
|
1143
|
+
message: ( localize(19385, "Enabling this extension requires a trusted workspace.")),
|
|
1144
1144
|
buttons
|
|
1145
1145
|
});
|
|
1146
1146
|
if (trustState === undefined) {
|
|
@@ -1166,7 +1166,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1166
1166
|
throw ( new ExtensionManagementError("Not supported in Web", ExtensionManagementErrorCode.Unsupported));
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
const productName = ( localize(
|
|
1169
|
+
const productName = ( localize(19386, "{0} for the Web", this.productService.nameLong));
|
|
1170
1170
|
const virtualWorkspaceSupport = this.extensionManifestPropertiesService.getExtensionVirtualWorkspaceSupportType(manifest);
|
|
1171
1171
|
const virtualWorkspaceSupportReason = getWorkspaceSupportTypeMessage(manifest.capabilities?.virtualWorkspaces);
|
|
1172
1172
|
const hasLimitedSupport = virtualWorkspaceSupport === "limited" || !!virtualWorkspaceSupportReason;
|
|
@@ -1174,7 +1174,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1174
1174
|
return;
|
|
1175
1175
|
}
|
|
1176
1176
|
const limitedSupportMessage = ( localize(
|
|
1177
|
-
|
|
1177
|
+
19387,
|
|
1178
1178
|
"'{0}' has limited functionality in {1}.",
|
|
1179
1179
|
extension.displayName || extension.identifier.id,
|
|
1180
1180
|
productName
|
|
@@ -1183,18 +1183,18 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1183
1183
|
let buttons = [];
|
|
1184
1184
|
let detail;
|
|
1185
1185
|
const installAnywayButton = {
|
|
1186
|
-
label: ( localize(
|
|
1186
|
+
label: ( localize(19388, "&&Install Anyway")),
|
|
1187
1187
|
run: () => {}
|
|
1188
1188
|
};
|
|
1189
1189
|
const showExtensionsButton = {
|
|
1190
|
-
label: ( localize(
|
|
1190
|
+
label: ( localize(19389, "&&Show Extensions")),
|
|
1191
1191
|
run: () => this.instantiationService.invokeFunction(
|
|
1192
1192
|
accessor => accessor.get(ICommandService).executeCommand("extension.open", extension.identifier.id, "extensionPack")
|
|
1193
1193
|
)
|
|
1194
1194
|
};
|
|
1195
1195
|
if (nonWebExtensions.length && hasLimitedSupport) {
|
|
1196
1196
|
message = limitedSupportMessage;
|
|
1197
|
-
detail = `${virtualWorkspaceSupportReason ? `${virtualWorkspaceSupportReason}\n` : ""}${( localize(
|
|
1197
|
+
detail = `${virtualWorkspaceSupportReason ? `${virtualWorkspaceSupportReason}\n` : ""}${( localize(19390, "Contains extensions which are not supported."))}`;
|
|
1198
1198
|
buttons = [installAnywayButton, showExtensionsButton];
|
|
1199
1199
|
} else if (hasLimitedSupport) {
|
|
1200
1200
|
message = limitedSupportMessage;
|
|
@@ -1202,7 +1202,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1202
1202
|
buttons = [installAnywayButton];
|
|
1203
1203
|
} else {
|
|
1204
1204
|
message = ( localize(
|
|
1205
|
-
|
|
1205
|
+
19391,
|
|
1206
1206
|
"'{0}' contains extensions which are not supported in {1}.",
|
|
1207
1207
|
extension.displayName || extension.identifier.id,
|
|
1208
1208
|
productName
|
|
@@ -1514,7 +1514,7 @@ let WorkspaceExtensionsManagementService = class WorkspaceExtensionsManagementSe
|
|
|
1514
1514
|
this.uriIdentityService.extUri.joinPath(extension.location, extension.manifest.main)
|
|
1515
1515
|
))) {
|
|
1516
1516
|
isValid = false;
|
|
1517
|
-
validations.push([Severity.Error, ( localize(
|
|
1517
|
+
validations.push([Severity.Error, ( localize(19392, "Cannot activate because {0} not found", extension.manifest.main))]);
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
1520
|
return {
|