@codingame/monaco-vscode-extension-gallery-service-override 34.1.2 → 35.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 -28
- package/vscode/src/vs/platform/extensionManagement/common/allowedExtensionsService.js +5 -5
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.d.ts +0 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js +1 -14
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +18 -18
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js +1 -1
- 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.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +38 -22
- 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": "35.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": "35.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js
CHANGED
|
@@ -14,7 +14,6 @@ import { TargetPlatformToString, isTargetPlatformCompatible, ExtensionManagement
|
|
|
14
14
|
import { IAllowedExtensionsService, IExtensionGalleryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
15
15
|
import { areSameExtensions, ExtensionKey, getGalleryExtensionId, getGalleryExtensionTelemetryData, isMalicious, getLocalExtensionTelemetryData } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
16
16
|
import { isApplicationScopedExtension, ExtensionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
17
|
-
import { areApiProposalsCompatible } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensionValidator';
|
|
18
17
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
19
18
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
20
19
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
@@ -36,7 +35,7 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
36
35
|
});
|
|
37
36
|
if (allowedToInstall !== true) {
|
|
38
37
|
return (new MarkdownString(localize(
|
|
39
|
-
|
|
38
|
+
1988,
|
|
40
39
|
"This extension cannot be installed because {0}",
|
|
41
40
|
allowedToInstall.value
|
|
42
41
|
)));
|
|
@@ -44,12 +43,12 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
44
43
|
if (!(await this.isExtensionPlatformCompatible(extension))) {
|
|
45
44
|
const learnLink = isWeb ? "https://aka.ms/vscode-web-extensions-guide" : "https://aka.ms/vscode-platform-specific-extensions";
|
|
46
45
|
return (new MarkdownString(`${( localize(
|
|
47
|
-
|
|
46
|
+
1989,
|
|
48
47
|
"The '{0}' extension is not available in {1} for the {2} platform.",
|
|
49
48
|
extension.displayName ?? extension.identifier.id,
|
|
50
49
|
this.productService.nameLong,
|
|
51
50
|
TargetPlatformToString(await this.getTargetPlatform())
|
|
52
|
-
))} [${( localize(
|
|
51
|
+
))} [${( localize(1990, "Learn Why"))}](${learnLink})`));
|
|
53
52
|
}
|
|
54
53
|
return true;
|
|
55
54
|
}
|
|
@@ -146,7 +145,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
146
145
|
}
|
|
147
146
|
async installGalleryExtensions(extensions) {
|
|
148
147
|
if (!this.galleryService.isEnabled()) {
|
|
149
|
-
throw ( new ExtensionManagementError(( localize(
|
|
148
|
+
throw ( new ExtensionManagementError(( localize(1991, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
|
|
150
149
|
}
|
|
151
150
|
const results = [];
|
|
152
151
|
const installableExtensions = [];
|
|
@@ -833,7 +832,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
833
832
|
const extensionsControlManifest = await this.getExtensionsControlManifest();
|
|
834
833
|
if (isMalicious(extension.identifier, extensionsControlManifest.malicious)) {
|
|
835
834
|
throw ( new ExtensionManagementError(( localize(
|
|
836
|
-
|
|
835
|
+
1992,
|
|
837
836
|
"Can't install '{0}' extension since it was reported to be problematic.",
|
|
838
837
|
extension.identifier.id
|
|
839
838
|
)), ExtensionManagementErrorCode.Malicious));
|
|
@@ -853,7 +852,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
853
852
|
}, CancellationToken.None))[0];
|
|
854
853
|
if (!compatibleExtension) {
|
|
855
854
|
throw ( new ExtensionManagementError(( localize(
|
|
856
|
-
|
|
855
|
+
1993,
|
|
857
856
|
"Can't install '{0}' extension since it was deprecated and the replacement extension '{1}' can't be found.",
|
|
858
857
|
extension.identifier.id,
|
|
859
858
|
deprecationInfo.extension.id
|
|
@@ -863,7 +862,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
863
862
|
if ((await this.canInstall(extension)) !== true) {
|
|
864
863
|
const targetPlatform = await this.getTargetPlatform();
|
|
865
864
|
throw ( new ExtensionManagementError(( localize(
|
|
866
|
-
|
|
865
|
+
1989,
|
|
867
866
|
"The '{0}' extension is not available in {1} for the {2} platform.",
|
|
868
867
|
extension.identifier.id,
|
|
869
868
|
this.productService.nameLong,
|
|
@@ -872,27 +871,15 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
872
871
|
}
|
|
873
872
|
compatibleExtension = await this.getCompatibleVersion(extension, sameVersion, installPreRelease, productVersion);
|
|
874
873
|
if (!compatibleExtension) {
|
|
875
|
-
const incompatibleApiProposalsMessages = [];
|
|
876
|
-
if (!areApiProposalsCompatible(
|
|
877
|
-
extension.properties.enabledApiProposals ?? [],
|
|
878
|
-
incompatibleApiProposalsMessages
|
|
879
|
-
)) {
|
|
880
|
-
throw ( new ExtensionManagementError(( localize(
|
|
881
|
-
1917,
|
|
882
|
-
"Can't install '{0}' extension. {1}",
|
|
883
|
-
extension.displayName ?? extension.identifier.id,
|
|
884
|
-
incompatibleApiProposalsMessages[0]
|
|
885
|
-
)), ExtensionManagementErrorCode.IncompatibleApi));
|
|
886
|
-
}
|
|
887
874
|
if (!installPreRelease && extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
|
|
888
875
|
throw ( new ExtensionManagementError(( localize(
|
|
889
|
-
|
|
876
|
+
1994,
|
|
890
877
|
"Can't install release version of '{0}' extension because it has no release version.",
|
|
891
878
|
extension.displayName ?? extension.identifier.id
|
|
892
879
|
)), ExtensionManagementErrorCode.ReleaseVersionNotFound));
|
|
893
880
|
}
|
|
894
881
|
throw ( new ExtensionManagementError(( localize(
|
|
895
|
-
|
|
882
|
+
1995,
|
|
896
883
|
"Can't install '{0}' extension because it is not compatible with the current version of {1} (version {2}).",
|
|
897
884
|
extension.identifier.id,
|
|
898
885
|
this.productService.nameLong,
|
|
@@ -1212,7 +1199,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1212
1199
|
if (extensionToUninstall === dependingExtension) {
|
|
1213
1200
|
if (dependents.length === 1) {
|
|
1214
1201
|
return localize(
|
|
1215
|
-
|
|
1202
|
+
1996,
|
|
1216
1203
|
"Cannot uninstall '{0}' extension. '{1}' extension depends on this.",
|
|
1217
1204
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1218
1205
|
dependents[0].manifest.displayName || dependents[0].manifest.name
|
|
@@ -1220,7 +1207,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1220
1207
|
}
|
|
1221
1208
|
if (dependents.length === 2) {
|
|
1222
1209
|
return localize(
|
|
1223
|
-
|
|
1210
|
+
1997,
|
|
1224
1211
|
"Cannot uninstall '{0}' extension. '{1}' and '{2}' extensions depend on this.",
|
|
1225
1212
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1226
1213
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -1228,7 +1215,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1228
1215
|
);
|
|
1229
1216
|
}
|
|
1230
1217
|
return localize(
|
|
1231
|
-
|
|
1218
|
+
1998,
|
|
1232
1219
|
"Cannot uninstall '{0}' extension. '{1}', '{2}' and other extension depend on this.",
|
|
1233
1220
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1234
1221
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -1237,7 +1224,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1237
1224
|
}
|
|
1238
1225
|
if (dependents.length === 1) {
|
|
1239
1226
|
return localize(
|
|
1240
|
-
|
|
1227
|
+
1999,
|
|
1241
1228
|
"Cannot uninstall '{0}' extension . It includes uninstalling '{1}' extension and '{2}' extension depends on this.",
|
|
1242
1229
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1243
1230
|
dependingExtension.manifest.displayName || dependingExtension.manifest.name,
|
|
@@ -1246,7 +1233,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1246
1233
|
}
|
|
1247
1234
|
if (dependents.length === 2) {
|
|
1248
1235
|
return localize(
|
|
1249
|
-
|
|
1236
|
+
2000,
|
|
1250
1237
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}' and '{3}' extensions depend on this.",
|
|
1251
1238
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1252
1239
|
dependingExtension.manifest.displayName || dependingExtension.manifest.name,
|
|
@@ -1255,7 +1242,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
1255
1242
|
);
|
|
1256
1243
|
}
|
|
1257
1244
|
return localize(
|
|
1258
|
-
|
|
1245
|
+
2001,
|
|
1259
1246
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}', '{3}' and other extensions depend on this.",
|
|
1260
1247
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
1261
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(2002, "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
|
+
2003,
|
|
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
|
+
2004,
|
|
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
|
+
2005,
|
|
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
|
+
2006,
|
|
132
132
|
"the pre-release versions from this publisher are not in the [allowed list]({1})",
|
|
133
133
|
publisherKey,
|
|
134
134
|
settingsCommandLink
|
|
@@ -65,7 +65,6 @@ export declare abstract class AbstractExtensionGalleryService implements IExtens
|
|
|
65
65
|
private readonly extensionsControlUrl;
|
|
66
66
|
private readonly unpkgResourceApi;
|
|
67
67
|
private readonly commonHeadersPromise;
|
|
68
|
-
private readonly extensionsEnabledWithApiProposalVersion;
|
|
69
68
|
constructor(storageService: IStorageService | undefined, requestService: IRequestService, logService: ILogService, environmentService: IEnvironmentService, telemetryService: ITelemetryService, fileService: IFileService, productService: IProductService, configurationService: IConfigurationService, allowedExtensionsService: IAllowedExtensionsService, extensionGalleryManifestService: IExtensionGalleryManifestService);
|
|
70
69
|
isEnabled(): boolean;
|
|
71
70
|
getExtensions(extensionInfos: ReadonlyArray<IExtensionInfo>, token: CancellationToken): Promise<IGalleryExtension[]>;
|
|
@@ -78,7 +77,6 @@ export declare abstract class AbstractExtensionGalleryService implements IExtens
|
|
|
78
77
|
getCompatibleExtension(extension: IGalleryExtension, includePreRelease: boolean, targetPlatform: TargetPlatform, productVersion?: IProductVersion): Promise<IGalleryExtension | null>;
|
|
79
78
|
isExtensionCompatible(extension: IGalleryExtension, includePreRelease: boolean, targetPlatform: TargetPlatform, productVersion?: IProductVersion): Promise<boolean>;
|
|
80
79
|
private isValidVersion;
|
|
81
|
-
private areApiProposalsCompatible;
|
|
82
80
|
private isEngineValid;
|
|
83
81
|
private getEngine;
|
|
84
82
|
query(options: IQueryOptions, token: CancellationToken): Promise<IPager<IGalleryExtension>>;
|
|
@@ -15,7 +15,7 @@ import { getTargetPlatform, SortOrder, SortBy, FilterType, toTargetPlatform, WEB
|
|
|
15
15
|
import { IAllowedExtensionsService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
16
16
|
import { adoptToGalleryExtensionId, getGalleryExtensionId, areSameExtensions, getGalleryExtensionTelemetryData } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
17
17
|
import { TargetPlatform } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
18
|
-
import {
|
|
18
|
+
import { isEngineValid } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensionValidator';
|
|
19
19
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
20
20
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
21
21
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
@@ -435,7 +435,6 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
435
435
|
this.extensionGalleryManifestService = extensionGalleryManifestService;
|
|
436
436
|
this.extensionsControlUrl = productService.extensionsGallery?.controlUrl;
|
|
437
437
|
this.unpkgResourceApi = productService.extensionsGallery?.extensionUrlTemplate;
|
|
438
|
-
this.extensionsEnabledWithApiProposalVersion = productService.extensionsEnabledWithApiProposalVersion?.map(id => id.toLowerCase()) ?? [];
|
|
439
438
|
this.commonHeadersPromise = resolveMarketplaceHeaders(
|
|
440
439
|
productService.version,
|
|
441
440
|
productService,
|
|
@@ -793,9 +792,6 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
793
792
|
}) !== true) {
|
|
794
793
|
return false;
|
|
795
794
|
}
|
|
796
|
-
if (!this.areApiProposalsCompatible(extension.id, extension.enabledApiProposals)) {
|
|
797
|
-
return false;
|
|
798
|
-
}
|
|
799
795
|
if (!(await this.isEngineValid(
|
|
800
796
|
extension.id,
|
|
801
797
|
extension.version,
|
|
@@ -808,15 +804,6 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
808
804
|
}
|
|
809
805
|
return true;
|
|
810
806
|
}
|
|
811
|
-
areApiProposalsCompatible(extensionId, enabledApiProposals) {
|
|
812
|
-
if (!enabledApiProposals) {
|
|
813
|
-
return true;
|
|
814
|
-
}
|
|
815
|
-
if (!this.extensionsEnabledWithApiProposalVersion.includes(extensionId.toLowerCase())) {
|
|
816
|
-
return true;
|
|
817
|
-
}
|
|
818
|
-
return areApiProposalsCompatible(enabledApiProposals);
|
|
819
|
-
}
|
|
820
807
|
async isEngineValid(extensionId, version, engine, manifestAsset, productVersion) {
|
|
821
808
|
if (!engine) {
|
|
822
809
|
try {
|
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(10233, "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
|
+
10234,
|
|
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
|
+
10235,
|
|
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
|
+
10236,
|
|
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(10237, "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
|
+
10238,
|
|
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(10239, "Activated by {1} on {0}", activationEvent, activationId));
|
|
313
313
|
}
|
|
314
314
|
} else {
|
|
315
|
-
title = ( localize(
|
|
315
|
+
title = ( localize(10240, "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(10241, "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(10242, "{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
|
+
10243,
|
|
372
372
|
"{0} Usage: {1} Requests",
|
|
373
373
|
feature.label,
|
|
374
374
|
accessData.accessTimes.length
|
|
375
|
-
))}${accessData.current ? ( localize(
|
|
375
|
+
))}${accessData.current ? ( localize(10244, ", {0} Requests (Session)", accessData.current.accessTimes.length)) : ""}`);
|
|
376
376
|
if (accessData.current) {
|
|
377
377
|
const title = ( localize(
|
|
378
|
-
|
|
378
|
+
10245,
|
|
379
379
|
"Last request was {0}.",
|
|
380
380
|
fromNow(accessData.current.lastAccessed, true, true)
|
|
381
381
|
));
|
|
@@ -406,7 +406,7 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
|
|
|
406
406
|
},
|
|
407
407
|
accessibilityProvider: new (class {
|
|
408
408
|
getWidgetAriaLabel() {
|
|
409
|
-
return localize(
|
|
409
|
+
return localize(10246, "Runtime Extensions");
|
|
410
410
|
}
|
|
411
411
|
getAriaLabel(element) {
|
|
412
412
|
return element.description.name;
|
|
@@ -419,7 +419,7 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
|
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
421
|
const actions = [];
|
|
422
|
-
actions.push(( new Action("runtimeExtensionsEditor.action.copyId", ( localize(
|
|
422
|
+
actions.push(( new Action("runtimeExtensionsEditor.action.copyId", ( localize(10247, "Copy id ({0})", e.element.description.identifier.value)), undefined, true, () => {
|
|
423
423
|
this._clipboardService.writeText(e.element.description.identifier.value);
|
|
424
424
|
})));
|
|
425
425
|
const reportExtensionIssueAction = this._createReportExtensionIssueAction(e.element);
|
|
@@ -428,8 +428,8 @@ let AbstractRuntimeExtensionsEditor = class AbstractRuntimeExtensionsEditor exte
|
|
|
428
428
|
}
|
|
429
429
|
actions.push(( new Separator()));
|
|
430
430
|
if (e.element.marketplaceInfo) {
|
|
431
|
-
actions.push(( new Action("runtimeExtensionsEditor.action.disableWorkspace", ( localize(
|
|
432
|
-
actions.push(( new Action("runtimeExtensionsEditor.action.disable", ( localize(
|
|
431
|
+
actions.push(( new Action("runtimeExtensionsEditor.action.disableWorkspace", ( localize(10248, "Disable (Workspace)")), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element.marketplaceInfo, EnablementState.DisabledWorkspace))));
|
|
432
|
+
actions.push(( new Action("runtimeExtensionsEditor.action.disable", ( localize(10249, "Disable")), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element.marketplaceInfo, EnablementState.DisabledGlobally))));
|
|
433
433
|
}
|
|
434
434
|
actions.push(( new Separator()));
|
|
435
435
|
const menuActions = this._menuService.getMenuActions(MenuId.ExtensionEditorContextMenu, this.contextKeyService);
|
|
@@ -449,7 +449,7 @@ class ShowRuntimeExtensionsAction extends Action2 {
|
|
|
449
449
|
constructor() {
|
|
450
450
|
super({
|
|
451
451
|
id: "workbench.action.showRuntimeExtensions",
|
|
452
|
-
title: ( localize2(
|
|
452
|
+
title: ( localize2(10250, "Show Running Extensions")),
|
|
453
453
|
category: Categories.Developer,
|
|
454
454
|
f1: true,
|
|
455
455
|
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(10476, "Running Extensions"))),
|
|
14
14
|
[( new SyncDescriptor(RuntimeExtensionsInput))]
|
|
15
15
|
);
|
|
16
16
|
registerAction2(ShowRuntimeExtensionsAction);
|
|
@@ -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(10861, "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(10862, "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(10863, "Running Extensions");
|
|
35
35
|
}
|
|
36
36
|
getIcon() {
|
|
37
37
|
return RuntimeExtensionsEditorIcon;
|
package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
26
26
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
27
27
|
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
28
28
|
import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
|
|
29
|
+
import { IDefaultAccountService } from "@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount.service";
|
|
29
30
|
type WorkspaceType = {
|
|
30
31
|
readonly virtual: boolean;
|
|
31
32
|
readonly trusted: boolean;
|
|
@@ -39,6 +40,7 @@ export declare class ExtensionEnablementService extends Disposable implements IW
|
|
|
39
40
|
private readonly configurationService;
|
|
40
41
|
private readonly extensionManagementServerService;
|
|
41
42
|
private readonly userDataSyncEnablementService;
|
|
43
|
+
private readonly defaultAccountService;
|
|
42
44
|
private readonly userDataSyncAccountService;
|
|
43
45
|
private readonly lifecycleService;
|
|
44
46
|
private readonly notificationService;
|
|
@@ -61,7 +63,7 @@ export declare class ExtensionEnablementService extends Disposable implements IW
|
|
|
61
63
|
private _extensionUnificationEnabled;
|
|
62
64
|
private readonly _sessionsWindowAllowedExtensions;
|
|
63
65
|
private _maliciousExtensionsCache;
|
|
64
|
-
constructor(storageService: IStorageService, globalExtensionEnablementService: IGlobalExtensionEnablementService, contextService: IWorkspaceContextService, environmentService: IWorkbenchEnvironmentService, extensionManagementService: IExtensionManagementService, configurationService: IConfigurationService, extensionManagementServerService: IExtensionManagementServerService, userDataSyncEnablementService: IUserDataSyncEnablementService, userDataSyncAccountService: IUserDataSyncAccountService, lifecycleService: ILifecycleService, notificationService: INotificationService, hostService: IHostService, extensionBisectService: IExtensionBisectService, allowedExtensionsService: IAllowedExtensionsService, workspaceTrustManagementService: IWorkspaceTrustManagementService, workspaceTrustRequestService: IWorkspaceTrustRequestService, extensionManifestPropertiesService: IExtensionManifestPropertiesService, chatEntitlementService: IChatEntitlementService, instantiationService: IInstantiationService, logService: ILogService, productService: IProductService);
|
|
66
|
+
constructor(storageService: IStorageService, globalExtensionEnablementService: IGlobalExtensionEnablementService, contextService: IWorkspaceContextService, environmentService: IWorkbenchEnvironmentService, extensionManagementService: IExtensionManagementService, configurationService: IConfigurationService, extensionManagementServerService: IExtensionManagementServerService, userDataSyncEnablementService: IUserDataSyncEnablementService, defaultAccountService: IDefaultAccountService, userDataSyncAccountService: IUserDataSyncAccountService, lifecycleService: ILifecycleService, notificationService: INotificationService, hostService: IHostService, extensionBisectService: IExtensionBisectService, allowedExtensionsService: IAllowedExtensionsService, workspaceTrustManagementService: IWorkspaceTrustManagementService, workspaceTrustRequestService: IWorkspaceTrustRequestService, extensionManifestPropertiesService: IExtensionManifestPropertiesService, chatEntitlementService: IChatEntitlementService, instantiationService: IInstantiationService, logService: ILogService, productService: IProductService);
|
|
65
67
|
private ensureChatExtensionInitialDisabledState;
|
|
66
68
|
private get hasWorkspace();
|
|
67
69
|
private get allUserExtensionsDisabled();
|
|
@@ -73,6 +75,7 @@ export declare class ExtensionEnablementService extends Disposable implements IW
|
|
|
73
75
|
][];
|
|
74
76
|
canChangeEnablement(extension: IExtension): boolean;
|
|
75
77
|
canChangeWorkspaceEnablement(extension: IExtension): boolean;
|
|
78
|
+
private isDefaultOrSettingsSyncAuthProviderExtension;
|
|
76
79
|
private throwErrorIfCannotChangeEnablement;
|
|
77
80
|
private throwErrorIfEnablementStateCannotBeChanged;
|
|
78
81
|
private throwErrorIfCannotChangeWorkspaceEnablement;
|
package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js
CHANGED
|
@@ -13,7 +13,7 @@ import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs
|
|
|
13
13
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
14
14
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
15
15
|
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
16
|
-
import {
|
|
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
18
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
19
19
|
import { StorageManager } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionEnablementService';
|
|
@@ -37,6 +37,7 @@ import { Delayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/asyn
|
|
|
37
37
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
38
38
|
import { isWeb } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
39
39
|
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
40
|
+
import { IDefaultAccountService } from '@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount.service';
|
|
40
41
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
41
42
|
|
|
42
43
|
const SOURCE = "IWorkbenchExtensionEnablementService";
|
|
@@ -52,6 +53,7 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
52
53
|
configurationService,
|
|
53
54
|
extensionManagementServerService,
|
|
54
55
|
userDataSyncEnablementService,
|
|
56
|
+
defaultAccountService,
|
|
55
57
|
userDataSyncAccountService,
|
|
56
58
|
lifecycleService,
|
|
57
59
|
notificationService,
|
|
@@ -75,6 +77,7 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
75
77
|
this.configurationService = configurationService;
|
|
76
78
|
this.extensionManagementServerService = extensionManagementServerService;
|
|
77
79
|
this.userDataSyncEnablementService = userDataSyncEnablementService;
|
|
80
|
+
this.defaultAccountService = defaultAccountService;
|
|
78
81
|
this.userDataSyncAccountService = userDataSyncAccountService;
|
|
79
82
|
this.lifecycleService = lifecycleService;
|
|
80
83
|
this.notificationService = notificationService;
|
|
@@ -148,8 +151,8 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
148
151
|
}));
|
|
149
152
|
if (this.allUserExtensionsDisabled) {
|
|
150
153
|
this.lifecycleService.when(LifecyclePhase.Eventually).then(() => {
|
|
151
|
-
this.notificationService.prompt(Severity.Info, ( localize(
|
|
152
|
-
label: ( localize(
|
|
154
|
+
this.notificationService.prompt(Severity.Info, ( localize(17562, "All installed extensions are temporarily disabled.")), [{
|
|
155
|
+
label: ( localize(17563, "Reload and Enable Extensions")),
|
|
153
156
|
run: () => hostService.reload({
|
|
154
157
|
disableExtensions: false
|
|
155
158
|
})
|
|
@@ -247,26 +250,39 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
247
250
|
return false;
|
|
248
251
|
}
|
|
249
252
|
}
|
|
253
|
+
isDefaultOrSettingsSyncAuthProviderExtension(manifest) {
|
|
254
|
+
if (!isAuthenticationProviderExtension(manifest)) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
const defaultAccountAuthProvider = this.defaultAccountService.getDefaultAccountAuthenticationProvider();
|
|
258
|
+
if (( manifest.contributes.authentication.some(a => a.id === defaultAccountAuthProvider.id))) {
|
|
259
|
+
return true;
|
|
260
|
+
}
|
|
261
|
+
if (this.userDataSyncEnablementService.isEnabled() && this.userDataSyncAccountService.account && ( manifest.contributes.authentication.some(
|
|
262
|
+
a => a.id === this.userDataSyncAccountService.account.authenticationProviderId
|
|
263
|
+
))) {
|
|
264
|
+
return true;
|
|
265
|
+
}
|
|
266
|
+
return false;
|
|
267
|
+
}
|
|
250
268
|
throwErrorIfCannotChangeEnablement(extension, donotCheckDependencies) {
|
|
251
269
|
if (isLanguagePackExtension(extension.manifest)) {
|
|
252
270
|
throw ( new Error(( localize(
|
|
253
|
-
|
|
271
|
+
17564,
|
|
254
272
|
"Cannot change enablement of {0} extension because it contributes language packs.",
|
|
255
273
|
extension.manifest.displayName || extension.identifier.id
|
|
256
274
|
))));
|
|
257
275
|
}
|
|
258
|
-
if (this.
|
|
259
|
-
a => a.id === this.userDataSyncAccountService.account.authenticationProviderId
|
|
260
|
-
))) {
|
|
276
|
+
if (this.isDefaultOrSettingsSyncAuthProviderExtension(extension.manifest)) {
|
|
261
277
|
throw ( new Error(( localize(
|
|
262
|
-
|
|
263
|
-
"Cannot change enablement {0} extension because Settings Sync depends on it.",
|
|
278
|
+
17565,
|
|
279
|
+
"Cannot change enablement of {0} extension because Settings Sync depends on it.",
|
|
264
280
|
extension.manifest.displayName || extension.identifier.id
|
|
265
281
|
))));
|
|
266
282
|
}
|
|
267
283
|
if (this._isEnabledInEnv(extension)) {
|
|
268
284
|
throw ( new Error(( localize(
|
|
269
|
-
|
|
285
|
+
17566,
|
|
270
286
|
"Cannot change enablement of {0} extension because it is enabled in environment",
|
|
271
287
|
extension.manifest.displayName || extension.identifier.id
|
|
272
288
|
))));
|
|
@@ -277,37 +293,37 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
277
293
|
switch (enablementStateOfExtension) {
|
|
278
294
|
case EnablementState.DisabledByEnvironment:
|
|
279
295
|
throw ( new Error(( localize(
|
|
280
|
-
|
|
296
|
+
17567,
|
|
281
297
|
"Cannot change enablement of {0} extension because it is disabled in environment",
|
|
282
298
|
extension.manifest.displayName || extension.identifier.id
|
|
283
299
|
))));
|
|
284
300
|
case EnablementState.DisabledByMalicious:
|
|
285
301
|
throw ( new Error(( localize(
|
|
286
|
-
|
|
302
|
+
17568,
|
|
287
303
|
"Cannot change enablement of {0} extension because it is malicious",
|
|
288
304
|
extension.manifest.displayName || extension.identifier.id
|
|
289
305
|
))));
|
|
290
306
|
case EnablementState.DisabledByVirtualWorkspace:
|
|
291
307
|
throw ( new Error(( localize(
|
|
292
|
-
|
|
308
|
+
17569,
|
|
293
309
|
"Cannot change enablement of {0} extension because it does not support virtual workspaces",
|
|
294
310
|
extension.manifest.displayName || extension.identifier.id
|
|
295
311
|
))));
|
|
296
312
|
case EnablementState.DisabledByExtensionKind:
|
|
297
313
|
throw ( new Error(( localize(
|
|
298
|
-
|
|
314
|
+
17570,
|
|
299
315
|
"Cannot change enablement of {0} extension because of its extension kind",
|
|
300
316
|
extension.manifest.displayName || extension.identifier.id
|
|
301
317
|
))));
|
|
302
318
|
case EnablementState.DisabledByAllowlist:
|
|
303
319
|
throw ( new Error(( localize(
|
|
304
|
-
|
|
320
|
+
17571,
|
|
305
321
|
"Cannot change enablement of {0} extension because it is disallowed",
|
|
306
322
|
extension.manifest.displayName || extension.identifier.id
|
|
307
323
|
))));
|
|
308
324
|
case EnablementState.DisabledByInvalidExtension:
|
|
309
325
|
throw ( new Error(( localize(
|
|
310
|
-
|
|
326
|
+
17572,
|
|
311
327
|
"Cannot change enablement of {0} extension because of it is invalid",
|
|
312
328
|
extension.manifest.displayName || extension.identifier.id
|
|
313
329
|
))));
|
|
@@ -320,7 +336,7 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
320
336
|
continue;
|
|
321
337
|
}
|
|
322
338
|
throw ( new Error(( localize(
|
|
323
|
-
|
|
339
|
+
17573,
|
|
324
340
|
"Cannot enable '{0}' extension because it depends on '{1}' extension that cannot be enabled",
|
|
325
341
|
extension.manifest.displayName || extension.identifier.id,
|
|
326
342
|
dependency.manifest.displayName || dependency.identifier.id
|
|
@@ -330,12 +346,12 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
330
346
|
}
|
|
331
347
|
throwErrorIfCannotChangeWorkspaceEnablement(extension) {
|
|
332
348
|
if (!this.hasWorkspace) {
|
|
333
|
-
throw ( new Error(( localize(
|
|
349
|
+
throw ( new Error(( localize(17574, "No workspace."))));
|
|
334
350
|
}
|
|
335
|
-
if (
|
|
351
|
+
if (this.isDefaultOrSettingsSyncAuthProviderExtension(extension.manifest)) {
|
|
336
352
|
throw ( new Error(( localize(
|
|
337
|
-
|
|
338
|
-
"Cannot change enablement of {0} extension in workspace because
|
|
353
|
+
17575,
|
|
354
|
+
"Cannot change enablement of {0} extension in workspace because Settings Sync depends on it.",
|
|
339
355
|
extension.manifest.displayName || extension.identifier.id
|
|
340
356
|
))));
|
|
341
357
|
}
|
|
@@ -857,7 +873,7 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
857
873
|
return true;
|
|
858
874
|
}
|
|
859
875
|
};
|
|
860
|
-
ExtensionEnablementService = ( __decorate([( __param(0, IStorageService)), ( __param(1, IGlobalExtensionEnablementService)), ( __param(2, IWorkspaceContextService)), ( __param(3, IWorkbenchEnvironmentService)), ( __param(4, IExtensionManagementService)), ( __param(5, IConfigurationService)), ( __param(6, IExtensionManagementServerService)), ( __param(7, IUserDataSyncEnablementService)), ( __param(8,
|
|
876
|
+
ExtensionEnablementService = ( __decorate([( __param(0, IStorageService)), ( __param(1, IGlobalExtensionEnablementService)), ( __param(2, IWorkspaceContextService)), ( __param(3, IWorkbenchEnvironmentService)), ( __param(4, IExtensionManagementService)), ( __param(5, IConfigurationService)), ( __param(6, IExtensionManagementServerService)), ( __param(7, IUserDataSyncEnablementService)), ( __param(8, IDefaultAccountService)), ( __param(9, IUserDataSyncAccountService)), ( __param(10, ILifecycleService)), ( __param(11, INotificationService)), ( __param(12, IHostService)), ( __param(13, IExtensionBisectService)), ( __param(14, IAllowedExtensionsService)), ( __param(15, IWorkspaceTrustManagementService)), ( __param(16, IWorkspaceTrustRequestService)), ( __param(17, IExtensionManifestPropertiesService)), ( __param(18, IChatEntitlementService)), ( __param(19, IInstantiationService)), ( __param(20, ILogService)), ( __param(21, IProductService))], ExtensionEnablementService));
|
|
861
877
|
let ExtensionsManager = class ExtensionsManager extends Disposable {
|
|
862
878
|
get extensions() {
|
|
863
879
|
return this._extensions;
|
|
@@ -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(17578, "Access '{0}' Feature", feature.label)),
|
|
100
100
|
message: ( localize(
|
|
101
|
-
|
|
101
|
+
17579,
|
|
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(17580, "Allow")),
|
|
109
|
+
cancelButton: ( localize(17581, "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(17582, "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(17583, "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
|
+
17584,
|
|
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
|
+
17585,
|
|
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
|
+
17586,
|
|
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(17587, "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
|
+
17588,
|
|
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
|
+
17588,
|
|
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
|
+
17589,
|
|
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
|
+
17589,
|
|
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
|
+
17589,
|
|
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
|
+
17589,
|
|
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
|
+
17590,
|
|
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
|
+
17588,
|
|
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(17591, "Install Extension")) : ( localize(17592, "Install Extensions")),
|
|
784
784
|
detail: extensions.length === 1 ? ( localize(
|
|
785
|
-
|
|
785
|
+
17593,
|
|
786
786
|
"Would you like to install and synchronize '{0}' extension across your devices?",
|
|
787
787
|
extensions[0].displayName
|
|
788
788
|
)) : ( localize(
|
|
789
|
-
|
|
789
|
+
17594,
|
|
790
790
|
"Would you like to install and synchronize extensions across your devices?"
|
|
791
791
|
)),
|
|
792
792
|
buttons: [{
|
|
793
|
-
label: ( localize(
|
|
793
|
+
label: ( localize(17595, "&&Install")),
|
|
794
794
|
run: () => false
|
|
795
795
|
}, {
|
|
796
|
-
label: ( localize(
|
|
796
|
+
label: ( localize(17596, "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
|
+
17589,
|
|
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(17597, "Trust Publishers & &&Install")) : ( localize(17598, "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(17599, "&&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
|
+
17600,
|
|
925
925
|
"Do you trust the publisher \"{0}\"?",
|
|
926
926
|
allPublishers[0].publisherDisplayName
|
|
927
927
|
)) : allPublishers.length === 2 ? ( localize(
|
|
928
|
-
|
|
928
|
+
17601,
|
|
929
929
|
"Do you trust publishers \"{0}\" and \"{1}\"?",
|
|
930
930
|
allPublishers[0].publisherDisplayName,
|
|
931
931
|
allPublishers[1].publisherDisplayName
|
|
932
932
|
)) : ( localize(
|
|
933
|
-
|
|
933
|
+
17602,
|
|
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
|
+
17603,
|
|
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
|
+
17604,
|
|
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
|
+
17605,
|
|
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
|
+
17606,
|
|
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
|
+
17607,
|
|
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
|
+
17608,
|
|
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
|
+
17609,
|
|
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
|
+
17610,
|
|
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
|
+
17611,
|
|
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(17612, "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
|
+
17613,
|
|
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
|
+
17614,
|
|
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(17615, "Trust Workspace & Install")),
|
|
1130
1130
|
type: "ContinueWithTrust"
|
|
1131
1131
|
});
|
|
1132
1132
|
if (!requireTrust) {
|
|
1133
1133
|
buttons.push({
|
|
1134
|
-
label: ( localize(
|
|
1134
|
+
label: ( localize(17616, "Install")),
|
|
1135
1135
|
type: "ContinueWithoutTrust"
|
|
1136
1136
|
});
|
|
1137
1137
|
}
|
|
1138
1138
|
buttons.push({
|
|
1139
|
-
label: ( localize(
|
|
1139
|
+
label: ( localize(17617, "Learn More")),
|
|
1140
1140
|
type: "Manage"
|
|
1141
1141
|
});
|
|
1142
1142
|
const trustState = await this.workspaceTrustRequestService.requestWorkspaceTrust({
|
|
1143
|
-
message: ( localize(
|
|
1143
|
+
message: ( localize(17618, "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(17619, "{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
|
+
17620,
|
|
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(17621, "&&Install Anyway")),
|
|
1187
1187
|
run: () => {}
|
|
1188
1188
|
};
|
|
1189
1189
|
const showExtensionsButton = {
|
|
1190
|
-
label: ( localize(
|
|
1190
|
+
label: ( localize(17622, "&&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(17623, "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
|
+
17624,
|
|
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(17625, "Cannot activate because {0} not found", extension.manifest.main))]);
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
1520
|
return {
|