@flowscripter/dynamic-plugin-framework
    Preparing search index...

    Interface MarketplacePluginManager

    Extends PluginManager with marketplace-level search, install, uninstall, and update checking capabilities.

    A MarketplacePluginManager combines one or more remote MarketplacePluginRepository instances (for discovery) with a local VersionedPluginRepository (for loading and installation). The standard PluginManager methods delegate to an internal DefaultPluginManager backed by the local repository.

    interface MarketplacePluginManager {
        checkAvailable(pluginId: string, version?: string): Promise<boolean>;
        checkForUpdates(
            remote?: VersionedPluginRepository,
        ): AsyncIterable<
            {
                availableVersion: string;
                descriptor: Readonly<VersionedPluginDescriptor>;
            },
        >;
        getRegisteredExtensions(
            extensionPoint: string,
        ): Promise<readonly ExtensionInfo[]>;
        install(
            descriptor: Readonly<VersionedPluginDescriptor>,
            options?: { includeDependencies?: boolean },
        ): Promise<void>;
        instantiate(
            extensionHandle: string,
            hostData?: Map<string, string>,
        ): Promise<unknown>;
        listInstalled(): AsyncIterable<Readonly<VersionedPluginDescriptor>>;
        registerExtensions(extensionPoint: string): Promise<void>;
        search(
            query: Readonly<SearchQuery>,
        ): AsyncIterable<Readonly<VersionedPluginDescriptor>>;
        uninstall(pluginId: string): Promise<void>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    • Check whether a plugin (and, optionally, a specific version of it) is available from any of the configured remote marketplace repositories, via a direct targeted lookup - not the fuzzy/ranked search.

      Each remote is checked in order via its MarketplacePluginRepository.getPlugin, which performs a targeted lookup rather than scanning all plugins. Returns true as soon as any remote has a match.

      Note: a MarketplacePluginRepository exposes a single "current" VersionedPluginDescriptor per plugin ID (typically the latest published version), not a full version history. When version is given, this checks whether that current version matches - it does not confirm whether an older version was ever published.

      Parameters

      • pluginId: string

        the plugin ID to check for (as returned by VersionedPluginDescriptor.pluginId).

      • Optionalversion: string

        optional exact version to additionally check for.

      Returns Promise<boolean>

      true if the plugin (and version, if given) is found in at least one configured remote, false otherwise.

    • Instantiate a specific Extension.

      Parameters

      • extensionHandle: string

        the opaque handle for the Extension provided by this Extension Manager instance via ExtensionInfo.extensionHandle.

      • OptionalhostData: Map<string, string>

        optional data to be passed in to the Extension when instantiating it.

      Returns Promise<unknown>

      an Extension instance implementing an Extension Point.

    • Scan for Plugins and register their Extensions which implement the specified Extension Point.

      Parameters

      • extensionPoint: string

        the Extension Point for which to register Extensions

      Returns Promise<void>

    • Remove a plugin from the local repository.

      Throws if another installed plugin declares a dependency on the plugin being removed.

      Parameters

      • pluginId: string

        the ID of the plugin to remove.

      Returns Promise<void>