You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose registry search via the API (searchPlugins) #260
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.
Activity