import type MarketplacePluginManager from "../api/plugin_manager/MarketplacePluginManager.ts"; import type MarketplacePluginRepository from "../api/plugin_repository/MarketplacePluginRepository.ts"; import type VersionedPluginRepository from "../api/plugin_repository/VersionedPluginRepository.ts"; import type ExtensionInfo from "../api/plugin_manager/ExtensionInfo.ts"; import type PluginManager from "../api/plugin_manager/PluginManager.ts"; import type SearchQuery from "../api/plugin_repository/SearchQuery.ts"; import type VersionedPluginDescriptor from "../api/plugin_repository/VersionedPluginDescriptor.ts"; import type FetchCapable from "../api/fetch/FetchCapable.ts"; import type FetchInterface from "../api/fetch/FetchInterface.ts"; /** * Abstract {@link MarketplacePluginManager} implementation. * * Combines one or more `TRemote` repositories (for search and install source) with a `TLocal` * repository (for loading installed plugins). The standard {@link PluginManager} methods delegate * to an internal {@link DefaultPluginManager} backed by the local repository only. * * Provides a concrete {@link checkForUpdates} implementation. Subclasses must implement * {@link install} and {@link uninstall} with ecosystem-specific logic * (e.g. {@link HttpPluginManager}, {@link NpmPluginManager}). */ export default abstract class BaseMarketplacePluginManager implements MarketplacePluginManager, FetchCapable { protected readonly remotes: TRemote[]; protected readonly local: TLocal; private readonly pluginManager; protected fetchInterface: FetchInterface | undefined; /** * @param remotes marketplace repositories used for search and as install sources. * @param local repository used to load installed plugins. * @param pluginManager optional {@link PluginManager} to delegate {@link registerExtensions}, * {@link getRegisteredExtensions} and {@link instantiate} to. Defaults to a * {@link DefaultPluginManager} backed by `local`. Provide this to supply a custom * {@link PluginManager} implementation. */ constructor(remotes: TRemote[], local: TLocal, pluginManager?: PluginManager); /** * Supplies a host-provided {@link FetchInterface} to this manager and forwards it to its * `remotes`/`local` repositories, for those which support {@link FetchCapable}. */ setFetch(fetchInterface: FetchInterface): void; private searchAsyncIterable; search(query: Readonly): AsyncIterable>; abstract install(descriptor: Readonly, options?: { includeDependencies?: boolean; }): Promise; abstract uninstall(pluginId: string): Promise; checkAvailable(pluginId: string, version?: string): Promise; private checkForUpdatesIterable; listInstalled(): AsyncIterable>; checkForUpdates(remote?: VersionedPluginRepository): AsyncIterable<{ descriptor: Readonly; availableVersion: string; }>; registerExtensions(extensionPoint: string): Promise; getRegisteredExtensions(extensionPoint: string): Promise>; instantiate(extensionHandle: string, hostData?: Map): Promise; } //# sourceMappingURL=BaseMarketplacePluginManager.d.ts.map