Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/services/extensionManagement/browser/extensionGalleryManifestService.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 { IExtensionGalleryManifestService } from '../../../../platform/extensionManagement/common/extensionGalleryManifest.js';
7
import { ExtensionGalleryManifestService as ExtensionGalleryManifestService } from '../../../../platform/extensionManagement/common/extensionGalleryManifestService.js';
8
import { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js';
9
import { IProductService } from '../../../../platform/product/common/productService.js';
10
import { IRemoteAgentService } from '../../remote/common/remoteAgentService.js';
11
12
class WebExtensionGalleryManifestService extends ExtensionGalleryManifestService implements IExtensionGalleryManifestService {
13
14
constructor(
15
@IProductService productService: IProductService,
16
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
17
) {
18
super(productService);
19
const remoteConnection = remoteAgentService.getConnection();
20
if (remoteConnection) {
21
const channel = remoteConnection.getChannel('extensionGalleryManifest');
22
this.getExtensionGalleryManifest().then(manifest => {
23
channel.call('setExtensionGalleryManifest', [manifest]);
24
this._register(this.onDidChangeExtensionGalleryManifest(manifest => channel.call('setExtensionGalleryManifest', [manifest])));
25
});
26
}
27
}
28
29
}
30
31
registerSingleton(IExtensionGalleryManifestService, WebExtensionGalleryManifestService, InstantiationType.Delayed);
32
33