From 49408c83d26d788bf893a8ec6ac56c31357084cd Mon Sep 17 00:00:00 2001 From: Pauline Date: Thu, 19 Sep 2024 00:50:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20chore:=20bump=20tauri=20to=20lat?= =?UTF-8?q?est=20rc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pauline --- Cargo.lock | 117 ++++++++++++++------------- Cargo.toml | 20 +++-- apps/desktop/Cargo.toml | 1 - apps/desktop/src/lib.rs | 7 +- apps/frontend/package.json | 2 +- apps/testing/src/main.rs | 7 +- packages/core/src/api/java.rs | 4 - packages/core/src/api/proxy/mod.rs | 1 + packages/core/src/store/discord.rs | 2 +- packages/core/src/store/mod.rs | 2 +- packages/core/src/store/package.rs | 5 +- packages/core/src/store/processor.rs | 17 ++-- pnpm-lock.yaml | 108 ++++++++++++++----------- 13 files changed, 155 insertions(+), 138 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 665fd9ab..4de63f59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -714,9 +714,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] @@ -811,9 +811,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.19" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ "jobserver", "libc", @@ -3068,9 +3068,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infer" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb33622da908807a06f9513c19b3c1ad50fab3e4137d82a78107d502075aa199" +checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847" dependencies = [ "cfb", ] @@ -3514,9 +3514,9 @@ dependencies = [ [[package]] name = "libsodium-sys-stable" -version = "1.21.1" +version = "1.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd1882b85f01cdd4021c0664fd897710a04c5d01b593a5a70e1b0baa999c1f8" +checksum = "42631d334de875c636a1aae7adb515653ac2e771e5a2ce74b1053f5a4412df3a" dependencies = [ "cc", "libc", @@ -4435,7 +4435,6 @@ dependencies = [ "tauri-plugin-updater", "tauri-plugin-window-state", "tauri-specta", - "tauri-utils", "thiserror", "tokio", "tracing", @@ -7151,9 +7150,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.29.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a97abbc7d6cfd0720da3e06fcb1cf2ac87cbfdb5bbbce103a1279a211c4d81" +checksum = "2a93f2c6b8fdaeb7f417bda89b5bc767999745c3052969664ae1fa65892deb7e" dependencies = [ "bitflags 2.6.0", "cocoa", @@ -7218,13 +7217,12 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.0.0-rc.8" +version = "2.0.0-rc.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8345ccc676ef16e26b61fc0f5340b4e770678b1e1f53f08c69ebdac5e56b422" +checksum = "eb3c3b1c7ac5b72d59da307b84af900a0098c74c9d7369f65018cd8ec0eb50fb" dependencies = [ "anyhow", "bytes", - "cocoa", "dirs 5.0.1", "dunce", "embed_plist", @@ -7235,14 +7233,17 @@ dependencies = [ "heck 0.5.0", "http 1.1.0", "http-range", - "image 0.24.9", + "image 0.25.2", "jni", "libc", "log", "mime", "muda", - "objc", + "objc2", + "objc2-app-kit", + "objc2-foundation", "percent-encoding", + "plist", "raw-window-handle", "reqwest 0.12.7", "serde", @@ -7272,9 +7273,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-rc.7" +version = "2.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5ad5fcfaf02cf79aa6727f6c5df38567d8dce172b00b62690c6bc46c08b7ce" +checksum = "6ff5713e81e02e0b99f5219b275abbd7d2c0cc0f30180e25b1b650e08feeac63" dependencies = [ "anyhow", "cargo_toml", @@ -7294,9 +7295,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-rc.7" +version = "2.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809ef6316726fc72593d296cf6f4e7461326e310c313d6a6c42b6e7f1e2671cf" +checksum = "5370f2591dcc93d4ff08d9dd168f5097f79b34e859883586a409c627544190e3" dependencies = [ "base64 0.22.1", "brotli", @@ -7321,9 +7322,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-rc.6" +version = "2.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1359e8861d210d25731f8b1bfbb4d111dd06406cf73c59659366ef450364d811" +checksum = "19442dc8ee002ab1926586f6aecb90114f3a1226766008b0c9ac2d9fec9eeb7e" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -7335,9 +7336,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.0.0-rc.7" +version = "2.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dded420c86183f592d0fe925ef9447f41e26fa79f0bdfef8d3f17bfbcdbfb7" +checksum = "5e3368e91a98aa55ea4e3e8ccff516bc1ed2f85872c335ec35e9b345469032e0" dependencies = [ "anyhow", "glob", @@ -7352,9 +7353,9 @@ dependencies = [ [[package]] name = "tauri-plugin-clipboard-manager" -version = "2.0.0-rc.3" +version = "2.0.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9d78deb78704d9eeedc23892fc6b25a944c7f9c59354a0ea9a4fb5ab043794" +checksum = "6a38a482e45edf5603839c30b3bc06e032db4ad8a01265ffa7e9b0b368283ea8" dependencies = [ "arboard", "image 0.24.9", @@ -7368,9 +7369,9 @@ dependencies = [ [[package]] name = "tauri-plugin-deep-link" -version = "2.0.0-rc.2" +version = "2.0.0-rc.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6b5660955c91ab25365613295788ce840c4e07b810e65436720b1a194cc72c2" +checksum = "4a2e49d1fb1aef2bd3a973aa7634474cfdac6bb894854f76a238e2fadf939d37" dependencies = [ "dunce", "log", @@ -7388,11 +7389,10 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.0.0-rc.3" +version = "2.0.0-rc.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa8bd381f75c47687f41fb603f67fdd99a1af377da22d03d8fb959d2481845c1" +checksum = "785722c81beb4a6b729ae55d06aeb68d47166c933e64b727e33254dcb5d4d82d" dependencies = [ - "dunce", "log", "raw-window-handle", "rfd", @@ -7407,12 +7407,14 @@ dependencies = [ [[package]] name = "tauri-plugin-fs" -version = "2.0.0-rc.2" +version = "2.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0704205734f3b4f37d7bf9e9072537716371741bf98b22a22cc5e5340e512467" +checksum = "4cb1dfbbea322afbc9dec49351bc29edf4e85e74d37d9a3fcc72d67ed55ffdbd" dependencies = [ "anyhow", + "dunce", "glob", + "percent-encoding", "schemars", "serde", "serde_json", @@ -7447,9 +7449,9 @@ dependencies = [ [[package]] name = "tauri-plugin-single-instance" -version = "2.0.0-rc.1" +version = "2.0.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73c92c98d44d4daba0118d905f45243dfcd6eaac82216c3382a02d17cb74cf2" +checksum = "15679effe51bd7db0038e7c5aed2d26a20b7e7c4657b6df693f5fb67af7dcaec" dependencies = [ "log", "serde", @@ -7462,9 +7464,9 @@ dependencies = [ [[package]] name = "tauri-plugin-updater" -version = "2.0.0-rc.2" +version = "2.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7048854b4271f3bc58ee850f0582f8d9bb0190118afa8397f36fc260daaa68b" +checksum = "391ebb8ae8cd6aec44b5d96d3005659d88cde69c57326f639bbc660116a30d63" dependencies = [ "base64 0.22.1", "dirs 5.0.1", @@ -7491,9 +7493,9 @@ dependencies = [ [[package]] name = "tauri-plugin-window-state" -version = "2.0.0-rc.2" +version = "2.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba56bcec4b7a1601cf3136c9a3a98f77036b7e1a67564788c5ccd051035d028a" +checksum = "2221224863eced96d800407f7ed8b8e6bd8f329e834b7b975bb553123fb79af0" dependencies = [ "bitflags 2.6.0", "log", @@ -7506,9 +7508,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-rc.7" +version = "2.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75c72b844f387bfc3341c355f3e16b8cbf4161848fa4e348670effb222cd3ba5" +checksum = "c5f38d8aaa1e81d20e8e208e3e317f81b59fb75c530fbae8a90e72d02001d687" dependencies = [ "dpi", "gtk", @@ -7525,15 +7527,17 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.0.0-rc.7" +version = "2.0.0-rc.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73accf936a7cd01d1382de7850726fdf6c1f6ab3b01ccb7a0950cb852e332596" +checksum = "cf1ef5171e14c8fe3b5a63e75004c20d057747bc3e7fdc5f8ded625f0b29f5c7" dependencies = [ - "cocoa", "gtk", "http 1.1.0", "jni", "log", + "objc2", + "objc2-app-kit", + "objc2-foundation", "percent-encoding", "raw-window-handle", "softbuffer", @@ -7550,9 +7554,9 @@ dependencies = [ [[package]] name = "tauri-specta" -version = "2.0.0-rc.18" +version = "2.0.0-rc.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2d58f5067f811ac923825ed15a95baa76313891ddc9ccfe28e4526e86477347" +checksum = "5d06336a2fa3ead0c8d08719e78cbc1fb73650845789605bd2ab908cbde72815" dependencies = [ "heck 0.5.0", "serde", @@ -7579,9 +7583,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-rc.7" +version = "2.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53d9fe87e985b273696ae22ce2b9f099a8f1b44bc8fb127467bda5fcb3e4371" +checksum = "31fe4c9148e1b35225e1c00753f24b517ce00041d02eb4b4d6fd10613a47736c" dependencies = [ "brotli", "cargo_metadata", @@ -8050,9 +8054,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131a65b2cef2081bc14dbcd414c906edbfa3bb5323dd7e748cc298614681196b" +checksum = "044d7738b3d50f288ddef035b793228740ad4d927f5466b0af55dc15e7e03cfe" dependencies = [ "core-graphics 0.24.0", "crossbeam-channel", @@ -8194,9 +8198,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -8276,11 +8280,10 @@ dependencies = [ [[package]] name = "urlpattern" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609" +checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" dependencies = [ - "derive_more", "regex", "serde", "unic-ucd-ident", @@ -9142,9 +9145,9 @@ dependencies = [ [[package]] name = "wry" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b8049c8f239cdbfaaea4bacb9646f6b208938ceec0acd5b3e99cd05f70903f" +checksum = "f4d715cf5fe88e9647f3d17b207b6d060d4a88e7171d4ccb2d2c657dd1d44728" dependencies = [ "base64 0.22.1", "block", diff --git a/Cargo.toml b/Cargo.toml index b79e71d3..ec5ee592 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ onelauncher_utils = { path = "./packages/utils" } # # ============= TAURI ============= # # # tauri uses latest crates.io rc channel -tauri = { version = "=2.0.0-rc.8", features = [ +tauri = { version = "=2.0.0-rc.15", features = [ "rustls-tls", "tracing", "specta", @@ -44,24 +44,22 @@ tauri = { version = "=2.0.0-rc.8", features = [ "protocol-asset" ] } -# tauri-utils is a collection of utilities for tauri apps. -tauri-utils = { version = "=2.0.0-rc.7" } # tauri-build is the codegen utility for our tauri buildscript. -tauri-build = { version = "=2.0.0-rc.7" } +tauri-build = { version = "=2.0.0-rc.12" } # tauri-plugin-shell adds a bridge for opening urls and paths in the frontend. tauri-plugin-shell = { version = "=2.0.0-rc.3" } # tauri-plugin-window-state saves the window position and size to be restored. -tauri-plugin-window-state = { version = "=2.0.0-rc.2" } +tauri-plugin-window-state = { version = "=2.0.0-rc.5" } # tauri-plugin-single-instance ensures that only one instance of the app is running. -tauri-plugin-single-instance = { version = "=2.0.0-rc.1" } +tauri-plugin-single-instance = { version = "=2.0.0-rc.4" } # tauri-plugin-clipboard-manager adds a bridge for reading/writing to the clipboard. -tauri-plugin-clipboard-manager = { version = "=2.0.0-rc.3" } +tauri-plugin-clipboard-manager = { version = "=2.0.0-rc.4" } # tauri-plugin-updater allows for us to use it's functionality for in-app updates. -tauri-plugin-updater = { version = "=2.0.0-rc.2" } +tauri-plugin-updater = { version = "=2.0.0-rc.3" } # tauri-plugin-dialog adds a bridge for opening file manager and message dialogs. -tauri-plugin-dialog = { version = "=2.0.0-rc.3" } +tauri-plugin-dialog = { version = "=2.0.0-rc.7" } # tauri-plugin-deep-link adds a way to handle custom uri schemes (onelauncher://) -tauri-plugin-deep-link = { version = "=2.0.0-rc.2" } +tauri-plugin-deep-link = { version = "=2.0.0-rc.6" } # # ============= CORE ============= # # # rspc is used as a faster and more intuitive replacement for tauri-specta @@ -92,7 +90,7 @@ specta = { version = "=2.0.0-rc.20", features = [ ] } # tauri-specta is the tauri adapter for specta. -tauri-specta = { version = "=2.0.0-rc.18", features = [ "javascript", "typescript", "derive" ] } +tauri-specta = { version = "=2.0.0-rc.20", features = [ "javascript", "typescript", "derive" ] } # specta-typescript is the typescript adapter for specta. specta-typescript = { version = "=0.0.7" } # rspc-specta2 is the specta v2 (rc) adapter for rspc. diff --git a/apps/desktop/Cargo.toml b/apps/desktop/Cargo.toml index c22291fa..99708d18 100644 --- a/apps/desktop/Cargo.toml +++ b/apps/desktop/Cargo.toml @@ -28,7 +28,6 @@ tauri-plugin-updater = { workspace = true } tauri-plugin-clipboard-manager = { workspace = true } tauri-plugin-dialog = { workspace = true } tauri-plugin-deep-link = { workspace = true } -tauri-utils = { workspace = true } tauri-specta = { workspace = true } specta = { workspace = true } specta-typescript = { workspace = true } diff --git a/apps/desktop/src/lib.rs b/apps/desktop/src/lib.rs index 39192225..3258ee7b 100644 --- a/apps/desktop/src/lib.rs +++ b/apps/desktop/src/lib.rs @@ -21,8 +21,11 @@ async fn initialize_state(handle: &tauri::AppHandle) -> api::Result<()> { Ok(()) } -/// initializes the logger and runs the app. if the logger fails to initialize -/// we panic because nothing else can be debugged once the logger fails. +/// the main entrypoint to the desktop add (initializes the logger and runs the app) +/// +/// if the logger fails to initialize then we will panic because +/// nothing else can be debugged once the logger fails. +/// /// the only thing that can fail before the logger should be our [`tokio::main`] loop. pub async fn run() { let _log_guard = onelauncher::start_logger(); diff --git a/apps/frontend/package.json b/apps/frontend/package.json index 40d12735..3474efa4 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -47,7 +47,7 @@ "@testing-library/jest-dom": "^6.5.0", "jsdom": "^25.0.0", "rollup-plugin-visualizer": "^5.12.0", - "sass": "^1.78.0", + "sass": "^1.79.1", "unocss": "^0.62.4", "vite": "^5.4.6", "vite-plugin-solid": "^2.10.2", diff --git a/apps/testing/src/main.rs b/apps/testing/src/main.rs index 59286ade..98905719 100644 --- a/apps/testing/src/main.rs +++ b/apps/testing/src/main.rs @@ -20,10 +20,15 @@ async fn main() -> onelauncher::Result<()> { } /// pauline's epic gamer minecraft auth flow +/// /// opens a browser tab in which the user sees xbox login and logs in with microsoft and gets redirected -/// to a new url. this new url contains the ?code=.... parameter that we need to finish authentication. +/// to a new url. +/// +/// this new url contains the ?code=.... parameter that we need to finish authentication. +/// /// in this testing environment we can just copy the final url from our browser and into the testing console /// and it will parse the url and find the code and complete the authenticaiton process. +/// /// in production/frontend, it works the same way but we get the url and code parameter automatically. pub async fn authenticate_mc() -> onelauncher::Result { // begins login flow, opens browser diff --git a/packages/core/src/api/java.rs b/packages/core/src/api/java.rs index 692095d2..43041cd6 100644 --- a/packages/core/src/api/java.rs +++ b/packages/core/src/api/java.rs @@ -126,7 +126,3 @@ pub async fn test_java(path: PathBuf, major: u32) -> crate::Result { let (maj, _) = get_java_version(&jvm.version)?; Ok(maj == major) } - -pub async fn get_max_memory() -> crate::Result { - Ok(sysinfo::System::new().total_memory()) -} diff --git a/packages/core/src/api/proxy/mod.rs b/packages/core/src/api/proxy/mod.rs index accd7aa2..2c4e5904 100644 --- a/packages/core/src/api/proxy/mod.rs +++ b/packages/core/src/api/proxy/mod.rs @@ -119,6 +119,7 @@ impl ProxyState { Ok(value.app.get_webview_window("main").unwrap()) } + #[allow(clippy::unused_async, reason = "clippy doesn't take into account the features")] #[cfg(feature = "tauri")] pub async fn get() -> crate::Result> { Ok(PROXY_STATE.get().ok_or(ProxyError::NotInitialized)?.clone()) diff --git a/packages/core/src/store/discord.rs b/packages/core/src/store/discord.rs index 2e545376..db54020b 100644 --- a/packages/core/src/store/discord.rs +++ b/packages/core/src/store/discord.rs @@ -20,7 +20,7 @@ pub struct DiscordRPC { impl DiscordRPC { /// Initialize the Discord IPC client and attempt to connect to the server. /// If an error is returned, it will be ignored since Discord RPC isnt essential for the launcher to load. - pub async fn initialize(is_offline: bool) -> crate::Result { + pub fn initialize(is_offline: bool) -> crate::Result { let mut discord_ipc = DiscordIpcClient::new(DISCORD_RPC_CLIENT_ID) .map_err(|e| anyhow::anyhow!("failed to create discord client {}", e))?; diff --git a/packages/core/src/store/mod.rs b/packages/core/src/store/mod.rs index 45c8af89..be2c6678 100644 --- a/packages/core/src/store/mod.rs +++ b/packages/core/src/store/mod.rs @@ -147,7 +147,7 @@ impl State { let packages = Packages::initialize(&directories, &clusters).await; let ingress_processor = IngressProcessor::new(); - let discord_rpc = DiscordRPC::initialize(is_offline || settings.disable_discord).await?; + let discord_rpc = DiscordRPC::initialize(is_offline || settings.disable_discord)?; if !settings.disable_discord && !is_offline { let _ = discord_rpc.apply_activity("Idling...", true).await; } diff --git a/packages/core/src/store/package.rs b/packages/core/src/store/package.rs index 0031e4c3..fafe748a 100644 --- a/packages/core/src/store/package.rs +++ b/packages/core/src/store/package.rs @@ -177,13 +177,14 @@ pub struct Package { } impl Package { - pub async fn new(path: &PackagePath, meta: PackageMetadata) -> crate::Result { + pub fn new(path: &PackagePath, meta: PackageMetadata) -> crate::Result { let file_name = path .0 .file_name() .ok_or_else(|| crate::ErrorKind::AnyhowError(anyhow::anyhow!("no file name")))? .to_string_lossy() .to_string(); + // TODO: sha512 let sha512 = String::from("unknown"); Ok(Self { @@ -484,7 +485,7 @@ impl PackageManager { // TODO: Infer package let meta = PackageMetadata::Unknown; - let package = Package::new(&package_path, meta).await?; + let package = Package::new(&package_path, meta)?; packages.insert(package_path.clone(), package); } diff --git a/packages/core/src/store/processor.rs b/packages/core/src/store/processor.rs index d4a10ade..fac6d534 100644 --- a/packages/core/src/store/processor.rs +++ b/packages/core/src/store/processor.rs @@ -222,7 +222,7 @@ impl ChildType { } /// Wait for a process to complete. - pub async fn try_wait(&mut self) -> crate::Result> { + pub fn try_wait(&mut self) -> crate::Result> { match self { Self::ChildProcess(child) => Ok(child .try_wait() @@ -301,8 +301,7 @@ impl Processor { .current_child .write() .await - .try_wait() - .await? + .try_wait()? .is_none() { keys.push(key); @@ -339,8 +338,7 @@ impl Processor { .current_child .write() .await - .try_wait() - .await? + .try_wait()? .is_none() { clusters.push(process.cluster_path.clone()); @@ -361,8 +359,7 @@ impl Processor { .current_child .write() .await - .try_wait() - .await? + .try_wait()? .is_none() { if let Some(cluster) = cluster::get(&process.cluster_path.clone()).await? { @@ -378,7 +375,7 @@ impl Processor { pub async fn exit_status(&self, uuid: Uuid) -> crate::Result> { if let Some(process) = self.get(uuid) { let process = process.write().await; - let status = process.current_child.write().await.try_wait().await?; + let status = process.current_child.write().await.try_wait()?; Ok(status) } else { Ok(None) @@ -626,7 +623,7 @@ impl Processor { // core main process loop, managed by tokio loop { - if let Some(stat) = current_child.write().await.try_wait().await? { + if let Some(stat) = current_child.write().await.try_wait()? { exit_status = stat; break; } @@ -742,7 +739,7 @@ impl Processor { .await?; loop { - if let Some(stat) = current_child.write().await.try_wait().await? { + if let Some(stat) = current_child.write().await.try_wait()? { exit_status = stat; break; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e92e2b40..ba755a68 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: devDependencies: '@flowr/eslint-config': specifier: ^4.3.4 - version: 4.3.4(@typescript-eslint/utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(@unocss/eslint-plugin@0.62.4(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-solid@0.14.3(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)(vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0)) + version: 4.3.4(@typescript-eslint/utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(@unocss/eslint-plugin@0.62.4(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-solid@0.14.3(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)(vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.79.1)) '@types/node': specifier: ^22.5.5 version: 22.5.5 @@ -49,10 +49,10 @@ importers: version: 5.6.2 vite: specifier: ^5.4.6 - version: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + version: 5.4.6(@types/node@22.5.5)(sass@1.79.1) vitest: specifier: ^2.1.1 - version: 2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0) + version: 2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.79.1) .github/actions/clippy: dependencies: @@ -205,23 +205,23 @@ importers: specifier: ^5.12.0 version: 5.12.0(rollup@4.21.3) sass: - specifier: ^1.78.0 - version: 1.78.0 + specifier: ^1.79.1 + version: 1.79.1 unocss: specifier: ^0.62.4 - version: 0.62.4(postcss@8.4.47)(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)) + version: 0.62.4(postcss@8.4.47)(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)) vite: specifier: ^5.4.6 - version: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + version: 5.4.6(@types/node@22.5.5)(sass@1.79.1) vite-plugin-solid: specifier: ^2.10.2 - version: 2.10.2(@testing-library/jest-dom@6.5.0)(solid-js@1.8.22)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)) + version: 2.10.2(@testing-library/jest-dom@6.5.0)(solid-js@1.8.22)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)) vite-plugin-solid-svg: specifier: ^0.8.1 - version: 0.8.1(solid-js@1.8.22)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)) + version: 0.8.1(solid-js@1.8.22)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)) vite-tsconfig-paths: specifier: ^5.0.1 - version: 5.0.1(typescript@5.6.2)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)) + version: 5.0.1(typescript@5.6.2)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)) apps/testing: {} @@ -1886,6 +1886,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chokidar@4.0.0: + resolution: {integrity: sha512-mxIojEAQcuEvT/lyXq+jf/3cO/KoA6z4CeNDGGevTybECPOMFCnQy3OPahluUkbqgPNGw5Bi78UC7Po6Lhy+NA==} + engines: {node: '>= 14.16.0'} + chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -3377,6 +3381,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.0.1: + resolution: {integrity: sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==} + engines: {node: '>= 14.16.0'} + redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} @@ -3460,8 +3468,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass@1.78.0: - resolution: {integrity: sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==} + sass@1.79.1: + resolution: {integrity: sha512-+mA7svoNKeL0DiJqZGeR/ZGUu8he4I8o3jyUcOFyo4eBJrwNgIMmAEwCMo/N2Y3wdjOBcRzoNxZIOtrtMX8EXg==} engines: {node: '>=14.0.0'} hasBin: true @@ -4637,7 +4645,7 @@ snapshots: '@fastify/busboy@2.1.1': {} - '@flowr/eslint-config@4.3.4(@typescript-eslint/utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(@unocss/eslint-plugin@0.62.4(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-solid@0.14.3(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)(vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0))': + '@flowr/eslint-config@4.3.4(@typescript-eslint/utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(@unocss/eslint-plugin@0.62.4(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-plugin-solid@0.14.3(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)(vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.79.1))': dependencies: '@antfu/install-pkg': 0.4.1 '@clack/prompts': 0.7.0 @@ -4647,7 +4655,7 @@ snapshots: '@stylistic/eslint-plugin': 2.8.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) '@typescript-eslint/eslint-plugin': 8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) '@typescript-eslint/parser': 8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - '@vitest/eslint-plugin': 1.1.4(@typescript-eslint/utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)(vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0)) + '@vitest/eslint-plugin': 1.1.4(@typescript-eslint/utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)(vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.79.1)) eslint: 9.10.0(jiti@1.21.6) eslint-flat-config-utils: 0.4.0 eslint-merge-processors: 0.1.0(eslint@9.10.0(jiti@1.21.6)) @@ -5357,13 +5365,13 @@ snapshots: '@typescript-eslint/types': 8.6.0 eslint-visitor-keys: 3.4.3 - '@unocss/astro@0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0))': + '@unocss/astro@0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1))': dependencies: '@unocss/core': 0.62.4 '@unocss/reset': 0.62.4 - '@unocss/vite': 0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)) + '@unocss/vite': 0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)) optionalDependencies: - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) transitivePeerDependencies: - rollup - supports-color @@ -5500,7 +5508,7 @@ snapshots: dependencies: '@unocss/core': 0.62.4 - '@unocss/vite@0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0))': + '@unocss/vite@0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1))': dependencies: '@ampproject/remapping': 2.3.0 '@rollup/pluginutils': 5.1.0(rollup@4.21.3) @@ -5510,7 +5518,7 @@ snapshots: chokidar: 3.6.0 magic-string: 0.30.11 tinyglobby: 0.2.6 - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) transitivePeerDependencies: - rollup - supports-color @@ -5521,13 +5529,13 @@ snapshots: '@vercel/ncc@0.38.1': {} - '@vitest/eslint-plugin@1.1.4(@typescript-eslint/utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)(vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0))': + '@vitest/eslint-plugin@1.1.4(@typescript-eslint/utils@8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)(vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.79.1))': dependencies: eslint: 9.10.0(jiti@1.21.6) optionalDependencies: '@typescript-eslint/utils': 8.6.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) typescript: 5.6.2 - vitest: 2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0) + vitest: 2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.79.1) '@vitest/expect@2.1.1': dependencies: @@ -5536,13 +5544,13 @@ snapshots: chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0))': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1))': dependencies: '@vitest/spy': 2.1.1 estree-walker: 3.0.3 magic-string: 0.30.11 optionalDependencies: - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) '@vitest/pretty-format@2.1.1': dependencies: @@ -5572,7 +5580,7 @@ snapshots: sirv: 2.0.4 tinyglobby: 0.2.6 tinyrainbow: 1.2.0 - vitest: 2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0) + vitest: 2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.79.1) '@vitest/utils@2.1.1': dependencies: @@ -5830,6 +5838,10 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.0: + dependencies: + readdirp: 4.0.1 + chownr@2.0.0: {} ci-info@4.0.0: {} @@ -7534,6 +7546,8 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.0.1: {} + redent@3.0.0: dependencies: indent-string: 4.0.0 @@ -7622,9 +7636,9 @@ snapshots: safer-buffer@2.1.2: {} - sass@1.78.0: + sass@1.79.1: dependencies: - chokidar: 3.6.0 + chokidar: 4.0.0 immutable: 4.3.7 source-map-js: 1.2.1 @@ -7982,9 +7996,9 @@ snapshots: universalify@0.2.0: {} - unocss@0.62.4(postcss@8.4.47)(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)): + unocss@0.62.4(postcss@8.4.47)(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)): dependencies: - '@unocss/astro': 0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)) + '@unocss/astro': 0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)) '@unocss/cli': 0.62.4(rollup@4.21.3) '@unocss/core': 0.62.4 '@unocss/postcss': 0.62.4(postcss@8.4.47) @@ -8000,9 +8014,9 @@ snapshots: '@unocss/transformer-compile-class': 0.62.4 '@unocss/transformer-directives': 0.62.4 '@unocss/transformer-variant-group': 0.62.4 - '@unocss/vite': 0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)) + '@unocss/vite': 0.62.4(rollup@4.21.3)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)) optionalDependencies: - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) transitivePeerDependencies: - postcss - rollup @@ -8050,12 +8064,12 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - vite-node@2.1.1(@types/node@22.5.5)(sass@1.78.0): + vite-node@2.1.1(@types/node@22.5.5)(sass@1.79.1): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) transitivePeerDependencies: - '@types/node' - less @@ -8067,13 +8081,13 @@ snapshots: - supports-color - terser - vite-plugin-solid-svg@0.8.1(solid-js@1.8.22)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)): + vite-plugin-solid-svg@0.8.1(solid-js@1.8.22)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)): dependencies: solid-js: 1.8.22 svgo: 3.3.2 - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) - vite-plugin-solid@2.10.2(@testing-library/jest-dom@6.5.0)(solid-js@1.8.22)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)): + vite-plugin-solid@2.10.2(@testing-library/jest-dom@6.5.0)(solid-js@1.8.22)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)): dependencies: '@babel/core': 7.25.2 '@types/babel__core': 7.20.5 @@ -8081,25 +8095,25 @@ snapshots: merge-anything: 5.1.7 solid-js: 1.8.22 solid-refresh: 0.6.3(solid-js@1.8.22) - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) - vitefu: 0.2.5(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) + vitefu: 0.2.5(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)) optionalDependencies: '@testing-library/jest-dom': 6.5.0 transitivePeerDependencies: - supports-color - vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)): + vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)): dependencies: debug: 4.3.6 globrex: 0.1.2 tsconfck: 3.1.1(typescript@5.6.2) optionalDependencies: - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) transitivePeerDependencies: - supports-color - typescript - vite@5.4.6(@types/node@22.5.5)(sass@1.78.0): + vite@5.4.6(@types/node@22.5.5)(sass@1.79.1): dependencies: esbuild: 0.21.5 postcss: 8.4.47 @@ -8107,16 +8121,16 @@ snapshots: optionalDependencies: '@types/node': 22.5.5 fsevents: 2.3.3 - sass: 1.78.0 + sass: 1.79.1 - vitefu@0.2.5(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)): + vitefu@0.2.5(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)): optionalDependencies: - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) - vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.78.0): + vitest@2.1.1(@types/node@22.5.5)(@vitest/ui@2.1.1)(jsdom@25.0.0)(sass@1.79.1): dependencies: '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.6(@types/node@22.5.5)(sass@1.78.0)) + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.6(@types/node@22.5.5)(sass@1.79.1)) '@vitest/pretty-format': 2.1.1 '@vitest/runner': 2.1.1 '@vitest/snapshot': 2.1.1 @@ -8131,8 +8145,8 @@ snapshots: tinyexec: 0.3.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.6(@types/node@22.5.5)(sass@1.78.0) - vite-node: 2.1.1(@types/node@22.5.5)(sass@1.78.0) + vite: 5.4.6(@types/node@22.5.5)(sass@1.79.1) + vite-node: 2.1.1(@types/node@22.5.5)(sass@1.79.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.5.5