feat(ipc): expose public module catalogue Tauri command and API client

This commit is contained in:
Дмитрий committed 2026-11-03 10:49:10 +05:00
1 parent 6bbdef1989
commit c53fc64d8b
2 files changed
+56

No files matched your search

+13
View File
@@ -2820,6 +2820,18 @@ async fn analyze_github_module(
.await
}
#[tauri::command]
async fn get_public_module_catalog(
force_refresh: Option<bool>,
) -> std::result::Result<coa_core::catalogue::PublicCatalogueResponse, UiError> {
let cache_dir = data_dir().join("catalogue");
let force = force_refresh.unwrap_or(false);
blocking(move || {
coa_core::catalogue::fetch_or_load_catalogue(&cache_dir, force)
})
.await
}
#[tauri::command]
fn preview_toolchain_status() -> coa_core::build_engine::ToolchainStatus {
coa_core::build_engine::detect_toolchain()
@@ -3212,6 +3224,7 @@ pub fn run() {
realmlist_activate,
modules_list,
analyze_github_module,
get_public_module_catalog,
realm_profiles,
realm_select,
realm_simultaneous,