Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/contrib/extensions/browser/unsupportedExtensionsMigrationContribution.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { IExtensionGalleryService, IGlobalExtensionEnablementService } from '../../../../platform/extensionManagement/common/extensionManagement.js';
7
import { IExtensionStorageService } from '../../../../platform/extensionManagement/common/extensionStorage.js';
8
import { migrateUnsupportedExtensions } from '../../../../platform/extensionManagement/common/unsupportedExtensionsMigration.js';
9
import { ILogService } from '../../../../platform/log/common/log.js';
10
import { IWorkbenchContribution } from '../../../common/contributions.js';
11
import { IExtensionManagementServerService } from '../../../services/extensionManagement/common/extensionManagement.js';
12
13
export class UnsupportedExtensionsMigrationContrib implements IWorkbenchContribution {
14
15
constructor(
16
@IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService,
17
@IExtensionGalleryService extensionGalleryService: IExtensionGalleryService,
18
@IExtensionStorageService extensionStorageService: IExtensionStorageService,
19
@IGlobalExtensionEnablementService extensionEnablementService: IGlobalExtensionEnablementService,
20
@ILogService logService: ILogService,
21
) {
22
// Unsupported extensions are not migrated for local extension management server, because it is done in shared process
23
if (extensionManagementServerService.remoteExtensionManagementServer) {
24
migrateUnsupportedExtensions(extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService, extensionGalleryService, extensionStorageService, extensionEnablementService, logService);
25
}
26
if (extensionManagementServerService.webExtensionManagementServer) {
27
migrateUnsupportedExtensions(extensionManagementServerService.webExtensionManagementServer.extensionManagementService, extensionGalleryService, extensionStorageService, extensionEnablementService, logService);
28
}
29
}
30
31
}
32
33