use std::path::PathBuf;
use vs_config::Scope;
use vs_plugin_api::{AvailableVersion, PluginManifest};
use vs_registry::RegistryEntry;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum UseScope {
Global,
Project,
Session,
}
impl UseScope {
pub fn as_str(self) -> &'static str {
match self {
Self::Global => "global",
Self::Project => "project",
Self::Session => "session",
}
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CurrentTool {
pub plugin: String,
pub version: String,
pub scope: Scope,
pub source: PathBuf,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct InstalledVersion {
pub plugin: String,
pub version: String,
pub install_dir: PathBuf,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PluginInfo {
pub entry: RegistryEntry,
pub manifest: PluginManifest,
pub available_versions: Vec<AvailableVersion>,
pub installed_versions: Vec<String>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct MigrateSummary {
pub source_home: PathBuf,
pub copied_roots: usize,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SelfUpgradeSummary {
pub current_version: String,
pub latest_version: String,
pub updated: bool,
}