import type MarketplacePluginRepository from "../../api/plugin_repository/MarketplacePluginRepository.ts"; import type ExtensionDescriptor from "../../api/plugin/ExtensionDescriptor.ts"; import type ExtensionEntry from "../../api/plugin_repository/ExtensionEntry.ts"; import type VersionedPluginDescriptor from "../../api/plugin_repository/VersionedPluginDescriptor.ts"; import type SearchQuery from "../../api/plugin_repository/SearchQuery.ts"; import type FetchCapable from "../../api/fetch/FetchCapable.ts"; import type FetchInterface from "../../api/fetch/FetchInterface.ts"; export interface NpmSearchQuery extends SearchQuery { readonly keywords?: string[]; } export interface NpmjsPluginRepositoryConfig { name: string; description?: string; author?: string; registryUrl: string; packageJsonNamespace: string; authToken?: string; username?: string; password?: string; } /** * {@link MarketplacePluginRepository} backed by an npm-compatible registry (e.g. npmjs.com). * * Discovers plugins via the registry's `/-/v1/search` endpoint, filtering by a keyword matching * `packageJsonNamespace`. Plugin metadata (extension points, dependencies, pluginData) is read * from the `packageJsonNamespace` key in each package's `package.json`. Supports keyword-based * search via {@link NpmSearchQuery}. * * Note: extensions cannot be instantiated directly from this repository — plugins must first be * installed locally via {@link NpmPluginInstaller}. */ export default class NpmjsPluginRepository implements MarketplacePluginRepository, FetchCapable { readonly name: string; readonly description?: string; readonly author?: string; readonly url: string; private readonly registryUrl; private readonly packageJsonNamespace; private readonly metaCache; private readonly authToken?; private readonly username?; private readonly password?; private fetchFn; constructor({ name, description, author, registryUrl, packageJsonNamespace, authToken, username, password, }: NpmjsPluginRepositoryConfig); setFetch(fetchInterface: FetchInterface): void; private buildHeaders; private parsePackageName; private fetchPackageMeta; private fetchPackageDoc; private searchAsyncIterable; search(query: Readonly): AsyncIterable>; getPlugins(): AsyncIterable>; getPlugin(pluginId: string): Promise | undefined>; private scanForExtensionsAsyncIterable; scanForExtensions(extensionPoint: string): AsyncIterable>; getExtensionDescriptorFromExtensionEntry(_extensionEntry: ExtensionEntry): Promise>; } //# sourceMappingURL=NpmjsPluginRepository.d.ts.map