Skip to content

Expose registry search via the API (searchPlugins) #260

Description

@taylortom

Subject of the issue/enhancement/features

Expose the existing registry search capability through the programmatic API so consumers (e.g. the Adapt authoring tool) can query the plugin registry by name.

The adapt search CLI command already searches the registry (lib/integration/PluginManagement/search.js, hitting …/packages/search/<term>), but the integration function only logs its results via the logger and returns nothing, and there is no method on the API (lib/api.js) to invoke it. As a result, programmatic consumers cannot determine whether a given plugin exists in the registry — which is needed to support features such as detecting registry availability of installed plugins and rolling custom/local-source plugins back to their registry version.

Proposed change

  • lib/integration/PluginManagement/search.js: return the results array ([{ name, url }]); return [] on error. Logging side effects are unchanged, so the adapt search CLI command is unaffected.
  • lib/api.js: add a searchPlugins({ searchTerm, cwd, logger }) method that calls the integration search and returns its results.

Impact

Purely additive. The only existing caller of the integration search is the adapt search CLI command, which discards the return value, so no existing behaviour changes.

Expected behaviour

api.searchPlugins({ searchTerm }) resolves with an array of matching registry entries ({ name, url }), enabling availability checks by name.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions