@codingame/monaco-vscode-extension-gallery-service-override 14.0.5 → 15.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/index.js +2 -2
- package/package.json +24 -25
- package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js +22 -26
- package/vscode/src/vs/platform/extensionManagement/common/allowedExtensionsService.js +5 -5
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.d.ts +0 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js +13 -14
- package/vscode/src/vs/platform/extensionManagement/common/unsupportedExtensionsMigration.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +20 -20
- package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +49 -49
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +16 -16
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +15 -15
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +175 -165
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.js +5 -5
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsList.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsList.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.js +5 -5
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewer.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +46 -46
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViews.js +26 -19
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWidgets.js +25 -25
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +81 -104
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +5 -5
- package/vscode/src/vs/workbench/contrib/extensions/browser/keymapRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/languageRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/remoteRecommendations.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +2 -2
- package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/common/reportExtensionIssueAction.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +14 -14
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
- 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.d.ts +3 -2
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js +68 -69
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.d.ts +1 -1
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { IAllowedExtensionsService, IExtensionTipsService, IGlobalExtensionEnabl
|
|
|
5
5
|
import { ExtensionGalleryService } from './vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js';
|
|
6
6
|
import { GlobalExtensionEnablementService } from '@codingame/monaco-vscode-a2719803-af40-5ae9-a29f-8a2231c33056-common/vscode/vs/platform/extensionManagement/common/extensionEnablementService';
|
|
7
7
|
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
8
|
-
import { getLocale } from '@codingame/monaco-vscode-
|
|
8
|
+
import { getLocale } from '@codingame/monaco-vscode-7ba0af96-90c2-5e11-ad7f-befdbbf246c8-common/vscode/vs/platform/languagePacks/common/languagePacks';
|
|
9
9
|
import { ExtensionsWorkbenchService } from './vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js';
|
|
10
10
|
import { IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService, IWebExtensionsScannerService, IExtensionManagementServerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
11
11
|
import { ExtensionManagementServerService } from './vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js';
|
|
@@ -19,7 +19,7 @@ import { ExtensionManifestPropertiesService } from '@codingame/monaco-vscode-d7f
|
|
|
19
19
|
import { IExtensionManifestPropertiesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
|
|
20
20
|
import { IBuiltinExtensionsScannerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions.service';
|
|
21
21
|
import { ExtensionIgnoredRecommendationsService } from './vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.js';
|
|
22
|
-
import { WorkspaceExtensionsConfigService } from '@codingame/monaco-vscode-
|
|
22
|
+
import { WorkspaceExtensionsConfigService } from '@codingame/monaco-vscode-805e9c2f-56b6-5a43-8b5b-d2dc2d3805fc-common/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig';
|
|
23
23
|
import { IWorkspaceExtensionsConfigService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.service';
|
|
24
24
|
import { ExtensionRecommendationNotificationService } from './vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js';
|
|
25
25
|
import { ExtensionTipsService } from './vscode/src/vs/platform/extensionManagement/common/extensionTipsService.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-extension-gallery-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.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,26 +15,25 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-039b5553-0838-562a-97c2-30d6e54a7b42-common": "
|
|
19
|
-
"@codingame/monaco-vscode-0f5ced28-abde-558b-8652-db8e7d4d64aa-common": "
|
|
20
|
-
"@codingame/monaco-vscode-10418ae3-ee63-5700-a757-89cbe6564ee4-common": "
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
25
|
-
"@codingame/monaco-vscode-5e324391-11e3-5ceb-93ee-938e4098e4ad-common": "
|
|
26
|
-
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "
|
|
27
|
-
"@codingame/monaco-vscode-
|
|
28
|
-
"@codingame/monaco-vscode-
|
|
29
|
-
"@codingame/monaco-vscode-
|
|
30
|
-
"@codingame/monaco-vscode-
|
|
31
|
-
"@codingame/monaco-vscode-
|
|
32
|
-
"@codingame/monaco-vscode-
|
|
33
|
-
"@codingame/monaco-vscode-
|
|
34
|
-
"@codingame/monaco-vscode-
|
|
35
|
-
"@codingame/monaco-vscode-
|
|
36
|
-
"@codingame/monaco-vscode-
|
|
37
|
-
"@codingame/monaco-vscode-eea37658-2307-56a5-8ed0-b2752c7b7a50-common": "14.0.5"
|
|
18
|
+
"@codingame/monaco-vscode-039b5553-0838-562a-97c2-30d6e54a7b42-common": "15.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-0f5ced28-abde-558b-8652-db8e7d4d64aa-common": "15.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-10418ae3-ee63-5700-a757-89cbe6564ee4-common": "15.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common": "15.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-1bb39316-6fbf-572e-ab6a-818a2496c14f-common": "15.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-3a00040f-b81b-50bc-88da-35f611c0bd1e-common": "15.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "15.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-5e324391-11e3-5ceb-93ee-938e4098e4ad-common": "15.0.0",
|
|
26
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "15.0.0",
|
|
27
|
+
"@codingame/monaco-vscode-7559b0be-bfa5-5fe6-b731-1973fe9fffa1-common": "15.0.0",
|
|
28
|
+
"@codingame/monaco-vscode-7ba0af96-90c2-5e11-ad7f-befdbbf246c8-common": "15.0.0",
|
|
29
|
+
"@codingame/monaco-vscode-805e9c2f-56b6-5a43-8b5b-d2dc2d3805fc-common": "15.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-81f603ca-d6ea-5402-90dd-3014dffc63b4-common": "15.0.0",
|
|
31
|
+
"@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "15.0.0",
|
|
32
|
+
"@codingame/monaco-vscode-a2719803-af40-5ae9-a29f-8a2231c33056-common": "15.0.0",
|
|
33
|
+
"@codingame/monaco-vscode-a4c2011e-8775-52bd-abf0-4a3c07a9696b-common": "15.0.0",
|
|
34
|
+
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "15.0.0",
|
|
35
|
+
"@codingame/monaco-vscode-api": "15.0.0",
|
|
36
|
+
"@codingame/monaco-vscode-d7f659f5-da33-5ea8-a3b8-9b94f2cf5f33-common": "15.0.0"
|
|
38
37
|
},
|
|
39
38
|
"main": "index.js",
|
|
40
39
|
"module": "index.js",
|
|
@@ -44,12 +43,12 @@
|
|
|
44
43
|
"default": "./index.js"
|
|
45
44
|
},
|
|
46
45
|
"./vscode/*": {
|
|
47
|
-
"
|
|
48
|
-
"
|
|
46
|
+
"types": "./vscode/src/*.d.ts",
|
|
47
|
+
"default": "./vscode/src/*.js"
|
|
49
48
|
},
|
|
50
49
|
"./*": {
|
|
51
|
-
"
|
|
52
|
-
"
|
|
50
|
+
"types": "./*.d.ts",
|
|
51
|
+
"default": "./*.js"
|
|
53
52
|
}
|
|
54
53
|
},
|
|
55
54
|
"typesVersions": {
|
package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js
CHANGED
|
@@ -32,7 +32,7 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
32
32
|
const allowedToInstall = this.allowedExtensionsService.isAllowed({ id: extension.identifier.id, publisherDisplayName: extension.publisherDisplayName });
|
|
33
33
|
if (allowedToInstall !== true) {
|
|
34
34
|
return (new MarkdownString(localize(
|
|
35
|
-
|
|
35
|
+
1700,
|
|
36
36
|
"This extension cannot be installed because {0}",
|
|
37
37
|
allowedToInstall.value
|
|
38
38
|
)));
|
|
@@ -40,12 +40,12 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
40
40
|
if (!(await this.isExtensionPlatformCompatible(extension))) {
|
|
41
41
|
const learnLink = isWeb ? 'https://aka.ms/vscode-web-extensions-guide' : 'https://aka.ms/vscode-platform-specific-extensions';
|
|
42
42
|
return (new MarkdownString(`${( localize(
|
|
43
|
-
|
|
43
|
+
1701,
|
|
44
44
|
"The '{0}' extension is not available in {1} for the {2}.",
|
|
45
45
|
extension.displayName ?? extension.identifier.id,
|
|
46
46
|
this.productService.nameLong,
|
|
47
47
|
TargetPlatformToString(await this.getTargetPlatform())
|
|
48
|
-
))} [${( localize(
|
|
48
|
+
))} [${( localize(1702, "Learn Why"))}](${learnLink})`));
|
|
49
49
|
}
|
|
50
50
|
return true;
|
|
51
51
|
}
|
|
@@ -110,7 +110,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
110
110
|
}
|
|
111
111
|
async installGalleryExtensions(extensions) {
|
|
112
112
|
if (!this.galleryService.isEnabled()) {
|
|
113
|
-
throw ( new ExtensionManagementError(( localize(
|
|
113
|
+
throw ( new ExtensionManagementError(( localize(1703, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
|
|
114
114
|
}
|
|
115
115
|
const results = [];
|
|
116
116
|
const installableExtensions = [];
|
|
@@ -229,7 +229,6 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
229
229
|
const isApplicationScoped = options.isApplicationScoped || options.isBuiltin || isApplicationScopedExtension(manifest);
|
|
230
230
|
const installExtensionTaskOptions = {
|
|
231
231
|
...options,
|
|
232
|
-
installOnlyNewlyAddedFromExtensionPack: options.installOnlyNewlyAddedFromExtensionPack ?? !URI.isUri(extension) ,
|
|
233
232
|
isApplicationScoped,
|
|
234
233
|
profileLocation: isApplicationScoped ? this.userDataProfilesService.defaultProfile.extensionsResource : options.profileLocation ?? this.getCurrentExtensionsManifestLocation(),
|
|
235
234
|
productVersion: options.productVersion ?? { version: this.productService.version, date: this.productService.date }
|
|
@@ -249,11 +248,12 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
249
248
|
}
|
|
250
249
|
else {
|
|
251
250
|
try {
|
|
252
|
-
const allDepsAndPackExtensionsToInstall = await this.getAllDepsAndPackExtensions(task.identifier, task.manifest, !!task.options.
|
|
251
|
+
const allDepsAndPackExtensionsToInstall = await this.getAllDepsAndPackExtensions(task.identifier, task.manifest, !!task.options.installPreReleaseVersion, task.options.productVersion);
|
|
253
252
|
const installed = await this.getInstalled(undefined, task.options.profileLocation, task.options.productVersion);
|
|
254
253
|
const options = { ...task.options, context: { ...task.options.context, [EXTENSION_INSTALL_DEP_PACK_CONTEXT]: true } };
|
|
255
254
|
for (const { gallery, manifest } of distinct(allDepsAndPackExtensionsToInstall, ({ gallery }) => gallery.identifier.id)) {
|
|
256
|
-
|
|
255
|
+
const existing = installed.find(e => areSameExtensions(e.identifier, gallery.identifier));
|
|
256
|
+
if (existing && existing.isApplicationScoped === !!options.isApplicationScoped) {
|
|
257
257
|
continue;
|
|
258
258
|
}
|
|
259
259
|
createInstallExtensionTask(manifest, gallery, options, task);
|
|
@@ -471,11 +471,10 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
471
471
|
}
|
|
472
472
|
throw error;
|
|
473
473
|
}
|
|
474
|
-
async getAllDepsAndPackExtensions(extensionIdentifier, manifest,
|
|
474
|
+
async getAllDepsAndPackExtensions(extensionIdentifier, manifest, installPreRelease, productVersion) {
|
|
475
475
|
if (!this.galleryService.isEnabled()) {
|
|
476
476
|
return [];
|
|
477
477
|
}
|
|
478
|
-
const installed = await this.getInstalled(undefined, profile, productVersion);
|
|
479
478
|
const knownIdentifiers = [];
|
|
480
479
|
const allDependenciesAndPacks = [];
|
|
481
480
|
const collectDependenciesAndPackExtensionsToInstall = async (extensionIdentifier, manifest) => {
|
|
@@ -483,12 +482,9 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
483
482
|
const dependecies = manifest.extensionDependencies || [];
|
|
484
483
|
const dependenciesAndPackExtensions = [...dependecies];
|
|
485
484
|
if (manifest.extensionPack) {
|
|
486
|
-
const existing = getOnlyNewlyAddedFromExtensionPack ? installed.find(e => areSameExtensions(e.identifier, extensionIdentifier)) : undefined;
|
|
487
485
|
for (const extension of manifest.extensionPack) {
|
|
488
|
-
if (
|
|
489
|
-
|
|
490
|
-
dependenciesAndPackExtensions.push(extension);
|
|
491
|
-
}
|
|
486
|
+
if (dependenciesAndPackExtensions.every(e => !areSameExtensions({ id: e }, { id: extension }))) {
|
|
487
|
+
dependenciesAndPackExtensions.push(extension);
|
|
492
488
|
}
|
|
493
489
|
}
|
|
494
490
|
}
|
|
@@ -528,7 +524,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
528
524
|
const extensionsControlManifest = await this.getExtensionsControlManifest();
|
|
529
525
|
if (isMalicious(extension.identifier, extensionsControlManifest)) {
|
|
530
526
|
throw ( new ExtensionManagementError(( localize(
|
|
531
|
-
|
|
527
|
+
1704,
|
|
532
528
|
"Can't install '{0}' extension since it was reported to be problematic.",
|
|
533
529
|
extension.identifier.id
|
|
534
530
|
)), ExtensionManagementErrorCode.Malicious));
|
|
@@ -539,7 +535,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
539
535
|
compatibleExtension = (await this.galleryService.getExtensions([{ id: deprecationInfo.extension.id, preRelease: deprecationInfo.extension.preRelease }], { targetPlatform: await this.getTargetPlatform(), compatible: true, productVersion }, CancellationToken.None))[0];
|
|
540
536
|
if (!compatibleExtension) {
|
|
541
537
|
throw ( new ExtensionManagementError(( localize(
|
|
542
|
-
|
|
538
|
+
1705,
|
|
543
539
|
"Can't install '{0}' extension since it was deprecated and the replacement extension '{1}' can't be found.",
|
|
544
540
|
extension.identifier.id,
|
|
545
541
|
deprecationInfo.extension.id
|
|
@@ -550,7 +546,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
550
546
|
if ((await this.canInstall(extension)) !== true) {
|
|
551
547
|
const targetPlatform = await this.getTargetPlatform();
|
|
552
548
|
throw ( new ExtensionManagementError(( localize(
|
|
553
|
-
|
|
549
|
+
1701,
|
|
554
550
|
"The '{0}' extension is not available in {1} for the {2}.",
|
|
555
551
|
extension.identifier.id,
|
|
556
552
|
this.productService.nameLong,
|
|
@@ -562,7 +558,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
562
558
|
const incompatibleApiProposalsMessages = [];
|
|
563
559
|
if (!areApiProposalsCompatible(extension.properties.enabledApiProposals ?? [], incompatibleApiProposalsMessages)) {
|
|
564
560
|
throw ( new ExtensionManagementError(( localize(
|
|
565
|
-
|
|
561
|
+
1706,
|
|
566
562
|
"Can't install '{0}' extension. {1}",
|
|
567
563
|
extension.displayName ?? extension.identifier.id,
|
|
568
564
|
incompatibleApiProposalsMessages[0]
|
|
@@ -570,13 +566,13 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
570
566
|
}
|
|
571
567
|
if (!installPreRelease && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
|
|
572
568
|
throw ( new ExtensionManagementError(( localize(
|
|
573
|
-
|
|
569
|
+
1707,
|
|
574
570
|
"Can't install release version of '{0}' extension because it has no release version.",
|
|
575
571
|
extension.displayName ?? extension.identifier.id
|
|
576
572
|
)), ExtensionManagementErrorCode.ReleaseVersionNotFound));
|
|
577
573
|
}
|
|
578
574
|
throw ( new ExtensionManagementError(( localize(
|
|
579
|
-
|
|
575
|
+
1708,
|
|
580
576
|
"Can't install '{0}' extension because it is not compatible with the current version of {1} (version {2}).",
|
|
581
577
|
extension.identifier.id,
|
|
582
578
|
this.productService.nameLong,
|
|
@@ -750,7 +746,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
750
746
|
if (extensionToUninstall === dependingExtension) {
|
|
751
747
|
if (dependents.length === 1) {
|
|
752
748
|
return localize(
|
|
753
|
-
|
|
749
|
+
1709,
|
|
754
750
|
"Cannot uninstall '{0}' extension. '{1}' extension depends on this.",
|
|
755
751
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
756
752
|
dependents[0].manifest.displayName || dependents[0].manifest.name
|
|
@@ -758,7 +754,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
758
754
|
}
|
|
759
755
|
if (dependents.length === 2) {
|
|
760
756
|
return localize(
|
|
761
|
-
|
|
757
|
+
1710,
|
|
762
758
|
"Cannot uninstall '{0}' extension. '{1}' and '{2}' extensions depend on this.",
|
|
763
759
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
764
760
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -766,7 +762,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
766
762
|
);
|
|
767
763
|
}
|
|
768
764
|
return localize(
|
|
769
|
-
|
|
765
|
+
1711,
|
|
770
766
|
"Cannot uninstall '{0}' extension. '{1}', '{2}' and other extension depend on this.",
|
|
771
767
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
772
768
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -775,7 +771,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
775
771
|
}
|
|
776
772
|
if (dependents.length === 1) {
|
|
777
773
|
return localize(
|
|
778
|
-
|
|
774
|
+
1712,
|
|
779
775
|
"Cannot uninstall '{0}' extension . It includes uninstalling '{1}' extension and '{2}' extension depends on this.",
|
|
780
776
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
781
777
|
dependingExtension.manifest.displayName
|
|
@@ -785,7 +781,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
785
781
|
}
|
|
786
782
|
if (dependents.length === 2) {
|
|
787
783
|
return localize(
|
|
788
|
-
|
|
784
|
+
1713,
|
|
789
785
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}' and '{3}' extensions depend on this.",
|
|
790
786
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
791
787
|
dependingExtension.manifest.displayName
|
|
@@ -795,7 +791,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
795
791
|
);
|
|
796
792
|
}
|
|
797
793
|
return localize(
|
|
798
|
-
|
|
794
|
+
1714,
|
|
799
795
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}', '{3}' and other extensions depend on this.",
|
|
800
796
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
801
797
|
dependingExtension.manifest.displayName
|
|
@@ -80,14 +80,14 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
80
80
|
`command:workbench.action.openSettings?${encodeURIComponent(JSON.stringify({ query: `@id:${AllowedExtensionsConfigKey}` }))}`
|
|
81
81
|
)).toString());
|
|
82
82
|
const extensionValue = this._allowedExtensionsConfigValue[id];
|
|
83
|
-
const extensionReason = ( new MarkdownString(( localize(
|
|
83
|
+
const extensionReason = ( new MarkdownString(( localize(1715, "it is not in the [allowed list]({0})", settingsCommandLink))));
|
|
84
84
|
if (!isUndefined(extensionValue)) {
|
|
85
85
|
if (isBoolean(extensionValue)) {
|
|
86
86
|
return extensionValue ? true : extensionReason;
|
|
87
87
|
}
|
|
88
88
|
if (extensionValue === 'stable' && prerelease) {
|
|
89
89
|
return (new MarkdownString(localize(
|
|
90
|
-
|
|
90
|
+
1716,
|
|
91
91
|
"the pre-release versions of this extension are not in the [allowed list]({0})",
|
|
92
92
|
settingsCommandLink
|
|
93
93
|
)));
|
|
@@ -107,7 +107,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
107
107
|
return false;
|
|
108
108
|
}))) {
|
|
109
109
|
return (new MarkdownString(localize(
|
|
110
|
-
|
|
110
|
+
1717,
|
|
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
|
+
1718,
|
|
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
|
+
1719,
|
|
132
132
|
"the pre-release versions from this publisher are not in the [allowed list]({1})",
|
|
133
133
|
publisherKey,
|
|
134
134
|
settingsCommandLink
|
|
@@ -42,7 +42,6 @@ declare abstract class AbstractExtensionGalleryService implements IExtensionGall
|
|
|
42
42
|
private readonly allowedExtensionsService;
|
|
43
43
|
readonly _serviceBrand: undefined;
|
|
44
44
|
private readonly extensionsGalleryUrl;
|
|
45
|
-
private readonly extensionsGallerySearchUrl;
|
|
46
45
|
private readonly extensionsControlUrl;
|
|
47
46
|
private readonly extensionUrlTemplate;
|
|
48
47
|
private readonly commonHeadersPromise;
|
|
@@ -331,9 +331,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
331
331
|
this.configurationService = configurationService;
|
|
332
332
|
this.allowedExtensionsService = allowedExtensionsService;
|
|
333
333
|
const config = productService.extensionsGallery;
|
|
334
|
-
|
|
335
|
-
this.extensionsGalleryUrl = isPPEEnabled ? config.servicePPEUrl : config?.serviceUrl;
|
|
336
|
-
this.extensionsGallerySearchUrl = isPPEEnabled ? undefined : config?.searchUrl;
|
|
334
|
+
this.extensionsGalleryUrl = config?.serviceUrl;
|
|
337
335
|
this.extensionsControlUrl = config?.controlUrl;
|
|
338
336
|
this.extensionUrlTemplate = config?.extensionUrlTemplate;
|
|
339
337
|
this.extensionsEnabledWithApiProposalVersion = productService.extensionsEnabledWithApiProposalVersion?.map(id => id.toLowerCase()) ?? [];
|
|
@@ -728,7 +726,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
728
726
|
try {
|
|
729
727
|
context = await this.requestService.request({
|
|
730
728
|
type: 'POST',
|
|
731
|
-
url: this.
|
|
729
|
+
url: this.api('/extensionquery'),
|
|
732
730
|
data,
|
|
733
731
|
headers
|
|
734
732
|
}, token);
|
|
@@ -857,7 +855,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
857
855
|
fallbackUri: `${extension.assets.download.fallbackUri}${( URI.parse(extension.assets.download.fallbackUri)).query ? '&' : '?'}${operationParam}=true`
|
|
858
856
|
} : extension.assets.download;
|
|
859
857
|
const headers = extension.queryContext?.[ACTIVITY_HEADER_NAME] ? { [ACTIVITY_HEADER_NAME]: extension.queryContext[ACTIVITY_HEADER_NAME] } : undefined;
|
|
860
|
-
const context = await this.getAsset(extension.identifier.id, downloadAsset, AssetType.VSIX, headers ? { headers } : undefined);
|
|
858
|
+
const context = await this.getAsset(extension.identifier.id, downloadAsset, AssetType.VSIX, extension.version, headers ? { headers } : undefined);
|
|
861
859
|
try {
|
|
862
860
|
await this.fileService.writeFile(location, context.stream);
|
|
863
861
|
}
|
|
@@ -877,7 +875,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
877
875
|
throw ( new Error('No signature asset found'));
|
|
878
876
|
}
|
|
879
877
|
this.logService.trace('ExtensionGalleryService#downloadSignatureArchive', extension.identifier.id);
|
|
880
|
-
const context = await this.getAsset(extension.identifier.id, extension.assets.signature, AssetType.Signature);
|
|
878
|
+
const context = await this.getAsset(extension.identifier.id, extension.assets.signature, AssetType.Signature, extension.version);
|
|
881
879
|
try {
|
|
882
880
|
await this.fileService.writeFile(location, context.stream);
|
|
883
881
|
}
|
|
@@ -893,7 +891,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
893
891
|
}
|
|
894
892
|
async getReadme(extension, token) {
|
|
895
893
|
if (extension.assets.readme) {
|
|
896
|
-
const context = await this.getAsset(extension.identifier.id, extension.assets.readme, AssetType.Details, {}, token);
|
|
894
|
+
const context = await this.getAsset(extension.identifier.id, extension.assets.readme, AssetType.Details, extension.version, {}, token);
|
|
897
895
|
const content = await asTextOrError(context);
|
|
898
896
|
return content || '';
|
|
899
897
|
}
|
|
@@ -901,7 +899,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
901
899
|
}
|
|
902
900
|
async getManifest(extension, token) {
|
|
903
901
|
if (extension.assets.manifest) {
|
|
904
|
-
const context = await this.getAsset(extension.identifier.id, extension.assets.manifest, AssetType.Manifest, {}, token);
|
|
902
|
+
const context = await this.getAsset(extension.identifier.id, extension.assets.manifest, AssetType.Manifest, extension.version, {}, token);
|
|
905
903
|
const text = await asTextOrError(context);
|
|
906
904
|
return text ? JSON.parse(text) : null;
|
|
907
905
|
}
|
|
@@ -913,13 +911,13 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
913
911
|
throw ( new Error('Manifest was not found'));
|
|
914
912
|
}
|
|
915
913
|
const headers = { 'Accept-Encoding': 'gzip' };
|
|
916
|
-
const context = await this.getAsset(extension, manifestAsset, AssetType.Manifest, { headers });
|
|
914
|
+
const context = await this.getAsset(extension, manifestAsset, AssetType.Manifest, rawExtensionVersion.version, { headers });
|
|
917
915
|
return await asJson(context);
|
|
918
916
|
}
|
|
919
917
|
async getCoreTranslation(extension, languageId) {
|
|
920
918
|
const asset = extension.assets.coreTranslations.filter(t => t[0] === languageId.toUpperCase())[0];
|
|
921
919
|
if (asset) {
|
|
922
|
-
const context = await this.getAsset(extension.identifier.id, asset[1], asset[0]);
|
|
920
|
+
const context = await this.getAsset(extension.identifier.id, asset[1], asset[0], extension.version);
|
|
923
921
|
const text = await asTextOrError(context);
|
|
924
922
|
return text ? JSON.parse(text) : null;
|
|
925
923
|
}
|
|
@@ -927,7 +925,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
927
925
|
}
|
|
928
926
|
async getChangelog(extension, token) {
|
|
929
927
|
if (extension.assets.changelog) {
|
|
930
|
-
const context = await this.getAsset(extension.identifier.id, extension.assets.changelog, AssetType.Changelog, {}, token);
|
|
928
|
+
const context = await this.getAsset(extension.identifier.id, extension.assets.changelog, AssetType.Changelog, extension.version, {}, token);
|
|
931
929
|
const content = await asTextOrError(context);
|
|
932
930
|
return content || '';
|
|
933
931
|
}
|
|
@@ -977,7 +975,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
977
975
|
}
|
|
978
976
|
return result;
|
|
979
977
|
}
|
|
980
|
-
async getAsset(extension, asset, assetType, options = {}, token = CancellationToken.None) {
|
|
978
|
+
async getAsset(extension, asset, assetType, extensionVersion, options = {}, token = CancellationToken.None) {
|
|
981
979
|
const commonHeaders = await this.commonHeadersPromise;
|
|
982
980
|
const baseOptions = { type: 'GET' };
|
|
983
981
|
const headers = { ...commonHeaders, ...(options.headers || {}) };
|
|
@@ -998,7 +996,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
998
996
|
throw err;
|
|
999
997
|
}
|
|
1000
998
|
const message = getErrorMessage(err);
|
|
1001
|
-
this.telemetryService.publicLog2('galleryService:cdnFallback', { extension, assetType, message });
|
|
999
|
+
this.telemetryService.publicLog2('galleryService:cdnFallback', { extension, assetType, message, extensionVersion });
|
|
1002
1000
|
const fallbackOptions = { ...options, url: fallbackUrl };
|
|
1003
1001
|
return this.requestService.request(fallbackOptions, token);
|
|
1004
1002
|
}
|
|
@@ -1006,7 +1004,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1006
1004
|
async getEngine(extension, rawExtensionVersion) {
|
|
1007
1005
|
let engine = getEngine(rawExtensionVersion);
|
|
1008
1006
|
if (!engine) {
|
|
1009
|
-
this.telemetryService.publicLog2('galleryService:engineFallback', { extension,
|
|
1007
|
+
this.telemetryService.publicLog2('galleryService:engineFallback', { extension, extensionVersion: rawExtensionVersion.version });
|
|
1010
1008
|
const manifest = await this.getManifestFromRawExtensionVersion(extension, rawExtensionVersion, CancellationToken.None);
|
|
1011
1009
|
if (!manifest) {
|
|
1012
1010
|
throw ( new Error('Manifest was not found'));
|
|
@@ -1025,6 +1023,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1025
1023
|
const context = await this.requestService.request({
|
|
1026
1024
|
type: 'GET',
|
|
1027
1025
|
url: this.extensionsControlUrl,
|
|
1026
|
+
timeout: 10000
|
|
1028
1027
|
}, CancellationToken.None);
|
|
1029
1028
|
if (context.res.statusCode !== 200) {
|
|
1030
1029
|
throw ( new Error('Could not get extensions report.'));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
3
|
-
import { InstallOperation } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
3
|
+
import { EXTENSION_INSTALL_SKIP_PUBLISHER_TRUST_CONTEXT, InstallOperation } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
4
4
|
import { areSameExtensions, getExtensionId } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
5
5
|
import { ExtensionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
6
6
|
|
|
@@ -35,7 +35,7 @@ async function migrateUnsupportedExtensions(extensionManagementService, galleryS
|
|
|
35
35
|
logService.info(`Uninstalled the unsupported extension '${unsupportedExtension.identifier.id}'`);
|
|
36
36
|
let preReleaseExtension = installed.find(i => areSameExtensions(i.identifier, { id: preReleaseExtensionId }));
|
|
37
37
|
if (!preReleaseExtension || (!preReleaseExtension.isPreReleaseVersion && isUnsupportedExtensionEnabled)) {
|
|
38
|
-
preReleaseExtension = await extensionManagementService.installFromGallery(gallery, { installPreReleaseVersion: true, isMachineScoped: unsupportedExtension.isMachineScoped, operation: InstallOperation.Migrate });
|
|
38
|
+
preReleaseExtension = await extensionManagementService.installFromGallery(gallery, { installPreReleaseVersion: true, isMachineScoped: unsupportedExtension.isMachineScoped, operation: InstallOperation.Migrate, context: { [EXTENSION_INSTALL_SKIP_PUBLISHER_TRUST_CONTEXT]: true } });
|
|
39
39
|
logService.info(`Installed the pre-release extension '${preReleaseExtension.identifier.id}'`);
|
|
40
40
|
if (!isUnsupportedExtensionEnabled) {
|
|
41
41
|
await extensionEnablementService.disableExtension(preReleaseExtension.identifier);
|
package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.d.ts
CHANGED
|
@@ -13,13 +13,13 @@ import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/pla
|
|
|
13
13
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
14
14
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
15
15
|
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
16
|
-
import { EditorPane } from "@codingame/monaco-vscode-
|
|
16
|
+
import { EditorPane } from "@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common/vscode/vs/workbench/browser/parts/editor/editorPane";
|
|
17
17
|
import { IEditorGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService";
|
|
18
18
|
import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
19
19
|
import { IExtensionFeaturesManagementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures.service";
|
|
20
20
|
import { IExtensionHostProfile, IExtensionsStatus } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions";
|
|
21
21
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
22
|
-
import { IExtension } from "@codingame/monaco-vscode-
|
|
22
|
+
import { IExtension } from "@codingame/monaco-vscode-7ba0af96-90c2-5e11-ad7f-befdbbf246c8-common/vscode/vs/workbench/contrib/extensions/common/extensions";
|
|
23
23
|
import { IExtensionsWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service";
|
|
24
24
|
interface IExtensionProfileInformation {
|
|
25
25
|
segments: number[];
|