diff --git a/Cargo.lock b/Cargo.lock index 91851fbd..da2f3ef1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2674,12 +2674,11 @@ dependencies = [ ] [[package]] -name = "interpulse" -version = "1.2.2" +name = "interfrost" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6dfab7ec77a9dc51f9c1986c3bfd9ab5c06ffcac5a4149329010a4bc01e52f7" +checksum = "3449eb9b8a587b832db2eb3a45776928ce0927c0efa7d0be9a7f4c619140a12a" dependencies = [ - "bytes", "chrono", "serde", "serde_json", @@ -3744,7 +3743,7 @@ version = "1.1.1" dependencies = [ "anyhow", "chrono", - "interpulse", + "interfrost", "objc2 0.6.3", "objc2-app-kit", "objc2-foundation 0.3.2", @@ -3798,7 +3797,7 @@ dependencies = [ "futures-lite", "governor", "indicatif", - "interpulse", + "interfrost", "libc", "md-5", "merge", @@ -3845,7 +3844,7 @@ name = "onelauncher_entity" version = "1.1.1" dependencies = [ "chrono", - "interpulse", + "interfrost", "merge", "onelauncher_macro", "sea-orm", @@ -3870,7 +3869,7 @@ version = "1.1.1" dependencies = [ "anyhow", "chrono", - "interpulse", + "interfrost", "objc2 0.6.3", "objc2-app-kit", "objc2-foundation 0.3.2", diff --git a/Cargo.toml b/Cargo.toml index 89fbae4f..60daa7a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ onelauncher_migration = { path = "./packages/migration" } serde_json_path_to_error = { path = "./packages/serde_json_path_to_error" } # core -interpulse = { version = "=1.2.2", features = [ "specta" ] } +interfrost = { version = "=1.3.2", features = [ "specta" ] } # tauri tauri = { version = "=2.5.1", features = [ diff --git a/apps/oneclient/desktop/Cargo.toml b/apps/oneclient/desktop/Cargo.toml index cfcff190..f75ee18f 100644 --- a/apps/oneclient/desktop/Cargo.toml +++ b/apps/oneclient/desktop/Cargo.toml @@ -28,7 +28,7 @@ tauri-build = { workspace = true } [dependencies] # core onelauncher_core = { workspace = true, features = [ "tauri" ] } -interpulse = { workspace = true } +interfrost = { workspace = true } # tauri tauri-plugin-window-state = { workspace = true } diff --git a/apps/oneclient/frontend/src/bindings.gen.ts b/apps/oneclient/frontend/src/bindings.gen.ts index 091b650a..28a6393d 100644 --- a/apps/oneclient/frontend/src/bindings.gen.ts +++ b/apps/oneclient/frontend/src/bindings.gen.ts @@ -63,7 +63,7 @@ export type IngressType = { Download: { file_name: string } } | "JavaPrepare" | export type JavaError = { type: "ParseVersion"; data: string } | { type: "Execute"; data: string } | { type: "MissingJava"; data: string } -export type LauncherError = { type: "DirError"; data: DirectoryError } | { type: "IOError"; data: IOError } | { type: "IngressError"; data: IngressError } | { type: "JavaError"; data: JavaError } | { type: "CryptoError"; data: CryptoError } | { type: "DiscordError"; data: DiscordError } | { type: "MetadataError"; data: MetadataError } | { type: "ClusterError"; data: ClusterError } | { type: "MinecraftAuthError"; data: MinecraftAuthError } | { type: "ProcessError"; data: ProcessError } | { type: "PackageError"; data: PackageError } | { type: "DaoError"; data: DaoError } | { type: "SerdeError"; data: string } | { type: "AnyhowError"; data: string } | { type: "DbError"; data: string } | { type: "ReqwestError"; data: string } | { type: "InterpulseError"; data: string } | { type: "RegexError"; data: string } | { type: "SemaphoreError"; data: string } | { type: "UrlError"; data: string } | { type: "OpenerError"; data: string } | { type: "TauriError"; data: string } +export type LauncherError = { type: "DirError"; data: DirectoryError } | { type: "IOError"; data: IOError } | { type: "IngressError"; data: IngressError } | { type: "JavaError"; data: JavaError } | { type: "CryptoError"; data: CryptoError } | { type: "DiscordError"; data: DiscordError } | { type: "MetadataError"; data: MetadataError } | { type: "ClusterError"; data: ClusterError } | { type: "MinecraftAuthError"; data: MinecraftAuthError } | { type: "ProcessError"; data: ProcessError } | { type: "PackageError"; data: PackageError } | { type: "DaoError"; data: DaoError } | { type: "SerdeError"; data: string } | { type: "AnyhowError"; data: string } | { type: "DbError"; data: string } | { type: "ReqwestError"; data: string } | { type: "InterfrostError"; data: string } | { type: "RegexError"; data: string } | { type: "SemaphoreError"; data: string } | { type: "UrlError"; data: string } | { type: "OpenerError"; data: string } | { type: "TauriError"; data: string } export type ManagedPackage = { id: string; slug: string; provider: Provider; package_type: PackageType; name: string; short_desc: string; body: ManagedPackageBody; /** diff --git a/apps/onelauncher/desktop/Cargo.toml b/apps/onelauncher/desktop/Cargo.toml index c4380bb0..5e3f9265 100644 --- a/apps/onelauncher/desktop/Cargo.toml +++ b/apps/onelauncher/desktop/Cargo.toml @@ -28,7 +28,7 @@ tauri-build = { workspace = true } [dependencies] # core onelauncher_core = { workspace = true, features = [ "tauri" ] } -interpulse = { workspace = true } +interfrost = { workspace = true } # tauri tauri-plugin-window-state = { workspace = true } diff --git a/apps/onelauncher/frontend/src/bindings.gen.ts b/apps/onelauncher/frontend/src/bindings.gen.ts index 4302fe57..621edb4e 100644 --- a/apps/onelauncher/frontend/src/bindings.gen.ts +++ b/apps/onelauncher/frontend/src/bindings.gen.ts @@ -43,7 +43,7 @@ export type IngressType = { Download: { file_name: string } } | "JavaPrepare" | export type JavaError = { type: "ParseVersion"; data: string } | { type: "Execute"; data: string } | { type: "MissingJava"; data: string } -export type LauncherError = { type: "DirError"; data: DirectoryError } | { type: "IOError"; data: IOError } | { type: "IngressError"; data: IngressError } | { type: "JavaError"; data: JavaError } | { type: "CryptoError"; data: CryptoError } | { type: "DiscordError"; data: DiscordError } | { type: "MetadataError"; data: MetadataError } | { type: "ClusterError"; data: ClusterError } | { type: "MinecraftAuthError"; data: MinecraftAuthError } | { type: "ProcessError"; data: ProcessError } | { type: "PackageError"; data: PackageError } | { type: "DaoError"; data: DaoError } | { type: "SerdeError"; data: string } | { type: "AnyhowError"; data: string } | { type: "DbError"; data: string } | { type: "ReqwestError"; data: string } | { type: "InterpulseError"; data: string } | { type: "RegexError"; data: string } | { type: "SemaphoreError"; data: string } | { type: "UrlError"; data: string } | { type: "TauriError"; data: string } +export type LauncherError = { type: "DirError"; data: DirectoryError } | { type: "IOError"; data: IOError } | { type: "IngressError"; data: IngressError } | { type: "JavaError"; data: JavaError } | { type: "CryptoError"; data: CryptoError } | { type: "DiscordError"; data: DiscordError } | { type: "MetadataError"; data: MetadataError } | { type: "ClusterError"; data: ClusterError } | { type: "MinecraftAuthError"; data: MinecraftAuthError } | { type: "ProcessError"; data: ProcessError } | { type: "PackageError"; data: PackageError } | { type: "DaoError"; data: DaoError } | { type: "SerdeError"; data: string } | { type: "AnyhowError"; data: string } | { type: "DbError"; data: string } | { type: "ReqwestError"; data: string } | { type: "InterfrostError"; data: string } | { type: "RegexError"; data: string } | { type: "SemaphoreError"; data: string } | { type: "UrlError"; data: string } | { type: "TauriError"; data: string } export type ManagedPackage = { id: string; slug: string; provider: Provider; package_type: PackageType; name: string; short_desc: string; body: ManagedPackageBody; /** diff --git a/packages/core/Cargo.toml b/packages/core/Cargo.toml index 58beb67e..ea90cff6 100644 --- a/packages/core/Cargo.toml +++ b/packages/core/Cargo.toml @@ -23,7 +23,7 @@ tauri = [ ] specta = [ "dep:specta", - "interpulse/specta", + "interfrost/specta", "onelauncher_entity/specta", ] cli = [ "dep:indicatif" ] @@ -37,7 +37,7 @@ shadow-rs = { workspace = true, features = [ "default" ] } [dependencies] # core -interpulse = { workspace = true } +interfrost = { workspace = true } onelauncher_migration = { workspace = true } onelauncher_entity = { workspace = true } onelauncher_macro = { workspace = true } diff --git a/packages/core/src/api/cluster/mod.rs b/packages/core/src/api/cluster/mod.rs index dc70cbf0..e6d16670 100644 --- a/packages/core/src/api/cluster/mod.rs +++ b/packages/core/src/api/cluster/mod.rs @@ -1,6 +1,6 @@ use chrono::Utc; use dao::ClusterId; -use interpulse::api::minecraft::VersionInfo; +use interfrost::api::minecraft::VersionInfo; use onelauncher_entity::cluster_stage::ClusterStage; use onelauncher_entity::icon::Icon; use onelauncher_entity::loader::GameLoader; @@ -267,7 +267,7 @@ async fn run_forge_processors( $(std::collections::HashMap::insert( $dest, String::from($name), - interpulse::api::modded::SidedDataEntry { + interfrost::api::modded::SidedDataEntry { client: String::from($client), server: String::from($server), }, diff --git a/packages/core/src/api/game/arguments.rs b/packages/core/src/api/game/arguments.rs index 521f50b7..e20e737b 100644 --- a/packages/core/src/api/game/arguments.rs +++ b/packages/core/src/api/game/arguments.rs @@ -4,9 +4,9 @@ use std::collections::{HashMap, HashSet}; use std::path::Path; use futures::{AsyncReadExt, TryStreamExt, pin_mut}; -use interpulse::api::minecraft::{Argument, ArgumentValue, Library, VersionType}; -use interpulse::api::modded::SidedDataEntry; -use interpulse::utils::get_path_from_artifact; +use interfrost::api::minecraft::{Argument, ArgumentValue, Library, VersionType}; +use interfrost::api::modded::SidedDataEntry; +use interfrost::utils::get_path_from_artifact; use onelauncher_entity::resolution::Resolution; use crate::constants::{self, DUMMY_REPLACE_NEWLINE}; diff --git a/packages/core/src/api/game/launch.rs b/packages/core/src/api/game/launch.rs index f03ab27e..bbcaae6b 100644 --- a/packages/core/src/api/game/launch.rs +++ b/packages/core/src/api/game/launch.rs @@ -223,7 +223,7 @@ pub async fn launch_minecraft( .args( arguments::java_arguments( updated, - args.get(&interpulse::api::minecraft::ArgumentType::Jvm) + args.get(&interfrost::api::minecraft::ArgumentType::Jvm) .map(Vec::as_slice), &dirs.natives_dir().join(&version_name), &dirs.libraries_dir(), @@ -245,7 +245,7 @@ pub async fn launch_minecraft( .args( arguments::minecraft_arguments( updated, - args.get(&interpulse::api::minecraft::ArgumentType::Game) + args.get(&interfrost::api::minecraft::ArgumentType::Game) .map(Vec::as_slice), version_info.minecraft_arguments.as_deref(), &creds, diff --git a/packages/core/src/api/game/metadata.rs b/packages/core/src/api/game/metadata.rs index 0b5f3b79..00ba52ff 100644 --- a/packages/core/src/api/game/metadata.rs +++ b/packages/core/src/api/game/metadata.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use futures::{StreamExt, stream}; -use interpulse::api::minecraft::{AssetsIndex, DownloadType, Library, Os, Version, VersionInfo}; -use interpulse::api::modded::LoaderVersion; +use interfrost::api::minecraft::{AssetsIndex, DownloadType, Library, Os, Version, VersionInfo}; +use interfrost::api::modded::LoaderVersion; use onelauncher_entity::loader::GameLoader; use reqwest::Method; @@ -96,11 +96,11 @@ pub async fn download_version_info( http::fetch_json_advanced(Method::GET, &version.url, None, None, None, ingress).await?; if let Some(loader) = loader { - let partial: interpulse::api::modded::PartialVersionInfo = + let partial: interfrost::api::modded::PartialVersionInfo = http::fetch_json_advanced(Method::GET, &loader.url, None, None, None, ingress) .await?; - info = interpulse::api::modded::merge_partial_version(partial, info); + info = interfrost::api::modded::merge_partial_version(partial, info); } info.id.clone_from(&version_id); @@ -322,7 +322,7 @@ pub async fn download_libraries( return Ok(()); } - let artifact_path = interpulse::utils::get_path_from_artifact(&lib.name)?; + let artifact_path = interfrost::utils::get_path_from_artifact(&lib.name)?; let path = lib_dir.join(&artifact_path); if path.exists() && !force.unwrap_or(false) { @@ -332,7 +332,7 @@ pub async fn download_libraries( tokio::try_join! { async { - if let Some(interpulse::api::minecraft::LibraryDownloads { + if let Some(interfrost::api::minecraft::LibraryDownloads { artifact: Some(ref artifact), .. }) = lib.downloads && !artifact.url.is_empty() { @@ -424,13 +424,13 @@ pub async fn get_loader_version( let state = State::get().await?; let mut metadata = state.metadata.write().await; - let resolve_from_manifest = |manifest: &interpulse::api::modded::Manifest| { + let resolve_from_manifest = |manifest: &interfrost::api::modded::Manifest| { let mut saw_matching_game_version = false; for entry in &manifest.game_versions { if entry .id - .replace(interpulse::api::modded::DUMMY_REPLACE_STRING, mc_version) + .replace(interfrost::api::modded::DUMMY_REPLACE_STRING, mc_version) != mc_version { continue; diff --git a/packages/core/src/api/game/rules.rs b/packages/core/src/api/game/rules.rs index 04aaa75a..def5254d 100644 --- a/packages/core/src/api/game/rules.rs +++ b/packages/core/src/api/game/rules.rs @@ -1,4 +1,4 @@ -use interpulse::api::minecraft::{Os, OsRule, Rule, RuleAction}; +use interfrost::api::minecraft::{Os, OsRule, Rule, RuleAction}; use crate::utils::os_ext::OsExt; diff --git a/packages/core/src/api/java/mod.rs b/packages/core/src/api/java/mod.rs index e514f4cf..10788874 100644 --- a/packages/core/src/api/java/mod.rs +++ b/packages/core/src/api/java/mod.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::path::PathBuf; use futures::TryStreamExt; -use interpulse::api::minecraft::VersionInfo; +use interfrost::api::minecraft::VersionInfo; use onelauncher_entity::{java_versions, setting_profiles}; use reqwest::Method; use serde::{Deserialize, Serialize}; diff --git a/packages/core/src/api/tauri/commands.rs b/packages/core/src/api/tauri/commands.rs index f10ec51f..4a89363f 100644 --- a/packages/core/src/api/tauri/commands.rs +++ b/packages/core/src/api/tauri/commands.rs @@ -8,7 +8,7 @@ use crate::api::setting_profiles::get_global_profile; use crate::store::processes::Process; use crate::store::{Settings, State}; use crate::utils::pagination::Paginated; -use interpulse::api::minecraft::Version; +use interfrost::api::minecraft::Version; use onelauncher_entity::cluster_stage::ClusterStage; use onelauncher_entity::icon::Icon; use onelauncher_entity::loader::GameLoader; diff --git a/packages/core/src/error.rs b/packages/core/src/error.rs index 0817b4b9..8fc31ac4 100644 --- a/packages/core/src/error.rs +++ b/packages/core/src/error.rs @@ -51,10 +51,10 @@ pub enum LauncherError { reqwest::Error, ), #[error("meta error: {0}")] - InterpulseError( + InterfrostError( #[from] #[skip] - interpulse::Error, + interfrost::Error, ), #[error(transparent)] RegexError( diff --git a/packages/core/src/store/metadata.rs b/packages/core/src/store/metadata.rs index 65bc81e7..56939327 100644 --- a/packages/core/src/store/metadata.rs +++ b/packages/core/src/store/metadata.rs @@ -1,8 +1,8 @@ use std::collections::HashMap; use std::str::FromStr; -use interpulse::api::minecraft::VersionManifest as VanillaManifest; -use interpulse::api::modded::Manifest as ModdedManifest; +use interfrost::api::minecraft::VersionManifest as VanillaManifest; +use interfrost::api::modded::Manifest as ModdedManifest; use onelauncher_entity::loader::GameLoader; use reqwest::Method; use serde::de::DeserializeOwned; diff --git a/packages/core/src/utils/os_ext.rs b/packages/core/src/utils/os_ext.rs index 641383bf..8b6c4e3f 100644 --- a/packages/core/src/utils/os_ext.rs +++ b/packages/core/src/utils/os_ext.rs @@ -1,4 +1,4 @@ -use interpulse::api::minecraft::Os; +use interfrost::api::minecraft::Os; /// An extension of [`Os`] for utilities on converting the current system's operating system /// into an [`Os`] structure for simple management. diff --git a/packages/entity/Cargo.toml b/packages/entity/Cargo.toml index 4908ba4b..8c666cb0 100644 --- a/packages/entity/Cargo.toml +++ b/packages/entity/Cargo.toml @@ -18,7 +18,7 @@ path = "src/lib.rs" default = [] specta = [ "dep:specta", - "interpulse/specta" + "interfrost/specta" ] [dependencies] @@ -29,7 +29,7 @@ serde_json = { workspace = true } chrono = { workspace = true } uuid = { workspace = true } url = { workspace = true } -interpulse = { workspace = true } +interfrost = { workspace = true } merge = { workspace = true } specta = { workspace = true, optional = true } diff --git a/packages/entity/src/domain/loader.rs b/packages/entity/src/domain/loader.rs index e6cf0bee..32e5a0ea 100644 --- a/packages/entity/src/domain/loader.rs +++ b/packages/entity/src/domain/loader.rs @@ -40,12 +40,12 @@ impl GameLoader { #[must_use] pub const fn get_format_version(&self) -> usize { match self { - Self::Vanilla => interpulse::api::minecraft::CURRENT_FORMAT_VERSION, - Self::Forge => interpulse::api::modded::CURRENT_FORGE_FORMAT_VERSION, - Self::NeoForge => interpulse::api::modded::CURRENT_NEOFORGE_FORMAT_VERSION, - Self::Quilt => interpulse::api::modded::CURRENT_QUILT_FORMAT_VERSION, - Self::Fabric => interpulse::api::modded::CURRENT_FABRIC_FORMAT_VERSION, - Self::LegacyFabric => interpulse::api::modded::CURRENT_LEGACY_FABRIC_FORMAT_VERSION, + Self::Vanilla => interfrost::api::minecraft::CURRENT_FORMAT_VERSION, + Self::Forge => interfrost::api::modded::CURRENT_FORGE_FORMAT_VERSION, + Self::NeoForge => interfrost::api::modded::CURRENT_NEOFORGE_FORMAT_VERSION, + Self::Quilt => interfrost::api::modded::CURRENT_QUILT_FORMAT_VERSION, + Self::Fabric => interfrost::api::modded::CURRENT_FABRIC_FORMAT_VERSION, + Self::LegacyFabric => interfrost::api::modded::CURRENT_LEGACY_FABRIC_FORMAT_VERSION, } }