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

    Interface PluginService

    Service providing plugin lifecycle management for a CLI with dynamic plugin support.

    Exposes search, availability-check, install, uninstall, list, and update operations backed by a MarketplacePluginManager (see dynamic-plugin-framework). Provided by DefaultPluginServiceProvider when plugin support is enabled via DynamicPluginRuntimeCLI (see dynamic-cli-framework).

    After install or an upgrade, the CLI must be restarted for new or updated plugin commands and service providers to become active.

    interface PluginService {
        checkAvailable(pluginId: string, version?: string): Promise<boolean>;
        checkForUpdates(): AsyncIterable<
            {
                availableVersion: string;
                descriptor: Readonly<VersionedPluginDescriptor>;
            },
        >;
        install(descriptor: Readonly<VersionedPluginDescriptor>): Promise<void>;
        listInstalled(): AsyncIterable<Readonly<VersionedPluginDescriptor>>;
        search(
            query: Readonly<SearchQuery>,
        ): AsyncIterable<Readonly<VersionedPluginDescriptor>>;
        uninstall(pluginId: string): Promise<void>;
    }
    Index
    • Check whether a plugin, optionally at a specific version, is available from the remote marketplace, without installing it.

      Parameters

      • pluginId: string

        the package identifier of the plugin to check (e.g. @scope/my-plugin).

      • Optionalversion: string

        an optional specific version to check for; if omitted, checks whether the plugin is available at any version.

      Returns Promise<boolean>

      true if the plugin (and version, if specified) is available, false otherwise.

    • Check each installed plugin for a newer version available on the remote marketplace.

      Returns AsyncIterable<
          {
              availableVersion: string;
              descriptor: Readonly<VersionedPluginDescriptor>;
          },
      >

      an async iterable of objects pairing the installed plugin descriptor with the latest available version string for plugins that have an update available.

    • Install a plugin from the remote marketplace into the local plugin store.

      Parameters

      • descriptor: Readonly<VersionedPluginDescriptor>

        the plugin to install, as returned by search.

      Returns Promise<void>

    • List all plugins currently installed in the local plugin store.

      Returns AsyncIterable<Readonly<VersionedPluginDescriptor>>

      an async iterable of VersionedPluginDescriptor entries for each installed plugin.

    • Search the remote marketplace for plugins matching the given query.

      Parameters

      • query: Readonly<SearchQuery>

        criteria to filter results by.

      Returns AsyncIterable<Readonly<VersionedPluginDescriptor>>

      an async iterable of matching VersionedPluginDescriptor entries.

    • Remove a previously installed plugin from the local plugin store.

      Parameters

      • pluginId: string

        the package identifier of the plugin to remove (e.g. @scope/my-plugin).

      Returns Promise<void>