Skip to main content

vs_core/service/
available.rs

1//! Services for listing available plugins from configured registries.
2
3use vs_registry::RegistryEntry;
4
5use crate::{App, CoreError};
6
7impl App {
8    /// Lists plugins in the available registry index.
9    pub fn available_plugins(&self) -> Result<Vec<RegistryEntry>, CoreError> {
10        self.refresh_registry_index_with_fallback()?;
11        self.registry.available_plugins().map_err(Into::into)
12    }
13
14    /// Lists plugins added to the local home.
15    pub fn added_plugins(&self) -> Result<Vec<RegistryEntry>, CoreError> {
16        self.registry.added_plugins().map_err(Into::into)
17    }
18}