@codingame/monaco-vscode-extension-gallery-service-override 23.2.2 → 24.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +5 -2
- package/index.js +26 -12
- package/package.json +2 -11
- package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js +20 -19
- package/vscode/src/vs/platform/extensionManagement/common/allowedExtensionsService.js +5 -5
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.d.ts +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js +17 -10
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementIpc.d.ts +4 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementIpc.js +5 -4
- package/vscode/src/vs/platform/extensionManagement/common/extensionTipsService.d.ts +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionTipsService.js +1 -1
- package/vscode/src/vs/platform/externalServices/common/marketplace.d.ts +1 -1
- package/vscode/src/vs/platform/externalServices/common/marketplace.js +1 -1
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileIpc.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/browserRuntimeExtensionsEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/browserRuntimeExtensionsEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/common/reportExtensionIssueAction.js +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +22 -16
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.js +4 -4
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementChannelClient.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js +47 -47
- package/vscode/src/vs/workbench/services/extensionManagement/common/remoteExtensionManagementService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { IEditorOverrideServices } from "@codingame/monaco-vscode-api/vscode/vs/editor/standalone/browser/standaloneServices";
|
|
2
|
+
import type { IExtensionGalleryManifest } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest";
|
|
2
3
|
export interface ExtensionGalleryOptions {
|
|
3
4
|
/**
|
|
4
5
|
* Whether we should only allow for web extensions to be installed, this is generally
|
|
5
6
|
* true if there is no server part.
|
|
6
7
|
*/
|
|
7
|
-
webOnly
|
|
8
|
+
webOnly?: boolean;
|
|
9
|
+
transformExtensionGalleryManifest?: (manifest: IExtensionGalleryManifest | null) => IExtensionGalleryManifest | null;
|
|
8
10
|
}
|
|
9
|
-
export default function getServiceOverride(
|
|
11
|
+
export default function getServiceOverride({ webOnly, transformExtensionGalleryManifest }?: ExtensionGalleryOptions): IEditorOverrideServices;
|
|
12
|
+
export type { IExtensionGalleryManifest };
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { AllowedExtensionsService } from './vscode/src/vs/platform/extensionManagement/common/allowedExtensionsService.js';
|
|
4
|
-
import { GlobalExtensionEnablementService } from '@codingame/monaco-vscode-
|
|
4
|
+
import { GlobalExtensionEnablementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionEnablementService';
|
|
5
5
|
import { IExtensionGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest.service';
|
|
6
6
|
import { IAllowedExtensionsService, IExtensionTipsService, IGlobalExtensionEnablementService, IExtensionGalleryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
7
7
|
import { IExtensionsProfileScannerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionsProfileScannerService.service';
|
|
@@ -11,12 +11,12 @@ import { IExtensionRecommendationNotificationService } from '@codingame/monaco-v
|
|
|
11
11
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
12
12
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
13
13
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
14
|
-
import { getLocale } from '@codingame/monaco-vscode-
|
|
14
|
+
import { getLocale } from '@codingame/monaco-vscode-api/vscode/vs/platform/languagePacks/common/languagePacks';
|
|
15
15
|
import { IgnoredExtensionsManagementService } from './vscode/src/vs/platform/userDataSync/common/ignoredExtensions.js';
|
|
16
16
|
import { IIgnoredExtensionsManagementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataSync/common/ignoredExtensions.service';
|
|
17
|
-
import { ExtensionRecommendationNotificationService } from '@codingame/monaco-vscode-
|
|
18
|
-
import { ExtensionRecommendationsService } from '@codingame/monaco-vscode-
|
|
19
|
-
import { ExtensionsWorkbenchService } from '@codingame/monaco-vscode-
|
|
17
|
+
import { ExtensionRecommendationNotificationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService';
|
|
18
|
+
import { ExtensionRecommendationsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionRecommendationsService';
|
|
19
|
+
import { ExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService';
|
|
20
20
|
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
21
21
|
import { ExtensionEnablementService } from './vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js';
|
|
22
22
|
import { WebExtensionGalleryManifestService } from './vscode/src/vs/workbench/services/extensionManagement/browser/extensionGalleryManifestService.js';
|
|
@@ -29,12 +29,12 @@ import { ExtensionManagementServerService } from './vscode/src/vs/workbench/serv
|
|
|
29
29
|
import { ExtensionManagementService } from './vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js';
|
|
30
30
|
import { ExtensionIgnoredRecommendationsService } from './vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.js';
|
|
31
31
|
import { IExtensionIgnoredRecommendationsService, IExtensionRecommendationsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.service';
|
|
32
|
-
import { WorkspaceExtensionsConfigService } from '@codingame/monaco-vscode-
|
|
32
|
+
import { WorkspaceExtensionsConfigService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig';
|
|
33
33
|
import { IWorkspaceExtensionsConfigService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.service';
|
|
34
34
|
import { ExtensionsScannerService } from './vscode/src/vs/workbench/services/extensions/browser/extensionsScannerService.js';
|
|
35
|
-
import { ExtensionUrlHandler } from '@codingame/monaco-vscode-
|
|
35
|
+
import { ExtensionUrlHandler } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/browser/extensionUrlHandler';
|
|
36
36
|
import { IExtensionUrlHandler } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/browser/extensionUrlHandler.service';
|
|
37
|
-
import { ExtensionManifestPropertiesService } from '@codingame/monaco-vscode-
|
|
37
|
+
import { ExtensionManifestPropertiesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService';
|
|
38
38
|
import { IExtensionManifestPropertiesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
|
|
39
39
|
import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
40
40
|
import { RemoteUserDataProfilesService } from './vscode/src/vs/workbench/services/userDataProfile/common/remoteUserDataProfiles.js';
|
|
@@ -42,13 +42,27 @@ import { IRemoteUserDataProfilesService } from '@codingame/monaco-vscode-api/vsc
|
|
|
42
42
|
import { registerAssets } from '@codingame/monaco-vscode-api/assets';
|
|
43
43
|
import { isLocaleAvailable } from '@codingame/monaco-vscode-api/l10n';
|
|
44
44
|
import { unsupported } from '@codingame/monaco-vscode-api/tools';
|
|
45
|
-
import '@codingame/monaco-vscode-
|
|
45
|
+
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensions.contribution';
|
|
46
46
|
import './vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js';
|
|
47
|
+
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
47
48
|
|
|
48
49
|
registerAssets({
|
|
49
50
|
'vs/workbench/contrib/extensions/browser/media/theme-icon.png': new URL('./vscode/src/vs/workbench/contrib/extensions/browser/media/theme-icon.png', import.meta.url).href,
|
|
50
51
|
'vs/workbench/contrib/extensions/browser/media/language-icon.svg': new URL('./vscode/src/vs/workbench/contrib/extensions/browser/media/theme-icon.png', import.meta.url).href
|
|
51
52
|
});
|
|
53
|
+
let CustomExtensionGalleryManifestService = class CustomExtensionGalleryManifestService extends WebExtensionGalleryManifestService {
|
|
54
|
+
constructor(transform, productService, remoteAgentService) {
|
|
55
|
+
super(productService, remoteAgentService);
|
|
56
|
+
this.transform = transform;
|
|
57
|
+
}
|
|
58
|
+
async getExtensionGalleryManifest() {
|
|
59
|
+
return this.transform(await super.getExtensionGalleryManifest());
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
CustomExtensionGalleryManifestService = __decorate([
|
|
63
|
+
__param(1, IProductService),
|
|
64
|
+
__param(2, IRemoteAgentService)
|
|
65
|
+
], CustomExtensionGalleryManifestService);
|
|
52
66
|
class EmptyRemoteAgentService {
|
|
53
67
|
constructor() {
|
|
54
68
|
this.endConnection = unsupported;
|
|
@@ -88,12 +102,12 @@ class ExtensionsWorkbenchServiceOverride extends ExtensionsWorkbenchService {
|
|
|
88
102
|
return false;
|
|
89
103
|
}
|
|
90
104
|
}
|
|
91
|
-
function getServiceOverride(
|
|
105
|
+
function getServiceOverride({ webOnly = false, transformExtensionGalleryManifest = (manifest) => manifest } = {}) {
|
|
92
106
|
return {
|
|
93
107
|
[IExtensionGalleryService.toString()]: new SyncDescriptor(WorkbenchExtensionGalleryService, [], true),
|
|
94
108
|
[IGlobalExtensionEnablementService.toString()]: new SyncDescriptor(GlobalExtensionEnablementService, [], true),
|
|
95
109
|
[IExtensionsWorkbenchService.toString()]: new SyncDescriptor(ExtensionsWorkbenchServiceOverride, [], true),
|
|
96
|
-
[IExtensionManagementServerService.toString()]: new SyncDescriptor(ExtensionManagementServerServiceOverride, [
|
|
110
|
+
[IExtensionManagementServerService.toString()]: new SyncDescriptor(ExtensionManagementServerServiceOverride, [webOnly], true),
|
|
97
111
|
[IExtensionRecommendationsService.toString()]: new SyncDescriptor(ExtensionRecommendationsService, [], true),
|
|
98
112
|
[IExtensionRecommendationNotificationService.toString()]: new SyncDescriptor(ExtensionRecommendationNotificationService, [], true),
|
|
99
113
|
[IExtensionIgnoredRecommendationsService.toString()]: new SyncDescriptor(ExtensionIgnoredRecommendationsService, [], true),
|
|
@@ -109,7 +123,7 @@ function getServiceOverride(options = { webOnly: false }) {
|
|
|
109
123
|
[IExtensionsScannerService.toString()]: new SyncDescriptor(ExtensionsScannerService, [], true),
|
|
110
124
|
[IExtensionsProfileScannerService.toString()]: new SyncDescriptor(ExtensionsProfileScannerService, [], true),
|
|
111
125
|
[IAllowedExtensionsService.toString()]: new SyncDescriptor(AllowedExtensionsService, [], true),
|
|
112
|
-
[IExtensionGalleryManifestService.toString()]: new SyncDescriptor(
|
|
126
|
+
[IExtensionGalleryManifestService.toString()]: new SyncDescriptor(CustomExtensionGalleryManifestService, [transformExtensionGalleryManifest], true)
|
|
113
127
|
};
|
|
114
128
|
}
|
|
115
129
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-extension-gallery-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - extension-gallery service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,16 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-23aade48-f094-5c08-9555-97fc9cca96c9-common": "23.2.2",
|
|
20
|
-
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "23.2.2",
|
|
21
|
-
"@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common": "23.2.2",
|
|
22
|
-
"@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common": "23.2.2",
|
|
23
|
-
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "23.2.2",
|
|
24
|
-
"@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "23.2.2",
|
|
25
|
-
"@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common": "23.2.2",
|
|
26
|
-
"@codingame/monaco-vscode-api": "23.2.2",
|
|
27
|
-
"@codingame/monaco-vscode-cc2a4237-8890-5664-9fcf-a56ecd22e3ef-common": "23.2.2"
|
|
18
|
+
"@codingame/monaco-vscode-api": "24.1.0"
|
|
28
19
|
},
|
|
29
20
|
"main": "index.js",
|
|
30
21
|
"module": "index.js",
|
package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js
CHANGED
|
@@ -33,7 +33,7 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
33
33
|
const allowedToInstall = this.allowedExtensionsService.isAllowed({ id: extension.identifier.id, publisherDisplayName: extension.publisherDisplayName });
|
|
34
34
|
if (allowedToInstall !== true) {
|
|
35
35
|
return (new MarkdownString(localize(
|
|
36
|
-
|
|
36
|
+
1802,
|
|
37
37
|
"This extension cannot be installed because {0}",
|
|
38
38
|
allowedToInstall.value
|
|
39
39
|
)));
|
|
@@ -41,12 +41,12 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
41
41
|
if (!(await this.isExtensionPlatformCompatible(extension))) {
|
|
42
42
|
const learnLink = isWeb ? 'https://aka.ms/vscode-web-extensions-guide' : 'https://aka.ms/vscode-platform-specific-extensions';
|
|
43
43
|
return (new MarkdownString(`${( localize(
|
|
44
|
-
|
|
45
|
-
"The '{0}' extension is not available in {1} for the {2}.",
|
|
44
|
+
1803,
|
|
45
|
+
"The '{0}' extension is not available in {1} for the {2} platform.",
|
|
46
46
|
extension.displayName ?? extension.identifier.id,
|
|
47
47
|
this.productService.nameLong,
|
|
48
48
|
TargetPlatformToString(await this.getTargetPlatform())
|
|
49
|
-
))} [${( localize(
|
|
49
|
+
))} [${( localize(1804, "Learn Why"))}](${learnLink})`));
|
|
50
50
|
}
|
|
51
51
|
return true;
|
|
52
52
|
}
|
|
@@ -111,7 +111,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
111
111
|
}
|
|
112
112
|
async installGalleryExtensions(extensions) {
|
|
113
113
|
if (!this.galleryService.isEnabled()) {
|
|
114
|
-
throw ( new ExtensionManagementError(( localize(
|
|
114
|
+
throw ( new ExtensionManagementError(( localize(1805, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
|
|
115
115
|
}
|
|
116
116
|
const results = [];
|
|
117
117
|
const installableExtensions = [];
|
|
@@ -212,6 +212,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
212
212
|
if (!result?.local) {
|
|
213
213
|
throw ( new Error(`Extension ${identifier.id} is not installed`));
|
|
214
214
|
}
|
|
215
|
+
return result.local;
|
|
215
216
|
}));
|
|
216
217
|
}
|
|
217
218
|
return;
|
|
@@ -499,7 +500,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
499
500
|
const allDependenciesAndPacks = [];
|
|
500
501
|
const collectDependenciesAndPackExtensionsToInstall = async (extensionIdentifier, manifest) => {
|
|
501
502
|
knownIdentifiers.push(extensionIdentifier);
|
|
502
|
-
const dependecies = manifest.extensionDependencies
|
|
503
|
+
const dependecies = manifest.extensionDependencies ? manifest.extensionDependencies.filter(dep => !( installed.some(e => areSameExtensions(e.identifier, { id: dep })))) : [];
|
|
503
504
|
const dependenciesAndPackExtensions = [...dependecies];
|
|
504
505
|
if (manifest.extensionPack) {
|
|
505
506
|
const existing = installed.find(e => areSameExtensions(e.identifier, extensionIdentifier));
|
|
@@ -547,7 +548,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
547
548
|
const extensionsControlManifest = await this.getExtensionsControlManifest();
|
|
548
549
|
if (isMalicious(extension.identifier, extensionsControlManifest.malicious)) {
|
|
549
550
|
throw ( new ExtensionManagementError(( localize(
|
|
550
|
-
|
|
551
|
+
1806,
|
|
551
552
|
"Can't install '{0}' extension since it was reported to be problematic.",
|
|
552
553
|
extension.identifier.id
|
|
553
554
|
)), ExtensionManagementErrorCode.Malicious));
|
|
@@ -558,7 +559,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
558
559
|
compatibleExtension = (await this.galleryService.getExtensions([{ id: deprecationInfo.extension.id, preRelease: deprecationInfo.extension.preRelease }], { targetPlatform: await this.getTargetPlatform(), compatible: true, productVersion }, CancellationToken.None))[0];
|
|
559
560
|
if (!compatibleExtension) {
|
|
560
561
|
throw ( new ExtensionManagementError(( localize(
|
|
561
|
-
|
|
562
|
+
1807,
|
|
562
563
|
"Can't install '{0}' extension since it was deprecated and the replacement extension '{1}' can't be found.",
|
|
563
564
|
extension.identifier.id,
|
|
564
565
|
deprecationInfo.extension.id
|
|
@@ -569,8 +570,8 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
569
570
|
if ((await this.canInstall(extension)) !== true) {
|
|
570
571
|
const targetPlatform = await this.getTargetPlatform();
|
|
571
572
|
throw ( new ExtensionManagementError(( localize(
|
|
572
|
-
|
|
573
|
-
"The '{0}' extension is not available in {1} for the {2}.",
|
|
573
|
+
1803,
|
|
574
|
+
"The '{0}' extension is not available in {1} for the {2} platform.",
|
|
574
575
|
extension.identifier.id,
|
|
575
576
|
this.productService.nameLong,
|
|
576
577
|
TargetPlatformToString(targetPlatform)
|
|
@@ -581,7 +582,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
581
582
|
const incompatibleApiProposalsMessages = [];
|
|
582
583
|
if (!areApiProposalsCompatible(extension.properties.enabledApiProposals ?? [], incompatibleApiProposalsMessages)) {
|
|
583
584
|
throw ( new ExtensionManagementError(( localize(
|
|
584
|
-
|
|
585
|
+
1808,
|
|
585
586
|
"Can't install '{0}' extension. {1}",
|
|
586
587
|
extension.displayName ?? extension.identifier.id,
|
|
587
588
|
incompatibleApiProposalsMessages[0]
|
|
@@ -589,13 +590,13 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
589
590
|
}
|
|
590
591
|
if (!installPreRelease && extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
|
|
591
592
|
throw ( new ExtensionManagementError(( localize(
|
|
592
|
-
|
|
593
|
+
1809,
|
|
593
594
|
"Can't install release version of '{0}' extension because it has no release version.",
|
|
594
595
|
extension.displayName ?? extension.identifier.id
|
|
595
596
|
)), ExtensionManagementErrorCode.ReleaseVersionNotFound));
|
|
596
597
|
}
|
|
597
598
|
throw ( new ExtensionManagementError(( localize(
|
|
598
|
-
|
|
599
|
+
1810,
|
|
599
600
|
"Can't install '{0}' extension because it is not compatible with the current version of {1} (version {2}).",
|
|
600
601
|
extension.identifier.id,
|
|
601
602
|
this.productService.nameLong,
|
|
@@ -820,7 +821,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
820
821
|
if (extensionToUninstall === dependingExtension) {
|
|
821
822
|
if (dependents.length === 1) {
|
|
822
823
|
return localize(
|
|
823
|
-
|
|
824
|
+
1811,
|
|
824
825
|
"Cannot uninstall '{0}' extension. '{1}' extension depends on this.",
|
|
825
826
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
826
827
|
dependents[0].manifest.displayName || dependents[0].manifest.name
|
|
@@ -828,7 +829,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
828
829
|
}
|
|
829
830
|
if (dependents.length === 2) {
|
|
830
831
|
return localize(
|
|
831
|
-
|
|
832
|
+
1812,
|
|
832
833
|
"Cannot uninstall '{0}' extension. '{1}' and '{2}' extensions depend on this.",
|
|
833
834
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
834
835
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -836,7 +837,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
836
837
|
);
|
|
837
838
|
}
|
|
838
839
|
return localize(
|
|
839
|
-
|
|
840
|
+
1813,
|
|
840
841
|
"Cannot uninstall '{0}' extension. '{1}', '{2}' and other extension depend on this.",
|
|
841
842
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
842
843
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -845,7 +846,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
845
846
|
}
|
|
846
847
|
if (dependents.length === 1) {
|
|
847
848
|
return localize(
|
|
848
|
-
|
|
849
|
+
1814,
|
|
849
850
|
"Cannot uninstall '{0}' extension . It includes uninstalling '{1}' extension and '{2}' extension depends on this.",
|
|
850
851
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
851
852
|
dependingExtension.manifest.displayName
|
|
@@ -855,7 +856,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
855
856
|
}
|
|
856
857
|
if (dependents.length === 2) {
|
|
857
858
|
return localize(
|
|
858
|
-
|
|
859
|
+
1815,
|
|
859
860
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}' and '{3}' extensions depend on this.",
|
|
860
861
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
861
862
|
dependingExtension.manifest.displayName
|
|
@@ -865,7 +866,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
865
866
|
);
|
|
866
867
|
}
|
|
867
868
|
return localize(
|
|
868
|
-
|
|
869
|
+
1816,
|
|
869
870
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}', '{3}' and other extensions depend on this.",
|
|
870
871
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
871
872
|
dependingExtension.manifest.displayName
|
|
@@ -77,14 +77,14 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
77
77
|
}
|
|
78
78
|
const settingsCommandLink = ( createCommandUri('workbench.action.openSettings', { query: `@id:${AllowedExtensionsConfigKey}` }).toString());
|
|
79
79
|
const extensionValue = this._allowedExtensionsConfigValue[id];
|
|
80
|
-
const extensionReason = ( new MarkdownString(( localize(
|
|
80
|
+
const extensionReason = ( new MarkdownString(( localize(1817, "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
|
+
1818,
|
|
88
88
|
"the pre-release versions of this extension are not in the [allowed list]({0})",
|
|
89
89
|
settingsCommandLink
|
|
90
90
|
)));
|
|
@@ -104,7 +104,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
104
104
|
return false;
|
|
105
105
|
}))) {
|
|
106
106
|
return (new MarkdownString(localize(
|
|
107
|
-
|
|
107
|
+
1819,
|
|
108
108
|
"the version {0} of this extension is not in the [allowed list]({1})",
|
|
109
109
|
version,
|
|
110
110
|
settingsCommandLink
|
|
@@ -117,7 +117,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
117
117
|
if (!isUndefined(publisherValue)) {
|
|
118
118
|
if (isBoolean(publisherValue)) {
|
|
119
119
|
return publisherValue ? true : ( new MarkdownString(( localize(
|
|
120
|
-
|
|
120
|
+
1820,
|
|
121
121
|
"the extensions from this publisher are not in the [allowed list]({1})",
|
|
122
122
|
publisherKey,
|
|
123
123
|
settingsCommandLink
|
|
@@ -125,7 +125,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
125
125
|
}
|
|
126
126
|
if (publisherValue === 'stable' && prerelease) {
|
|
127
127
|
return (new MarkdownString(localize(
|
|
128
|
-
|
|
128
|
+
1821,
|
|
129
129
|
"the pre-release versions from this publisher are not in the [allowed list]({1})",
|
|
130
130
|
publisherKey,
|
|
131
131
|
settingsCommandLink
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { IPager } from "@codingame/monaco-vscode-
|
|
2
|
+
import { IPager } from "@codingame/monaco-vscode-api/vscode/vs/base/common/paging";
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
5
|
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
@@ -8,7 +8,7 @@ import { isWeb, platform } from '@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
8
8
|
import { arch } from '@codingame/monaco-vscode-api/vscode/vs/base/common/process';
|
|
9
9
|
import { isString, isBoolean, isNumber } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
10
10
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
11
|
-
import { isOfflineError } from '@codingame/monaco-vscode-
|
|
11
|
+
import { isOfflineError } from '@codingame/monaco-vscode-api/vscode/vs/base/parts/request/common/request';
|
|
12
12
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
13
13
|
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
14
14
|
import { getTargetPlatform, SortOrder, SortBy, FilterType, toTargetPlatform, WEB_EXTENSION_TAG, isTargetPlatformCompatible, EXTENSION_IDENTIFIER_REGEX, ExtensionGalleryError, ExtensionGalleryErrorCode, isNotWebExtensionInWebTargetPlatform, StatisticType, InstallOperation, ExtensionRequestsTimeoutConfigKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
@@ -238,8 +238,8 @@ function sortExtensionVersions(versions, preferredTargetPlatform) {
|
|
|
238
238
|
}
|
|
239
239
|
function filterLatestExtensionVersionsForTargetPlatform(versions, targetPlatform, allTargetPlatforms) {
|
|
240
240
|
const latestVersions = [];
|
|
241
|
-
let
|
|
242
|
-
let
|
|
241
|
+
let preReleaseVersionIndex = -1;
|
|
242
|
+
let releaseVersionIndex = -1;
|
|
243
243
|
for (const version of versions) {
|
|
244
244
|
const versionTargetPlatform = getTargetPlatformForExtensionVersion(version);
|
|
245
245
|
const isCompatibleWithTargetPlatform = isTargetPlatformCompatible(versionTargetPlatform, allTargetPlatforms, targetPlatform);
|
|
@@ -248,16 +248,22 @@ function filterLatestExtensionVersionsForTargetPlatform(versions, targetPlatform
|
|
|
248
248
|
continue;
|
|
249
249
|
}
|
|
250
250
|
if (isPreReleaseVersion(version)) {
|
|
251
|
-
if (
|
|
252
|
-
|
|
251
|
+
if (preReleaseVersionIndex === -1) {
|
|
252
|
+
preReleaseVersionIndex = latestVersions.length;
|
|
253
253
|
latestVersions.push(version);
|
|
254
254
|
}
|
|
255
|
+
else if (versionTargetPlatform === targetPlatform) {
|
|
256
|
+
latestVersions[preReleaseVersionIndex] = version;
|
|
257
|
+
}
|
|
255
258
|
}
|
|
256
259
|
else {
|
|
257
|
-
if (
|
|
258
|
-
|
|
260
|
+
if (releaseVersionIndex === -1) {
|
|
261
|
+
releaseVersionIndex = latestVersions.length;
|
|
259
262
|
latestVersions.push(version);
|
|
260
263
|
}
|
|
264
|
+
else if (versionTargetPlatform === targetPlatform) {
|
|
265
|
+
latestVersions[releaseVersionIndex] = version;
|
|
266
|
+
}
|
|
261
267
|
}
|
|
262
268
|
}
|
|
263
269
|
return latestVersions;
|
|
@@ -354,7 +360,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
354
360
|
}
|
|
355
361
|
const options = CancellationToken.isCancellationToken(arg1) ? {} : arg1;
|
|
356
362
|
const token = CancellationToken.isCancellationToken(arg1) ? arg1 : arg2;
|
|
357
|
-
const resourceApi =
|
|
363
|
+
const resourceApi = this.getResourceApi(extensionGalleryManifest);
|
|
358
364
|
const result = resourceApi
|
|
359
365
|
? await this.getExtensionsUsingResourceApi(extensionInfos, options, resourceApi, extensionGalleryManifest, token)
|
|
360
366
|
: await this.getExtensionsUsingQueryApi(extensionInfos, options, extensionGalleryManifest, token);
|
|
@@ -374,7 +380,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
374
380
|
}
|
|
375
381
|
return result;
|
|
376
382
|
}
|
|
377
|
-
|
|
383
|
+
getResourceApi(extensionGalleryManifest) {
|
|
378
384
|
const latestVersionResource = getExtensionGalleryManifestResourceUri(extensionGalleryManifest, ExtensionGalleryResourceType.ExtensionLatestVersionUri);
|
|
379
385
|
if (latestVersionResource) {
|
|
380
386
|
return {
|
|
@@ -1060,7 +1066,8 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1060
1066
|
uri: `${extension.assets.download.uri}${( URI.parse(extension.assets.download.uri)).query ? '&' : '?'}${operationParam}=true`,
|
|
1061
1067
|
fallbackUri: `${extension.assets.download.fallbackUri}${( URI.parse(extension.assets.download.fallbackUri)).query ? '&' : '?'}${operationParam}=true`
|
|
1062
1068
|
} : extension.assets.download;
|
|
1063
|
-
const
|
|
1069
|
+
const activityId = extension.queryContext?.[SEARCH_ACTIVITY_HEADER_NAME];
|
|
1070
|
+
const headers = activityId && typeof activityId === 'string' ? { [SEARCH_ACTIVITY_HEADER_NAME]: activityId } : undefined;
|
|
1064
1071
|
const context = await this.getAsset(extension.identifier.id, downloadAsset, AssetType.VSIX, extension.version, headers ? { headers } : undefined);
|
|
1065
1072
|
try {
|
|
1066
1073
|
await this.fileService.writeFile(location, context.stream);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Emitter, Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
3
|
import { IURITransformer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uriIpc";
|
|
4
|
-
import { IChannel, IServerChannel } from "@codingame/monaco-vscode-
|
|
4
|
+
import { IChannel, IServerChannel } from "@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc";
|
|
5
5
|
import { IExtensionIdentifier, IGalleryExtension, ILocalExtension, IExtensionsControlManifest, InstallOptions, UninstallOptions, Metadata, DidUninstallExtensionEvent, InstallExtensionEvent, InstallExtensionResult, UninstallExtensionEvent, InstallOperation, InstallExtensionInfo, IProductVersion, DidUpdateExtensionMetadata, UninstallExtensionInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement";
|
|
6
6
|
import { IAllowedExtensionsService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service";
|
|
7
7
|
import { IExtensionTipsService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service";
|
|
@@ -9,7 +9,8 @@ import { IExtensionManagementService } from "@codingame/monaco-vscode-api/vscode
|
|
|
9
9
|
import { ExtensionType, IExtensionManifest, TargetPlatform } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
10
10
|
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
11
11
|
import { CommontExtensionManagementService } from "./abstractExtensionManagementService.js";
|
|
12
|
-
|
|
12
|
+
import { RemoteAgentConnectionContext } from "@codingame/monaco-vscode-api/vscode/vs/platform/remote/common/remoteAgentEnvironment";
|
|
13
|
+
export declare class ExtensionManagementChannel<TContext = RemoteAgentConnectionContext | string> implements IServerChannel<TContext> {
|
|
13
14
|
private service;
|
|
14
15
|
private getUriTransformer;
|
|
15
16
|
readonly onInstallExtension: Event<InstallExtensionEvent>;
|
|
@@ -17,7 +18,7 @@ export declare class ExtensionManagementChannel implements IServerChannel {
|
|
|
17
18
|
readonly onUninstallExtension: Event<UninstallExtensionEvent>;
|
|
18
19
|
readonly onDidUninstallExtension: Event<DidUninstallExtensionEvent>;
|
|
19
20
|
readonly onDidUpdateExtensionMetadata: Event<DidUpdateExtensionMetadata>;
|
|
20
|
-
constructor(service: IExtensionManagementService, getUriTransformer: (requestContext:
|
|
21
|
+
constructor(service: IExtensionManagementService, getUriTransformer: (requestContext: TContext) => IURITransformer | null);
|
|
21
22
|
listen(context: any, event: string): Event<any>;
|
|
22
23
|
call(context: any, command: string, args?: any): Promise<any>;
|
|
23
24
|
}
|
|
@@ -49,12 +49,13 @@ class ExtensionManagementChannelClient extends CommontExtensionManagementService
|
|
|
49
49
|
onDidUpdateExtensionMetadataEvent(event) {
|
|
50
50
|
this._onDidUpdateExtensionMetadata.fire(event);
|
|
51
51
|
}
|
|
52
|
-
isUriComponents(
|
|
53
|
-
if (!
|
|
52
|
+
isUriComponents(obj) {
|
|
53
|
+
if (!obj) {
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
const thing = obj;
|
|
57
|
+
return typeof thing?.path === 'string' &&
|
|
58
|
+
typeof thing?.scheme === 'string';
|
|
58
59
|
}
|
|
59
60
|
getTargetPlatform() {
|
|
60
61
|
if (!this._targetPlatformPromise) {
|
|
@@ -12,7 +12,7 @@ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
12
12
|
export declare class ExtensionTipsService extends Disposable implements IExtensionTipsService {
|
|
13
13
|
protected readonly fileService: IFileService;
|
|
14
14
|
private readonly productService;
|
|
15
|
-
_serviceBrand:
|
|
15
|
+
_serviceBrand: undefined;
|
|
16
16
|
private readonly allConfigBasedTips;
|
|
17
17
|
constructor(fileService: IFileService, productService: IProductService);
|
|
18
18
|
getConfigBasedTips(folder: URI): Promise<IConfigBasedExtensionTip[]>;
|
|
@@ -20,7 +20,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
20
20
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
21
21
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
22
22
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry';
|
|
23
|
-
import '@codingame/monaco-vscode-
|
|
23
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/extensionRecommendations/common/extensionRecommendations';
|
|
24
24
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
25
25
|
|
|
26
26
|
let ExtensionTipsService = class ExtensionTipsService extends Disposable {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHeaders } from "@codingame/monaco-vscode-
|
|
1
|
+
import { IHeaders } from "@codingame/monaco-vscode-api/vscode/vs/base/parts/request/common/request";
|
|
2
2
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
3
|
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
4
4
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { getServiceMachineId } from '@codingame/monaco-vscode-
|
|
2
|
+
import { getServiceMachineId } from '@codingame/monaco-vscode-api/vscode/vs/platform/externalServices/common/serviceMachineId';
|
|
3
3
|
import { TelemetryLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry';
|
|
4
4
|
import { supportsTelemetry, getTelemetryLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { IChannel, IServerChannel } from "@codingame/monaco-vscode-
|
|
3
|
+
import { IChannel, IServerChannel } from "@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc";
|
|
4
4
|
import { URI, UriDto } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
5
|
import { DidChangeProfilesEvent, IUserDataProfile, IUserDataProfileOptions, IUserDataProfileUpdateOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile";
|
|
6
6
|
import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
package/vscode/src/vs/workbench/contrib/extensions/browser/browserRuntimeExtensionsEditor.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Action } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
2
2
|
import { IExtensionHostProfile } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions";
|
|
3
3
|
import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
4
|
-
import { AbstractRuntimeExtensionsEditor, IRuntimeExtension } from "@codingame/monaco-vscode-
|
|
4
|
+
import { AbstractRuntimeExtensionsEditor, IRuntimeExtension } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor";
|
|
5
5
|
export declare class RuntimeExtensionsEditor extends AbstractRuntimeExtensionsEditor {
|
|
6
6
|
protected _getProfileInfo(): IExtensionHostProfile | null;
|
|
7
7
|
protected _getUnresponsiveProfile(extensionId: ExtensionIdentifier): IExtensionHostProfile | undefined;
|
package/vscode/src/vs/workbench/contrib/extensions/browser/browserRuntimeExtensionsEditor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { AbstractRuntimeExtensionsEditor } from '@codingame/monaco-vscode-
|
|
2
|
+
import { AbstractRuntimeExtensionsEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor';
|
|
3
3
|
import { ReportExtensionIssueAction } from '../common/reportExtensionIssueAction.js';
|
|
4
4
|
|
|
5
5
|
class RuntimeExtensionsEditor extends AbstractRuntimeExtensionsEditor {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
3
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
4
4
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
5
|
-
import { EditorPaneDescriptor } from '@codingame/monaco-vscode-
|
|
5
|
+
import { EditorPaneDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/editor';
|
|
6
6
|
import { RuntimeExtensionsEditor } from './browserRuntimeExtensionsEditor.js';
|
|
7
|
-
import { RuntimeExtensionsInput } from '@codingame/monaco-vscode-
|
|
7
|
+
import { RuntimeExtensionsInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/runtimeExtensionsInput';
|
|
8
8
|
import { EditorExtensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
9
9
|
|
|
10
|
-
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(RuntimeExtensionsEditor, RuntimeExtensionsEditor.ID, ( localize(
|
|
10
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(RuntimeExtensionsEditor, RuntimeExtensionsEditor.ID, ( localize(7478, "Running Extensions"))), [( new SyncDescriptor(RuntimeExtensionsInput))]);
|
|
@@ -8,7 +8,7 @@ var ReportExtensionIssueAction_1;
|
|
|
8
8
|
let ReportExtensionIssueAction = class ReportExtensionIssueAction extends Action {
|
|
9
9
|
static { ReportExtensionIssueAction_1 = this; }
|
|
10
10
|
static { this._id = 'workbench.extensions.action.reportExtensionIssue'; }
|
|
11
|
-
static { this._label = ( localize(
|
|
11
|
+
static { this._label = ( localize(7845, "Report Issue")); }
|
|
12
12
|
constructor(extension, issueService) {
|
|
13
13
|
super(ReportExtensionIssueAction_1._id, ReportExtensionIssueAction_1._label, 'extension-action report-issue');
|
|
14
14
|
this.extension = extension;
|
package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js
CHANGED
|
@@ -16,7 +16,7 @@ import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscod
|
|
|
16
16
|
import { isLanguagePackExtension, isAuthenticationProviderExtension, 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
|
-
import { StorageManager } from '@codingame/monaco-vscode-
|
|
19
|
+
import { StorageManager } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionEnablementService';
|
|
20
20
|
import { webWorkerExtHostConfig } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
|
|
21
21
|
import { IUserDataSyncAccountService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataSync/common/userDataSyncAccount.service';
|
|
22
22
|
import { IUserDataSyncEnablementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
@@ -35,6 +35,7 @@ import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/array
|
|
|
35
35
|
import { isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
36
36
|
import { Delayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
37
37
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
38
|
+
import { isWeb } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
38
39
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
39
40
|
|
|
40
41
|
const SOURCE = 'IWorkbenchExtensionEnablementService';
|
|
@@ -81,7 +82,12 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
81
82
|
this._completionsExtensionId = productService.defaultChatAgent?.extensionId.toLowerCase();
|
|
82
83
|
this._chatExtensionId = productService.defaultChatAgent?.chatExtensionId.toLowerCase();
|
|
83
84
|
const unificationExtensions = [this._completionsExtensionId, this._chatExtensionId].filter(id => !!id);
|
|
84
|
-
|
|
85
|
+
if (isWeb && this.environmentService.remoteAuthority === undefined) {
|
|
86
|
+
this._extensionUnificationEnabled = false;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this._extensionUnificationEnabled = this.configurationService.getValue(EXTENSION_UNIFICATION_SETTING);
|
|
90
|
+
}
|
|
85
91
|
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
86
92
|
if (e.affectsConfiguration(EXTENSION_UNIFICATION_SETTING)) {
|
|
87
93
|
const extensionUnificationEnabled = this.configurationService.getValue(EXTENSION_UNIFICATION_SETTING);
|
|
@@ -93,8 +99,8 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
93
99
|
}));
|
|
94
100
|
if (this.allUserExtensionsDisabled) {
|
|
95
101
|
this.lifecycleService.when(LifecyclePhase.Eventually).then(() => {
|
|
96
|
-
this.notificationService.prompt(Severity.Info, ( localize(
|
|
97
|
-
label: ( localize(
|
|
102
|
+
this.notificationService.prompt(Severity.Info, ( localize(13859, "All installed extensions are temporarily disabled.")), [{
|
|
103
|
+
label: ( localize(13860, "Reload and Enable Extensions")),
|
|
98
104
|
run: () => hostService.reload({ disableExtensions: false })
|
|
99
105
|
}], {
|
|
100
106
|
sticky: true,
|
|
@@ -146,7 +152,7 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
146
152
|
throwErrorIfCannotChangeEnablement(extension, donotCheckDependencies) {
|
|
147
153
|
if (isLanguagePackExtension(extension.manifest)) {
|
|
148
154
|
throw ( new Error(( localize(
|
|
149
|
-
|
|
155
|
+
13861,
|
|
150
156
|
"Cannot change enablement of {0} extension because it contributes language packs.",
|
|
151
157
|
extension.manifest.displayName || extension.identifier.id
|
|
152
158
|
))));
|
|
@@ -156,14 +162,14 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
156
162
|
a => a.id === this.userDataSyncAccountService.account.authenticationProviderId
|
|
157
163
|
))) {
|
|
158
164
|
throw ( new Error(( localize(
|
|
159
|
-
|
|
165
|
+
13862,
|
|
160
166
|
"Cannot change enablement {0} extension because Settings Sync depends on it.",
|
|
161
167
|
extension.manifest.displayName || extension.identifier.id
|
|
162
168
|
))));
|
|
163
169
|
}
|
|
164
170
|
if (this._isEnabledInEnv(extension)) {
|
|
165
171
|
throw ( new Error(( localize(
|
|
166
|
-
|
|
172
|
+
13863,
|
|
167
173
|
"Cannot change enablement of {0} extension because it is enabled in environment",
|
|
168
174
|
extension.manifest.displayName || extension.identifier.id
|
|
169
175
|
))));
|
|
@@ -174,37 +180,37 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
174
180
|
switch (enablementStateOfExtension) {
|
|
175
181
|
case EnablementState.DisabledByEnvironment:
|
|
176
182
|
throw ( new Error(( localize(
|
|
177
|
-
|
|
183
|
+
13864,
|
|
178
184
|
"Cannot change enablement of {0} extension because it is disabled in environment",
|
|
179
185
|
extension.manifest.displayName || extension.identifier.id
|
|
180
186
|
))));
|
|
181
187
|
case EnablementState.DisabledByMalicious:
|
|
182
188
|
throw ( new Error(( localize(
|
|
183
|
-
|
|
189
|
+
13865,
|
|
184
190
|
"Cannot change enablement of {0} extension because it is malicious",
|
|
185
191
|
extension.manifest.displayName || extension.identifier.id
|
|
186
192
|
))));
|
|
187
193
|
case EnablementState.DisabledByVirtualWorkspace:
|
|
188
194
|
throw ( new Error(( localize(
|
|
189
|
-
|
|
195
|
+
13866,
|
|
190
196
|
"Cannot change enablement of {0} extension because it does not support virtual workspaces",
|
|
191
197
|
extension.manifest.displayName || extension.identifier.id
|
|
192
198
|
))));
|
|
193
199
|
case EnablementState.DisabledByExtensionKind:
|
|
194
200
|
throw ( new Error(( localize(
|
|
195
|
-
|
|
201
|
+
13867,
|
|
196
202
|
"Cannot change enablement of {0} extension because of its extension kind",
|
|
197
203
|
extension.manifest.displayName || extension.identifier.id
|
|
198
204
|
))));
|
|
199
205
|
case EnablementState.DisabledByAllowlist:
|
|
200
206
|
throw ( new Error(( localize(
|
|
201
|
-
|
|
207
|
+
13868,
|
|
202
208
|
"Cannot change enablement of {0} extension because it is disallowed",
|
|
203
209
|
extension.manifest.displayName || extension.identifier.id
|
|
204
210
|
))));
|
|
205
211
|
case EnablementState.DisabledByInvalidExtension:
|
|
206
212
|
throw ( new Error(( localize(
|
|
207
|
-
|
|
213
|
+
13869,
|
|
208
214
|
"Cannot change enablement of {0} extension because of it is invalid",
|
|
209
215
|
extension.manifest.displayName || extension.identifier.id
|
|
210
216
|
))));
|
|
@@ -217,7 +223,7 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
217
223
|
continue;
|
|
218
224
|
}
|
|
219
225
|
throw ( new Error(( localize(
|
|
220
|
-
|
|
226
|
+
13870,
|
|
221
227
|
"Cannot enable '{0}' extension because it depends on '{1}' extension that cannot be enabled",
|
|
222
228
|
extension.manifest.displayName || extension.identifier.id,
|
|
223
229
|
dependency.manifest.displayName || dependency.identifier.id
|
|
@@ -227,11 +233,11 @@ let ExtensionEnablementService = class ExtensionEnablementService extends Dispos
|
|
|
227
233
|
}
|
|
228
234
|
throwErrorIfCannotChangeWorkspaceEnablement(extension) {
|
|
229
235
|
if (!this.hasWorkspace) {
|
|
230
|
-
throw ( new Error(( localize(
|
|
236
|
+
throw ( new Error(( localize(13871, "No workspace."))));
|
|
231
237
|
}
|
|
232
238
|
if (isAuthenticationProviderExtension(extension.manifest)) {
|
|
233
239
|
throw ( new Error(( localize(
|
|
234
|
-
|
|
240
|
+
13872,
|
|
235
241
|
"Cannot change enablement of {0} extension in workspace because it contributes authentication providers",
|
|
236
242
|
extension.manifest.displayName || extension.identifier.id
|
|
237
243
|
))));
|
|
@@ -87,17 +87,17 @@ let ExtensionFeaturesManagementService = class ExtensionFeaturesManagementServic
|
|
|
87
87
|
if (feature.access.requireUserConsent) {
|
|
88
88
|
const extensionDescription = this.extensionService.extensions.find(e => ExtensionIdentifier.equals(e.identifier, extension));
|
|
89
89
|
const confirmationResult = await this.dialogService.confirm({
|
|
90
|
-
title: ( localize(
|
|
90
|
+
title: ( localize(13875, "Access '{0}' Feature", feature.label)),
|
|
91
91
|
message: ( localize(
|
|
92
|
-
|
|
92
|
+
13876,
|
|
93
93
|
"'{0}' extension would like to access the '{1}' feature.",
|
|
94
94
|
extensionDescription?.displayName ?? extension._lower,
|
|
95
95
|
feature.label
|
|
96
96
|
)),
|
|
97
97
|
detail: justification ?? feature.description,
|
|
98
98
|
custom: true,
|
|
99
|
-
primaryButton: ( localize(
|
|
100
|
-
cancelButton: ( localize(
|
|
99
|
+
primaryButton: ( localize(13877, "Allow")),
|
|
100
|
+
cancelButton: ( localize(13878, "Don't Allow")),
|
|
101
101
|
});
|
|
102
102
|
enabled = confirmationResult.confirmed;
|
|
103
103
|
}
|
|
@@ -3,7 +3,7 @@ import { IAllowedExtensionsService } from "@codingame/monaco-vscode-api/vscode/v
|
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { ExtensionIdentifier, ExtensionType } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
5
5
|
import { ExtensionManagementChannelClient as BaseExtensionManagementChannelClient } from "../../../../platform/extensionManagement/common/extensionManagementIpc.js";
|
|
6
|
-
import { IChannel } from "@codingame/monaco-vscode-
|
|
6
|
+
import { IChannel } from "@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc";
|
|
7
7
|
import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
8
8
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
9
9
|
import { DidChangeProfileEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement";
|
|
@@ -22,7 +22,7 @@ let ExtensionManagementServerService = class ExtensionManagementServerService {
|
|
|
22
22
|
this.remoteExtensionManagementServer = {
|
|
23
23
|
id: 'remote',
|
|
24
24
|
extensionManagementService,
|
|
25
|
-
get label() { return labelService.getHostLabel(Schemas.vscodeRemote, remoteAgentConnection.remoteAuthority) || ( localize(
|
|
25
|
+
get label() { return labelService.getHostLabel(Schemas.vscodeRemote, remoteAgentConnection.remoteAuthority) || ( localize(13879, "Remote")); },
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
if (isWeb) {
|
|
@@ -30,7 +30,7 @@ let ExtensionManagementServerService = class ExtensionManagementServerService {
|
|
|
30
30
|
this.webExtensionManagementServer = {
|
|
31
31
|
id: 'web',
|
|
32
32
|
extensionManagementService,
|
|
33
|
-
label: ( localize(
|
|
33
|
+
label: ( localize(13880, "Browser")),
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
}
|
package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js
CHANGED
|
@@ -38,7 +38,7 @@ import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
38
38
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
39
39
|
import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
40
40
|
import { MarkdownString, createCommandUri } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
41
|
-
import { verifiedPublisherIcon } from '@codingame/monaco-vscode-
|
|
41
|
+
import { verifiedPublisherIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionsIcons';
|
|
42
42
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
43
43
|
import { CommontExtensionManagementService } from '../../../../platform/extensionManagement/common/abstractExtensionManagementService.js';
|
|
44
44
|
|
|
@@ -222,7 +222,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
222
222
|
getDependentsErrorMessage(extension, dependents) {
|
|
223
223
|
if (dependents.length === 1) {
|
|
224
224
|
return localize(
|
|
225
|
-
|
|
225
|
+
13881,
|
|
226
226
|
"Cannot uninstall extension '{0}'. Extension '{1}' depends on this.",
|
|
227
227
|
extension.manifest.displayName || extension.manifest.name,
|
|
228
228
|
dependents[0].manifest.displayName || dependents[0].manifest.name
|
|
@@ -230,7 +230,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
230
230
|
}
|
|
231
231
|
if (dependents.length === 2) {
|
|
232
232
|
return localize(
|
|
233
|
-
|
|
233
|
+
13882,
|
|
234
234
|
"Cannot uninstall extension '{0}'. Extensions '{1}' and '{2}' depend on this.",
|
|
235
235
|
extension.manifest.displayName || extension.manifest.name,
|
|
236
236
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -238,7 +238,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
return localize(
|
|
241
|
-
|
|
241
|
+
13883,
|
|
242
242
|
"Cannot uninstall extension '{0}'. Extensions '{1}', '{2}' and others depend on this.",
|
|
243
243
|
extension.manifest.displayName || extension.manifest.name,
|
|
244
244
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -348,7 +348,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
348
348
|
}
|
|
349
349
|
const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None);
|
|
350
350
|
if (!manifest) {
|
|
351
|
-
return ( new MarkdownString()).appendText(( localize(
|
|
351
|
+
return ( new MarkdownString()).appendText(( localize(13884, "Manifest is not found")));
|
|
352
352
|
}
|
|
353
353
|
if (this.extensionManagementServerService.remoteExtensionManagementServer
|
|
354
354
|
&& (await this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.canInstall(gallery)) === true
|
|
@@ -361,7 +361,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
361
361
|
return true;
|
|
362
362
|
}
|
|
363
363
|
return ( new MarkdownString()).appendText(( localize(
|
|
364
|
-
|
|
364
|
+
13885,
|
|
365
365
|
"Cannot install the '{0}' extension because it is not available in this setup.",
|
|
366
366
|
gallery.displayName || gallery.name
|
|
367
367
|
)));
|
|
@@ -377,7 +377,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
377
377
|
return true;
|
|
378
378
|
}
|
|
379
379
|
return ( new MarkdownString()).appendText(( localize(
|
|
380
|
-
|
|
380
|
+
13885,
|
|
381
381
|
"Cannot install the '{0}' extension because it is not available in this setup.",
|
|
382
382
|
extension.manifest.displayName ?? extension.identifier.id
|
|
383
383
|
)));
|
|
@@ -406,7 +406,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
406
406
|
const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
|
|
407
407
|
if (!manifest) {
|
|
408
408
|
throw ( new Error(( localize(
|
|
409
|
-
|
|
409
|
+
13886,
|
|
410
410
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
411
411
|
extension.displayName || extension.name
|
|
412
412
|
))));
|
|
@@ -425,7 +425,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
425
425
|
const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
|
|
426
426
|
if (!manifest) {
|
|
427
427
|
throw ( new Error(( localize(
|
|
428
|
-
|
|
428
|
+
13886,
|
|
429
429
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
430
430
|
extension.displayName || extension.name
|
|
431
431
|
))));
|
|
@@ -473,7 +473,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
473
473
|
const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None);
|
|
474
474
|
if (!manifest) {
|
|
475
475
|
throw ( new Error(( localize(
|
|
476
|
-
|
|
476
|
+
13886,
|
|
477
477
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
478
478
|
gallery.displayName || gallery.name
|
|
479
479
|
))));
|
|
@@ -577,7 +577,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
577
577
|
const manifest = await this.extensionGalleryService.getManifest(gallery, CancellationToken.None);
|
|
578
578
|
if (!manifest) {
|
|
579
579
|
return Promise.reject(( localize(
|
|
580
|
-
|
|
580
|
+
13886,
|
|
581
581
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
582
582
|
gallery.displayName || gallery.name
|
|
583
583
|
)));
|
|
@@ -627,7 +627,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
627
627
|
for (const server of servers) {
|
|
628
628
|
if (!installableServers.includes(server)) {
|
|
629
629
|
const error = ( new Error(( localize(
|
|
630
|
-
|
|
630
|
+
13887,
|
|
631
631
|
"Cannot install the '{0}' extension because it is not available in the '{1}' setup.",
|
|
632
632
|
gallery.displayName || gallery.name,
|
|
633
633
|
server.label
|
|
@@ -651,7 +651,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
651
651
|
}
|
|
652
652
|
if (!servers.length) {
|
|
653
653
|
const error = ( new Error(( localize(
|
|
654
|
-
|
|
654
|
+
13885,
|
|
655
655
|
"Cannot install the '{0}' extension because it is not available in this setup.",
|
|
656
656
|
gallery.displayName || gallery.name
|
|
657
657
|
))));
|
|
@@ -689,24 +689,24 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
689
689
|
if (this.isExtensionsSyncEnabled()) {
|
|
690
690
|
const { result } = await this.dialogService.prompt({
|
|
691
691
|
type: Severity.Info,
|
|
692
|
-
message: extensions.length === 1 ? ( localize(
|
|
692
|
+
message: extensions.length === 1 ? ( localize(13888, "Install Extension")) : ( localize(13889, "Install Extensions")),
|
|
693
693
|
detail: extensions.length === 1
|
|
694
694
|
? ( localize(
|
|
695
|
-
|
|
695
|
+
13890,
|
|
696
696
|
"Would you like to install and synchronize '{0}' extension across your devices?",
|
|
697
697
|
extensions[0].displayName
|
|
698
698
|
))
|
|
699
699
|
: ( localize(
|
|
700
|
-
|
|
700
|
+
13891,
|
|
701
701
|
"Would you like to install and synchronize extensions across your devices?"
|
|
702
702
|
)),
|
|
703
703
|
buttons: [
|
|
704
704
|
{
|
|
705
|
-
label: ( localize(
|
|
705
|
+
label: ( localize(13892, "&&Install")),
|
|
706
706
|
run: () => false
|
|
707
707
|
},
|
|
708
708
|
{
|
|
709
|
-
label: ( localize(
|
|
709
|
+
label: ( localize(13893, "Install (Do &¬ sync)")),
|
|
710
710
|
run: () => true
|
|
711
711
|
}
|
|
712
712
|
],
|
|
@@ -755,7 +755,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
755
755
|
const manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None);
|
|
756
756
|
if (!manifest) {
|
|
757
757
|
throw ( new Error(( localize(
|
|
758
|
-
|
|
758
|
+
13886,
|
|
759
759
|
"Installing Extension {0} failed: Manifest is not found.",
|
|
760
760
|
extension.displayName || extension.name
|
|
761
761
|
))));
|
|
@@ -787,7 +787,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
787
787
|
const unverfiiedPublishers = allPublishers.filter(p => !p.publisherDomain?.verified);
|
|
788
788
|
const verifiedPublishers = allPublishers.filter(p => p.publisherDomain?.verified);
|
|
789
789
|
const installButton = {
|
|
790
|
-
label: allPublishers.length > 1 ? ( localize(
|
|
790
|
+
label: allPublishers.length > 1 ? ( localize(13894, "Trust Publishers & &&Install")) : ( localize(13895, "Trust Publisher & &&Install")),
|
|
791
791
|
run: () => {
|
|
792
792
|
this.telemetryService.publicLog2('extensions:trustPublisher', { action: 'trust', extensionId: ( untrustedExtensions.map(e => e.identifier.id)).join(',') });
|
|
793
793
|
this.trustPublishers(...( allPublishers.map(
|
|
@@ -796,7 +796,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
796
796
|
}
|
|
797
797
|
};
|
|
798
798
|
const learnMoreButton = {
|
|
799
|
-
label: ( localize(
|
|
799
|
+
label: ( localize(13896, "&&Learn More")),
|
|
800
800
|
run: () => {
|
|
801
801
|
this.telemetryService.publicLog2('extensions:trustPublisher', { action: 'learn', extensionId: ( untrustedExtensions.map(e => e.identifier.id)).join(',') });
|
|
802
802
|
this.instantiationService.invokeFunction(accessor => accessor.get(ICommandService).executeCommand('vscode.open', ( URI.parse('https://aka.ms/vscode-extension-security'))));
|
|
@@ -809,19 +809,19 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
809
809
|
const unverifiedLink = 'https://aka.ms/vscode-verify-publisher';
|
|
810
810
|
const title = allPublishers.length === 1
|
|
811
811
|
? ( localize(
|
|
812
|
-
|
|
812
|
+
13897,
|
|
813
813
|
"Do you trust the publisher \"{0}\"?",
|
|
814
814
|
allPublishers[0].publisherDisplayName
|
|
815
815
|
))
|
|
816
816
|
: allPublishers.length === 2
|
|
817
817
|
? ( localize(
|
|
818
|
-
|
|
818
|
+
13898,
|
|
819
819
|
"Do you trust publishers \"{0}\" and \"{1}\"?",
|
|
820
820
|
allPublishers[0].publisherDisplayName,
|
|
821
821
|
allPublishers[1].publisherDisplayName
|
|
822
822
|
))
|
|
823
823
|
: ( localize(
|
|
824
|
-
|
|
824
|
+
13899,
|
|
825
825
|
"Do you trust the publisher \"{0}\" and {1} others?",
|
|
826
826
|
allPublishers[0].publisherDisplayName,
|
|
827
827
|
allPublishers.length - 1
|
|
@@ -832,7 +832,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
832
832
|
const manifest = untrustedExtensionManifests[0];
|
|
833
833
|
if (otherUntrustedPublishers.length) {
|
|
834
834
|
customMessage.appendMarkdown(( localize(
|
|
835
|
-
|
|
835
|
+
13900,
|
|
836
836
|
"The extension {0} is published by {1}.",
|
|
837
837
|
`[${extension.displayName}](${extension.detailsLink})`,
|
|
838
838
|
getPublisherLink(extension)
|
|
@@ -841,7 +841,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
841
841
|
const commandUri = ( createCommandUri('extension.open', extension.identifier.id, manifest.extensionPack?.length ? 'extensionPack' : 'dependencies').toString());
|
|
842
842
|
if (otherUntrustedPublishers.length === 1) {
|
|
843
843
|
customMessage.appendMarkdown(( localize(
|
|
844
|
-
|
|
844
|
+
13901,
|
|
845
845
|
"Installing this extension will also install [extensions]({0}) published by {1}.",
|
|
846
846
|
commandUri,
|
|
847
847
|
getPublisherLink(otherUntrustedPublishers[0])
|
|
@@ -849,7 +849,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
849
849
|
}
|
|
850
850
|
else {
|
|
851
851
|
customMessage.appendMarkdown(( localize(
|
|
852
|
-
|
|
852
|
+
13902,
|
|
853
853
|
"Installing this extension will also install [extensions]({0}) published by {1} and {2}.",
|
|
854
854
|
commandUri,
|
|
855
855
|
( otherUntrustedPublishers.slice(0, otherUntrustedPublishers.length - 1).map(p => getPublisherLink(p))).join(', '),
|
|
@@ -858,13 +858,13 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
858
858
|
}
|
|
859
859
|
customMessage.appendMarkdown(' ');
|
|
860
860
|
customMessage.appendMarkdown(( localize(
|
|
861
|
-
|
|
861
|
+
13903,
|
|
862
862
|
"This is the first time you're installing extensions from these publishers."
|
|
863
863
|
)));
|
|
864
864
|
}
|
|
865
865
|
else {
|
|
866
866
|
customMessage.appendMarkdown(( localize(
|
|
867
|
-
|
|
867
|
+
13904,
|
|
868
868
|
"The extension {0} is published by {1}. This is the first extension you're installing from this publisher.",
|
|
869
869
|
`[${extension.displayName}](${extension.detailsLink})`,
|
|
870
870
|
getPublisherLink(extension)
|
|
@@ -873,7 +873,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
873
873
|
}
|
|
874
874
|
else {
|
|
875
875
|
customMessage.appendMarkdown(( localize(
|
|
876
|
-
|
|
876
|
+
13905,
|
|
877
877
|
"This is the first time you're installing extensions from publishers {0} and {1}.",
|
|
878
878
|
getPublisherLink(allPublishers[0]),
|
|
879
879
|
getPublisherLink(allPublishers[allPublishers.length - 1])
|
|
@@ -883,7 +883,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
883
883
|
for (const publisher of verifiedPublishers) {
|
|
884
884
|
customMessage.appendText('\n');
|
|
885
885
|
const publisherVerifiedMessage = ( localize(
|
|
886
|
-
|
|
886
|
+
13906,
|
|
887
887
|
"{0} has verified ownership of {1}.",
|
|
888
888
|
getPublisherLink(publisher),
|
|
889
889
|
`[$(link-external) ${( URI.parse(publisher.publisherDomain.link)).authority}](${publisher.publisherDomain.link})`
|
|
@@ -894,7 +894,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
894
894
|
customMessage.appendText('\n');
|
|
895
895
|
if (unverfiiedPublishers.length === 1) {
|
|
896
896
|
customMessage.appendMarkdown(`$(${Codicon.unverified.id}) ${( localize(
|
|
897
|
-
|
|
897
|
+
13907,
|
|
898
898
|
"{0} is [**not** verified]({1}).",
|
|
899
899
|
getPublisherLink(unverfiiedPublishers[0]),
|
|
900
900
|
unverifiedLink
|
|
@@ -902,7 +902,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
902
902
|
}
|
|
903
903
|
else {
|
|
904
904
|
customMessage.appendMarkdown(`$(${Codicon.unverified.id}) ${( localize(
|
|
905
|
-
|
|
905
|
+
13908,
|
|
906
906
|
"{0} and {1} are [**not** verified]({2}).",
|
|
907
907
|
( unverfiiedPublishers.slice(0, unverfiiedPublishers.length - 1).map(p => getPublisherLink(p))).join(', '),
|
|
908
908
|
getPublisherLink(unverfiiedPublishers[unverfiiedPublishers.length - 1]),
|
|
@@ -913,19 +913,19 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
913
913
|
}
|
|
914
914
|
else {
|
|
915
915
|
customMessage.appendText('\n');
|
|
916
|
-
customMessage.appendMarkdown(`$(${Codicon.unverified.id}) ${( localize(
|
|
916
|
+
customMessage.appendMarkdown(`$(${Codicon.unverified.id}) ${( localize(13909, "All publishers are [**not** verified]({0}).", unverifiedLink))}`);
|
|
917
917
|
}
|
|
918
918
|
customMessage.appendText('\n');
|
|
919
919
|
if (allPublishers.length > 1) {
|
|
920
920
|
customMessage.appendMarkdown(( localize(
|
|
921
|
-
|
|
921
|
+
13910,
|
|
922
922
|
"{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.",
|
|
923
923
|
this.productService.nameLong
|
|
924
924
|
)));
|
|
925
925
|
}
|
|
926
926
|
else {
|
|
927
927
|
customMessage.appendMarkdown(( localize(
|
|
928
|
-
|
|
928
|
+
13911,
|
|
929
929
|
"{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.",
|
|
930
930
|
this.productService.nameLong
|
|
931
931
|
)));
|
|
@@ -1004,13 +1004,13 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1004
1004
|
async checkForWorkspaceTrust(manifest, requireTrust) {
|
|
1005
1005
|
if (requireTrust || this.extensionManifestPropertiesService.getExtensionUntrustedWorkspaceSupportType(manifest) === false) {
|
|
1006
1006
|
const buttons = [];
|
|
1007
|
-
buttons.push({ label: ( localize(
|
|
1007
|
+
buttons.push({ label: ( localize(13912, "Trust Workspace & Install")), type: 'ContinueWithTrust' });
|
|
1008
1008
|
if (!requireTrust) {
|
|
1009
|
-
buttons.push({ label: ( localize(
|
|
1009
|
+
buttons.push({ label: ( localize(13913, "Install")), type: 'ContinueWithoutTrust' });
|
|
1010
1010
|
}
|
|
1011
|
-
buttons.push({ label: ( localize(
|
|
1011
|
+
buttons.push({ label: ( localize(13914, "Learn More")), type: 'Manage' });
|
|
1012
1012
|
const trustState = await this.workspaceTrustRequestService.requestWorkspaceTrust({
|
|
1013
|
-
message: ( localize(
|
|
1013
|
+
message: ( localize(13915, "Enabling this extension requires a trusted workspace.")),
|
|
1014
1014
|
buttons
|
|
1015
1015
|
});
|
|
1016
1016
|
if (trustState === undefined) {
|
|
@@ -1034,7 +1034,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1034
1034
|
throw ( new ExtensionManagementError('Not supported in Web', ExtensionManagementErrorCode.Unsupported));
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
|
-
const productName = ( localize(
|
|
1037
|
+
const productName = ( localize(13916, "{0} for the Web", this.productService.nameLong));
|
|
1038
1038
|
const virtualWorkspaceSupport = this.extensionManifestPropertiesService.getExtensionVirtualWorkspaceSupportType(manifest);
|
|
1039
1039
|
const virtualWorkspaceSupportReason = getWorkspaceSupportTypeMessage(manifest.capabilities?.virtualWorkspaces);
|
|
1040
1040
|
const hasLimitedSupport = virtualWorkspaceSupport === 'limited' || !!virtualWorkspaceSupportReason;
|
|
@@ -1042,7 +1042,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1042
1042
|
return;
|
|
1043
1043
|
}
|
|
1044
1044
|
const limitedSupportMessage = ( localize(
|
|
1045
|
-
|
|
1045
|
+
13917,
|
|
1046
1046
|
"'{0}' has limited functionality in {1}.",
|
|
1047
1047
|
extension.displayName || extension.identifier.id,
|
|
1048
1048
|
productName
|
|
@@ -1051,16 +1051,16 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1051
1051
|
let buttons = [];
|
|
1052
1052
|
let detail;
|
|
1053
1053
|
const installAnywayButton = {
|
|
1054
|
-
label: ( localize(
|
|
1054
|
+
label: ( localize(13918, "&&Install Anyway")),
|
|
1055
1055
|
run: () => { }
|
|
1056
1056
|
};
|
|
1057
1057
|
const showExtensionsButton = {
|
|
1058
|
-
label: ( localize(
|
|
1058
|
+
label: ( localize(13919, "&&Show Extensions")),
|
|
1059
1059
|
run: () => this.instantiationService.invokeFunction(accessor => accessor.get(ICommandService).executeCommand('extension.open', extension.identifier.id, 'extensionPack'))
|
|
1060
1060
|
};
|
|
1061
1061
|
if (nonWebExtensions.length && hasLimitedSupport) {
|
|
1062
1062
|
message = limitedSupportMessage;
|
|
1063
|
-
detail = `${virtualWorkspaceSupportReason ? `${virtualWorkspaceSupportReason}\n` : ''}${( localize(
|
|
1063
|
+
detail = `${virtualWorkspaceSupportReason ? `${virtualWorkspaceSupportReason}\n` : ''}${( localize(13920, "Contains extensions which are not supported."))}`;
|
|
1064
1064
|
buttons = [
|
|
1065
1065
|
installAnywayButton,
|
|
1066
1066
|
showExtensionsButton
|
|
@@ -1073,7 +1073,7 @@ let ExtensionManagementService = class ExtensionManagementService extends Common
|
|
|
1073
1073
|
}
|
|
1074
1074
|
else {
|
|
1075
1075
|
message = ( localize(
|
|
1076
|
-
|
|
1076
|
+
13921,
|
|
1077
1077
|
"'{0}' contains extensions which are not supported in {1}.",
|
|
1078
1078
|
extension.displayName || extension.identifier.id,
|
|
1079
1079
|
productName
|
|
@@ -1360,7 +1360,7 @@ let WorkspaceExtensionsManagementService = class WorkspaceExtensionsManagementSe
|
|
|
1360
1360
|
if (extension.manifest.main) {
|
|
1361
1361
|
if (!(await this.fileService.exists(this.uriIdentityService.extUri.joinPath(extension.location, extension.manifest.main)))) {
|
|
1362
1362
|
isValid = false;
|
|
1363
|
-
validations.push([Severity.Error, ( localize(
|
|
1363
|
+
validations.push([Severity.Error, ( localize(13922, "Cannot activate because {0} not found", extension.manifest.main))]);
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
1366
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IChannel } from "@codingame/monaco-vscode-
|
|
1
|
+
import { IChannel } from "@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc";
|
|
2
2
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
3
|
import { DidChangeProfileEvent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement";
|
|
4
4
|
import { IProfileAwareExtensionManagementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
3
|
-
import { IgnoredRecommendationChangeNotification } from "@codingame/monaco-vscode-
|
|
3
|
+
import { IgnoredRecommendationChangeNotification } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations";
|
|
4
4
|
import { IExtensionIgnoredRecommendationsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.service";
|
|
5
5
|
import { IWorkspaceExtensionsConfigService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.service";
|
|
6
6
|
export declare class ExtensionIgnoredRecommendationsService extends Disposable implements IExtensionIgnoredRecommendationsService {
|