313
314
constructor(
316
>
@IRequestService private readonly _requestService: IRequestService,
317
>
@IEnvironmentService environmentService: IEnvironmentService,
318
>
@IFileService private readonly _fileService: IFileService,
319
>
@IAgentPluginRepositoryService private readonly _pluginRepositoryService: IAgentPluginRepositoryService,
320
>
@ILogService private readonly _logService: ILogService,
321
>
@IStorageService private readonly _storageService: IStorageService,
322
>
@IWorkspacePluginSettingsService private readonly _workspacePluginSettingsService: IWorkspacePluginSettingsService,
323
>
@IWorkspaceTrustManagementService private readonly _workspaceTrustService: IWorkspaceTrustManagementService,
324
>
@IExtensionsWorkbenchService private readonly _extensionsWorkbenchService: IExtensionsWorkbenchService,
325
>
) {
326
>
super();
327
>
328
>
// File-backed store for installed plugins. The old cache location
329
>
// is passed so the store can rebase URIs during migration.
330
>
const oldCacheRoot = joinPath(environmentService.cacheHome, 'agentPlugins');
331
>
this._installedPluginsStore = this._register(
332
>
new FileBackedInstalledPluginsStore(
333
>
_pluginRepositoryService.agentPluginsHome,
334
>
oldCacheRoot,
335
>
_fileService,
336
>
_logService,
337
>
_storageService,
338
>
)
339
>
);
340
>
341
>
this._trustedMarketplacesStore = this._register(
342
>
trustedMarketplacesMemento(StorageScope.APPLICATION, StorageTarget.MACHINE, _storageService)
343
>
);
344
>
345
>
this._lastFetchedPluginsStore = this._register(
346
>
lastFetchedPluginsMemento(StorageScope.APPLICATION, StorageTarget.MACHINE, _storageService)
347
>
);
348
>
349
>
this.lastFetchedPlugins = this._lastFetchedPluginsStore.map(s => {
350
const revived = revive(s) as IStoredLastFetchedPlugins;
351
return revived.plugins.map(ensureSourceDescriptor);
353
>
354
>
this.installedPlugins = this._installedPluginsStore.value.map(entries => {
355
const result: IMarketplaceInstalledPlugin[] = [];
356
for (const e of entries) {