From 50ee1856f42094d9381052dfdd241af90875f113 Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 16:32:31 +0100 Subject: [PATCH 01/18] fix: clippy 1.100 lint that fails CI on every platform --- crates/odysync-core/src/cleanup.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/odysync-core/src/cleanup.rs b/crates/odysync-core/src/cleanup.rs index 44e3a07..60605c0 100644 --- a/crates/odysync-core/src/cleanup.rs +++ b/crates/odysync-core/src/cleanup.rs @@ -544,11 +544,7 @@ fn is_safe_windows_root(root: &Path) -> bool { // `C:\Windows` itself is refused, but `C:\Windows\Temp` is a legitimate // target, so this checks for the tree ending there rather than containing // it. - if lowered.ends_with("\\windows") { - return false; - } - - true + !lowered.ends_with("\\windows") } #[cfg(test)] From fe2c2f3f3edcc298951b64b0421b2453c1d56fb4 Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 16:43:05 +0100 Subject: [PATCH 02/18] chore(deps): refresh both lockfiles, replace chrono with jiff cargo audit: 2 vulnerabilities (cookie RUSTSEC-2026-0594, url RUSTSEC-2026-0592) and one yanked crate become 0. chrono is unmaintained (RUSTSEC-2026-0543) and failed cargo-deny as a direct dependency; jiff is the recommended replacement, and histories written before still load. The Rust and the npm half of the Tauri plugins move together here, which the two separate pull requests could not. --- Cargo.lock | 1048 ++++++++------ Cargo.toml | 2 +- apps/gui/package-lock.json | 1255 +++++++---------- apps/gui/src-tauri/Cargo.toml | 1 - apps/gui/src-tauri/src/commands.rs | 2 +- crates/odysync-backends/Cargo.toml | 2 +- crates/odysync-backends/src/components.rs | 2 +- crates/odysync-backends/src/diagnostics.rs | 2 +- crates/odysync-backends/src/direct/macos.rs | 2 +- crates/odysync-backends/src/direct/mod.rs | 2 +- crates/odysync-backends/src/driver_backup.rs | 12 +- crates/odysync-backends/src/gpu/nvidia_gpu.rs | 2 +- crates/odysync-backends/src/offline.rs | 2 +- crates/odysync-backends/src/security/mod.rs | 2 +- .../src/security/remediate.rs | 6 +- crates/odysync-cli/Cargo.toml | 2 +- crates/odysync-cli/src/main.rs | 4 +- crates/odysync-core/Cargo.toml | 2 +- crates/odysync-core/src/config.rs | 24 +- crates/odysync-core/src/history.rs | 21 +- crates/odysync-core/src/report.rs | 10 +- 21 files changed, 1232 insertions(+), 1173 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5230bd7..4c19d55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" +checksum = "2cb931c189b85683d69a5cfad41d4d418671e1ac413dd209f3f2fc31e3cfd902" [[package]] name = "async-broadcast" @@ -123,9 +123,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" dependencies = [ "async-task", "concurrent-queue", @@ -155,9 +155,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.4.2" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f" dependencies = [ "event-listener", "event-listener-strategy", @@ -190,7 +190,7 @@ checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -225,7 +225,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -265,9 +265,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "aws-lc-rs" -version = "1.18.2" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faac5829c2b74c28f830747e7818ccfb684261b5f48a1118b1e2a13d36dfab13" +checksum = "048006790404103c488e6c5616b3e7e702a71292aadda08e8f7698a9e0d2eb53" dependencies = [ "aws-lc-sys", "zeroize", @@ -275,9 +275,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.46.0" +version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1622d8446a2d4b2ce0c7eefc73dd43a99779028d5ee5c2dd8073a658ba8a2bc" +checksum = "8bfbe32ac36b3c428696ce315464181bc4029d689fd58e3f2a4e58c252242f52" dependencies = [ "cc", "cmake", @@ -292,12 +292,6 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - [[package]] name = "base64" version = "0.23.1" @@ -310,7 +304,16 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec", + "bit-vec 0.8.0", +] + +[[package]] +name = "bit-set" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d87354e4229f54a44f7bf2435906a4656dba36026ab6eaca629a2c436a691c" +dependencies = [ + "bit-vec 0.10.2", ] [[package]] @@ -319,6 +322,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" +[[package]] +name = "bit-vec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72503af1e72be411d74ca45cd6b309878fcb35354e252fc2a3a8bda3a97082a0" + [[package]] name = "bitflags" version = "1.3.2" @@ -376,9 +385,9 @@ dependencies = [ [[package]] name = "brotli" -version = "9.0.0" +version = "9.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b851b75c23ca7873623d612fe49bd1989aeb03d08fb9432187eb253d3d4c6b" +checksum = "9071f285ed78f04f37d675abaaef5de7689e2f30a216c8dc6795465d81910a13" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -387,9 +396,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "6.0.1" +version = "6.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941cd9bd4ddab83cb46fa5a2d428f1c857b24ac78cb876cf7beb710840934bd7" +checksum = "664148598c930650998ef56df301329ffe7b4cdb02d49b2a3fca3bcaf2185bcb" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -406,9 +415,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.3" +version = "3.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" [[package]] name = "bytemuck" @@ -424,9 +433,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.12.1" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c" dependencies = [ "serde", ] @@ -496,14 +505,14 @@ checksum = "82f4b26e751e711a5302649417f2da046dce6391b2ea30a4820f37462314f0b9" dependencies = [ "semver", "serde", - "toml 1.1.8+spec-1.1.0", + "toml 1.2.3+spec-1.1.0", ] [[package]] name = "cc" -version = "1.8.0" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6651c9ed80effdc7db0ff72512157f901af5e3549e341e24b1dd4887d836d838" +checksum = "02f0e023adb368345ce0ca6cdfc0f24a06554468d0e8503e14a0841de79bfa69" dependencies = [ "find-msvc-tools", "jobserver", @@ -558,7 +567,7 @@ checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", "cpufeatures 0.3.1", - "rand_core 0.10.1", + "rand_core", ] [[package]] @@ -568,18 +577,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ "iana-time-zone", - "js-sys", "num-traits", "serde", - "wasm-bindgen", "windows-link", ] [[package]] name = "clap" -version = "4.6.7" +version = "4.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +checksum = "50066ca966813ca8957ee15361752f19424a8ff620dbe9c8993d9f99d99b04b3" dependencies = [ "clap_builder", "clap_derive", @@ -587,9 +594,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.7" +version = "4.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" +checksum = "a0ed97c96ef4efb3cc84e09fa388df4463e7cc3224ec38d7b1d9e45749333590" dependencies = [ "anstream", "anstyle", @@ -599,21 +606,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.7" +version = "4.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" +checksum = "b4c174f11f949b9ca8c60580925e282b9cbd5454750e506f08648b2038080cd7" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] name = "clap_lex" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" +checksum = "e0921b3876b3a1df8a1c9f912e7f94342458022c2e84288015893d83c4d62a79" [[package]] name = "cmake" @@ -651,15 +658,24 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.10.2" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a" + +[[package]] +name = "constant_time_eq" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" +checksum = "144e7f1de087984240b7816d47f698b414979faa6f40839c5b86d6bd47db57b7" +dependencies = [ + "rustversion", +] [[package]] name = "cookie" -version = "0.18.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87" +checksum = "d55f2d6c30eeec7d5c6f98bd4395d4abb1895629eab97ee6522d340623615f8a" dependencies = [ "time", "version_check", @@ -731,9 +747,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.5.2" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" +checksum = "fd9ae8fcb3ea71b0b26338b4ffb13006bb175de8fd07921089a906ce7e5e6945" dependencies = [ "cfg-if", ] @@ -781,7 +797,20 @@ dependencies = [ "cssparser-macros", "dtoa-short", "itoa", - "phf", + "phf 0.13.1", + "smallvec", +] + +[[package]] +name = "cssparser" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11119743ad110e8c1bdccd930d7f5c30c99e5fc76a7b63ec9807e84eef0c5f59" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf 0.14.0", "smallvec", ] @@ -792,14 +821,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" dependencies = [ "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] name = "ctor" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d" +checksum = "ea691ed9f36489d087419b8b2ba3ef27d89621380b4178c73e2445a379e4e0f4" +dependencies = [ + "link-section", +] [[package]] name = "curve25519-dalek" @@ -848,7 +880,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -859,7 +891,7 @@ checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" dependencies = [ "darling_core", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -873,37 +905,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "defmt" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a0795ac740cb54d7b3775c9c17345f6aaecf884c01733b39d6017738e0e3e1" -dependencies = [ - "bitflags 1.3.2", - "defmt-macros", -] - -[[package]] -name = "defmt-macros" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "840bb056bd99c495c9188198a258ab787c79f306d864db3e6e8451442d6d8366" -dependencies = [ - "defmt-parser", - "proc-macro2", - "quote", - "syn 3.0.9", -] - -[[package]] -name = "defmt-parser" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71958f69fb2de856c5dd51ac9377e986ca1aa5919f931bf5395a807277f889a0" -dependencies = [ - "thiserror 2.0.21", -] - [[package]] name = "deranged" version = "0.5.9" @@ -1005,7 +1006,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -1037,12 +1038,27 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fac5fca71e65e94cc718a6e2af65d6e0f9c6027751c2aa562fbb5087fda639bc" dependencies = [ - "bit-set", - "cssparser", + "bit-set 0.8.0", + "cssparser 0.37.0", "foldhash", - "html5ever", + "html5ever 0.39.0", "precomputed-hash", - "selectors", + "selectors 0.38.0", + "tendril", +] + +[[package]] +name = "dom_query" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35b4f772a1a8b88e5545a67c2d3a62a93d4edccc5a68f2145fe52e39c96d275" +dependencies = [ + "bit-set 0.11.1", + "cssparser 0.38.0", + "foldhash", + "html5ever 0.40.1", + "precomputed-hash", + "selectors 0.41.0", "tendril", ] @@ -1099,7 +1115,7 @@ checksum = "6ebaa1a2bf1290ab3bfe5a7b771d050ebffab2711c19a81691c683a5144a25de" dependencies = [ "curve25519-dalek", "ed25519", - "sha2 0.11.1", + "sha2 0.11.2", "subtle", "zeroize", ] @@ -1113,7 +1129,7 @@ dependencies = [ "cc", "memchr", "rustc_version", - "toml 1.1.8+spec-1.1.0", + "toml 1.2.3+spec-1.1.0", "vswhom", "winreg", ] @@ -1126,9 +1142,9 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "encoding_rs" -version = "0.8.42" +version = "0.8.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" +checksum = "89253175e704ab869b04f9db224d38630e0211a53841a79181deae0889e169f5" dependencies = [ "cfg-if", "core_detect", @@ -1173,9 +1189,9 @@ checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" [[package]] name = "erased-serde" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +checksum = "1e59b668157f32d3459d4bd634861a06ffa2503a461ca5f0916b9f0252605e66" dependencies = [ "serde", "serde_core", @@ -1184,9 +1200,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" dependencies = [ "libc", "windows-sys 0.61.2", @@ -1245,15 +1261,15 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" [[package]] name = "flate2" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" +checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4" dependencies = [ "crc32fast", "miniz_oxide 0.9.1", @@ -1290,7 +1306,7 @@ checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -1301,9 +1317,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" dependencies = [ "percent-encoding", ] @@ -1382,7 +1398,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -1558,7 +1574,7 @@ dependencies = [ "js-sys", "libc", "r-efi 6.0.0", - "rand_core 0.10.1", + "rand_core", "wasm-bindgen", ] @@ -1718,9 +1734,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.17.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +checksum = "735eaa21a6a5ffb2e84362faaeb90c05ba8e19797ca30428478cb6ea3a4921bc" [[package]] name = "heck" @@ -1753,7 +1769,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a1761807faccc9a19e86944bbf40610014066306f96edcdedc2fb714bcb7b8" dependencies = [ "log", - "markup5ever", + "markup5ever 0.39.0", +] + +[[package]] +name = "html5ever" +version = "0.40.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456a1a377e608e555d22ddab27ac0114bc7a7b4199078108e34c2aeae6c9b130" +dependencies = [ + "log", + "markup5ever 0.40.0", + "memchr", ] [[package]] @@ -1806,9 +1833,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" +checksum = "229c6ff5584df4c6becbfe00567128bac768c8cd32ebc8a8366bd81ed072e8f3" dependencies = [ "atomic-waker", "bytes", @@ -1898,9 +1925,9 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" dependencies = [ "displaydoc", "potential_utf", @@ -1912,9 +1939,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" dependencies = [ "displaydoc", "litemap", @@ -1925,9 +1952,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -1939,15 +1966,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" [[package]] name = "icu_properties" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" dependencies = [ "displaydoc", "icu_collections", @@ -1960,15 +1987,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" [[package]] name = "icu_provider" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" dependencies = [ "displaydoc", "icu_locale_core", @@ -2024,7 +2051,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", - "hashbrown 0.17.1", + "hashbrown 0.17.2", "serde", "serde_core", ] @@ -2071,9 +2098,9 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itoa" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" [[package]] name = "javascriptcore-rs" @@ -2100,14 +2127,29 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.38" +version = "0.2.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175dc66334db3b9ab9985bf8b61cfed50dc16d20964bb47f9e479adcae984a7f" +dependencies = [ + "jiff-core 0.1.8", + "jiff-static 0.2.46", + "jiff-tzdb-platform 0.1.3", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link", +] + +[[package]] +name = "jiff" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" +checksum = "107f2e89536b6818514025f6787b0d94d819e54fe3b40365275fc753de485b3f" dependencies = [ - "defmt", - "jiff-core", - "jiff-static", - "jiff-tzdb-platform", + "jiff-core 1.0.2", + "jiff-static 1.0.3", + "jiff-tzdb-platform 1.0.0", "log", "portable-atomic", "portable-atomic-util", @@ -2117,31 +2159,57 @@ dependencies = [ [[package]] name = "jiff-core" -version = "0.1.1" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e599b80292e597019b8b3e392de3f4bea2959ddfb8c7dff60e035e9e311a2c1b" +dependencies = [ + "log", +] + +[[package]] +name = "jiff-core" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c" +checksum = "d44c923edf2bf456a982253f1a9ee1f6e89e421dffd0065d9b9a581da0def58f" dependencies = [ - "defmt", "log", ] [[package]] name = "jiff-static" -version = "0.2.38" +version = "0.2.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" +checksum = "c7b1af7547d47354bc438d797e3854601bde8f8d185780c5ba4ab27afa54f1ba" dependencies = [ - "jiff-core", + "jiff-core 0.1.8", "proc-macro2", "quote", "syn 2.0.119", ] +[[package]] +name = "jiff-static" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4996f71e569e3a3e32b925c28ef8f0027dc30bb1d594b33eeda409eea185f5c8" +dependencies = [ + "jiff-core 1.0.2", + "proc-macro2", + "quote", + "syn 3.0.10", +] + [[package]] name = "jiff-tzdb" -version = "0.1.9" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0980fca2cc272465bd60e82397607ba9f33add9e48defd77923301bbd03808f2" + +[[package]] +name = "jiff-tzdb" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8377070c6bae868759445e5a77f66d84f0b72f3a054bfb00e6d038b8282da7" +checksum = "12e71a1b68a875a44a33bb7a1dd84392cb77145a3367a552a3cfe6a4f5cf3afc" [[package]] name = "jiff-tzdb-platform" @@ -2149,7 +2217,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" dependencies = [ - "jiff-tzdb", + "jiff-tzdb 0.1.10", +] + +[[package]] +name = "jiff-tzdb-platform" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc65b284afcfa8f6cf189c7274c805505314a7ab975c60e1f548bff56525420e" +dependencies = [ + "jiff-tzdb 1.0.0", ] [[package]] @@ -2238,9 +2315,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.106" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" dependencies = [ "cfg-if", "futures-util", @@ -2343,6 +2420,12 @@ dependencies = [ "libc", ] +[[package]] +name = "link-section" +version = "0.19.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d9aae57673c1a235149777a74d152f3210ebd3e3b13346d2cdb6809e566bd3c" + [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -2366,9 +2449,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" [[package]] name = "lru-slab" @@ -2398,7 +2481,18 @@ checksum = "7122d987ec5f704ee56f6e5b41a7d93722e9aae27ae07cafa4036c4d3f9757de" dependencies = [ "log", "tendril", - "web_atoms", + "web_atoms 0.2.6", +] + +[[package]] +name = "markup5ever" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab3dc68ac4a0f5719e560136778c1ee716e296030d75dbd4484e37e39e3a842" +dependencies = [ + "log", + "tendril", + "web_atoms 0.3.0", ] [[package]] @@ -2427,9 +2521,9 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1" [[package]] name = "miniz_oxide" @@ -2453,9 +2547,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +checksum = "20521a903f02b0a573cd6840e9d0a5a0cc043d361fe924092cd70f8556cc9c4a" dependencies = [ "libc", "wasi", @@ -2527,9 +2621,9 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" -version = "0.31.3" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +checksum = "77730ed34f01f4990cb2ea67fec715ecebc6fab9a6396cf83c5529b13f581bdc" dependencies = [ "bitflags 2.13.2", "cfg-if", @@ -2539,16 +2633,16 @@ dependencies = [ [[package]] name = "notify-rust" -version = "4.18.2" +version = "4.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4587364a9a0074333429b3df75a30a205340c56a536ca3eb6ca0e59b87bbf8af" +checksum = "57da5b5d3b7809bf71858da5a2818c3404ca4688c02c8abecdda0fcdec235df3" dependencies = [ "futures-lite", "log", "mac-notification-sys", "serde", "tauri-winrt-notification", - "zbus", + "zbus 6.5.0", ] [[package]] @@ -2801,11 +2895,11 @@ dependencies = [ "anyhow", "async-trait", "base64 0.23.1", - "chrono", "directories", "ed25519-dalek", "futures", "hex", + "jiff 1.0.3", "odysync-core", "odysync-verify", "plist", @@ -2814,7 +2908,7 @@ dependencies = [ "roxmltree", "serde", "serde_json", - "sha2 0.11.1", + "sha2 0.11.2", "tempfile", "tokio", "tracing", @@ -2829,9 +2923,9 @@ name = "odysync-cli" version = "3.1.1" dependencies = [ "anyhow", - "chrono", "clap", "futures", + "jiff 1.0.3", "odysync-backends", "odysync-core", "serde_json", @@ -2845,8 +2939,8 @@ name = "odysync-core" version = "3.1.1" dependencies = [ "async-trait", - "chrono", "directories", + "jiff 1.0.3", "libc", "regex", "serde", @@ -2862,7 +2956,6 @@ dependencies = [ name = "odysync-gui" version = "3.1.1" dependencies = [ - "chrono", "directories", "futures", "odysync-backends", @@ -2887,7 +2980,7 @@ dependencies = [ "hex", "odysync-core", "serde", - "sha2 0.11.1", + "sha2 0.11.2", "tokio", "tracing", ] @@ -2906,9 +2999,9 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "open" -version = "5.4.4" +version = "5.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa576c76302b7b808eecc68061e67336c47833ef9d22caa74dda10fa9675eebc" +checksum = "8d8c8b8e725ad26404d6896eb2f064294a0a7b4f1d9120210d85544684c4ca95" dependencies = [ "dunce", "is-wsl", @@ -2917,9 +3010,9 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" +checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1" [[package]] name = "option-ext" @@ -3013,8 +3106,19 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ - "phf_macros", - "phf_shared", + "phf_macros 0.13.1", + "phf_shared 0.13.1", + "serde", +] + +[[package]] +name = "phf" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6" +dependencies = [ + "phf_macros 0.14.0", + "phf_shared 0.14.0", "serde", ] @@ -3024,8 +3128,18 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.13.1", + "phf_shared 0.13.1", +] + +[[package]] +name = "phf_codegen" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b585a510fb76fdebead6897982ef2a03a21d8e6cbcca904999742a4afc6ffe" +dependencies = [ + "phf_generator 0.14.0", + "phf_shared 0.14.0", ] [[package]] @@ -3035,7 +3149,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ "fastrand", - "phf_shared", + "phf_shared 0.13.1", +] + +[[package]] +name = "phf_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb62e0959d5a1bebc965f4d15d9e2b7cea002b6b0f5ba8cde6cc26738467100" +dependencies = [ + "fastrand", + "phf_shared 0.14.0", ] [[package]] @@ -3044,8 +3168,21 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.13.1", + "phf_shared 0.13.1", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_macros" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fa8d0ca26d424d27630da600c6624696e7dec8bf7b3b492b383c5dc49e5e085" +dependencies = [ + "phf_generator 0.14.0", + "phf_shared 0.14.0", "proc-macro2", "quote", "syn 2.0.119", @@ -3060,11 +3197,20 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project-lite" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752" [[package]] name = "piper" @@ -3085,9 +3231,9 @@ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" [[package]] name = "plist" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327a4cb2ad49dc48adfdc9da89e22c64d488b508c67a044d71ba729e4521a285" +checksum = "d86a77b7d9cdebd9643c180c158748db7d894b24a3935ed4b5843e698ae086eb" dependencies = [ "base64 0.23.1", "indexmap 2.14.2", @@ -3153,15 +3299,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - [[package]] name = "precomputed-hash" version = "0.1.1" @@ -3194,7 +3331,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.17+spec-1.1.0", + "toml_edit 0.25.21+spec-1.1.0", ] [[package]] @@ -3269,7 +3406,7 @@ dependencies = [ "bytes", "getrandom 0.4.3", "lru-slab", - "rand 0.10.3", + "rand", "rand_pcg", "ring", "rustc-hash", @@ -3319,42 +3456,13 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" -dependencies = [ - "rand_chacha", - "rand_core 0.9.5", -] - -[[package]] -name = "rand" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11" dependencies = [ "chacha20", "getrandom 0.4.3", - "rand_core 0.10.1", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.5", -] - -[[package]] -name = "rand_core" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" -dependencies = [ - "getrandom 0.3.4", + "rand_core", ] [[package]] @@ -3365,11 +3473,11 @@ checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" [[package]] name = "rand_pcg" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +checksum = "eb95882a1e14462c69aea9984bb261293ccfe6022ef8de0eda18bd5afb0052df" dependencies = [ - "rand_core 0.10.1", + "rand_core", ] [[package]] @@ -3414,14 +3522,14 @@ checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] name = "regex" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857" dependencies = [ "aho-corasick", "memchr", @@ -3431,9 +3539,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158" dependencies = [ "aho-corasick", "memchr", @@ -3442,9 +3550,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6" [[package]] name = "reqwest" @@ -3488,9 +3596,9 @@ dependencies = [ [[package]] name = "rfd" -version = "0.16.0" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672" +checksum = "20dafead71c16a34e1ff357ddefc8afc11e7d51d6d2b9fbd07eaa48e3e540220" dependencies = [ "block2", "dispatch2", @@ -3498,16 +3606,18 @@ dependencies = [ "gobject-sys", "gtk-sys", "js-sys", + "libc", "log", "objc2", "objc2-app-kit", "objc2-core-foundation", "objc2-foundation", + "percent-encoding", "raw-window-handle", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3550,9 +3660,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ "bitflags 2.13.2", "errno", @@ -3589,9 +3699,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.15.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +checksum = "102f35f7de7b06d8c61f1cff6592f5253e0dea431c74867aad5dfd70f44663fb" dependencies = [ "web-time", "zeroize", @@ -3626,9 +3736,9 @@ checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f" [[package]] name = "rustls-webpki" -version = "0.103.16" +version = "0.103.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" +checksum = "e3a0760a887c14823fca5a1c970b01d47c328c696c0c64829d1df50e8f853fd5" dependencies = [ "aws-lc-rs", "ring", @@ -3653,9 +3763,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5" dependencies = [ "windows-sys 0.61.2", ] @@ -3747,15 +3857,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8adfa1c298912827b8a28b223b3b874357397ae706e6190acd9bf28cee99114d" dependencies = [ "bitflags 2.13.2", - "cssparser", + "cssparser 0.37.0", + "derive_more", + "log", + "new_debug_unreachable", + "phf 0.13.1", + "phf_codegen 0.13.1", + "precomputed-hash", + "rustc-hash", + "servo_arc 0.4.3", + "smallvec", +] + +[[package]] +name = "selectors" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8322aebea94a6cc288ff884e8a49bdbceef60206c400c6c46d22e62fc4fd91a6" +dependencies = [ + "bitflags 2.13.2", + "cssparser 0.38.0", "derive_more", "log", "new_debug_unreachable", - "phf", - "phf_codegen", "precomputed-hash", "rustc-hash", - "servo_arc", + "servo_arc 0.5.0", "smallvec", ] @@ -3808,7 +3935,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -3843,7 +3970,7 @@ checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -3857,18 +3984,18 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" +checksum = "9c187e0a369471c550af028cba56d4f4fa2a489ad28151ae95a4d340a2a8b782" dependencies = [ "serde_core", ] [[package]] name = "serde_with" -version = "3.24.0" +version = "3.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9adc193c780ef8f159aee8b61e2d5801aaa555e6eb0947fe45530ec506296f" +checksum = "56cb1ca7c93ae63d6439b5250f6b6b040f7e121f32e5dd2f5d523dd4149b3204" dependencies = [ "base64 0.23.1", "bs58", @@ -3876,7 +4003,8 @@ dependencies = [ "hex", "indexmap 1.9.3", "indexmap 2.14.2", - "jiff", + "jiff 0.2.46", + "jiff 1.0.3", "schemars 0.9.0", "schemars 1.2.3", "serde_core", @@ -3887,14 +4015,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.24.0" +version = "3.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17bbc68e28663bbbb90df47e058aa7eda4fb445b89fe70457bb94fbccf6e49" +checksum = "cff15a7c864bbec77d9586ca6822bc7c369bdf19e9243134a62b0b51ce26b31f" dependencies = [ "darling", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -3928,6 +4056,15 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "servo_arc" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4eceb519ec34d8290aaf6e46f435102f2bfa63f22b05a144fb16ab266d3b198" +dependencies = [ + "stable_deref_trait", +] + [[package]] name = "sha2" version = "0.10.9" @@ -3941,9 +4078,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19" +checksum = "5b0e5c7d67bc53f435386b2130fdc900488c5703770f6d8a4633060e34288a27" dependencies = [ "cfg-if", "cpufeatures 0.3.1", @@ -4027,9 +4164,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.16.3" +version = "1.16.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b" +checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59" [[package]] name = "socket2" @@ -4109,7 +4246,19 @@ checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" dependencies = [ "new_debug_unreachable", "parking_lot", - "phf_shared", + "phf_shared 0.13.1", + "precomputed-hash", +] + +[[package]] +name = "string_cache" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa8a5dbe8b3f0bbe29d4c3225daafaeead63afdc1b65fc4c01a1384166038e6" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.14.0", "precomputed-hash", ] @@ -4119,8 +4268,20 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.13.1", + "phf_shared 0.13.1", + "proc-macro2", + "quote", +] + +[[package]] +name = "string_cache_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928dcdf75e47626b3617a976ec205d9f057584c371c1f23b782129268d0e6edc" +dependencies = [ + "phf_generator 0.14.0", + "phf_shared 0.14.0", "proc-macro2", "quote", ] @@ -4177,9 +4338,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" dependencies = [ "proc-macro2", "quote", @@ -4203,7 +4364,7 @@ checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -4221,9 +4382,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.37.1" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f37f381f4e048e6cdf038b5705f8cf14ad108279d46eb968140a7b291aba9400" +checksum = "02ca9c0ce2a2fd70dc4ef4449ca5e8d30e6fa0db111cd8008594602a06a68371" dependencies = [ "bitflags 2.13.2", "block2", @@ -4278,9 +4439,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.12.5" +version = "2.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb0244332cfb9cee7e2a568bf5da29a36ed8fdbd717f6f47a66b6b7b358c072" +checksum = "30fbfbb9dc9a2697b0e96d909ddc295fb18d2d82a58ed542ab8d9eba2edbe6da" dependencies = [ "anyhow", "bytes", @@ -4329,9 +4490,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adddb0e648752aaac5da9c3c3c6a68e1e87cab55e3b757b18a9441ef8c3ac614" +checksum = "73d80784e874fa117b9b00a6680cf2f9b8a51bbd14406bea980cf8f328b00646" dependencies = [ "anyhow", "cargo_toml", @@ -4352,9 +4513,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb37631cf71dab5e8ab55e1bdd701e18a52653d90b78e71d0e5598b1e0a61316" +checksum = "c5dc6caab4da5646f57648f39b794bae118f0dd4a4305eeb8c892966171f4852" dependencies = [ "base64 0.23.1", "brotli", @@ -4367,7 +4528,7 @@ dependencies = [ "semver", "serde", "serde_json", - "sha2 0.10.9", + "sha2 0.11.2", "syn 2.0.119", "tauri-utils", "thiserror 2.0.21", @@ -4379,9 +4540,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc38db58854c10fb5f91a887ed8bf82d3239bb92b5d8db86eda09e96d9963d1" +checksum = "2831c5da8603a96b1efc0b650c2cb6decc69b6cda257d815fe70c7f5be53818e" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -4393,9 +4554,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fb21a77e8f94e8beb3325e583102488659365af0a3948b7ea244c5b779c291" +checksum = "6c18076d9b04211cb4899387aab97497e8edd0d02cd21710623afcdde27145d1" dependencies = [ "anyhow", "glob", @@ -4409,9 +4570,9 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.8.3" +version = "2.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7461aaacf1901915ea7b9f5cd74f8224a351ed96af0a62c07fce934003cb34b" +checksum = "ce0fb9c2b6d34a9720627ed930ebc8af26f61e648695aecaeb03d5c33c5896f5" dependencies = [ "log", "raw-window-handle", @@ -4445,19 +4606,19 @@ dependencies = [ "tauri-plugin", "tauri-utils", "thiserror 2.0.21", - "toml 1.1.8+spec-1.1.0", + "toml 1.2.3+spec-1.1.0", "url", ] [[package]] name = "tauri-plugin-notification" -version = "2.7.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b939d7b19c8af1381a72ef8474b3aba2b56c1ddac2c23f0c8e96abbcf86b198b" +checksum = "14a226bfb8189ec4ab2c1936e66330ad06c44d9f6c54a674338208491dee177f" dependencies = [ "log", "notify-rust", - "rand 0.9.5", + "rand", "serde", "serde_json", "serde_repr", @@ -4466,14 +4627,14 @@ dependencies = [ "thiserror 2.0.21", "time", "url", - "zbus", + "zbus 5.19.0", ] [[package]] name = "tauri-plugin-shell" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8567d42b2c7264355daa1df415ec77f52aa42e885924c86a969be2e920e05521" +checksum = "7375b25f72f70f6168f27f1ba3a413e30eaa0a2098cff53a4046ebfe9e2f142d" dependencies = [ "encoding_rs", "libc", @@ -4494,9 +4655,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.12.2" +version = "2.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c55766d99cea69055904d1735b93c2049302b2e09effd462120deb5581d78e9" +checksum = "60c2b14bd5265b63993cdc34ad526fb836e0fd0cf64a4634a895db0784844d5e" dependencies = [ "cookie", "dpi", @@ -4519,9 +4680,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.12.3" +version = "2.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1aa9d8b7a120f879f44fdc1053f7b7dbf416bf0bbc6a72b714dec46b782b52f" +checksum = "b8c14a025255cc9816d401635035075b09b6cc9973b7b8fd7b8fcb8753f30f92" dependencies = [ "gtk", "http", @@ -4544,15 +4705,15 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.10.2" +version = "2.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "362ab21cd4cc713f2a02b1a9b5688198b1541cfb6907c4281e9190e0f0ef4aa3" +checksum = "28d1d33d4453c5df0bf1672dbc7ada69d8ed74f56a4316d964a4aa73d4ecd3ad" dependencies = [ "anyhow", "brotli", "cargo_metadata", "ctor", - "dom_query", + "dom_query 0.28.0", "dunce", "glob", "http", @@ -4560,7 +4721,7 @@ dependencies = [ "json-patch", "log", "memchr", - "phf", + "phf 0.13.1", "plist", "proc-macro2", "quote", @@ -4573,7 +4734,7 @@ dependencies = [ "serde_with", "swift-rs", "thiserror 2.0.21", - "toml 1.1.8+spec-1.1.0", + "toml 1.2.3+spec-1.1.0", "url", "urlpattern", "uuid", @@ -4582,13 +4743,13 @@ dependencies = [ [[package]] name = "tauri-winres" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc65d45c68858bfe420dd29e834b5d15dbecf8a07a8a16cf4d532c7b1f69d4b6" +checksum = "c52bb6904475a6ca662f15ef787f18ade61d5740a1ee12c45d3b748efdb6f796" dependencies = [ "dunce", "embed-resource", - "toml 1.1.8+spec-1.1.0", + "toml 1.2.3+spec-1.1.0", ] [[package]] @@ -4661,7 +4822,7 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -4705,9 +4866,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" dependencies = [ "displaydoc", "zerovec", @@ -4743,7 +4904,7 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -4783,17 +4944,17 @@ dependencies = [ [[package]] name = "toml" -version = "1.1.8+spec-1.1.0" +version = "1.2.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" +checksum = "26b1f26e9485c1fa43ee89fe76e9f3fb9e2e52bb227f8594b4d687496b83d073" dependencies = [ "indexmap 2.14.2", "serde_core", - "serde_spanned 1.1.2", - "toml_datetime 1.1.2+spec-1.1.0", + "serde_spanned 1.1.3", + "toml_datetime 1.1.3+spec-1.1.0", "toml_parser", "toml_writer", - "winnow 1.0.4", + "winnow 1.0.5", ] [[package]] @@ -4807,9 +4968,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.1.2+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" dependencies = [ "serde_core", ] @@ -4840,30 +5001,30 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.17+spec-1.1.0" +version = "0.25.21+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" +checksum = "88497dab46de5bf343ec66b05c251e48c6213f3e9170c70a70a823f7abe886a4" dependencies = [ "indexmap 2.14.2", - "toml_datetime 1.1.2+spec-1.1.0", + "toml_datetime 1.1.3+spec-1.1.0", "toml_parser", - "winnow 1.0.4", + "winnow 1.0.5", ] [[package]] name = "toml_parser" -version = "1.1.5+spec-1.1.0" +version = "1.1.7+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +checksum = "0bb28d6e049a9766c3bd91a8326e6179f5b132dec87906bb97018ef7a2f3431a" dependencies = [ - "winnow 1.0.4", + "winnow 1.0.5", ] [[package]] name = "toml_writer" -version = "1.1.3+spec-1.1.0" +version = "1.2.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770" +checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" [[package]] name = "tower" @@ -5055,9 +5216,9 @@ checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] name = "unicode-width" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +checksum = "ca718471876992059f251e33aafc334346ada08042b7661dd1fe313a9bced557" [[package]] name = "untrusted" @@ -5067,9 +5228,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.8" +version = "2.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" dependencies = [ "form_urlencoded", "idna", @@ -5092,9 +5253,12 @@ dependencies = [ [[package]] name = "utf8_iter" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] [[package]] name = "utf8parse" @@ -5102,11 +5266,17 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "utf_types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" + [[package]] name = "uuid" -version = "1.28.0" +version = "1.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" +checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -5154,9 +5324,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "b42e295b7452c4604982280d8586001fcad9b8b201cac67bca9771e7a7475403" dependencies = [ "same-file", "winapi-util", @@ -5188,12 +5358,11 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" dependencies = [ "cfg-if", - "once_cell", "rustversion", "wasm-bindgen-macro", "wasm-bindgen-shared", @@ -5201,9 +5370,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.79" +version = "0.4.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" dependencies = [ "js-sys", "tokio", @@ -5212,9 +5381,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5222,22 +5391,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" dependencies = [ "unicode-ident", ] @@ -5257,9 +5426,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.106" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" dependencies = [ "js-sys", "wasm-bindgen", @@ -5281,10 +5450,22 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba8b815c1b593dc0baf78dd0f4fc8fdb2de53198fb1163738093e9a311c33fb3" dependencies = [ - "phf", - "phf_codegen", - "string_cache", - "string_cache_codegen", + "phf 0.13.1", + "phf_codegen 0.13.1", + "string_cache 0.9.0", + "string_cache_codegen 0.6.1", +] + +[[package]] +name = "web_atoms" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7572660c8890448ba236b7376f27e389c6a7e1c70195622faced601f855c0ada" +dependencies = [ + "phf 0.14.0", + "phf_codegen 0.14.0", + "string_cache 0.11.0", + "string_cache_codegen 0.11.2", ] [[package]] @@ -5333,9 +5514,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49d0e65abc00c142e8f9428da991da9f1a250c39be97459901eb12b9b49f62a" +checksum = "293198dcebfb821155b5092ab94b5a82ff180eddd7241df3bd6e66a4ffd1a585" dependencies = [ "rustls-pki-types", ] @@ -5773,9 +5954,9 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" dependencies = [ "memchr", ] @@ -5804,16 +5985,16 @@ checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" [[package]] name = "wry" -version = "0.57.0" +version = "0.57.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a819957a01b3119af85e638a38d242af76dbc87d130dca67bfd0441072e21ff0" +checksum = "2c7bdc0b007462dd8a6cdb598e131e6899efa7eec16afdab4ee94b33f344c705" dependencies = [ - "base64 0.22.1", + "base64 0.23.1", "block2", "cookie", "crossbeam-channel", "dirs", - "dom_query", + "dom_query 0.30.0", "dpi", "dunce", "gdkx11", @@ -5829,7 +6010,6 @@ dependencies = [ "objc2-foundation", "objc2-ui-kit", "objc2-web-kit", - "once_cell", "percent-encoding", "raw-window-handle", "sha2 0.10.9", @@ -5869,9 +6049,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -5886,7 +6066,7 @@ checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "synstructure", ] @@ -5919,12 +6099,39 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 1.0.4", - "zbus_macros", + "winnow 1.0.5", + "zbus_macros 5.19.0", "zbus_names", "zvariant", ] +[[package]] +name = "zbus" +version = "6.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a7f9f5dd97fa527c1202ba1cb35d48e07f77d4de8542317c854f7aef22b0668" +dependencies = [ + "async-trait", + "bitflags 2.13.2", + "endi", + "futures-core", + "hex", + "libc", + "ordered-stream", + "rustix", + "serde", + "serde_repr", + "socket2", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow 1.0.5", + "zbus_macros 6.5.0", + "zbus_utils", + "zcheapstr", + "zruntime", +] + [[package]] name = "zbus_macros" version = "5.19.0" @@ -5934,50 +6141,55 @@ dependencies = [ "proc-macro-crate 3.5.0", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "zbus_names", "zvariant", "zvariant_utils", ] [[package]] -name = "zbus_names" -version = "4.3.4" +name = "zbus_macros" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" +checksum = "2f5aa7f2c4ea81b7ccfb26bafefdb4d1a44dd9d4f82c8426173a3727311743e4" dependencies = [ - "serde", - "winnow 1.0.4", - "zvariant", + "proc-macro2", + "quote", + "syn 3.0.10", + "zbus_utils", ] [[package]] -name = "zcheapstr" -version = "1.1.0" +name = "zbus_names" +version = "4.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1afec51604565183aeb5c54c20aeab286120d4e4460f7f76e3e8bb8c0d99473" +checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd" dependencies = [ "serde", + "winnow 1.0.5", + "zvariant", ] [[package]] -name = "zerocopy" -version = "0.8.63" +name = "zbus_utils" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" +checksum = "af55e52da295311b368c45bcae221f020e28e97a2420360170ce389218e76ec7" dependencies = [ - "zerocopy-derive", + "proc-macro2", + "quote", + "serde", + "syn 3.0.10", + "winnow 1.0.5", ] [[package]] -name = "zerocopy-derive" -version = "0.8.63" +name = "zcheapstr" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" +checksum = "2da34e7164b75d803c3197b86e6cf61b874106fbd472c5082575a8bc5fbd0907" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", + "serde", ] [[package]] @@ -5997,15 +6209,29 @@ checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "synstructure", ] [[package]] name = "zeroize" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" +checksum = "85ccff8a4805aba1eaa4cd4afcd49f7557dd2cf5fd79ffc37f8959466effc5aa" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] name = "zerotrie" @@ -6020,9 +6246,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" dependencies = [ "yoke", "zerofrom", @@ -6031,37 +6257,40 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.6" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] name = "zip" -version = "9.1.3" +version = "9.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1156b39d142a34b999c2310a50455e0cb3760bf7efad0122f796d813bee26ccb" +checksum = "2d8dbe089cf6b0448b78f5fc50139ab5aaa40d08ac07cdc1baf2c13add35fcce" dependencies = [ + "constant_time_eq", "crc32fast", "flate2", "getrandom 0.4.3", "indexmap 2.14.2", + "libc", "memchr", "nix", "typed-path", "windows-sys 0.61.2", + "zeroize", "zopfli", ] [[package]] name = "zlib-rs" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" +checksum = "aa76918995d776d9dd34d371030be228d021137449771493d56e29f77e4148ac" [[package]] name = "zmij" @@ -6081,16 +6310,29 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "zruntime" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac67096b97c00742108c4674db6bb6178adb78c4b66a506b0e4a7a9593aa5d9e" +dependencies = [ + "futures-core", + "futures-io", + "rustix", + "socket2", + "windows-sys 0.61.2", +] + [[package]] name = "zvariant" -version = "5.15.0" +version = "5.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1d34c27cc6cdd1f458427519dd6b8612f7b7e3f7b9a0b2355d041dda9869147" +checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7" dependencies = [ "endi", "enumflags2", "serde", - "winnow 1.0.4", + "winnow 1.0.5", "zcheapstr", "zvariant_derive", "zvariant_utils", @@ -6098,14 +6340,14 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "5.15.0" +version = "5.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864155e69b4352db0c7f374917bf45d1e0c8d17659c8b3dbf9795f3673f8c497" +checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d" dependencies = [ "proc-macro-crate 3.5.0", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "zvariant_utils", ] @@ -6118,6 +6360,6 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 3.0.9", - "winnow 1.0.4", + "syn 3.0.10", + "winnow 1.0.5", ] diff --git a/Cargo.toml b/Cargo.toml index 50abea1..f3d3b82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ tokio = { version = "1", features = ["rt-multi-thread", "macros", "process", "ti tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } clap = { version = "4", features = ["derive"] } -chrono = { version = "0.4", features = ["serde"] } +jiff = { version = "1", default-features = false, features = ["std", "serde"] } sha2 = "0.11" hex = "0.4" directories = "6" diff --git a/apps/gui/package-lock.json b/apps/gui/package-lock.json index 16a7d83..80fa22c 100644 --- a/apps/gui/package-lock.json +++ b/apps/gui/package-lock.json @@ -37,14 +37,14 @@ } }, "node_modules/@asamuzakjp/css-color": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-7.1.5.tgz", - "integrity": "sha512-jCpAvj8apa7SKHZYogk0rbXB3Kb0hLFrpkWF+Ap+vBA5rirItnpv9NKyAyEuDuFizvl0qwnj6JWR70RGJ0rOlw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-7.2.0.tgz", + "integrity": "sha512-+JNLVlzePs1XiBT5s9aVkEjOePRoB//tk3bc69BGdzQCz7EICVSQuVPZu6tjc7vAJxBx5fama67LbOltwnXzPQ==", "dev": true, "license": "MIT", "dependencies": { "@csstools/css-calc": "^3.4.3", - "@csstools/css-color-parser": "^4.2.6", + "@csstools/css-color-parser": "^4.2.7", "@csstools/css-parser-algorithms": "^4.0.2", "@csstools/css-tokenizer": "^4.0.2", "lru-cache": "^11.5.3" @@ -54,9 +54,9 @@ } }, "node_modules/@asamuzakjp/dom-selector": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-10.0.3.tgz", - "integrity": "sha512-3+777rEPsOOjoy5/sRmIzHnoRDaLpm3XWY2dmWn/N7f/XwDG0bcpnFaKL3X9FYJUbNwLmpcJC1bUYexJRxsFlw==", + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-10.0.7.tgz", + "integrity": "sha512-fWUO6pa4z2WBAWbcHsfWIT7SVqjzxi/kqd0M92naZNEcgKO7RQ57IuMTesH5+3bnhO+b41nT6qGYTB8Di4JRUw==", "dev": true, "license": "MIT", "dependencies": { @@ -95,9 +95,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.29.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.10.tgz", - "integrity": "sha512-NpugTzbKgGrNe45Ui32cN8vCFFMxVtP/9rtfwv0nP5FRDAjvYBxJcLVpYA9mr1jxP6cnIT7x9LUzuDTbWYYNRA==", + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.15.tgz", + "integrity": "sha512-304gsbbGVmQc+cNGHzwHBlqepYdWLKj3VXCQBGt/EGcV7PUPfKI7kAUNW1FZEOCwlQiLvQjg1JEaAlRQ616h+Q==", "dev": true, "license": "MIT", "engines": { @@ -105,9 +105,9 @@ } }, "node_modules/@bramus/specificity": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.3.tgz", - "integrity": "sha512-0GEz8qJWokkUVYQYRukmkSHIFNoBH8QTreeHrAFbvz1XFYc3Y+puhMs8PQ5x8GNugiC2l5jvDBXKLbBIByeSBw==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.4.tgz", + "integrity": "sha512-TRvTbeibL1ORTXe5NbH+9XUZdbjns55AmFfg8BroI1Ge13CqNF58Txg3Zd/+gjUCSh0ROHqJ1qJfnoX2MAxUZg==", "dev": true, "license": "MIT", "dependencies": { @@ -118,9 +118,9 @@ } }, "node_modules/@csstools/color-helpers": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.2.tgz", - "integrity": "sha512-grhRy3OKmniaAEKXMjua5z/EODX0MSqBGjunw8+j/3HQjOnahs2AGhvEOIYVUWcU6ScApbhLhVrQTX8XqrMrow==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.3.tgz", + "integrity": "sha512-c6CpX5G1pvuOKTXiRFJ54Lzc8zQrZ3qUjp44QC5DJNt1OmA1vmfUxOMCcKdDqsvffVDG0/MHnY63J+Mn0nmdUg==", "dev": true, "funding": [ { @@ -138,9 +138,9 @@ } }, "node_modules/@csstools/css-calc": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.4.3.tgz", - "integrity": "sha512-iex20d8CHVkyvg6B7UKV7uHnI2Bqo9g+EFfT9E0y+GvTvhZ/DwONJ+9aKb1dlqm0ZiGsL5RXjp0fCoJYnkeDjA==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.4.4.tgz", + "integrity": "sha512-Jwo1Z8DUsZ8xVOLBdLMfhjJFvWD6pqaUTlBNQZ+qIB2i9g7yG8kd/UBJj2c9J9Twr+u87cjy9BjkmfvMbyOk3Q==", "dev": true, "funding": [ { @@ -157,14 +157,14 @@ "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^4.0.2", - "@csstools/css-tokenizer": "^4.0.2" + "@csstools/css-parser-algorithms": "^4.0.3", + "@csstools/css-tokenizer": "^4.0.3" } }, "node_modules/@csstools/css-color-parser": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.2.6.tgz", - "integrity": "sha512-iiPQ3iRWwnJkeEn6RIu6SJPr7hYrLz6XZ9s/QZl+2/LI5KQVjpl2fdmDSZKuD4xP6GMmMPgHFFXg6k1Wkz0Trg==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.2.8.tgz", + "integrity": "sha512-JLsKBee9dmnA3L+H+vYK4lQ6n5CoY3yEnh33zdlMutRfrTxtqt+hFeoZ1maHRt5vLw67huDLpOkDb3rl9A51MQ==", "dev": true, "funding": [ { @@ -178,21 +178,21 @@ ], "license": "MIT", "dependencies": { - "@csstools/color-helpers": "^6.1.2", - "@csstools/css-calc": "^3.4.3" + "@csstools/color-helpers": "^6.1.3", + "@csstools/css-calc": "^3.4.4" }, "engines": { "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^4.0.2", - "@csstools/css-tokenizer": "^4.0.2" + "@csstools/css-parser-algorithms": "^4.0.3", + "@csstools/css-tokenizer": "^4.0.3" } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.2.tgz", - "integrity": "sha512-40cSKyMvK+tq4qz6Awrlye2WGuOKt3FwPgtGg6KTfbHOWNw+Rk1rzbAtZnZ6IBhsY491HLRnDXwoyBAijmmILA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.3.tgz", + "integrity": "sha512-EpCfUDaJtwohPHC7egoXxPGT/R1/WyyAhw87MKB/7BPPZvZU+IcEqo4er5FpLnby2Gvwt9Lpxy+WNEDyFjoXtA==", "dev": true, "funding": [ { @@ -209,13 +209,13 @@ "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-tokenizer": "^4.0.2" + "@csstools/css-tokenizer": "^4.0.3" } }, "node_modules/@csstools/css-syntax-patches-for-csstree": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.15.tgz", - "integrity": "sha512-J0u7HkVl2nzSlhsiTOp4AmwcUQ3D+mGEEKfBy/7To5/y7F2OHwyLrXfrhR0SMgr4p5Lo+eaMVSeai24zUcBIxA==", + "version": "1.1.17", + "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.17.tgz", + "integrity": "sha512-IPx9W33+t0Yt5TVb+Y7oICrThOIry0TY6GuXfSHOatxA0uiHqbzi98Gai905lpBAX1m/LH7iI96e9jcI7Dkvxw==", "dev": true, "funding": [ { @@ -238,9 +238,9 @@ } }, "node_modules/@csstools/css-tokenizer": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.2.tgz", - "integrity": "sha512-OoKoR0f76dCY666JlcbhmVTs2drYj1GUXZTYTcbUgJjh9Nv41aFfZ21bPQTERm5+L5cBDo466NltB2lplS5GBw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.3.tgz", + "integrity": "sha512-gdkFe/Z4KU1q8Y5S3GYScXGcOnO56dgWwIs5+97Ij1VIKISItOIUlCXUq4VLbdnRclF+SSQ49sLsn3KeV111AA==", "dev": true, "funding": [ { @@ -257,6 +257,37 @@ "node": ">=20.19.0" } }, + "node_modules/@emnapi/core": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-beta.2.tgz", + "integrity": "sha512-MzCVoWtcg4Pm2B3je5mMvYMvj3MmBKw+fU7vbsJc9/iT8ip6/eYIHo/Dsm/mr+wsHB6SEyJDuxB09Yy6r/8+4A==", + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "2.2.0", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-beta.2.tgz", + "integrity": "sha512-JcrSPzPvZuNZvJqPTF9Fw25LbOJ8avzFVlaf2grmH4Cku0oGP47tRgqPZadcfj3YoZMHkFVnCYFbQM8I+i5QEw==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.2.0.tgz", + "integrity": "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@exodus/bytes": { "version": "1.16.0", "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.16.0.tgz", @@ -323,9 +354,9 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", + "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", "license": "MIT", "engines": { "node": ">=6.0.0" @@ -347,19 +378,40 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.6.tgz", + "integrity": "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw==", + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || 2.0.0-beta.2", + "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" + } + }, "node_modules/@oxc-project/types": { - "version": "0.154.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.154.0.tgz", - "integrity": "sha512-KYOUGQFlLWR+s4QMV2Q9ko38TZm7EdO87Qm7rvZLqk/webse/cDjtyxKhg/47l0byCbs/k46LT8qc4PKjAikzA==", + "version": "0.156.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", + "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/oxc-project" } }, "node_modules/@oxlint/binding-android-arm-eabi": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.90.0.tgz", - "integrity": "sha512-sgfalb1HuxYjiAa4wESZ626z1FGusqNcXYHyB5oIOEprS2sbPg0UYEfo83uF1GNG70DIfZxHkXuE6KFrlSdn8Q==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.95.0.tgz", + "integrity": "sha512-hJna6w3COWJjfMPxomjZL82klTdrITm56PEpCsfO/xMkzQw/fNtJWauQ/YEwQqVttj0L5vDIa8rCcuhfAE3L4w==", "cpu": [ "arm" ], @@ -374,9 +426,9 @@ } }, "node_modules/@oxlint/binding-android-arm64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.90.0.tgz", - "integrity": "sha512-RcKhz1ETMq+fazE9TKS2+5NIRGwigm/nW8egqF0LI+A8Yw2iW5r0E/C3XAPRiwIm/vcPiutIRIa6IQCIKhZsTQ==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.95.0.tgz", + "integrity": "sha512-uAIGZQ9uJVUeogeWOSboI3F7twOuM4mNuZcHXD9+LdYLcWp7J6kbtRUXJ6GVqcs5E0Cjb4emmSBK9FNrkGuhqQ==", "cpu": [ "arm64" ], @@ -391,9 +443,9 @@ } }, "node_modules/@oxlint/binding-darwin-arm64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.90.0.tgz", - "integrity": "sha512-PSrxMvP6mx+p1karZcUxLdy9lpaP+JWQPti4al9FgTaPhxE+pT/BjhGExloVVSWgZgIfOlLOjVyyq8BXlodhLQ==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.95.0.tgz", + "integrity": "sha512-Ogh1vfHO5vshKRop/He46r+WqC5BTqonYwhB4fp9e2gvOFvg1Xi6XsHTuM/lBSH85ZcaG+DS99EMAy9GcwDong==", "cpu": [ "arm64" ], @@ -408,9 +460,9 @@ } }, "node_modules/@oxlint/binding-darwin-x64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.90.0.tgz", - "integrity": "sha512-OLbU9qsrV2Q8QxT2OEzOPdO8zCCpyI8qB+hDI8yr6RsYELtkf0FAZhJdfjM/RnLHKzt44HWwAPnk92vBtKofvw==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.95.0.tgz", + "integrity": "sha512-kTrE1xfpQUBMMS50Ws6KY92N8OsJ8LE6JqxKqkHEY3KdsmguQ6kKVGSjzyt1HLwsSi0fQCvNRog8YRBBovD1AA==", "cpu": [ "x64" ], @@ -425,9 +477,9 @@ } }, "node_modules/@oxlint/binding-freebsd-x64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.90.0.tgz", - "integrity": "sha512-fBA4pWyVDARmNucQqpyFuPC49xYf1r+sX7dxPL5fNPQrSMLum39Sn56tZ9JPleWC7FzLPwSQ7plYYfirYBHF8A==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.95.0.tgz", + "integrity": "sha512-ho7E1VCInK0VnpneRaI1BEpe1ceJE8VjxP2O9THWdReV6bth1Q4+80kYVGGK47mHRyZ2NGztQZ2dWRo6j1lavA==", "cpu": [ "x64" ], @@ -442,9 +494,9 @@ } }, "node_modules/@oxlint/binding-linux-arm-gnueabihf": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.90.0.tgz", - "integrity": "sha512-zhxH78eP2nR6/pGdhBc7MIfjhhcgATeu8fkmkFJbuzfk6Cj0FzBxyEhL85yDqrCybjx+G2YDzZGsxIO9kvO4Iw==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.95.0.tgz", + "integrity": "sha512-94afnouMHcnHr/OtRh07gG5LehC9M0GjiSoik3xxTtrmq6cWxXOTAhYlBtxa67u/GlycbnHlDoGJfYlTshcr/w==", "cpu": [ "arm" ], @@ -459,9 +511,9 @@ } }, "node_modules/@oxlint/binding-linux-arm-musleabihf": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.90.0.tgz", - "integrity": "sha512-MvYmpHyJqUJjEvkZbJHdwfdL45cGn8EVBkYmoXFiaYFW9suoD3dbJl5mBdpy0DVgdjlyddmldbRtk3cCgETadQ==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.95.0.tgz", + "integrity": "sha512-LEeclqV1/fafxPgJWN21Bri6HBBBZpEFluq/ZH7Avvu9HjJh/XOn6WwogJqX9X7pG2aITZ2nRH39+sUKEQt2WA==", "cpu": [ "arm" ], @@ -476,9 +528,9 @@ } }, "node_modules/@oxlint/binding-linux-arm64-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.90.0.tgz", - "integrity": "sha512-L13Sy+Kg0nZhwTsToniqjUFPA2TuM6962qCZ5Wp5KeB517Tw7ApdLTTtlb+bF86fcZZa2EtvCVvAJxk4Dya/MQ==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.95.0.tgz", + "integrity": "sha512-EpXpEQKmgtkvc6RyU84LM1e3CrVDWQkgghVzf1hMGgwjBzgKAJ/QntHgnzmu5cNeLBfa7GPCY+gGXxEll8Adcg==", "cpu": [ "arm64" ], @@ -496,9 +548,9 @@ } }, "node_modules/@oxlint/binding-linux-arm64-musl": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.90.0.tgz", - "integrity": "sha512-wFDdZWGpzIPFdJFjSLWnKB0TGzFriTKUIrl04iMqMyM9BBIJTuerfCHYa0WpDSjr5x3lcW/CHLyacSt886WpGg==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.95.0.tgz", + "integrity": "sha512-+96Md8c2BAgFp8nWHrUrpqba87DoU+HVJYIun6qA+QKFoeNd3xAWq1JYE6da4nVli9GgwRpfncfRePcgmQQaIQ==", "cpu": [ "arm64" ], @@ -516,9 +568,9 @@ } }, "node_modules/@oxlint/binding-linux-ppc64-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.90.0.tgz", - "integrity": "sha512-FRywfn+MoKn8xpBSzgNwNVliSKRI2QXkxi/iF7o6FEQs8Bh8z2RpVTaFAcO3pchXjvB2eGNFIoLLQABIQ+u7VA==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.95.0.tgz", + "integrity": "sha512-6yG99vsXct3Uv536w6Z1s03w2makRKnE0q3eJSmf+W/IwPmO56QLk8XUA6ebu/R5peCbJ67HmcWqACH+kg/6Bg==", "cpu": [ "ppc64" ], @@ -536,9 +588,9 @@ } }, "node_modules/@oxlint/binding-linux-riscv64-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.90.0.tgz", - "integrity": "sha512-IS2PaUgpc/qeLADTyhUNmdx3x4ijs9pjJdPKBYHaT+mAE7k3FsjnHPTjhpsak1b++h6CIPhv6WX9Z+y7Pw0voQ==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.95.0.tgz", + "integrity": "sha512-Eir0Z4ldh55AsQUqVDlLF4Pw3lSFXIdAl8ZNgU8tp/gTwT9JVCzWY0o3+ys9pCcpTN0vCqBwwuQfAUxzbIgvcQ==", "cpu": [ "riscv64" ], @@ -556,9 +608,9 @@ } }, "node_modules/@oxlint/binding-linux-riscv64-musl": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.90.0.tgz", - "integrity": "sha512-s7JFKRkGS8O7i2ZVODfuO++NC7sH6HDqpMn8lYxw91w0SXJOxnAVjQ8utvmDwLMMT0jaSkuOKuUYJDGDtu4sHQ==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.95.0.tgz", + "integrity": "sha512-ceRx+K2WJ7C3tIv+XjZS28oAoZ7DY29ZcWChPdXG5M100phI72FRDYwGRlWZEeDfmkROnarLTMKnnrQAtsC42Q==", "cpu": [ "riscv64" ], @@ -576,9 +628,9 @@ } }, "node_modules/@oxlint/binding-linux-s390x-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.90.0.tgz", - "integrity": "sha512-b0GxrOQr5VONCkd7KLSqmP6b6nqZuTpuS8QPQHzltmqdXP5bY0Jl0CZ0QmlCTrS3ExaLYbioFYOARzNbYvcApQ==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.95.0.tgz", + "integrity": "sha512-WbD3sM08ZDk2QE6060wK/omihQKbRm+LVzKIg4W5zNTbEhYJChciqX49UZuqW59RGF+wBUxzAup7egUIESTjUA==", "cpu": [ "s390x" ], @@ -596,9 +648,9 @@ } }, "node_modules/@oxlint/binding-linux-x64-gnu": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.90.0.tgz", - "integrity": "sha512-iaJeShJtgUp8rZbt9YUdTAGOpmX5KogCLba17Jp1tWdJ3F4M3D2g2TKUyI1FMTHxKH9NNHuQcuC2kZRg6IV7yQ==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.95.0.tgz", + "integrity": "sha512-F4ST2ZkFIiLL9OKyRCyC0KQQpwM5WIv0GTcMiZuYVa6xSRJHR05iVRqst+arOVudEPkhP47EnbuoC9UfVCYDyg==", "cpu": [ "x64" ], @@ -616,9 +668,9 @@ } }, "node_modules/@oxlint/binding-linux-x64-musl": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.90.0.tgz", - "integrity": "sha512-/aZoXnL5WBLCXuzfHqvEFXcm4iwYmr/cYByHDTXzLFzJdE5DC7bm6phpWqHv6BeqpVgY9IpBAxGDv2WEkl5JCg==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.95.0.tgz", + "integrity": "sha512-hEpYDZatpuxLrWlTlkwhHZ1e8QkL02aFS55BPQX1XA9iOd+yUEADGFF1iY6z+xkw6RkpzXFrtnDFe4/JNOLSRA==", "cpu": [ "x64" ], @@ -636,9 +688,9 @@ } }, "node_modules/@oxlint/binding-openharmony-arm64": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.90.0.tgz", - "integrity": "sha512-SMhk7ozwoxYDKfYqGZCQEfULOKDneF9uhaoIf2neoDLWvNtjY9yVeL7YHmE5L9WdKvMpWNwwZxhenxBu6AgfOg==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.95.0.tgz", + "integrity": "sha512-+JwIH9/uLgQXfxBvOAKzvp616m5i0fBR5ELEBHm5D+++fStBZ+74T7YW4xBpX13zNU2blr52Swoe3GTF1JyqRg==", "cpu": [ "arm64" ], @@ -653,9 +705,9 @@ } }, "node_modules/@oxlint/binding-win32-arm64-msvc": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.90.0.tgz", - "integrity": "sha512-KBvR3A9fO7fCi2vCP8ifWvlia7tGEQV9NaYh+IGwa/7Groy48Mt/UaYqMK9/zOtAWl20BUCf6RPqzJ32fRw33Q==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.95.0.tgz", + "integrity": "sha512-pzJgcp3WkOSchukg5y5pn5mVIQ6P83RDI79YJ9gQZKed1pOgjhrmlc5AMizjuq6/P8VifhxzBsMqYI6LLjO2TA==", "cpu": [ "arm64" ], @@ -670,9 +722,9 @@ } }, "node_modules/@oxlint/binding-win32-ia32-msvc": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.90.0.tgz", - "integrity": "sha512-+x42rDHQGbTCuT3EzpWAzhP3NoVPE/cJsG4gnrakOSg0olV+GCdMpPU23Nvrl3zZMnXxFZdTtDv4D3SuaA5ZeQ==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.95.0.tgz", + "integrity": "sha512-54MeQvLRXkJqF1nEFs7wb73SrnurZJQy9fVK4NdEwumNKVwyUUxpGHhvfDMIY2NqJZS7kz0pY9uVty5664Gt1Q==", "cpu": [ "ia32" ], @@ -687,9 +739,9 @@ } }, "node_modules/@oxlint/binding-win32-x64-msvc": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.90.0.tgz", - "integrity": "sha512-30JiaFEBUB9peEOcvVM8ggo88SoN/IdSr9DW505JdBji/R6dM66gKEiG65hw6qcaF2f4mO0cEJ+RwRZprmun9g==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.95.0.tgz", + "integrity": "sha512-I/Fn+Fed1qzb1k2uRjMe2VRtRN1+ZObyU+E76B6v/Ul3Z6JdeAW5zBHSe0n5d8a0ZyU4iorzVy0Rw9LYgo3MSQ==", "cpu": [ "x64" ], @@ -704,9 +756,9 @@ } }, "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.14.tgz", - "integrity": "sha512-aWR+XKH9+rW7m5fWq/5360J3mHycrx/o6xZM2DQFdJnTMdyP7/WzxPjhtLbVWdKo2y612/4U1bWqb3HQhiF7vg==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.19.tgz", + "integrity": "sha512-e+Ebe0WT+9tbXmNKPIiC8YrWAHYwug3m6i4p3rZGGulfZri1jtI4HslT+OZnFf/OIHowWF71DTlHwXBP2SiA7A==", "cpu": [ "arm" ], @@ -720,9 +772,9 @@ } }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.14.tgz", - "integrity": "sha512-QiVxHofl6A8lQU7WAtOUY4QMVZXohxwz7WJJoeh8NBEUyKfIkMRKhYyq8az/1RypNiIXzNTtiS6KwHz0erxYRQ==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.19.tgz", + "integrity": "sha512-hOombrTJ+szt2ciEzS7oCA78lMPBgF5UMQWCJIyNfnrI7GLl8HYoFqCnpL2gcPOaXMqryGCU5ExdQKyDDcC+yA==", "cpu": [ "arm64" ], @@ -736,9 +788,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.14.tgz", - "integrity": "sha512-lTQOzHuBIooh3jIr5XINQkjPGEuGy+Dsy0meXDr6Sjty0b99kYgGh4uBC/8mJX1T0kC8d6S0aPP1Y+bHkh6aBw==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.19.tgz", + "integrity": "sha512-XoMA2pwCKGTQzUjPgtRwkedH4WmXhdIPKT6l6oOxd1PUbNodGI6DcBekgN7EC//+x3pfBYX/qL1gNmZAqivw5g==", "cpu": [ "arm64" ], @@ -752,9 +804,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.14.tgz", - "integrity": "sha512-hyMKEGatjmBYCs/Q4sbIcL/GqpFEqsX3wc+HYVQ/85A4rxc1o7rPm4DUI4GV4k/h0ITddwFSGpqQunI14GXjTA==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.19.tgz", + "integrity": "sha512-zo8EsSSwMZCY/e+fRnGaX02YGgvJD0yvhNi/9hpGPA2MJ9ZF8dPCw75UGfpI6OpQ/myR/dIYmogRvqiZD0TrXg==", "cpu": [ "x64" ], @@ -768,9 +820,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.14.tgz", - "integrity": "sha512-u371GbXoVXrEgP20PwzoGNOdAOqAMhzo19JzzY+V4YmmnC+DTOoqdbMu+O+54emM59Mik/UdrtWgcuEDKWRPKA==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.19.tgz", + "integrity": "sha512-O8ISAOfI1nj7AuBPd30FSF47z7f7lzlk5poQVGgiikvQuGEBFYvW8ki+UEnT+YJPnNGjQzn304klt4O9FUE7mA==", "cpu": [ "x64" ], @@ -784,9 +836,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.14.tgz", - "integrity": "sha512-BqwKsdZQf6EqVWr8fv2MrDYzAvOZ7+NYFSJESRGs87fkseEhs0TU9TXgRJTkZoRRkxTizyEg1LKUXfU3/78uqg==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.19.tgz", + "integrity": "sha512-/lYCba5NO0yq4S0jGMH8QTBtkvQxoXjoQWzF5BcWp9MjB9jxVRD1GQDNofkVjcOj30DWyhLIN/4Oe60JKzaONw==", "cpu": [ "arm" ], @@ -800,9 +852,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.14.tgz", - "integrity": "sha512-SD9kY8M009x/7s57Z1dgUVlP5+uYBgKQK0Tkr1WIWngrtUJmRCW1RJFMY7QDla2khXhmg2i5Io7MUjcmZNZ/KQ==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.19.tgz", + "integrity": "sha512-pm/apFMBnSbFb3O6nG5pHO1iqHhZrjGDFEjSm+ot9J17XXPvH9L90y5h+jgfHCE+Qdlsvy8qKEcU4VKxgjD+vA==", "cpu": [ "arm64" ], @@ -819,9 +871,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.14.tgz", - "integrity": "sha512-BJ2CL19M6uuWesMgnqJzgxoI+N+eV7b0A9O9vLV42y+gitC41fNa8KElau1tHVzuLWX5GzEuxMPhAO0tQXQMkg==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.19.tgz", + "integrity": "sha512-K1SmQp3FFichn8oqrNIwvFoZ5wcvjC7goBzpaMNvLf9FZc+QB/QvLmnpJZgAAGHiD980tP8FZZnXk2K94rvlxg==", "cpu": [ "arm64" ], @@ -838,9 +890,9 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.14.tgz", - "integrity": "sha512-4+Kl8daPV8NDHaD7mfCcc1pRM+Qg7ab8DyMm5FG5WoZgv4h2i3KFN1CybYBNbQqmuYm7ftJLvmMI1eHYJ22S/Q==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.19.tgz", + "integrity": "sha512-I0xwD57jP/3A7+5UPZin2w8Y7XHEmEM5zqpYZOcQ45MlNW6tUJUziymV3yRr7rL4vwyfEcRsRksC4a7Kc08p5Q==", "cpu": [ "ppc64" ], @@ -857,9 +909,9 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.14.tgz", - "integrity": "sha512-V/h8ePq1fKDrmtFMz6xcCN3DKvuvMRrwwD1q0PkBeeo4DpK64biaKvqWGVxqCeYKqeRk7gE7/iKPxLCn08O97A==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.19.tgz", + "integrity": "sha512-BrtEHT24SNXj9HiXqy+s/kXiSiQGt6EKCPUlRirAoIioVxKGnbXBUEkbZASAei7iZJB0/Ynm+0JP00Ipx7AnSw==", "cpu": [ "s390x" ], @@ -876,9 +928,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.14.tgz", - "integrity": "sha512-WxalXzgrLVpKC93xfpaJ3gCXUWzeCr+FRCbDVD2mUAy4L6Vo3lNVz0epUEUpxPWJkLNYUwM4OSIikv36OJ9mLg==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.19.tgz", + "integrity": "sha512-rm75/9DkHKeU2WnA8w4X94WGYgLlDCFCfkQC+4bguVJmC/jvDRv2B+2wLOYhyE0fVuv7//Ckk39OoOufyCu76Q==", "cpu": [ "x64" ], @@ -895,9 +947,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.14.tgz", - "integrity": "sha512-3G3tnAmTpdk9jO3GQtyHXqeFD2SlecfTws/Y3M2mmj9nMBwwuLT4kur8sZKeu7ENUHSpVO3cIsm5A52LEWWwlg==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.19.tgz", + "integrity": "sha512-irh/4+iYFM4GAzpluDErgjz89bj6NDtqqMAG/6O1LG38Ed3NpyebzCpcVNkFW8uhy+/3/BocUvnXDR33CXWe9A==", "cpu": [ "x64" ], @@ -914,9 +966,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.14.tgz", - "integrity": "sha512-qyr5XiNGxm2ytx17vvtcJ9nXn6v1gENETi503bJx3OGwZ1tSonj7BosxbMa/xeAfSl5iS9X6KjEWYXLu6v1L7Q==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.19.tgz", + "integrity": "sha512-+KWTWNoPt+CfSq94CiceWu3yPE+QzkaG+phPyz9G60tmZLwfQkcA4AeksafzvJAw4pvg1mcd5a1TkUqVv0s4JA==", "cpu": [ "arm64" ], @@ -929,10 +981,28 @@ "node": "^20.19.0 || >=22.12.0" } }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.2.19.tgz", + "integrity": "sha512-7EH+skOsl5qpWnK0vzamgJFhOv1cwxQpsxm8tI883K9fur5c27p8q87fzEO6BbBPabA2/+s/zR63/pLc137iOg==", + "cpu": [ + "wasm32" + ], + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "2.0.0-beta.2", + "@emnapi/runtime": "2.0.0-beta.2", + "@napi-rs/wasm-runtime": "1.2.6" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + } + }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.14.tgz", - "integrity": "sha512-oA4o5o0S2yB199YyYXDzKUv1Z56Rc+mgOjwm7Z/vJ9Z8igiDPYvoOuDyo6g7AK/ZaF09nPhDKVnGBcYHO11GXA==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.19.tgz", + "integrity": "sha512-3Q1Yg1Q7tEvBWoZf5rFvG/GKZQPgwfru+p4wBajDfJFBs0SHCpL++dfTjW9gyAKd1T7ZpIYvdaUax7Pa/IhFVQ==", "cpu": [ "arm64" ], @@ -946,9 +1016,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.14.tgz", - "integrity": "sha512-9mE94bf2GZUaR/fUSXCMpBoWkctu421Mi0ORpm4zqfbkjKep7RxzPFa5etcGs5h+2KApoWBOA/hAJa/7saGgEQ==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.19.tgz", + "integrity": "sha512-y/sqRRc6d7hECzOFc5n3LSeqctmIp9mMjY1Kq4s14uLPd/LZ4z7i1zrW6fMtp2mPeuQIC4e6ULMcwQzMomqQag==", "cpu": [ "x64" ], @@ -962,314 +1032,53 @@ } }, "node_modules/@rolldown/pluginutils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz", + "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==", "license": "MIT" }, "node_modules/@tailwindcss/node": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz", - "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.5.tgz", + "integrity": "sha512-yT53FzV4ke0cr/BguDxhWMpm5MJu1O2muzk+tKw6lKHjODAsYArBbWwFbJiaksfzFv1tpkO9QHGzmfs1hJT66g==", "license": "MIT", "dependencies": { "@jridgewell/remapping": "^2.3.5", - "enhanced-resolve": "^5.24.1", + "enhanced-resolve": "^5.24.5", "jiti": "^2.7.0", - "lightningcss": "1.32.0", - "magic-string": "^0.30.21", + "lightningcss": "1.33.0", + "magic-string": "^1.1.0", "source-map-js": "^1.2.1", - "tailwindcss": "4.3.3" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.32.0", - "lightningcss-darwin-arm64": "1.32.0", - "lightningcss-darwin-x64": "1.32.0", - "lightningcss-freebsd-x64": "1.32.0", - "lightningcss-linux-arm-gnueabihf": "1.32.0", - "lightningcss-linux-arm64-gnu": "1.32.0", - "lightningcss-linux-arm64-musl": "1.32.0", - "lightningcss-linux-x64-gnu": "1.32.0", - "lightningcss-linux-x64-musl": "1.32.0", - "lightningcss-win32-arm64-msvc": "1.32.0", - "lightningcss-win32-x64-msvc": "1.32.0" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-android-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", - "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-darwin-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", - "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-darwin-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", - "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-freebsd-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", - "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", - "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", - "cpu": [ - "arm" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", - "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-arm64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", - "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-x64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-linux-x64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", - "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/node/node_modules/lightningcss-win32-x64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", - "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "tailwindcss": "4.3.5" } }, "node_modules/@tailwindcss/oxide": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz", - "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.5.tgz", + "integrity": "sha512-PynqGLZsZvwM9tqD/CUxkOIfyd6K5elZ2MooauzJryP/UqXYgi3yYbtt3N0Xe+MHV/eFKPFQCEfIKAqlAS1CBg==", "license": "MIT", "engines": { "node": ">= 20" }, "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.3.3", - "@tailwindcss/oxide-darwin-arm64": "4.3.3", - "@tailwindcss/oxide-darwin-x64": "4.3.3", - "@tailwindcss/oxide-freebsd-x64": "4.3.3", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", - "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", - "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", - "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", - "@tailwindcss/oxide-linux-x64-musl": "4.3.3", - "@tailwindcss/oxide-wasm32-wasi": "4.3.3", - "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", - "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" + "@tailwindcss/oxide-android-arm64": "4.3.5", + "@tailwindcss/oxide-darwin-arm64": "4.3.5", + "@tailwindcss/oxide-darwin-x64": "4.3.5", + "@tailwindcss/oxide-freebsd-x64": "4.3.5", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.5", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.5", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.5", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.5", + "@tailwindcss/oxide-linux-x64-musl": "4.3.5", + "@tailwindcss/oxide-wasm32-wasi": "4.3.5", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.5", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.5" } }, "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", - "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.5.tgz", + "integrity": "sha512-Se0z5xMqcSQanJD1IYmO0cGpK3iv0fp3ZsIT7xRJZ1Da5PghvNoc46zz4jIQn+aan3dV9T8AermFNN9QPmsh0Q==", "cpu": [ "arm64" ], @@ -1283,9 +1092,9 @@ } }, "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", - "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.5.tgz", + "integrity": "sha512-UPrgTDuUbvmqGMZuCnmI3FKee/tYKzKdp00/kuB4oSGB213VYg8QTdF7lVhnPoBXq/mIfJ+ILoBFqNOboWcMwQ==", "cpu": [ "arm64" ], @@ -1299,9 +1108,9 @@ } }, "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", - "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.5.tgz", + "integrity": "sha512-E+p7HEtjI0b8D7kbbWxH067cGui6d4c79COGko9fAPVE3rwc1E7ld2HFCbaG86AOGWS5VKQYqZOaf38ya4uxTQ==", "cpu": [ "x64" ], @@ -1315,9 +1124,9 @@ } }, "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", - "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.5.tgz", + "integrity": "sha512-yWEWcWyAG7rWOcTpJTjdhQ3pcaFY2h+0bqTRfgU3G2fz87ZU3AKdvdZKhslD+kyHnjBUWKvNdRYwIYC5dI1tIg==", "cpu": [ "x64" ], @@ -1331,9 +1140,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", - "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.5.tgz", + "integrity": "sha512-WmeVjtJhZlr+smpqcdR2kQkkn6arHIJnUIBxTO2EJcTLGY1ecVXNo2hbSn8xc0IH2aEtys936iMWKGyj0GaKnA==", "cpu": [ "arm" ], @@ -1347,9 +1156,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", - "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.5.tgz", + "integrity": "sha512-DTCSyucc6ShMp1QMqV5R94Z7xlgNgUzkGmFF1rL5HH2Qjy4eSmEqy+YLGkqqYvWa4sILtgrBt1JjRKbneQtiFQ==", "cpu": [ "arm64" ], @@ -1366,9 +1175,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", - "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.5.tgz", + "integrity": "sha512-H9lsvO4x9E4nE4Hi8h7NHHw0O/kcVSu+iOyFHNGdYzazGgDjFHZbE6S3hQ8kMcbNXSBlMdNi67LV5EVqtpaJtw==", "cpu": [ "arm64" ], @@ -1385,9 +1194,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", - "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.5.tgz", + "integrity": "sha512-4uxQvtBvPuIdl13WfUBj9xMZHH14PtHZ8OZdtLmdyDtG66sCa1t599NZT+jagkUzRtWhuul1qRZQ1nAJscXN5g==", "cpu": [ "x64" ], @@ -1404,9 +1213,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", - "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.5.tgz", + "integrity": "sha512-0JQAzs7jwbA7O6+z/adU+Jk3AXwsu3npAhtr5escXS7TqEqWcaDV7qHuI+0Vy/KQRuVGnLQREcSJWYauyV3oqg==", "cpu": [ "x64" ], @@ -1423,9 +1232,9 @@ } }, "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", - "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.5.tgz", + "integrity": "sha512-OJhFmlEfdzMr+avACdi40RPtnkW0B6hXyxL/8r+tnEHBWZji36CYRjEXrrvgBmaYsD3oEOBqwYFRKsYvzFe7Bw==", "bundleDependencies": [ "@napi-rs/wasm-runtime", "@emnapi/core", @@ -1434,35 +1243,32 @@ "@emnapi/wasi-threads", "tslib" ], - "cpu": [ - "wasm32" - ], "license": "MIT", "optional": true, "dependencies": { - "@emnapi/core": "^1.11.1", - "@emnapi/runtime": "^1.11.1", - "@emnapi/wasi-threads": "^1.2.2", - "@napi-rs/wasm-runtime": "^1.1.4", - "@tybys/wasm-util": "^0.10.2", + "@emnapi/core": "^1.11.3", + "@emnapi/runtime": "^1.11.3", + "@emnapi/wasi-threads": "^1.2.3", + "@napi-rs/wasm-runtime": "^1.2.2", + "@tybys/wasm-util": "^0.10.3", "tslib": "^2.8.1" }, "engines": { - "node": ">=14.0.0" + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { - "version": "1.11.1", + "version": "1.11.3", "inBundle": true, "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.2.2", + "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { - "version": "1.11.1", + "version": "1.11.3", "inBundle": true, "license": "MIT", "optional": true, @@ -1471,7 +1277,7 @@ } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { - "version": "1.2.2", + "version": "1.2.3", "inBundle": true, "license": "MIT", "optional": true, @@ -1480,24 +1286,27 @@ } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.4", + "version": "1.2.2", "inBundle": true, "license": "MIT", "optional": true, "dependencies": { - "@tybys/wasm-util": "^0.10.1" + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/Brooooooklyn" }, "peerDependencies": { - "@emnapi/core": "^1.7.1", - "@emnapi/runtime": "^1.7.1" + "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3", + "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { - "version": "0.10.2", + "version": "0.10.3", "inBundle": true, "license": "MIT", "optional": true, @@ -1512,9 +1321,9 @@ "optional": true }, "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", - "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.5.tgz", + "integrity": "sha512-9o8jgthi+QE5eandnboiJT64VQfnIArfZzSTdgbhEK5aafdiu2jTW9Honi/mwYHxBZuH1vAC57IFyrh+0iK5Gg==", "cpu": [ "arm64" ], @@ -1528,9 +1337,9 @@ } }, "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", - "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.5.tgz", + "integrity": "sha512-XiKFfIy1RWe7qK4WqByxNW7Oz1/nkOy8o/BWhHminyV1PmpUd8Eedj5v2A8h2kpqeVlz6xRnwk9Fr/ZXNLcZfg==", "cpu": [ "x64" ], @@ -1544,23 +1353,23 @@ } }, "node_modules/@tailwindcss/vite": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz", - "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.5.tgz", + "integrity": "sha512-BCNiY0a1ZjdOHVqw7kyb7U72BwfMF3dfUuN+tQsLWky/J5JOI/r7abibglXfygrZhVO/3u3V+E25kkKTeMkXaQ==", "license": "MIT", "dependencies": { - "@tailwindcss/node": "4.3.3", - "@tailwindcss/oxide": "4.3.3", - "tailwindcss": "4.3.3" + "@tailwindcss/node": "4.3.5", + "@tailwindcss/oxide": "4.3.5", + "tailwindcss": "4.3.5" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "node_modules/@tauri-apps/api": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.12.4.tgz", - "integrity": "sha512-pVmfis+4zT8H0Qhp3xPZx9Ju7kpzvA6rr/PSJPyuwfvucTQ8sVt61NYU9KMkK703UFlYadFmjKA4HhybOtN0gg==", + "version": "2.12.5", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.12.5.tgz", + "integrity": "sha512-G9QIMt5fzED+aS4QhVK3w1HWLKpLIwH/MnpCr9z1ugGEHnS2ORmqrLkc0uALOjRK4qXJy+4Yiw8LDl/KicC1Hg==", "license": "Apache-2.0 OR MIT", "funding": { "type": "opencollective", @@ -1568,9 +1377,9 @@ } }, "node_modules/@tauri-apps/cli": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.12.4.tgz", - "integrity": "sha512-JI9bHfudSRJikGOrjbXEm6RjzzvmKuLc+JixB1NE8hNzQkNlCCIC3pTES3uypkR9lxHrsbxzcnSwhI2IxBQphw==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.12.6.tgz", + "integrity": "sha512-/cOeQgqq8PBDPODOjjT0YHs4qxKCHcQMWMiBm4rLM3JNr9mZE+PHNKOK4zAkhIUtYMNL/0fweW48VNvzD1AbqA==", "dev": true, "license": "Apache-2.0 OR MIT", "bin": { @@ -1584,23 +1393,23 @@ "url": "https://opencollective.com/tauri" }, "optionalDependencies": { - "@tauri-apps/cli-darwin-arm64": "2.12.4", - "@tauri-apps/cli-darwin-x64": "2.12.4", - "@tauri-apps/cli-linux-arm-gnueabihf": "2.12.4", - "@tauri-apps/cli-linux-arm64-gnu": "2.12.4", - "@tauri-apps/cli-linux-arm64-musl": "2.12.4", - "@tauri-apps/cli-linux-riscv64-gnu": "2.12.4", - "@tauri-apps/cli-linux-x64-gnu": "2.12.4", - "@tauri-apps/cli-linux-x64-musl": "2.12.4", - "@tauri-apps/cli-win32-arm64-msvc": "2.12.4", - "@tauri-apps/cli-win32-ia32-msvc": "2.12.4", - "@tauri-apps/cli-win32-x64-msvc": "2.12.4" + "@tauri-apps/cli-darwin-arm64": "2.12.6", + "@tauri-apps/cli-darwin-x64": "2.12.6", + "@tauri-apps/cli-linux-arm-gnueabihf": "2.12.6", + "@tauri-apps/cli-linux-arm64-gnu": "2.12.6", + "@tauri-apps/cli-linux-arm64-musl": "2.12.6", + "@tauri-apps/cli-linux-riscv64-gnu": "2.12.6", + "@tauri-apps/cli-linux-x64-gnu": "2.12.6", + "@tauri-apps/cli-linux-x64-musl": "2.12.6", + "@tauri-apps/cli-win32-arm64-msvc": "2.12.6", + "@tauri-apps/cli-win32-ia32-msvc": "2.12.6", + "@tauri-apps/cli-win32-x64-msvc": "2.12.6" } }, "node_modules/@tauri-apps/cli-darwin-arm64": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.12.4.tgz", - "integrity": "sha512-OxqKSckIkoJ6vX2AjifIJpTasFC0Hbdoo7gEiCmAjauABO3U8m2MRsLWe+QTiBwDx1mIrvgA+rvI7tvDnbnHVg==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.12.6.tgz", + "integrity": "sha512-Uokwk1hFfJoG54+kD8iU0St33jAIkNvojnjEfBZ6UbL5rnM10AiFwUS/2DHTJ9R4/Kba4U44v7djfMuWFTQgeg==", "cpu": [ "arm64" ], @@ -1615,9 +1424,9 @@ } }, "node_modules/@tauri-apps/cli-darwin-x64": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.12.4.tgz", - "integrity": "sha512-fz76/77wMMJOaaUN6n3CybRG0P/MTEjjqYk81mGPyhi9m6Ue5T+LWBnJP/AkPooNatBPI2vtulGqomyMJ44lCQ==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.12.6.tgz", + "integrity": "sha512-WhahqzcyHCpCzh4Taf0ZbBm6nGkvuOSh5ffrgOO7EdYaYe+RBQK8LOlFu+bbjul5v9cdLDi3kco+0+7IlZtTVA==", "cpu": [ "x64" ], @@ -1632,9 +1441,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.12.4.tgz", - "integrity": "sha512-K0w8Bof6Lt8QKLAYhRy0yy36ZH5iA/35VuSOvnxyjvCUZ+A3JKsUTlALviH/sVgAlisaPzzmeJSH8XOn4Q2HBA==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.12.6.tgz", + "integrity": "sha512-GB6weN+iFHxiFZ9SOKW6fINis7gnxohoOldR7sryBe7uaavkFGaMCa0yQs5njeXPWvzlE9WTQ13z8oDjmqK+Ww==", "cpu": [ "arm" ], @@ -1649,9 +1458,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm64-gnu": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.12.4.tgz", - "integrity": "sha512-j5rOnjmRUwWrm1oosf0zBYl4D+fqydgUROFCk0hvKZxvbTT8SOERes0QB7rBV/XWNy+kM6pCKzb3oSm2sRglzg==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.12.6.tgz", + "integrity": "sha512-mdHoUFYKfztUtPKE0C2hhGkEo7j6swXjg+5yRRKSD7A2gLkRPQFIXWD/DAYhiJdeAkyA8MCP6nvvKvg/4YryWQ==", "cpu": [ "arm64" ], @@ -1669,9 +1478,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm64-musl": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.12.4.tgz", - "integrity": "sha512-aOue3Fy6Jb7+oWcfAVUsVHfeTybSCt2CZoU06aO4jv4d2Ks/KnaTPwMAK3CLEduGOvBLY1lbBBrIyomqLLH5Sg==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.12.6.tgz", + "integrity": "sha512-2BxB+9a3JRN0eJ0t0qGe8IKJfgBLOZDE8a499OXH+yg4J9bMpSK1oHXBxnHuSHFWhby4QnQ/t+sBf7tRC0UZeA==", "cpu": [ "arm64" ], @@ -1689,9 +1498,9 @@ } }, "node_modules/@tauri-apps/cli-linux-riscv64-gnu": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.12.4.tgz", - "integrity": "sha512-Fx6GShY/RvST+t6LMlTHAwd66+1tEaAAGrnU7cysVfaiRP1BKng5Vl6rVmO6rSLOA1Sp1dRzNYM4f0OWQGb7qA==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.12.6.tgz", + "integrity": "sha512-sb58RsNHex9QVqHdN1cf9MMlamUWAtk1NzuxTZalUnBUHfblIbe71hfmdI6whDZ84MufgOdeg/bzvhrbZS1r0w==", "cpu": [ "riscv64" ], @@ -1709,9 +1518,9 @@ } }, "node_modules/@tauri-apps/cli-linux-x64-gnu": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.12.4.tgz", - "integrity": "sha512-tNzZSa79Z1nRpHxEpQ38lsAFpKlFlYvoXzjTV+lRRn/zSf3wrdUC3wnLcq2XEadchPu4ttK0zivhYzr+XGD19Q==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.12.6.tgz", + "integrity": "sha512-ZAb4/CHRma3ErjL2RGfHjITTUBIs4zySf0hIli9BddOtEdSx0ze0hEgxl+HfBVc5OEW/QmbiZ2E2+CkkHc8Pcg==", "cpu": [ "x64" ], @@ -1729,9 +1538,9 @@ } }, "node_modules/@tauri-apps/cli-linux-x64-musl": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.12.4.tgz", - "integrity": "sha512-jmZ1pr0xEqUhuEusWtt9Yt+GF6lCnGHUmIL+KIknpbjK/XQ2qkhDBhaxK/JMHM2A8dAacVXCxXJk2EXpwhQUfA==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.12.6.tgz", + "integrity": "sha512-ueSzM2Du6r4i1d/lby9kEvrhPnXw5zM/VYvcW1ldEWSpkUyVohsBXkmD+U7vMskEW5tXeCUenki7nYVxyGBGpQ==", "cpu": [ "x64" ], @@ -1749,9 +1558,9 @@ } }, "node_modules/@tauri-apps/cli-win32-arm64-msvc": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.12.4.tgz", - "integrity": "sha512-fGo8pgEHZxdSYgZ/J98m1usJ7NHKmKbq7k6uT0x1rpOq6Bg2YVzzpaAblWk710f5LHYBJIL5QIFS5IrD+4gmTg==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.12.6.tgz", + "integrity": "sha512-6bmOt2BQSe0Bba+5CJcTKSML7VOYDxyiAKyBrjo86VxMdC1usIQmklu3Xc83s3QoK1rOMwwbANlPF6i5R2mvIg==", "cpu": [ "arm64" ], @@ -1766,9 +1575,9 @@ } }, "node_modules/@tauri-apps/cli-win32-ia32-msvc": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.12.4.tgz", - "integrity": "sha512-ezl8sQIcjYsye3TUnTH5VcWmWzccZASlQm7hlZt0dYyj1XD0qpVW47u2xYVrIKui0F8uQv/7QGZixdWiClBsbg==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.12.6.tgz", + "integrity": "sha512-9q9ZFNuFreBczwyJuhhlrEOBzGClwWUYirQ2GBl66Y6EaNl17IdLH8TRqoY9wYB1LnctNBi+Fa/WMGtFA4BtFQ==", "cpu": [ "ia32" ], @@ -1783,9 +1592,9 @@ } }, "node_modules/@tauri-apps/cli-win32-x64-msvc": { - "version": "2.12.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.12.4.tgz", - "integrity": "sha512-DJhDeCqjLDNMWYFy7ZS8cfeAHX2RK0RbQMLiA3bMVVkXRDJ4NBYiHriGqsUhsr9iG41aTb+dJGkFPmPw1gWwVw==", + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.12.6.tgz", + "integrity": "sha512-ion7Chbj21ROxMRpjQ7G8rz5sIOaI7IoBQum1oq5sl1V5zGWyc/oYnCrQhVqO2TxK/lBDWxt648BzLi02SY3Xg==", "cpu": [ "x64" ], @@ -1800,27 +1609,27 @@ } }, "node_modules/@tauri-apps/plugin-dialog": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.8.3.tgz", - "integrity": "sha512-Hd/yBfk2R5v2MFrz/0VArSXeh8xKLLXGunqSiTtcHKn1zNZwaKujuA0VSwUvNfwC4hDoF1PveS+gBDNe3nHspw==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.8.4.tgz", + "integrity": "sha512-+6ZOiXenOaxXwb8qCbBPdT2jX2cFPaVVHGIskrpmJLpmWj+qKRTD6X/z9x7hTdSQn7NedcoXCkWGej4a7dC4lw==", "license": "MIT OR Apache-2.0", "dependencies": { "@tauri-apps/api": "^2.12.0" } }, "node_modules/@tauri-apps/plugin-notification": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-notification/-/plugin-notification-2.7.0.tgz", - "integrity": "sha512-kgdHCPSY/3GIi4gSWuLfd3y555U0kwzP0PmnUjT+sGhgO7RdAM6goFjDqayRaKC8yA5oEYi7w2NnA3oQxIjldw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-notification/-/plugin-notification-2.8.1.tgz", + "integrity": "sha512-B+OCJv17XCFQxAhe2+fn2bHqQ1fz/hGnYHeT++yv8+q0daOH5o1ghX7MmxWgoGFp7POaNn4UMONclHeZn65mJA==", "license": "MIT OR Apache-2.0", "dependencies": { "@tauri-apps/api": "^2.12.0" } }, "node_modules/@tauri-apps/plugin-shell": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.5.0.tgz", - "integrity": "sha512-FZ6RtcikCxJ35do1kfqi94Fknmc7DAK4mJxDRfNBInX24TQMsMLddM5i4XLqE8VvJ+Lg6EriiDcLs7JIfuFkWw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.6.0.tgz", + "integrity": "sha512-z9LZGSr8jfD0FWWJ+CdD99i2FQcmJ26ebNJlYJdrlFdMLcggUS29BYrfS4hJlXO1UAI6A6r084vJUAG5734Y6w==", "license": "MIT OR Apache-2.0", "dependencies": { "@tauri-apps/api": "^2.12.0" @@ -1874,6 +1683,16 @@ } } }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.5.tgz", + "integrity": "sha512-dOGOPxlaNV+G046mZzN+9C0dAcQZeSKcXiVaM0TYy/LM4ttTmgSBDxYfovcYI8Em3+eAbiAYpvWLOv8+ZVRJKA==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/aria-query": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", @@ -1900,16 +1719,16 @@ "license": "MIT" }, "node_modules/@types/estree": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.11.tgz", + "integrity": "sha512-YBdNe5JcjYR0sPhJW1QIeRCmI11YhYvaRuGCs9+WCeTTb+Yhb2BE2XMe5/wAqF10FK5g3+q1PDhQABfT7aX0gg==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "24.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", - "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", + "version": "24.19.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.4.tgz", + "integrity": "sha512-s04odlR3ksJrLu7QLi+pddkWLD0RmSbcP9KuWn2/ozQKAp/YgwBC/6x9kJj8yAzZnGPfxePm7zm7nysVPCRagw==", "devOptional": true, "license": "MIT", "dependencies": { @@ -1917,9 +1736,9 @@ } }, "node_modules/@types/react": { - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", - "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "version": "19.3.3", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.3.tgz", + "integrity": "sha512-K8uWpJc4teiuOPdiP1umjeA9rGMgVPiXuoL66fcS1QlwBT1WMqY8PORmub9FadopIs+RCW6siYEs7Lpq+vDlog==", "devOptional": true, "license": "MIT", "dependencies": { @@ -2277,9 +2096,9 @@ } }, "node_modules/@vitejs/plugin-react": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.2.tgz", - "integrity": "sha512-fhJNGUdscQa4HkI0xFxwonWyhnVReCPDbXI7FH7jmzpnVCrFQI7PRrhWecO263610vOrs9tr2Y4xcf8uAdFxbw==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.3.0.tgz", + "integrity": "sha512-H9E955aVvD2F4zNHCw4eIZbIfF6xKldlh7MNu+hSU7xwQzh65lI/N+CJWqmfhi0PEjDXIt/H7T7J/4wU63KJiw==", "dev": true, "license": "MIT", "dependencies": { @@ -2289,9 +2108,9 @@ "node": "^20.19.0 || >=22.12.0" }, "peerDependencies": { - "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0 || ^0.3.0", "babel-plugin-react-compiler": "^1.0.0", - "oxc-transform-react": "^0.152.0", + "oxc-transform-react": ">=0.152.0 <0.157.0", "vite": "^8.0.0" }, "peerDependenciesMeta": { @@ -2307,16 +2126,16 @@ } }, "node_modules/@vitest/mocker": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.0.5.tgz", - "integrity": "sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.2.tgz", + "integrity": "sha512-UGc97wUIy0Ji2+9GxzHEJiOhiwkaukgE7VYcUNnjpX3sWnwQ8XogmNXX4WyOukxYgKb8Nh2XFa7KId0ZjpmVhQ==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.31", - "@vitest/spy": "5.0.5", + "@vitest/spy": "5.1.2", "estree-walker": "^3.0.3", - "magic-string": "^1.4.3" + "magic-string": "^1.4.5" }, "funding": { "url": "https://opencollective.com/vitest" @@ -2334,20 +2153,10 @@ } } }, - "node_modules/@vitest/mocker/node_modules/magic-string": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.3.tgz", - "integrity": "sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.6.0" - } - }, "node_modules/@vitest/spy": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.0.5.tgz", - "integrity": "sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.2.tgz", + "integrity": "sha512-PQl0/3+p9GaY71+MHywN6oyHfLhVDD5kcbm7oNRldA2F0ExMU3S8RQdnpteJ9gFAdK5P6KCgE6LqCpUgy57KzA==", "dev": true, "license": "MIT", "funding": { @@ -2432,9 +2241,9 @@ } }, "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz", + "integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==", "devOptional": true, "license": "MIT" }, @@ -2486,9 +2295,9 @@ "license": "MIT" }, "node_modules/enhanced-resolve": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.0.tgz", - "integrity": "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.27.0.tgz", + "integrity": "sha512-Do6BB2xzlcc/odFg+XEYyneAx4T/WfywO71yw9ePS2tVfRsf7JVR4mUeELadIeHzixkzbG5DpluiEFPi2WGfYQ==", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", @@ -2499,9 +2308,9 @@ } }, "node_modules/entities": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-8.1.0.tgz", - "integrity": "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-9.0.0.tgz", + "integrity": "sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -2538,6 +2347,23 @@ "node": ">=12.0.0" } }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2553,10 +2379,10 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC" + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz", + "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==", + "license": "BlueOak-1.0.0" }, "node_modules/html-encoding-sniffer": { "version": "7.0.0", @@ -2906,9 +2732,9 @@ } }, "node_modules/lucide-react": { - "version": "1.62.0", - "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.62.0.tgz", - "integrity": "sha512-2i8QZZhkgYMA3oJvKYpCltHh54VnT/3rIPkDLHbzr3IJQBaCz8+7j7V2k2rczYd2aCqcBaMmNlWQ2KKeDfcxmw==", + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.80.0.tgz", + "integrity": "sha512-f9cQkUMFp2ZrOek9FucpRqQVI67gT09clXcHs3yCvdhJnsK4RW4og/rqoC0YAHd6FV/GPkeiIR3Rdxr2pPRwHA==", "license": "ISC", "peerDependencies": { "@types/react": "*", @@ -2931,12 +2757,12 @@ } }, "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", + "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" + "@jridgewell/sourcemap-codec": "^1.6.0" } }, "node_modules/mdn-data": { @@ -2979,9 +2805,9 @@ } }, "node_modules/oxlint": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.90.0.tgz", - "integrity": "sha512-RkTN9EmgIUpLuhNoLhO3OliMGJlvb3Dk7XVjBZnfoMCHrVpuz5ESd97klfiyYeV7XfA2lNLnDCPMkUI+Qw5How==", + "version": "1.95.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.95.0.tgz", + "integrity": "sha512-eNzjFjm1TU02/+ohAJjOB7aekRQgTXhOWxMGscEm8VJMokNnnix+PCZn7kqIuGIqxAoBnHxatqlN3Chz3N6PKA==", "dev": true, "license": "MIT", "bin": { @@ -2994,28 +2820,28 @@ "url": "https://github.com/sponsors/oxc-project" }, "optionalDependencies": { - "@oxlint/binding-android-arm-eabi": "1.90.0", - "@oxlint/binding-android-arm64": "1.90.0", - "@oxlint/binding-darwin-arm64": "1.90.0", - "@oxlint/binding-darwin-x64": "1.90.0", - "@oxlint/binding-freebsd-x64": "1.90.0", - "@oxlint/binding-linux-arm-gnueabihf": "1.90.0", - "@oxlint/binding-linux-arm-musleabihf": "1.90.0", - "@oxlint/binding-linux-arm64-gnu": "1.90.0", - "@oxlint/binding-linux-arm64-musl": "1.90.0", - "@oxlint/binding-linux-ppc64-gnu": "1.90.0", - "@oxlint/binding-linux-riscv64-gnu": "1.90.0", - "@oxlint/binding-linux-riscv64-musl": "1.90.0", - "@oxlint/binding-linux-s390x-gnu": "1.90.0", - "@oxlint/binding-linux-x64-gnu": "1.90.0", - "@oxlint/binding-linux-x64-musl": "1.90.0", - "@oxlint/binding-openharmony-arm64": "1.90.0", - "@oxlint/binding-win32-arm64-msvc": "1.90.0", - "@oxlint/binding-win32-ia32-msvc": "1.90.0", - "@oxlint/binding-win32-x64-msvc": "1.90.0" + "@oxlint/binding-android-arm-eabi": "1.95.0", + "@oxlint/binding-android-arm64": "1.95.0", + "@oxlint/binding-darwin-arm64": "1.95.0", + "@oxlint/binding-darwin-x64": "1.95.0", + "@oxlint/binding-freebsd-x64": "1.95.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.95.0", + "@oxlint/binding-linux-arm-musleabihf": "1.95.0", + "@oxlint/binding-linux-arm64-gnu": "1.95.0", + "@oxlint/binding-linux-arm64-musl": "1.95.0", + "@oxlint/binding-linux-ppc64-gnu": "1.95.0", + "@oxlint/binding-linux-riscv64-gnu": "1.95.0", + "@oxlint/binding-linux-riscv64-musl": "1.95.0", + "@oxlint/binding-linux-s390x-gnu": "1.95.0", + "@oxlint/binding-linux-x64-gnu": "1.95.0", + "@oxlint/binding-linux-x64-musl": "1.95.0", + "@oxlint/binding-openharmony-arm64": "1.95.0", + "@oxlint/binding-win32-arm64-msvc": "1.95.0", + "@oxlint/binding-win32-ia32-msvc": "1.95.0", + "@oxlint/binding-win32-x64-msvc": "1.95.0" }, "peerDependencies": { - "oxlint-tsgolint": ">=7.0.2005", + "oxlint-tsgolint": ">=7.0.2008", "vite-plus": "*" }, "peerDependenciesMeta": { @@ -3028,13 +2854,13 @@ } }, "node_modules/parse5": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz", - "integrity": "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.1.1.tgz", + "integrity": "sha512-EcR/6WDcU7b2N3vQSxKALCk9lXGtUMQxXio008OEMBE0kavu/7JLfBEeFPzi43nMqVDSbEn3QCK+BMCc9zO//w==", "dev": true, "license": "MIT", "dependencies": { - "entities": "^8.0.0" + "entities": "^9.0.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -3059,9 +2885,9 @@ } }, "node_modules/postcss": { - "version": "8.5.30", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.30.tgz", - "integrity": "sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==", + "version": "8.5.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", + "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", "funding": [ { "type": "opencollective", @@ -3150,12 +2976,12 @@ } }, "node_modules/rolldown": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.14.tgz", - "integrity": "sha512-eTBTTqMR6uHKLgcUqpJP8ntzDI6V4LYA8negAMBEI7gkgVvOdrx6VsvS2Ym+83KhOPdLCHWJu0w7UQFJZhHKNw==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.19.tgz", + "integrity": "sha512-QIiV1J9d0pzN4jeeTH4sjPy0AZ6cAy2cG0ExeoE1+U8Rvj+hR3gYkokx0YbeUNGlZqiQJJ2utcETe0oKXwzsuA==", "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.154.0", + "@oxc-project/types": "=0.156.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -3165,21 +2991,22 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.14", - "@rolldown/binding-android-arm64": "1.2.14", - "@rolldown/binding-darwin-arm64": "1.2.14", - "@rolldown/binding-darwin-x64": "1.2.14", - "@rolldown/binding-freebsd-x64": "1.2.14", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.14", - "@rolldown/binding-linux-arm64-gnu": "1.2.14", - "@rolldown/binding-linux-arm64-musl": "1.2.14", - "@rolldown/binding-linux-ppc64-gnu": "1.2.14", - "@rolldown/binding-linux-s390x-gnu": "1.2.14", - "@rolldown/binding-linux-x64-gnu": "1.2.14", - "@rolldown/binding-linux-x64-musl": "1.2.14", - "@rolldown/binding-openharmony-arm64": "1.2.14", - "@rolldown/binding-win32-arm64-msvc": "1.2.14", - "@rolldown/binding-win32-x64-msvc": "1.2.14" + "@rolldown/binding-android-arm-eabi": "1.2.19", + "@rolldown/binding-android-arm64": "1.2.19", + "@rolldown/binding-darwin-arm64": "1.2.19", + "@rolldown/binding-darwin-x64": "1.2.19", + "@rolldown/binding-freebsd-x64": "1.2.19", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.19", + "@rolldown/binding-linux-arm64-gnu": "1.2.19", + "@rolldown/binding-linux-arm64-musl": "1.2.19", + "@rolldown/binding-linux-ppc64-gnu": "1.2.19", + "@rolldown/binding-linux-s390x-gnu": "1.2.19", + "@rolldown/binding-linux-x64-gnu": "1.2.19", + "@rolldown/binding-linux-x64-musl": "1.2.19", + "@rolldown/binding-openharmony-arm64": "1.2.19", + "@rolldown/binding-wasm32-wasi": "1.2.19", + "@rolldown/binding-win32-arm64-msvc": "1.2.19", + "@rolldown/binding-win32-x64-msvc": "1.2.19" } }, "node_modules/saxes": { @@ -3202,12 +3029,12 @@ "license": "MIT" }, "node_modules/source-map-js": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", - "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.4.tgz", + "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", "license": "BSD-3-Clause", "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, "node_modules/std-env": { @@ -3218,15 +3045,15 @@ "license": "MIT" }, "node_modules/tailwindcss": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", - "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.5.tgz", + "integrity": "sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ==", "license": "MIT" }, "node_modules/tapable": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", - "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.4.tgz", + "integrity": "sha512-NHFiWnAbMJxNNpBwiO7jJVGDuqMxT9/oV8v57RR+fgBQShkJil5inGD8/xWy0hjLyHQyX1tu27QANhlz3KBqCg==", "license": "MIT", "engines": { "node": ">=6" @@ -3237,9 +3064,9 @@ } }, "node_modules/tinybench": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.2.tgz", - "integrity": "sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==", + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.5.tgz", + "integrity": "sha512-b/8GRMdnY4cqkfCLyaFpTGIv1qwfi3oT0mWaepwT++6Z/ZrYehNfZZ2JDKVLKGhNoEkS3IIB1ELtCT0XS5DtOA==", "dev": true, "license": "MIT", "engines": { @@ -3247,9 +3074,9 @@ } }, "node_modules/tinyexec": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz", - "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.4.0.tgz", + "integrity": "sha512-PV6lIcJQh57aFeJDwx16JNHmgFRh5xguzallrDW1qe8nAghYgr5MKz2K5k7wEyV/ygZhdnIAP8+HZSarHPBCsg==", "dev": true, "license": "MIT", "engines": { @@ -3272,47 +3099,30 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, "node_modules/tldts": { - "version": "7.4.18", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.18.tgz", - "integrity": "sha512-somxA8xKAUzlAxl0TX/jMSYIbRNFIVGnI96pVGJPeMc5BsHmfVXn6mOJT6U++ELnl04eGfzpfcEuZe8WiASkXg==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.6.0.tgz", + "integrity": "sha512-IFk9SJW/EhTZMpJA1zRdP+69JK4NmJbMx1aRdJvLBR9em1k62eWiwolSWlDRpRdkaAnZ1dDCwFPmRPBNuLGGHA==", "dev": true, "license": "MIT", "dependencies": { - "tldts-core": "^7.4.18" + "tldts-core": "^7.6.0" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "7.4.18", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.18.tgz", - "integrity": "sha512-KI2PKvCmvQI/xD6ypPqkU0i7oxNXR/O58RLRaHR4svsgVUQ2JE/XC8BtMbG6PSehD27I8sZJRcC1ASnCy6lp3g==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.6.0.tgz", + "integrity": "sha512-0By9U6fw2hNzfJAbBMuo1bsX/OyVlsj0wjGyMPV50RZKoLCRwXBOX0FQqgZDaMo2WjjaEW/ZGyVXicLUFTmXqQ==", "dev": true, "license": "MIT" }, "node_modules/tough-cookie": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.2.tgz", - "integrity": "sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.1.0.tgz", + "integrity": "sha512-FTxc8u8Kl2tz0Lat1u8ksvcy8bwHRyEMawwTWybo51JqaC6O7SvfuhAKg+Ld6VqyIe2QRJBzY9HA7y2WyFRT2w==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -3335,6 +3145,13 @@ "node": "^22.14.0 || >=24.0.0" } }, + "node_modules/tslib": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", + "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==", + "license": "0BSD", + "optional": true + }, "node_modules/typescript": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", @@ -3371,9 +3188,9 @@ } }, "node_modules/undici": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.2.tgz", - "integrity": "sha512-XtuDWVdqTLr3NAxm2ly9/hU6kUsJOgGh1RASzMBbsw6aWCOaQzHdW+QQDfdERjfJ2V5vL5pRPa4RetO9UfivDg==", + "version": "8.13.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-8.13.1.tgz", + "integrity": "sha512-Kt7EaPjh0s93lJH/PmW3d5rhkcpUa6fS3jqZ7+YGxNd9L7Xy/i827xe4C2uhhq+pJebM4tQOl5AgHmW11G5Skg==", "dev": true, "license": "MIT", "engines": { @@ -3388,15 +3205,15 @@ "license": "MIT" }, "node_modules/vite": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.5.tgz", - "integrity": "sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==", + "version": "8.3.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.8.tgz", + "integrity": "sha512-LzOn3h9rG/0vhLdXrV4yJ4QFA9eEoqCl+Yx+kGJd7aB9w6nfNgVHKSYwLPZUHrz4ZGa+t+kXjV9itvcHDLQouA==", "license": "MIT", "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", - "postcss": "^8.5.30", - "rolldown": "~1.2.14", + "postcss": "^8.5.32", + "rolldown": "~1.2.18", "tinyglobby": "^0.2.17" }, "bin": { @@ -3465,22 +3282,22 @@ } }, "node_modules/vitest": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.0.5.tgz", - "integrity": "sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.1.2.tgz", + "integrity": "sha512-VIa2wXV208WraXUbzH+dQUrGcFpPuaiRA8HlhXS8R6/sy9cynw6OMqGj8fmAlH1hot7huTCtWUE14+FdXU3eLw==", "dev": true, "license": "MIT", "dependencies": { "@types/chai": "^5.2.2", - "@vitest/mocker": "5.0.5", + "@vitest/mocker": "5.1.2", "chai": "^6.3.0", "es-module-lexer": "^2.3.2", "expect-type": "^1.4.0", - "magic-string": "^1.4.3", + "magic-string": "^1.4.5", "obug": "^3.0.0", "picomatch": "^4.0.7", "std-env": "^4.3.0", - "tinybench": "^6.2.2", + "tinybench": "^6.2.3", "tinyexec": "^1.3.1", "tinyglobby": "^0.2.17", "why-is-node-running": "3.2.1" @@ -3498,12 +3315,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "5.0.5", - "@vitest/browser-preview": "5.0.5", + "@vitest/browser-playwright": "5.1.2", + "@vitest/browser-preview": "5.1.2", "@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0", - "@vitest/coverage-istanbul": "5.0.5", - "@vitest/coverage-v8": "5.0.5", - "@vitest/ui": "5.0.5", + "@vitest/coverage-istanbul": "5.1.2", + "@vitest/coverage-v8": "5.1.2", + "@vitest/ui": "5.1.2", "happy-dom": "*", "jsdom": "*", "vite": "^6.4.0 || ^7.0.0 || ^8.0.0" @@ -3547,16 +3364,6 @@ } } }, - "node_modules/vitest/node_modules/magic-string": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.3.tgz", - "integrity": "sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.6.0" - } - }, "node_modules/w3c-xmlserializer": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-6.0.0.tgz", diff --git a/apps/gui/src-tauri/Cargo.toml b/apps/gui/src-tauri/Cargo.toml index 5ae99bc..aad27a5 100644 --- a/apps/gui/src-tauri/Cargo.toml +++ b/apps/gui/src-tauri/Cargo.toml @@ -31,7 +31,6 @@ tokio = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } tracing-appender = "0.2" -chrono = { workspace = true } futures = { version = "0.3", default-features = false, features = ["std", "async-await"] } directories = { workspace = true } diff --git a/apps/gui/src-tauri/src/commands.rs b/apps/gui/src-tauri/src/commands.rs index e68fd56..85a7584 100644 --- a/apps/gui/src-tauri/src/commands.rs +++ b/apps/gui/src-tauri/src/commands.rs @@ -772,7 +772,7 @@ pub async fn get_update_history() -> Result, String> { .iter() .rev() .map(|e| HistoryEntryDto { - timestamp: e.timestamp.to_rfc3339(), + timestamp: e.timestamp.to_string(), package: e.package_name.clone(), backend: e.backend.id().to_string(), from_version: e.from_version.clone(), diff --git a/crates/odysync-backends/Cargo.toml b/crates/odysync-backends/Cargo.toml index a39272f..6b27389 100644 --- a/crates/odysync-backends/Cargo.toml +++ b/crates/odysync-backends/Cargo.toml @@ -22,7 +22,7 @@ serde_json.workspace = true futures = { version = "0.3", default-features = false, features = ["std", "async-await"] } unicode-width = "0.2" zip.workspace = true -chrono.workspace = true +jiff.workspace = true regex = "1" reqwest.workspace = true sha2.workspace = true diff --git a/crates/odysync-backends/src/components.rs b/crates/odysync-backends/src/components.rs index 17e495c..2e4e08b 100644 --- a/crates/odysync-backends/src/components.rs +++ b/crates/odysync-backends/src/components.rs @@ -411,7 +411,7 @@ mod windows_impl { let dir = http::download_dir()?.join(format!( "component-{id}-{}", - chrono::Utc::now().timestamp_millis() + jiff::Timestamp::now().as_millisecond() )); tokio::fs::create_dir_all(&dir).await?; let file = dir.join(http::file_name_for(&url, "installer.exe")); diff --git a/crates/odysync-backends/src/diagnostics.rs b/crates/odysync-backends/src/diagnostics.rs index 2d50ce0..2ec75e7 100644 --- a/crates/odysync-backends/src/diagnostics.rs +++ b/crates/odysync-backends/src/diagnostics.rs @@ -39,7 +39,7 @@ pub async fn create_diagnostics( Generated: {}\n", platform::os_label(), platform::is_elevated(), - chrono::Utc::now(), + jiff::Timestamp::now(), ); zip.start_file("env.txt", options) .map_err(|e| odysync_core::error::Error::Io(std::io::Error::other(e.to_string())))?; diff --git a/crates/odysync-backends/src/direct/macos.rs b/crates/odysync-backends/src/direct/macos.rs index 375d684..158e1bc 100644 --- a/crates/odysync-backends/src/direct/macos.rs +++ b/crates/odysync-backends/src/direct/macos.rs @@ -485,7 +485,7 @@ pub mod imp { let work = http::download_dir()?.join(format!( "mac-{}-{}", bundle_id.replace(|c: char| !c.is_ascii_alphanumeric(), "-"), - chrono::Utc::now().timestamp_millis() + jiff::Timestamp::now().as_millisecond() )); std::fs::create_dir_all(&work)?; let archive = work.join(http::file_name_for(&release.url, "update.zip")); diff --git a/crates/odysync-backends/src/direct/mod.rs b/crates/odysync-backends/src/direct/mod.rs index 89d8643..d362123 100644 --- a/crates/odysync-backends/src/direct/mod.rs +++ b/crates/odysync-backends/src/direct/mod.rs @@ -541,7 +541,7 @@ pub mod windows_apply { "{}-{}-{}", entry.id, release.version, - chrono::Utc::now().timestamp_millis() + jiff::Timestamp::now().as_millisecond() )); tokio::fs::create_dir_all(&dir).await?; let file = dir.join(http::file_name_for(&release.url, "installer.bin")); diff --git a/crates/odysync-backends/src/driver_backup.rs b/crates/odysync-backends/src/driver_backup.rs index e6e83e7..feef28d 100644 --- a/crates/odysync-backends/src/driver_backup.rs +++ b/crates/odysync-backends/src/driver_backup.rs @@ -263,8 +263,8 @@ fn safe_backup_path(root: &Path, id: &str) -> Result { } /// A timestamp usable as a directory name on Windows, where `:` is illegal. -fn backup_id_for(now: chrono::DateTime) -> String { - now.format("%Y-%m-%dT%H-%M-%SZ").to_string() +fn backup_id_for(now: jiff::Timestamp) -> String { + now.strftime("%Y-%m-%dT%H-%M-%SZ").to_string() } // ── Enumerate ─────────────────────────────────────────────────────────────── @@ -297,7 +297,7 @@ pub async fn create_backup(reason: &str) -> Result { /// [`create_backup`] over a caller-supplied package list. pub async fn create_backup_of(reason: &str, packages: &[DriverPackage]) -> Result { let root = backup_root()?; - let id = backup_id_for(chrono::Utc::now()); + let id = backup_id_for(jiff::Timestamp::now()); let dir = safe_backup_path(&root, &id)?; std::fs::create_dir_all(&dir)?; @@ -360,7 +360,7 @@ pub async fn create_backup_of(reason: &str, packages: &[DriverPackage]) -> Resul let manifest = BackupManifest { id: id.clone(), - created_at: chrono::Utc::now().to_rfc3339(), + created_at: jiff::Timestamp::now().to_string(), reason: reason.to_string(), packages: saved, failures, @@ -688,9 +688,7 @@ mod tests { #[test] fn the_backup_id_is_a_legal_windows_directory_name() { - let ts = chrono::DateTime::parse_from_rfc3339("2026-07-27T14:05:33Z") - .unwrap() - .with_timezone(&chrono::Utc); + let ts: jiff::Timestamp = "2026-07-27T14:05:33Z".parse().unwrap(); let id = backup_id_for(ts); assert_eq!(id, "2026-07-27T14-05-33Z"); // `:` is illegal in a Windows path component, which is the whole diff --git a/crates/odysync-backends/src/gpu/nvidia_gpu.rs b/crates/odysync-backends/src/gpu/nvidia_gpu.rs index ad530bb..ebcd146 100644 --- a/crates/odysync-backends/src/gpu/nvidia_gpu.rs +++ b/crates/odysync-backends/src/gpu/nvidia_gpu.rs @@ -263,7 +263,7 @@ impl Backend for NvidiaGpuBackend { let dir = crate::direct::http::download_dir()?.join(format!( "nvidia-{}-{}", driver.version, - chrono::Utc::now().timestamp_millis() + jiff::Timestamp::now().as_millisecond() )); tokio::fs::create_dir_all(&dir).await?; let file = dir.join(crate::direct::http::file_name_for( diff --git a/crates/odysync-backends/src/offline.rs b/crates/odysync-backends/src/offline.rs index 1e5a04c..e53ca57 100644 --- a/crates/odysync-backends/src/offline.rs +++ b/crates/odysync-backends/src/offline.rs @@ -539,7 +539,7 @@ pub async fn download_and_cache( filename, sha256, size_bytes, - cached_at: chrono::Utc::now().to_rfc3339(), + cached_at: jiff::Timestamp::now().to_string(), signature, }; diff --git a/crates/odysync-backends/src/security/mod.rs b/crates/odysync-backends/src/security/mod.rs index e79903d..cd2c693 100644 --- a/crates/odysync-backends/src/security/mod.rs +++ b/crates/odysync-backends/src/security/mod.rs @@ -242,7 +242,7 @@ pub async fn scan() -> ScanReport { } pub async fn scan_with_progress(progress: Option>) -> ScanReport { - let scanned_at = chrono::Utc::now().to_rfc3339(); + let scanned_at = jiff::Timestamp::now().to_string(); let (defender, persistence, integrity, network, posture) = futures::join!( run_section("defender", defender::scan(), progress), diff --git a/crates/odysync-backends/src/security/remediate.rs b/crates/odysync-backends/src/security/remediate.rs index ab6d2e6..32d87ad 100644 --- a/crates/odysync-backends/src/security/remediate.rs +++ b/crates/odysync-backends/src/security/remediate.rs @@ -382,7 +382,7 @@ if ($k) {{ [string]$k.GetValue({quoted_name}) }}" hive: normalized.clone(), name: name.to_string(), value: value.clone(), - removed_at: chrono::Utc::now().to_rfc3339(), + removed_at: jiff::Timestamp::now().to_string(), }; let backup_path = append_run_key_backup(&backup)?; @@ -458,7 +458,7 @@ async fn quarantine_file(path: &str) -> Result { )); } - let stamp = chrono::Utc::now().format("%Y%m%dT%H%M%SZ").to_string(); + let stamp = jiff::Timestamp::now().strftime("%Y%m%dT%H%M%SZ").to_string(); let dest = quarantine_dir()?.join(quarantine_name(path, &stamp)); let moved = move_file(&source, &dest)?; @@ -523,7 +523,7 @@ async fn reset_hosts_file() -> Result { let backup = restore_dir()?.join(format!( "hosts-{}.bak", - chrono::Utc::now().format("%Y%m%dT%H%M%SZ") + jiff::Timestamp::now().strftime("%Y%m%dT%H%M%SZ") )); if hosts.is_file() { std::fs::copy(&hosts, &backup)?; diff --git a/crates/odysync-cli/Cargo.toml b/crates/odysync-cli/Cargo.toml index 4c88cfa..a992807 100644 --- a/crates/odysync-cli/Cargo.toml +++ b/crates/odysync-cli/Cargo.toml @@ -24,7 +24,7 @@ anyhow.workspace = true serde_json.workspace = true tracing.workspace = true tracing-subscriber.workspace = true -chrono.workspace = true +jiff.workspace = true futures = { version = "0.3", default-features = false, features = ["std", "async-await"] } [lints] diff --git a/crates/odysync-cli/src/main.rs b/crates/odysync-cli/src/main.rs index 74191d0..40412d9 100644 --- a/crates/odysync-cli/src/main.rs +++ b/crates/odysync-cli/src/main.rs @@ -630,14 +630,14 @@ async fn run(cli: Cli) -> Result { ); }; - let until = chrono::Utc::now() + chrono::Duration::days(days as i64); + let until = jiff::Timestamp::now() + jiff::SignedDuration::from_hours(24 * i64::from(days)); config.pause_backend(kind, until, note); config.save(&config_path)?; println!( "Paused {} for {days} day(s), until {}.", kind.id(), - until.format("%Y-%m-%d %H:%M UTC") + until.strftime("%Y-%m-%d %H:%M UTC") ); // Said out loud because a paused security backend is exactly the // state a user can forget they put the machine into. diff --git a/crates/odysync-core/Cargo.toml b/crates/odysync-core/Cargo.toml index 7a88032..c834ae6 100644 --- a/crates/odysync-core/Cargo.toml +++ b/crates/odysync-core/Cargo.toml @@ -15,7 +15,7 @@ description = "Domain model, safety policy and update planner for Odysync" serde.workspace = true serde_json.workspace = true thiserror.workspace = true -chrono.workspace = true +jiff.workspace = true async-trait.workspace = true directories.workspace = true tracing.workspace = true diff --git a/crates/odysync-core/src/config.rs b/crates/odysync-core/src/config.rs index 7c4c359..be99c11 100644 --- a/crates/odysync-core/src/config.rs +++ b/crates/odysync-core/src/config.rs @@ -96,9 +96,9 @@ impl PausedBackend { /// permanent. A typo in a hand-edited config must not silently stop /// security updates forever; failing open here means the worst case is an /// update the user wanted to defer, rather than one they never receive. - pub fn is_active_at(&self, now: chrono::DateTime) -> bool { - match chrono::DateTime::parse_from_rfc3339(self.until.trim()) { - Ok(until) => now < until.with_timezone(&chrono::Utc), + pub fn is_active_at(&self, now: jiff::Timestamp) -> bool { + match self.until.trim().parse::() { + Ok(until) => now < until, Err(e) => { tracing::warn!( backend = %self.backend, @@ -181,7 +181,7 @@ impl Config { /// An explicit disable always wins, so a user who turns something off does /// not have it turned back on by an opt-in list they edited earlier. pub fn backend_enabled(&self, kind: BackendKind) -> bool { - self.backend_enabled_at(kind, chrono::Utc::now()) + self.backend_enabled_at(kind, jiff::Timestamp::now()) } /// [`backend_enabled`](Config::backend_enabled) as of a given moment. @@ -190,7 +190,7 @@ impl Config { pub fn backend_enabled_at( &self, kind: BackendKind, - now: chrono::DateTime, + now: jiff::Timestamp, ) -> bool { if self .disabled_backends @@ -217,13 +217,13 @@ impl Config { /// is missing and when it comes back — "paused until 3 August" is /// actionable, "no updates found" is misleading. pub fn pause_for(&self, kind: BackendKind) -> Option<&PausedBackend> { - self.pause_for_at(kind, chrono::Utc::now()) + self.pause_for_at(kind, jiff::Timestamp::now()) } fn pause_for_at( &self, kind: BackendKind, - now: chrono::DateTime, + now: jiff::Timestamp, ) -> Option<&PausedBackend> { self.paused_backends .iter() @@ -234,14 +234,14 @@ impl Config { pub fn pause_backend( &mut self, kind: BackendKind, - until: chrono::DateTime, + until: jiff::Timestamp, note: Option, ) { self.paused_backends .retain(|p| !p.backend.eq_ignore_ascii_case(kind.id())); self.paused_backends.push(PausedBackend { backend: kind.id().to_string(), - until: until.to_rfc3339(), + until: until.to_string(), note, }); } @@ -357,10 +357,8 @@ mod tests { } } - fn at(text: &str) -> chrono::DateTime { - chrono::DateTime::parse_from_rfc3339(text) - .unwrap() - .with_timezone(&chrono::Utc) + fn at(text: &str) -> jiff::Timestamp { + text.parse().unwrap() } #[test] diff --git a/crates/odysync-core/src/history.rs b/crates/odysync-core/src/history.rs index d74867a..04c1505 100644 --- a/crates/odysync-core/src/history.rs +++ b/crates/odysync-core/src/history.rs @@ -7,7 +7,7 @@ use std::path::PathBuf; -use chrono::{DateTime, Utc}; +use jiff::Timestamp; use serde::{Deserialize, Serialize}; use crate::model::{ApplyOutcome, BackendKind, PackageId}; @@ -16,7 +16,7 @@ use crate::model::{ApplyOutcome, BackendKind, PackageId}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct HistoryEntry { /// When the apply was attempted. - pub timestamp: DateTime, + pub timestamp: Timestamp, /// Which package was being updated. pub package_id: String, /// Human-readable package name. @@ -99,7 +99,7 @@ impl UpdateHistory { outcome: &ApplyOutcome, ) { let entry = HistoryEntry { - timestamp: Utc::now(), + timestamp: Timestamp::now(), package_id: package_id.to_string(), package_name: package_name.to_string(), backend: package_id.backend, @@ -160,6 +160,21 @@ fn history_path() -> PathBuf { #[cfg(test)] mod tests { use super::*; + + /// Histories written before 3.2 carry the timestamps of another library, + /// with nanoseconds and either spelling of UTC. They must keep loading: + /// an unreadable entry would empty the whole page. + #[test] + fn older_history_timestamps_still_load() { + for ts in [ + "2026-10-16T13:24:07.123456789Z", + "2026-10-16T13:24:07Z", + "2026-10-16T13:24:07.123456789+00:00", + ] { + let parsed: Timestamp = serde_json::from_str(&format!("{ts:?}")).expect(ts); + assert_eq!(parsed.as_second(), 1_792_157_047, "{ts}"); + } + } use tempfile::tempdir; #[test] diff --git a/crates/odysync-core/src/report.rs b/crates/odysync-core/src/report.rs index 99c34dd..b5169fd 100644 --- a/crates/odysync-core/src/report.rs +++ b/crates/odysync-core/src/report.rs @@ -1,14 +1,14 @@ //! Machine- and human-readable run reports. -use chrono::{DateTime, Utc}; +use jiff::Timestamp; use serde::{Deserialize, Serialize}; use crate::model::{ApplyOutcome, PackageId}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RunReport { - pub started: DateTime, - pub finished: Option>, + pub started: Timestamp, + pub finished: Option, pub entries: Vec, /// Set when a backend signalled that a reboot is needed to finish. pub reboot_required: bool, @@ -30,7 +30,7 @@ impl Default for RunReport { impl RunReport { pub fn new() -> Self { Self { - started: Utc::now(), + started: Timestamp::now(), finished: None, entries: Vec::new(), reboot_required: false, @@ -46,7 +46,7 @@ impl RunReport { } pub fn finish(&mut self) { - self.finished = Some(Utc::now()); + self.finished = Some(Timestamp::now()); } pub fn updated(&self) -> usize { From 9b425107045e3a6a2335fe491e6a50d6d6ef2d5b Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 16:44:35 +0100 Subject: [PATCH 03/18] fix(core): order versions the way their package managers do Debian security updates (1.1.1w-0+deb11u1 to +deb11u2) compared as equal and were never installed; epochs such as 1:9.2p1-2+deb12u3 were unreadable. Version::parse_as now uses dpkg, rpm, pacman or PEP 440 rules, tested with the reference cases of each project. The stable-only rule missed every marker that was not exactly "rc" or "beta": 1.0.0-rc1, 2.0b3, 5.0 Beta 2 were offered as stable. 3.5a to 3.5 counted as an upgrade. Two versions whose difference has no agreed meaning (1.0.0 against 1.0.0-4) are now refused instead of guessed. --- crates/odysync-core/src/config.rs | 12 +- crates/odysync-core/src/lib.rs | 1 + crates/odysync-core/src/runner.rs | 3 +- crates/odysync-core/src/version.rs | 384 +++++++++++-- crates/odysync-core/src/version_native.rs | 635 ++++++++++++++++++++++ 5 files changed, 976 insertions(+), 59 deletions(-) create mode 100644 crates/odysync-core/src/version_native.rs diff --git a/crates/odysync-core/src/config.rs b/crates/odysync-core/src/config.rs index be99c11..44d4b90 100644 --- a/crates/odysync-core/src/config.rs +++ b/crates/odysync-core/src/config.rs @@ -187,11 +187,7 @@ impl Config { /// [`backend_enabled`](Config::backend_enabled) as of a given moment. /// /// Split out so the pause logic is testable without waiting for a clock. - pub fn backend_enabled_at( - &self, - kind: BackendKind, - now: jiff::Timestamp, - ) -> bool { + pub fn backend_enabled_at(&self, kind: BackendKind, now: jiff::Timestamp) -> bool { if self .disabled_backends .iter() @@ -220,11 +216,7 @@ impl Config { self.pause_for_at(kind, jiff::Timestamp::now()) } - fn pause_for_at( - &self, - kind: BackendKind, - now: jiff::Timestamp, - ) -> Option<&PausedBackend> { + fn pause_for_at(&self, kind: BackendKind, now: jiff::Timestamp) -> Option<&PausedBackend> { self.paused_backends .iter() .find(|p| p.backend.eq_ignore_ascii_case(kind.id()) && p.is_active_at(now)) diff --git a/crates/odysync-core/src/lib.rs b/crates/odysync-core/src/lib.rs index b808fda..9d34920 100644 --- a/crates/odysync-core/src/lib.rs +++ b/crates/odysync-core/src/lib.rs @@ -19,6 +19,7 @@ pub mod runner; pub mod scan_cache; pub mod verification; pub mod version; +pub mod version_native; pub mod windows_update; pub use backend::{ApplyPhase, ApplyProgress, Backend}; diff --git a/crates/odysync-core/src/runner.rs b/crates/odysync-core/src/runner.rs index 1ff1577..2d0891d 100644 --- a/crates/odysync-core/src/runner.rs +++ b/crates/odysync-core/src/runner.rs @@ -13,7 +13,6 @@ use crate::history::UpdateHistory; use crate::model::{ApplyOutcome, BackendKind, PlannedUpdate}; use crate::report::RunReport; use crate::restore::RestorePointGuard; -use crate::version::Version; /// Default number of retries when no explicit value is configured. pub const DEFAULT_MAX_RETRIES: u32 = 2; @@ -280,7 +279,7 @@ impl<'a> Runner<'a> { } }; - let actual = Version::parse(&actual_raw); + let actual = expected.parse_like(&actual_raw); // Accept "at least what we asked for": some installers normalise the // version string, and a package that jumped further ahead is still not diff --git a/crates/odysync-core/src/version.rs b/crates/odysync-core/src/version.rs index 37b63ff..ff72a96 100644 --- a/crates/odysync-core/src/version.rs +++ b/crates/odysync-core/src/version.rs @@ -13,15 +13,23 @@ //! * a shorter release compares as if zero-padded, so 1.2 == 1.2.0 //! * a pre-release suffix (after the first `-`) makes a version *lower* than //! the same version without one, matching semver +//! * a segment that mixes digits and letters is read as its number followed +//! by a suffix: `0rc1` is a pre-release of `0`, `1w` a later patch of `1` //! * anything we cannot parse becomes [`Version::Unknown`], which is never -//! ordered against a real version — the policy layer refuses to act on it -//! rather than guessing. +//! ordered against a real version; nor are two versions whose difference +//! has no agreed meaning. The policy layer refuses to act on both rather +//! than guessing. +//! +//! Distribution packages and Python packages follow published rules of their +//! own; [`Version::parse_as`] uses those, see [`crate::version_native`]. use std::cmp::Ordering; use std::fmt; use serde::{Deserialize, Serialize}; +use crate::version_native::Scheme; + /// One dot-separated piece of a version string. /// /// Public only because it appears in [`Version`]'s serialised shape; callers @@ -43,22 +51,183 @@ impl Segment { } } -impl Ord for Segment { - fn cmp(&self, other: &Self) -> Ordering { +/// Words that mark a version as not yet released. +const PRERELEASE_WORDS: &[&str] = &[ + "alpha", + "beta", + "rc", + "cr", + "pre", + "prerelease", + "preview", + "dev", + "nightly", + "canary", + "insider", + "insiders", + "snapshot", + "test", + "testing", + "unstable", + "ea", + "next", + "milestone", +]; + +/// Words that mark a later build of the same version. +const PATCH_WORDS: &[&str] = &["post", "p", "pl", "patch", "sp", "r", "rev", "u", "update"]; + +/// What a suffix such as the `rc1` in `0rc1` says about its version. +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +enum SuffixKind { + Prerelease, + None, + Patch, +} + +/// Split `0rc1` into `("0", "rc1")` and `rc1` into `("", "rc1")`. +fn split_leading_digits(text: &str) -> (&str, &str) { + let n = text.bytes().take_while(u8::is_ascii_digit).count(); + text.split_at(n) +} + +/// Classify a lower-case suffix. `None` means we do not know what it means. +fn classify_suffix(suffix: &str) -> Option { + if suffix.is_empty() { + return Some(SuffixKind::None); + } + let n = suffix.bytes().take_while(u8::is_ascii_alphabetic).count(); + let (word, number) = suffix.split_at(n); + if !number.bytes().all(|b| b.is_ascii_digit()) { + return None; + } + if PRERELEASE_WORDS.contains(&word) { + return Some(SuffixKind::Prerelease); + } + if PATCH_WORDS.contains(&word) { + return Some(SuffixKind::Patch); + } + match (word.len(), number.is_empty()) { + // `1.0a2`, `1.0b1`: Python's and many others' alpha and beta. + (1, false) if word == "a" || word == "b" => Some(SuffixKind::Prerelease), + // `1.1.1w`, `9e`: a patch letter. + (1, true) => Some(SuffixKind::Patch), + _ => None, + } +} + +/// Order text so that runs of digits compare as numbers: `rc9` before `rc10`. +fn natural_cmp(a: &str, b: &str) -> Ordering { + let (mut a, mut b) = (a, b); + while !a.is_empty() && !b.is_empty() { + let (da, ra) = split_leading_digits(a); + let (db, rb) = split_leading_digits(b); + if !da.is_empty() && !db.is_empty() { + let (ta, tb) = (da.trim_start_matches('0'), db.trim_start_matches('0')); + match ta.len().cmp(&tb.len()).then_with(|| ta.cmp(tb)) { + Ordering::Equal => {} + other => return other, + } + (a, b) = (ra, rb); + continue; + } + let (mut ca, mut cb) = (a.chars(), b.chars()); + match ca.next().cmp(&cb.next()) { + Ordering::Equal => {} + other => return other, + } + (a, b) = (ca.as_str(), cb.as_str()); + } + a.len().cmp(&b.len()) +} + +impl Segment { + /// The segment as the number it starts with and the rest. + fn parts(&self) -> (Option, &str) { + match self { + Segment::Num(n) => (Some(*n), ""), + Segment::Text(t) => { + let (digits, suffix) = split_leading_digits(t); + (digits.parse().ok(), suffix) + } + } + } + + /// Order two release segments, or `None` when their order has no agreed + /// meaning. + fn compare(&self, other: &Segment) -> Option { + if self == other { + return Some(Ordering::Equal); + } + match (self.parts(), other.parts()) { + ((Some(a), sa), (Some(b), sb)) => { + if a != b { + return Some(a.cmp(&b)); + } + let (ka, kb) = (classify_suffix(sa)?, classify_suffix(sb)?); + Some(ka.cmp(&kb).then_with(|| natural_cmp(sa, sb))) + } + // `1.0.beta` and the like: a word where a number is expected. It + // only has a meaning when it is a known one. + ((Some(_), _), (None, word)) => match classify_suffix(word)? { + SuffixKind::Prerelease => Some(Ordering::Greater), + _ => None, + }, + ((None, word), (Some(_), _)) => match classify_suffix(word)? { + SuffixKind::Prerelease => Some(Ordering::Less), + _ => None, + }, + ((None, a), (None, b)) => { + let (ka, kb) = (classify_suffix(a)?, classify_suffix(b)?); + Some(ka.cmp(&kb).then_with(|| natural_cmp(a, b))) + } + } + } + + /// Order two pre-release segments the way semver does, except that digits + /// inside a word count as numbers (`rc9` before `rc10`). + fn compare_pre(&self, other: &Segment) -> Ordering { match (self, other) { (Segment::Num(a), Segment::Num(b)) => a.cmp(b), - (Segment::Text(a), Segment::Text(b)) => a.cmp(b), - // A numeric segment outranks a textual one: 1.2 > 1.rc. - (Segment::Num(_), Segment::Text(_)) => Ordering::Greater, - (Segment::Text(_), Segment::Num(_)) => Ordering::Less, + (Segment::Text(a), Segment::Text(b)) => natural_cmp(a, b), + (Segment::Num(_), Segment::Text(_)) => Ordering::Less, + (Segment::Text(_), Segment::Num(_)) => Ordering::Greater, + } + } + + /// Whether this segment says "not released yet": `rc`, `beta2`, `0rc1`. + fn marks_prerelease(&self) -> bool { + match self { + Segment::Num(_) => false, + Segment::Text(t) => { + let (_, suffix) = split_leading_digits(t); + classify_suffix(suffix) == Some(SuffixKind::Prerelease) + } } } } -impl PartialOrd for Segment { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) +/// The pre-release marker in a vendor's commentary, if there is one: `Beta 2` +/// in `5.0 Beta 2`, nothing in `17.14.29 (March 2026)`. +fn prerelease_in_commentary(rest: &str) -> Vec { + let words: Vec = rest + .split(|c: char| !c.is_ascii_alphanumeric()) + .filter(|w| !w.is_empty()) + .map(str::to_ascii_lowercase) + .collect(); + let Some(at) = words + .iter() + .position(|w| Segment::parse(w).marks_prerelease()) + else { + return Vec::new(); + }; + let mut out = vec![Segment::parse(&words[at])]; + if let Some(next) = words.get(at + 1) + && next.bytes().all(|b| b.is_ascii_digit()) + { + out.push(Segment::parse(next)); } + out } /// A parsed package version. @@ -72,6 +241,8 @@ pub enum Version { release: Vec, pre: Vec, }, + /// A version ordered by its package manager's own published rules. + Native { raw: String, scheme: Scheme }, /// A version we could not make sense of, including winget's `Unknown`. Unknown(String), } @@ -99,7 +270,9 @@ impl Version { // contains a space, so everything from the first one is commentary — // dropping it lets 17.14.29 order properly against 17.14.36 instead of // falling back to a textual segment comparison. + // The exception is a pre-release marker: `5.0 Beta 2` is not 5.0. let body = trimmed.split_whitespace().next().unwrap_or(trimmed); + let commentary = prerelease_in_commentary(&trimmed[body.len()..]); let body = body.strip_prefix(['v', 'V']).unwrap_or(body); @@ -128,7 +301,7 @@ impl Version { return Version::Unknown(raw.to_string()); } - let pre: Vec = pre_raw + let mut pre: Vec = pre_raw .map(|p| { p.split(['.', '-', '_']) .filter(|s| !s.is_empty()) @@ -136,6 +309,7 @@ impl Version { .collect() }) .unwrap_or_default(); + pre.extend(commentary); Version::Parsed { raw: trimmed.to_string(), @@ -144,17 +318,39 @@ impl Version { } } + /// Parse a version that follows `scheme` rather than the general rules. + pub fn parse_as(raw: &str, scheme: Scheme) -> Self { + let trimmed = raw.trim(); + if scheme.accepts(trimmed) { + Version::Native { + raw: trimmed.to_string(), + scheme, + } + } else { + Version::Unknown(raw.to_string()) + } + } + + /// Parse `raw` by the same rules as this version, so that a value read + /// back from the same package manager can be compared with it. + pub fn parse_like(&self, raw: &str) -> Self { + match self { + Version::Native { scheme, .. } => Version::parse_as(raw, *scheme), + _ => Version::parse(raw), + } + } + /// The original string, for handing back to a package manager verbatim. pub fn raw(&self) -> &str { match self { - Version::Parsed { raw, .. } => raw, + Version::Parsed { raw, .. } | Version::Native { raw, .. } => raw, Version::Unknown(raw) => raw, } } /// Whether this version can participate in ordering comparisons. pub fn is_known(&self) -> bool { - matches!(self, Version::Parsed { .. }) + !matches!(self, Version::Unknown(_)) } /// True when this is a pre-release (beta, rc, alpha...). @@ -163,28 +359,11 @@ impl Version { /// opt in explicitly. pub fn is_prerelease(&self) -> bool { match self { - Version::Parsed { pre, .. } => { - !pre.is_empty() - && pre.iter().any(|s| match s { - Segment::Text(t) => { - matches!( - t.as_str(), - "alpha" - | "beta" - | "rc" - | "pre" - | "preview" - | "dev" - | "nightly" - | "canary" - | "insider" - | "snapshot" - | "test" - ) - } - Segment::Num(_) => false, - }) + Version::Parsed { release, pre, .. } => { + pre.iter().any(Segment::marks_prerelease) + || release.iter().any(Segment::marks_prerelease) } + Version::Native { raw, scheme } => scheme.is_prerelease(raw), Version::Unknown(_) => false, } } @@ -193,36 +372,56 @@ impl Version { /// /// Callers must treat `None` as "refuse to act", never as "equal". pub fn compare(&self, other: &Version) -> Option { - let (a_rel, a_pre) = match self { - Version::Parsed { release, pre, .. } => (release, pre), - Version::Unknown(_) => return None, - }; - let (b_rel, b_pre) = match other { - Version::Parsed { release, pre, .. } => (release, pre), - Version::Unknown(_) => return None, + let (a_rel, a_pre, b_rel, b_pre) = match (self, other) { + ( + Version::Parsed { + release: ar, + pre: ap, + .. + }, + Version::Parsed { + release: br, + pre: bp, + .. + }, + ) => (ar, ap, br, bp), + (Version::Native { raw: a, scheme: sa }, Version::Native { raw: b, scheme: sb }) + if sa == sb => + { + return sa.compare(a, b); + } + // Unknown, or two different sets of rules. + _ => return None, }; // Zero-pad the shorter release so 1.2 == 1.2.0. let len = a_rel.len().max(b_rel.len()); + let zero = Segment::Num(0); for i in 0..len { - let a = a_rel.get(i).cloned().unwrap_or(Segment::Num(0)); - let b = b_rel.get(i).cloned().unwrap_or(Segment::Num(0)); - match a.cmp(&b) { + let a = a_rel.get(i).unwrap_or(&zero); + let b = b_rel.get(i).unwrap_or(&zero); + match a.compare(b)? { Ordering::Equal => continue, non_eq => return Some(non_eq), } } // Equal releases: absence of a pre-release wins (1.0.0 > 1.0.0-rc1). + // A suffix of only numbers is a pre-release to semver and a build + // revision to almost everyone else, so against a bare version its + // order is not knowable. + let only_numbers = |pre: &[Segment]| pre.iter().all(|s| matches!(s, Segment::Num(_))); match (a_pre.is_empty(), b_pre.is_empty()) { (true, true) => Some(Ordering::Equal), + (true, false) if only_numbers(b_pre) => None, + (false, true) if only_numbers(a_pre) => None, (true, false) => Some(Ordering::Greater), (false, true) => Some(Ordering::Less), (false, false) => { let len = a_pre.len().max(b_pre.len()); for i in 0..len { match (a_pre.get(i), b_pre.get(i)) { - (Some(a), Some(b)) => match a.cmp(b) { + (Some(a), Some(b)) => match a.compare_pre(b) { Ordering::Equal => continue, non_eq => return Some(non_eq), }, @@ -250,7 +449,7 @@ impl Version { impl fmt::Display for Version { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - Version::Parsed { raw, .. } => f.write_str(raw), + Version::Parsed { raw, .. } | Version::Native { raw, .. } => f.write_str(raw), Version::Unknown(_) => f.write_str("unknown"), } } @@ -328,6 +527,97 @@ mod tests { assert!(!v("1.0.0").is_prerelease()); } + /// Every one of these was offered as a stable release before: only a + /// segment that was exactly `rc` or `beta` counted as a marker. + #[test] + fn prerelease_markers_are_found_wherever_vendors_put_them() { + for raw in [ + "1.0.0-rc1", + "1.0.0-beta2", + "1.0.0-alpha", + "1.0.0rc1", + "2.0a1", + "2.0b3", + "1.0.beta2", + "1.0.dev0", + "5.0 Beta 2", + "17.15.0 Preview 3", + "2.0 RC1", + "3.0 (beta)", + "24.0-ea", + "1.2.3-SNAPSHOT", + ] { + assert!(v(raw).is_prerelease(), "{raw} is a pre-release"); + } + for raw in [ + "1.1.1w", + "9e", + "17.14.29 (March 2026)", + "2.39.2.windows.1", + "1.0.0-4", + "1.9.13p3", + "10.0 (x64 en-US)", + "21H2", + "8u402", + ] { + assert!(!v(raw).is_prerelease(), "{raw} is a release"); + } + } + + #[test] + fn numbers_inside_words_compare_as_numbers() { + assert!(v("1.0.0-rc9").is_upgrade_to(&v("1.0.0-rc10"))); + assert!(v("1.0.0rc9").is_upgrade_to(&v("1.0.0rc10"))); + assert!(v("1.0.8u99").is_upgrade_to(&v("1.0.8u402"))); + assert!(v("1.9.13p3").is_upgrade_to(&v("1.9.13p10"))); + } + + /// `3.5a` to `3.5` used to count as an upgrade, which is a downgrade. + #[test] + fn a_patch_letter_is_later_than_the_bare_version() { + assert!(v("3.5").is_upgrade_to(&v("3.5a"))); + assert!(!v("3.5a").is_upgrade_to(&v("3.5"))); + assert!(v("1.1.1v").is_upgrade_to(&v("1.1.1w"))); + assert!(v("1.1.1w").is_upgrade_to(&v("1.1.2"))); + } + + #[test] + fn a_prerelease_inside_a_segment_is_earlier_than_the_release() { + assert!(v("1.0.0rc1").is_upgrade_to(&v("1.0.0"))); + assert!(!v("1.0.0").is_upgrade_to(&v("1.0.0rc1"))); + assert!(v("5.0 Beta 2").is_upgrade_to(&v("5.0"))); + assert!(!v("5.0").is_upgrade_to(&v("5.0 Beta 2"))); + assert!(v("1.0.beta2").is_upgrade_to(&v("1.0.0"))); + } + + /// When two versions differ in a way that has no agreed meaning, the + /// answer is "do nothing", in both directions. + #[test] + fn differences_without_a_known_meaning_are_not_ordered() { + for (a, b) in [ + ("1.0.0", "1.0.0-4"), + ("1.0", "1.0git1234"), + ("1.0.x", "1.0.1"), + ("2.1.0foo", "2.1.0bar"), + ] { + assert_eq!(v(a).compare(&v(b)), None, "{a} against {b}"); + assert!(!v(a).is_upgrade_to(&v(b))); + assert!(!v(b).is_upgrade_to(&v(a))); + } + // Two revisions of the same thing are fine. + assert!(v("1.0.0-4").is_upgrade_to(&v("1.0.0-5"))); + } + + #[test] + fn versions_under_different_rules_are_not_ordered() { + let deb = Version::parse_as("1.0-1", Scheme::Dpkg); + assert!(deb.is_known()); + assert_eq!(deb.compare(&v("1.1")), None); + assert_eq!(deb.compare(&Version::parse_as("1.0-1", Scheme::Rpm)), None); + assert!(deb.is_upgrade_to(&deb.parse_like("1.0-1+deb12u1"))); + assert!(!deb.parse_like("(none)").is_known()); + } + #[test] fn unknown_versions_never_compare() { assert!(!v("Unknown").is_known()); diff --git a/crates/odysync-core/src/version_native.rs b/crates/odysync-core/src/version_native.rs new file mode 100644 index 0000000..7c0d5cd --- /dev/null +++ b/crates/odysync-core/src/version_native.rs @@ -0,0 +1,635 @@ +//! Version ordering the way each package manager defines it. +//! +//! The general algebra in [`crate::version`] is right for the versions that +//! software vendors write. It is wrong for the ones distributions write: a +//! Debian security update moves `1.1.1w-0+deb11u1` to `1.1.1w-0+deb11u2`, +//! which the general rules read as the same version with different build +//! metadata, so the update was shown as "not an upgrade" and never installed. +//! `1:9.2p1-2+deb12u3` was not readable at all. +//! +//! These are the published algorithms, reimplemented so that they run in tests +//! on every platform: `dpkg --compare-versions`, `rpmvercmp` over +//! epoch:version-release, pacman's `vercmp`, and PEP 440 for Python packages. + +use std::cmp::Ordering; + +use serde::{Deserialize, Serialize}; + +/// Whose ordering rules a version follows. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "kebab-case")] +pub enum Scheme { + /// Debian, Ubuntu and derivatives. + Dpkg, + /// Fedora, RHEL, openSUSE. + Rpm, + /// Arch Linux and derivatives. + Pacman, + /// Python packages (PEP 440). + Pep440, +} + +impl Scheme { + /// Whether `raw` is a version this scheme can order. + pub fn accepts(self, raw: &str) -> bool { + let raw = raw.trim(); + if raw.is_empty() || raw.chars().any(char::is_whitespace) { + return false; + } + match self { + // The managers themselves require the upstream part to contain a + // digit in practice; a bare word such as `stable` or `(none)` is + // what they print when there is no version. + Scheme::Dpkg | Scheme::Rpm | Scheme::Pacman => { + raw.bytes().any(|b| b.is_ascii_digit()) + && raw + .bytes() + .all(|b| b.is_ascii_alphanumeric() || b".+-~:^_".contains(&b)) + } + Scheme::Pep440 => Pep440::parse(raw).is_some(), + } + } + + /// Order two versions, or `None` when either cannot be read. + pub fn compare(self, a: &str, b: &str) -> Option { + let (a, b) = (a.trim(), b.trim()); + if !self.accepts(a) || !self.accepts(b) { + return None; + } + match self { + Scheme::Dpkg => Some(dpkg(a, b)), + Scheme::Rpm => Some(evr(a, b, rpmvercmp)), + Scheme::Pacman => Some(evr(a, b, alpm_vercmp)), + Scheme::Pep440 => Some(Pep440::parse(a)?.cmp(&Pep440::parse(b)?)), + } + } + + /// Whether `raw` is a pre-release under this scheme. + /// + /// A distribution decides itself what is released, so what its stable + /// repositories carry is stable even when upstream calls it `~rc1`. The + /// one place the marker means "not released" is a Python package. + pub fn is_prerelease(self, raw: &str) -> bool { + match self { + Scheme::Pep440 => Pep440::parse(raw.trim()).is_some_and(|v| v.is_prerelease()), + Scheme::Dpkg | Scheme::Rpm | Scheme::Pacman => false, + } + } +} + +/// Split `epoch:rest`. A missing epoch is zero. +fn split_epoch(v: &str) -> (u64, &str) { + match v.split_once(':') { + Some((e, rest)) => match e.parse() { + Ok(n) => (n, rest), + Err(_) => (0, v), + }, + None => (0, v), + } +} + +// ── dpkg ──────────────────────────────────────────────────────────────────── + +fn dpkg(a: &str, b: &str) -> Ordering { + let (ea, a) = split_epoch(a); + let (eb, b) = split_epoch(b); + if ea != eb { + return ea.cmp(&eb); + } + // The revision is what follows the *last* hyphen; none counts as "0". + let split = |v: &str| match v.rsplit_once('-') { + Some((u, r)) => (u.to_string(), r.to_string()), + None => (v.to_string(), String::new()), + }; + let (ua, ra) = split(a); + let (ub, rb) = split(b); + verrevcmp(&ua, &ub).then_with(|| verrevcmp(&ra, &rb)) +} + +/// dpkg's `order()`: `~` before everything, even the end; letters before the +/// remaining punctuation; digits end a non-digit run. +fn dpkg_order(c: Option) -> i32 { + match c { + None => 0, + Some(c) if c.is_ascii_digit() => 0, + Some(c) if c.is_ascii_alphabetic() => i32::from(c), + Some(b'~') => -1, + Some(c) => i32::from(c) + 256, + } +} + +fn verrevcmp(a: &str, b: &str) -> Ordering { + let (a, b) = (a.as_bytes(), b.as_bytes()); + let (mut i, mut j) = (0, 0); + let digit = |s: &[u8], k: usize| s.get(k).is_some_and(u8::is_ascii_digit); + + while i < a.len() || j < b.len() { + while (i < a.len() && !digit(a, i)) || (j < b.len() && !digit(b, j)) { + let (oa, ob) = (dpkg_order(a.get(i).copied()), dpkg_order(b.get(j).copied())); + if oa != ob { + return oa.cmp(&ob); + } + i += 1; + j += 1; + } + let (na, next_i) = digits(a, i); + let (nb, next_j) = digits(b, j); + match cmp_digits(na, nb) { + Ordering::Equal => {} + other => return other, + } + i = next_i; + j = next_j; + } + Ordering::Equal +} + +/// The run of digits at `i`, without leading zeros, and where it ends. +fn digits(s: &[u8], i: usize) -> (&[u8], usize) { + let start = i.min(s.len()); + let end = s[start..] + .iter() + .position(|c| !c.is_ascii_digit()) + .map_or(s.len(), |n| start + n); + let run = &s[start..end]; + let zeros = run.iter().take_while(|c| **c == b'0').count(); + (&run[zeros..], end) +} + +/// Compare digit runs of any length without overflowing. +fn cmp_digits(a: &[u8], b: &[u8]) -> Ordering { + a.len().cmp(&b.len()).then_with(|| a.cmp(b)) +} + +// ── rpm and pacman ────────────────────────────────────────────────────────── + +/// Epoch, then version, then release, the last only when both sides have one. +fn evr(a: &str, b: &str, cmp: fn(&str, &str) -> Ordering) -> Ordering { + let (ea, a) = split_epoch(a); + let (eb, b) = split_epoch(b); + if ea != eb { + return ea.cmp(&eb); + } + let split = |v: &str| match v.rsplit_once('-') { + Some((v, r)) => (v.to_string(), Some(r.to_string())), + None => (v.to_string(), None), + }; + let (va, ra) = split(a); + let (vb, rb) = split(b); + cmp(&va, &vb).then_with(|| match (ra, rb) { + (Some(ra), Some(rb)) => cmp(&ra, &rb), + _ => Ordering::Equal, + }) +} + +/// The next run of only digits or only letters at `i`. +fn run_at(s: &[u8], i: usize) -> (&[u8], bool, usize) { + let numeric = s[i].is_ascii_digit(); + let end = s[i..] + .iter() + .position(|c| { + if numeric { + !c.is_ascii_digit() + } else { + !c.is_ascii_alphabetic() + } + }) + .map_or(s.len(), |n| i + n); + (&s[i..end], numeric, end) +} + +fn cmp_runs(a: &[u8], b: &[u8], numeric: bool) -> Ordering { + if numeric { + cmp_digits(digits(a, 0).0, digits(b, 0).0) + } else { + a.cmp(b) + } +} + +/// rpm's `rpmvercmp`, including `~` (sorts before anything) and `^` (sorts +/// after the same version, before anything longer). +fn rpmvercmp(a: &str, b: &str) -> Ordering { + let (a, b) = (a.as_bytes(), b.as_bytes()); + let (mut i, mut j) = (0, 0); + let skip = |s: &[u8], mut k: usize| { + while k < s.len() && !s[k].is_ascii_alphanumeric() && s[k] != b'~' && s[k] != b'^' { + k += 1; + } + k + }; + + while i < a.len() || j < b.len() { + i = skip(a, i); + j = skip(b, j); + let (ca, cb) = (a.get(i).copied(), b.get(j).copied()); + + if ca == Some(b'~') || cb == Some(b'~') { + if ca != Some(b'~') { + return Ordering::Greater; + } + if cb != Some(b'~') { + return Ordering::Less; + } + i += 1; + j += 1; + continue; + } + if ca == Some(b'^') || cb == Some(b'^') { + match (ca, cb) { + (None, _) => return Ordering::Less, + (_, None) => return Ordering::Greater, + (Some(b'^'), Some(b'^')) => { + i += 1; + j += 1; + continue; + } + (Some(b'^'), _) => return Ordering::Less, + _ => return Ordering::Greater, + } + } + if ca.is_none() || cb.is_none() { + break; + } + + let (ra, na, ei) = run_at(a, i); + let (rb, nb, ej) = run_at(b, j); + if na != nb { + // A numeric segment is newer than an alphabetic one. + return if na { + Ordering::Greater + } else { + Ordering::Less + }; + } + match cmp_runs(ra, rb, na) { + Ordering::Equal => {} + other => return other, + } + i = ei; + j = ej; + } + + // Whichever still has something left is newer. + (i < a.len()).cmp(&(j < b.len())) +} + +/// pacman's `vercmp`, which differs from rpm in two ways: a remaining +/// alphabetic part loses (`1.0rc` < `1.0`), and there is no `~` or `^`. +fn alpm_vercmp(a: &str, b: &str) -> Ordering { + if a == b { + return Ordering::Equal; + } + let (a, b) = (a.as_bytes(), b.as_bytes()); + let (mut i, mut j) = (0, 0); + let skip = |s: &[u8], mut k: usize| { + while k < s.len() && !s[k].is_ascii_alphanumeric() { + k += 1; + } + k + }; + + while i < a.len() && j < b.len() { + let (si, sj) = (skip(a, i), skip(b, j)); + let (gap_a, gap_b) = (si - i, sj - j); + i = si; + j = sj; + if i >= a.len() || j >= b.len() { + break; + } + if gap_a != gap_b { + return gap_a.cmp(&gap_b); + } + let (ra, na, ei) = run_at(a, i); + let (rb, nb, ej) = run_at(b, j); + if na != nb { + return if na { + Ordering::Greater + } else { + Ordering::Less + }; + } + match cmp_runs(ra, rb, na) { + Ordering::Equal => {} + other => return other, + } + i = ei; + j = ej; + } + + let alpha = |c: Option<&u8>| c.is_some_and(u8::is_ascii_alphabetic); + match (a.get(i), b.get(j)) { + (None, None) => Ordering::Equal, + (x, y) => { + if (x.is_none() && !alpha(y)) || alpha(x) { + Ordering::Less + } else { + Ordering::Greater + } + } + } +} + +// ── PEP 440 ───────────────────────────────────────────────────────────────── + +/// A Python version, normalised enough to order. +#[derive(Debug, PartialEq, Eq)] +struct Pep440 { + epoch: u64, + release: Vec, + /// 0 = alpha, 1 = beta, 2 = candidate. + pre: Option<(u8, u64)>, + post: Option, + dev: Option, + local: Vec, +} + +/// Alphabetic local parts sort before numeric ones. +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] +enum LocalPart { + Text(String), + Num(u64), +} + +impl Pep440 { + fn parse(raw: &str) -> Option { + let lower = raw.trim().to_ascii_lowercase(); + let body = lower.strip_prefix('v').unwrap_or(&lower); + let (body, local) = match body.split_once('+') { + Some((b, l)) => (b, Some(l)), + None => (body, None), + }; + let (epoch, body) = match body.split_once('!') { + Some((e, b)) => (e.parse().ok()?, b), + None => (0, body), + }; + + // Release: digits separated by dots, as far as they go. + let mut rest = body; + let mut release = Vec::new(); + loop { + let n = rest.bytes().take_while(u8::is_ascii_digit).count(); + if n == 0 { + break; + } + release.push(rest[..n].parse().ok()?); + rest = &rest[n..]; + match rest.strip_prefix('.') { + Some(r) if r.starts_with(|c: char| c.is_ascii_digit()) => rest = r, + _ => break, + } + } + if release.is_empty() { + return None; + } + + let mut v = Pep440 { + epoch, + release, + pre: None, + post: None, + dev: None, + local: local + .map(|l| { + l.split(['.', '-', '_']) + .map(|p| match p.parse() { + Ok(n) => LocalPart::Num(n), + Err(_) => LocalPart::Text(p.to_string()), + }) + .collect() + }) + .unwrap_or_default(), + }; + + while !rest.is_empty() { + rest = rest.trim_start_matches(['.', '-', '_']); + let n = rest.bytes().take_while(u8::is_ascii_alphabetic).count(); + let (word, tail) = rest.split_at(n); + let tail = tail + .strip_prefix(['.', '-', '_']) + .filter(|t| t.starts_with(|c: char| c.is_ascii_digit())) + .unwrap_or(tail); + let m = tail.bytes().take_while(u8::is_ascii_digit).count(); + let number: u64 = if m == 0 { 0 } else { tail[..m].parse().ok()? }; + rest = &tail[m..]; + match word { + "a" | "alpha" => v.pre = Some((0, number)), + "b" | "beta" => v.pre = Some((1, number)), + "c" | "rc" | "pre" | "preview" => v.pre = Some((2, number)), + "post" | "rev" | "r" => v.post = Some(number), + "dev" => v.dev = Some(number), + // `1.0-1` is the old spelling of `1.0.post1`. + "" if m > 0 && v.post.is_none() => v.post = Some(number), + _ => return None, + } + } + Some(v) + } + + fn is_prerelease(&self) -> bool { + self.pre.is_some() || self.dev.is_some() + } + + /// PEP 440's sort keys for the optional parts: a bare dev release sorts + /// before any pre-release, a final release after all of them. + fn pre_key(&self) -> (u8, u8, u64) { + match (self.pre, self.post, self.dev) { + (Some((kind, n)), _, _) => (1, kind, n), + (None, None, Some(_)) => (0, 0, 0), + _ => (2, 0, 0), + } + } +} + +impl Ord for Pep440 { + fn cmp(&self, other: &Self) -> Ordering { + let len = self.release.len().max(other.release.len()); + let seg = |v: &Pep440, i: usize| v.release.get(i).copied().unwrap_or(0); + self.epoch + .cmp(&other.epoch) + .then_with(|| { + (0..len) + .map(|i| seg(self, i).cmp(&seg(other, i))) + .find(|o| o.is_ne()) + .unwrap_or(Ordering::Equal) + }) + .then_with(|| self.pre_key().cmp(&other.pre_key())) + // No post sorts before any post; no dev sorts after any dev. + .then_with(|| self.post.cmp(&other.post)) + .then_with(|| { + self.dev + .unwrap_or(u64::MAX) + .cmp(&other.dev.unwrap_or(u64::MAX)) + }) + .then_with(|| self.local.cmp(&other.local)) + } +} + +impl PartialOrd for Pep440 { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + /// Assert `older < newer` in both directions. + fn ordered(scheme: Scheme, older: &str, newer: &str) { + assert_eq!( + scheme.compare(older, newer), + Some(Ordering::Less), + "{scheme:?}: {older} should be older than {newer}" + ); + assert_eq!(scheme.compare(newer, older), Some(Ordering::Greater)); + } + + fn same(scheme: Scheme, a: &str, b: &str) { + assert_eq!(scheme.compare(a, b), Some(Ordering::Equal), "{a} == {b}"); + } + + /// The case this module exists for: these are security updates. + #[test] + fn debian_security_updates_are_upgrades() { + let d = Scheme::Dpkg; + ordered(d, "1.1.1w-0+deb11u1", "1.1.1w-0+deb11u2"); + ordered(d, "7.88.1-10+deb12u5", "7.88.1-10+deb12u14"); + ordered(d, "1.9.13p3-1", "1.9.13p3-1+deb12u1"); + ordered(d, "1:9.2p1-2+deb12u2", "1:9.2p1-2+deb12u3"); + ordered(d, "2024a-0+deb12u1", "2025b-0+deb12u1"); + ordered(d, "2.39-0ubuntu8.9", "2.39-0ubuntu8.10"); + ordered(d, "1.2-1", "1.2-1ubuntu1"); + } + + /// Cases from dpkg's own `t-version.c`. + #[test] + fn dpkg_matches_the_reference_ordering() { + let d = Scheme::Dpkg; + ordered(d, "1.0~rc1-1", "1.0-1"); + ordered(d, "1.0~~", "1.0~"); + ordered(d, "1.0~", "1.0"); + ordered(d, "9", "1:0"); + ordered(d, "1.2.3", "1.2.10"); + ordered(d, "1.0", "1.0a"); + ordered(d, "1.0a", "1.0+"); + ordered(d, "2:9.1", "2:10.0"); + same(d, "0:1.0", "1.0"); + same(d, "1.0-0", "1.0"); + same(d, "1.00", "1.0"); + ordered( + d, + "20240101000000000000000001", + "20240101000000000000000002", + ); + } + + /// Cases from rpm's own `rpmvercmp.at`. + #[test] + fn rpm_matches_the_reference_ordering() { + let r = Scheme::Rpm; + ordered(r, "1.0", "2.0"); + ordered(r, "2.0", "2.0.1"); + ordered(r, "2.0.1", "2.0.1a"); + ordered(r, "5.5p1", "5.5p2"); + ordered(r, "5.5p1", "5.5p10"); + ordered(r, "10xyz", "10.1xyz"); + ordered(r, "xyz10a", "xyz10.1a"); + ordered(r, "1.0~rc1", "1.0"); + ordered(r, "1.0~rc1", "1.0~rc2"); + ordered(r, "1.0~rc1~git123", "1.0~rc1"); + ordered(r, "1.0", "1.0^"); + ordered(r, "1.0^git1", "1.0^git2"); + ordered(r, "1.0^git1", "1.01"); + ordered(r, "1.0~rc1", "1.0~rc1^git1"); + ordered(r, "1.0^git1~pre", "1.0^git1"); + same(r, "2_0", "2.0"); + same(r, "1.05", "1.5"); + } + + #[test] + fn rpm_compares_epoch_version_and_release() { + let r = Scheme::Rpm; + ordered(r, "2.3-4.fc43", "1:1.0-1.fc43"); + ordered(r, "1:9.0-1", "1:10.0-1"); + ordered(r, "6.11.4-301.fc41", "6.11.10-200.fc41"); + ordered(r, "1.2-4.fc9", "1.2-4.fc10"); + ordered(r, "1.2-4.fc43", "1.2-10.fc43"); + // A query without a release must not look like an older one. + same(r, "1.2", "1.2-4.fc43"); + } + + /// Cases from pacman's own `vercmptest.sh`. + #[test] + fn pacman_matches_the_reference_ordering() { + let p = Scheme::Pacman; + ordered(p, "1.5.0", "1.5.1"); + ordered(p, "1.5", "1.5.1"); + ordered(p, "1.5.0-1", "1.5.0-2"); + ordered(p, "1.0a", "1.0alpha"); + ordered(p, "1.0alpha", "1.0b"); + ordered(p, "1.0beta", "1.0p"); + ordered(p, "1.0pre", "1.0rc"); + ordered(p, "1.0rc", "1.0"); + ordered(p, "1.5.b", "1.5.1"); + ordered(p, "1.5b", "1.5"); + ordered(p, "1.5b", "1.5.1"); + ordered(p, "1.0", "1.0.a"); + ordered(p, "1.0.a", "1.0.1"); + ordered(p, "2:9.0-1", "2:10.0-1"); + ordered(p, "9.9-1", "1:0.1-1"); + same(p, "0:1.0", "1.0"); + same(p, "1.5", "1.5-1"); + } + + #[test] + fn python_versions_follow_pep_440() { + let p = Scheme::Pep440; + for pair in [ + "1.0.dev456", + "1.0a1", + "1.0a2.dev456", + "1.0a12.dev456", + "1.0a12", + "1.0b1.dev456", + "1.0b2", + "1.0b2.post345.dev456", + "1.0b2.post345", + "1.0rc1.dev456", + "1.0rc1", + "1.0", + "1.0+abc.5", + "1.0+abc.7", + "1.0+5", + "1.0.post456.dev34", + "1.0.post456", + "1.1.dev1", + "1!0.1", + ] + .windows(2) + { + ordered(p, pair[0], pair[1]); + } + same(p, "1.0", "1.0.0"); + same(p, "1.0-rc.1", "1.0rc1"); + same(p, "1.0-1", "1.0.post1"); + ordered(p, "1.0rc9", "1.0rc10"); + assert!(p.is_prerelease("2.0.0rc1")); + assert!(p.is_prerelease("2.0.0.dev3")); + assert!(!p.is_prerelease("2.0.0.post1")); + // A CUDA build must not be "upgraded" to the plain one of the same + // version. + ordered(p, "2.1.0", "2.1.0+cu118"); + } + + #[test] + fn unreadable_versions_are_refused_rather_than_ordered() { + for scheme in [Scheme::Dpkg, Scheme::Rpm, Scheme::Pacman, Scheme::Pep440] { + for bad in ["", " ", "stable", "(none)", "1.0 beta", "n/a"] { + assert!(!scheme.accepts(bad), "{scheme:?} accepted {bad:?}"); + assert_eq!(scheme.compare(bad, "1.0"), None); + assert_eq!(scheme.compare("1.0", bad), None); + } + } + assert_eq!(Scheme::Pep440.compare("1.0", "1.0.foo"), None); + } +} From f25806e9cf2674a7512322373c506ae71568891e Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 16:50:10 +0100 Subject: [PATCH 04/18] fix(core): a finished program is not held up by what it left running proc::run waited for the output pipe to close, so an installer that started the installed app kept "running" until that app was closed and ended as a timeout. It now returns two seconds after the program exits at the latest. A timeout or a cancelled scan ends everything the program started on Windows (npm.cmd's node, choco's installer), not only the launcher, and output beyond 10 MiB is dropped while reading instead of afterwards. --- crates/odysync-core/Cargo.toml | 2 + crates/odysync-core/src/proc.rs | 273 +++++++++++++++++++++++--------- 2 files changed, 203 insertions(+), 72 deletions(-) diff --git a/crates/odysync-core/Cargo.toml b/crates/odysync-core/Cargo.toml index c834ae6..379cdb1 100644 --- a/crates/odysync-core/Cargo.toml +++ b/crates/odysync-core/Cargo.toml @@ -33,6 +33,8 @@ windows = { version = "0.62", features = [ "Win32_Foundation", "Win32_Security", "Win32_System_Threading", + # `proc::ProcessTree`: stop everything a timed-out program started. + "Win32_System_JobObjects", "Win32_System_Restore", # `platform::reboot_pending` reads the three registry locations Windows # itself uses to record "a restart is needed to finish servicing". diff --git a/crates/odysync-core/src/proc.rs b/crates/odysync-core/src/proc.rs index 46641d7..0f01bc7 100644 --- a/crates/odysync-core/src/proc.rs +++ b/crates/odysync-core/src/proc.rs @@ -15,7 +15,9 @@ use std::ffi::OsStr; use std::process::Stdio; use std::time::Duration; -use tokio::io::AsyncReadExt; +use std::sync::{Arc, Mutex}; + +use tokio::io::{AsyncRead, AsyncReadExt}; use tokio::process::Command; use crate::error::{Error, Result}; @@ -26,6 +28,15 @@ use crate::error::{Error, Result}; /// writes unbounded output (e.g. verbose debug logging to stderr). const MAX_OUTPUT_BYTES: usize = 10 * 1024 * 1024; +/// How long to keep reading once the program itself has exited. +/// +/// A pipe only ends when *every* holder of its write end is gone, and a +/// program can leave a child behind that inherited it: an installer that +/// starts the freshly installed app, a package manager that starts a daemon. +/// Waiting for the pipe would then wait for that app to be closed, turn a +/// finished install into a timeout, and report it as failed. +const DRAIN_AFTER_EXIT: Duration = Duration::from_secs(2); + /// Windows `CREATE_NO_WINDOW`: run without allocating a console. #[cfg(windows)] const CREATE_NO_WINDOW: u32 = 0x0800_0000; @@ -149,10 +160,97 @@ fn is_windows_powershell(program: &str) -> bool { name == "powershell.exe" || name == "powershell" } +/// Read `pipe` to its end into `into`, keeping at most [`MAX_OUTPUT_BYTES`]. +/// +/// What exceeds the limit is read and dropped: a child blocks on a full pipe +/// that nobody empties. +async fn drain(pipe: Option, into: Arc>>, program: String) { + let Some(mut pipe) = pipe else { return }; + let mut buf = vec![0u8; 16 * 1024]; + let mut warned = false; + while let Ok(n) = pipe.read(&mut buf).await { + if n == 0 { + break; + } + let mut out = into.lock().unwrap_or_else(|p| p.into_inner()); + let room = MAX_OUTPUT_BYTES.saturating_sub(out.len()); + out.extend_from_slice(&buf[..n.min(room)]); + if n > room && !warned { + warned = true; + tracing::warn!(%program, max = MAX_OUTPUT_BYTES, "output truncated"); + } + } +} + +fn collected(buffer: &Mutex>) -> String { + let raw = buffer.lock().unwrap_or_else(|p| p.into_inner()); + String::from_utf8_lossy(&raw).into_owned() +} + +/// Everything a spawned program started, so that it can be stopped as one. +/// +/// `kill_on_drop` ends the direct child only. On Windows that child is often +/// just a launcher (`npm.cmd` runs node, `choco` runs the installer), and what +/// it started kept running after the timeout that was supposed to end it. +/// +/// The job carries no limits: whatever is still running when the program has +/// exited on its own (an app an installer started) is left alone. +#[cfg(windows)] +struct ProcessTree { + job: windows::Win32::Foundation::HANDLE, + armed: bool, +} + +// A job handle is a kernel object reference, usable from any thread. +#[cfg(windows)] +unsafe impl Send for ProcessTree {} +#[cfg(windows)] +unsafe impl Sync for ProcessTree {} + +#[cfg(windows)] +impl ProcessTree { + fn of(child: &tokio::process::Child) -> Option { + use windows::Win32::Foundation::{CloseHandle, HANDLE}; + use windows::Win32::System::JobObjects::{AssignProcessToJobObject, CreateJobObjectW}; + + let process = HANDLE(child.raw_handle()?); + // SAFETY: the process handle belongs to `child`, which outlives this + // call; the job handle is closed below or in `drop`. + unsafe { + let job = CreateJobObjectW(None, None).ok()?; + if AssignProcessToJobObject(job, process).is_err() { + let _ = CloseHandle(job); + return None; + } + Some(Self { job, armed: true }) + } + } + + /// The program exited on its own; leave what it started alone. + fn release(&mut self) { + self.armed = false; + } +} + +#[cfg(windows)] +impl Drop for ProcessTree { + fn drop(&mut self) { + use windows::Win32::Foundation::CloseHandle; + use windows::Win32::System::JobObjects::TerminateJobObject; + // SAFETY: the handle is ours and still open. + unsafe { + if self.armed { + let _ = TerminateJobObject(self.job, 1); + } + let _ = CloseHandle(self.job); + } + } +} + /// Run `program` with `args`, capturing output, killed after `timeout`. /// -/// The child is killed on timeout; `kill_on_drop` ensures it also dies if the -/// future is cancelled, so a cancelled scan cannot leave orphaned processes. +/// On timeout, and when the future is dropped (a cancelled scan), the program +/// is stopped; on Windows together with everything it started. pub async fn run>(program: &str, args: &[S], timeout: Duration) -> Result { let mut cmd = build(program, args); cmd.kill_on_drop(true); @@ -164,57 +262,52 @@ pub async fn run>(program: &str, args: &[S], timeout: Duration) Error::Io(e) } })?; - - let mut stdout_pipe = child.stdout.take(); - let mut stderr_pipe = child.stderr.take(); - - // Drain both pipes concurrently with the wait. Reading them sequentially - // deadlocks as soon as a child fills the pipe buffer it is not being read - // from, which winget does on large upgrade lists. - let collect = async { - let stdout_fut = async { - let mut stdout = String::new(); - if let Some(p) = stdout_pipe.as_mut() { - let mut raw = Vec::new(); - p.read_to_end(&mut raw).await?; - truncate_output(&mut raw, program); - stdout = String::from_utf8_lossy(&raw).into_owned(); - } - Ok::<_, std::io::Error>(stdout) - }; - let stderr_fut = async { - let mut stderr = String::new(); - if let Some(p) = stderr_pipe.as_mut() { - let mut raw = Vec::new(); - p.read_to_end(&mut raw).await?; - truncate_output(&mut raw, program); - stderr = String::from_utf8_lossy(&raw).into_owned(); - } - Ok::<_, std::io::Error>(stderr) - }; - let (stdout, stderr) = tokio::try_join!(stdout_fut, stderr_fut)?; - Ok::<_, std::io::Error>((stdout, stderr)) + #[cfg(windows)] + let mut tree = ProcessTree::of(&child); + + // Both pipes are drained while waiting. Reading them one after the other + // deadlocks as soon as a child fills the pipe that is not being read, + // which winget does on large upgrade lists. + let stdout = Arc::new(Mutex::new(Vec::new())); + let stderr = Arc::new(Mutex::new(Vec::new())); + let mut readers = tokio::task::JoinSet::new(); + readers.spawn(drain( + child.stdout.take(), + Arc::clone(&stdout), + program.to_string(), + )); + readers.spawn(drain( + child.stderr.take(), + Arc::clone(&stderr), + program.to_string(), + )); + + let status = match tokio::time::timeout(timeout, child.wait()).await { + Ok(status) => status?, + Err(_) => { + return Err(Error::CommandTimeout { + command: program.to_string(), + seconds: timeout.as_secs(), + }); + } }; + #[cfg(windows)] + if let Some(tree) = &mut tree { + tree.release(); + } - let status = tokio::time::timeout(timeout, async { - let (out, err) = collect.await?; - let status = child.wait().await?; - Ok::<_, std::io::Error>((status, out, err)) + // Dropping the set ends readers that are still waiting on a pipe some + // left-behind child holds open. + let _ = tokio::time::timeout(DRAIN_AFTER_EXIT, async { + while readers.join_next().await.is_some() {} }) .await; - match status { - Ok(Ok((status, stdout, stderr))) => Ok(Output { - code: status.code().unwrap_or(-1), - stdout, - stderr, - }), - Ok(Err(e)) => Err(Error::Io(e)), - Err(_) => Err(Error::CommandTimeout { - command: program.to_string(), - seconds: timeout.as_secs(), - }), - } + Ok(Output { + code: status.code().unwrap_or(-1), + stdout: collected(&stdout), + stderr: collected(&stderr), + }) } /// True when `program` can be executed at all. @@ -254,19 +347,6 @@ pub async fn powershell(script: &str, timeout: Duration) -> Result { .await } -/// Truncate output to `MAX_OUTPUT_BYTES`, logging a warning if truncation occurred. -fn truncate_output(raw: &mut Vec, program: &str) { - if raw.len() > MAX_OUTPUT_BYTES { - tracing::warn!( - program = program, - original_len = raw.len(), - max = MAX_OUTPUT_BYTES, - "output truncated to prevent memory exhaustion" - ); - raw.truncate(MAX_OUTPUT_BYTES); - } -} - #[cfg(test)] mod tests { use super::*; @@ -371,17 +451,66 @@ mod tests { assert!(!exists("odysync-not-real-at-all", &["--version"]).await); } - #[test] - fn truncate_output_cuts_at_max() { - let mut raw = vec![b'a'; MAX_OUTPUT_BYTES + 100]; - truncate_output(&mut raw, "test"); - assert_eq!(raw.len(), MAX_OUTPUT_BYTES); + #[tokio::test] + async fn output_is_capped_while_it_is_read() { + let buffer = Arc::new(Mutex::new(Vec::new())); + let input = std::io::Cursor::new(vec![b'a'; MAX_OUTPUT_BYTES + 100_000]); + drain(Some(input), Arc::clone(&buffer), "test".into()).await; + assert_eq!(buffer.lock().unwrap().len(), MAX_OUTPUT_BYTES); } - #[test] - fn truncate_output_leaves_small_output_alone() { - let mut raw = vec![b'a'; 100]; - truncate_output(&mut raw, "test"); - assert_eq!(raw.len(), 100); + #[tokio::test] + async fn small_output_is_kept_whole() { + let buffer = Arc::new(Mutex::new(Vec::new())); + let input = std::io::Cursor::new(b"abc".to_vec()); + drain(Some(input), Arc::clone(&buffer), "test".into()).await; + assert_eq!(collected(&buffer), "abc"); + } + + /// An installer that starts the app it installed leaves a child behind + /// that inherited its output pipe. The install is done when the installer + /// exits, not when that app is closed. + #[tokio::test] + async fn a_left_behind_child_does_not_hold_up_the_result() { + let started = std::time::Instant::now(); + let (prog, args) = if cfg!(windows) { + ( + "cmd", + vec!["/c", "echo done & start /b ping -n 20 127.0.0.1"], + ) + } else { + ("sh", vec!["-c", "echo done; sleep 20 &"]) + }; + let out = run(prog, &args, Duration::from_secs(15)).await.unwrap(); + assert!(out.success()); + assert!(out.stdout.contains("done")); + assert!( + started.elapsed() < Duration::from_secs(10), + "took {:?}", + started.elapsed() + ); + } + + /// What a launcher started must not outlive the timeout that ended it. + #[cfg(windows)] + #[tokio::test] + async fn a_timeout_ends_what_the_program_started_too() { + // A distinctive ping target identifies the grandchild. + let marker = "127.77.31.99"; + let err = run( + "cmd", + &["/c", "cmd /c ping -n 60 127.77.31.99"], + Duration::from_secs(2), + ) + .await + .unwrap_err(); + assert!(matches!(err, Error::CommandTimeout { .. })); + + let query = format!( + "@(Get-CimInstance Win32_Process -Filter \"Name='PING.EXE'\" | \ + Where-Object {{ $_.CommandLine -like '*{marker}*' }}).Count" + ); + let out = powershell(&query, Duration::from_secs(60)).await.unwrap(); + assert_eq!(out.stdout.trim(), "0", "the grandchild is still running"); } } From be4da65838a3d735962fadc1a9bef3617bfb2dd2 Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 16:50:11 +0100 Subject: [PATCH 05/18] fix(core): never start an installer twice, one run at a time, cancel An installer that ran into its time limit was started up to two more times over whatever the first left. The installed version is read back instead. Exit codes 11 and 143 no longer count as "try again" either. Runs can be cancelled between packages, a lock file keeps two Odysync processes from installing at once, history is written after every package and an unreadable history is kept instead of overwritten. macOS system updates, guest tools and Windows features are never part of unattended care. Error texts keep four-part versions, which were redacted as IPs. --- crates/odysync-core/src/apply_lock.rs | 67 +++++++ crates/odysync-core/src/error.rs | 64 +++++-- crates/odysync-core/src/history.rs | 48 +++-- crates/odysync-core/src/lib.rs | 2 + crates/odysync-core/src/model.rs | 6 + crates/odysync-core/src/runner.rs | 254 +++++++++++++++++++++++++- 6 files changed, 402 insertions(+), 39 deletions(-) create mode 100644 crates/odysync-core/src/apply_lock.rs diff --git a/crates/odysync-core/src/apply_lock.rs b/crates/odysync-core/src/apply_lock.rs new file mode 100644 index 0000000..2966811 --- /dev/null +++ b/crates/odysync-core/src/apply_lock.rs @@ -0,0 +1,67 @@ +//! One install run at a time, across every Odysync on the machine. +//! +//! The app, a terminal and the scheduler are separate processes. Two of them +//! installing at once would race over the same packages and the same history +//! file, so whoever starts first holds a lock file until it is done. The lock +//! is the operating system's, not the file's existence: a process that dies +//! releases it. + +use std::fs::{File, TryLockError}; +use std::path::{Path, PathBuf}; + +use crate::error::{Error, Result}; + +/// Held for as long as updates are being installed. +#[derive(Debug)] +pub struct ApplyLock { + _file: File, +} + +impl ApplyLock { + /// Take the lock, or say that someone else has it. + pub fn acquire() -> Result { + Self::acquire_at(&default_path()?) + } + + /// [`acquire`](Self::acquire) on a given file. + pub fn acquire_at(path: &Path) -> Result { + if let Some(parent) = path.parent() { + std::fs::create_dir_all(parent)?; + } + let file = File::options() + .create(true) + .truncate(false) + .write(true) + .open(path)?; + match file.try_lock() { + Ok(()) => Ok(Self { _file: file }), + Err(TryLockError::WouldBlock) => Err(Error::unavailable( + "Odysync", + "another Odysync is installing updates right now; wait for it to finish", + )), + Err(TryLockError::Error(e)) => Err(e.into()), + } + } +} + +fn default_path() -> Result { + directories::ProjectDirs::from("dev", "SenseiIssei", "Odysync") + .map(|d| d.data_local_dir().join("apply.lock")) + .ok_or_else(|| Error::Config("could not resolve the user data directory".into())) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn only_one_run_holds_the_lock_at_a_time() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("sub").join("apply.lock"); + let first = ApplyLock::acquire_at(&path).expect("free"); + let err = ApplyLock::acquire_at(&path).expect_err("taken"); + assert!(err.to_string().contains("another Odysync"), "{err}"); + drop(first); + ApplyLock::acquire_at(&path).expect("free again"); + } +} diff --git a/crates/odysync-core/src/error.rs b/crates/odysync-core/src/error.rs index b5b4c4a..359b0b9 100644 --- a/crates/odysync-core/src/error.rs +++ b/crates/odysync-core/src/error.rs @@ -105,15 +105,16 @@ impl Error { } } - /// Whether this error is worth retrying. + /// Whether the same operation may simply be started again. /// - /// Transient errors and timeouts are retryable. Verification errors, - /// security violations, and invalid package IDs are never retryable. + /// Only when nothing was changed yet: a download that broke off, a lock + /// held by someone else. A program that was started and timed out is not + /// in this group. It was stopped in the middle of something, or it has + /// finished and nobody noticed; running the installer a second time is + /// the reinstall over a working copy this tool promises never to do. pub fn is_retryable(&self) -> bool { match self { Error::Transient { .. } => true, - Error::CommandTimeout { .. } => true, - Error::CommandFailed { code, .. } => *code == 11 || *code == 143, Error::Io(e) => { matches!( e.kind(), @@ -161,10 +162,20 @@ fn sanitize_text(text: &str) -> String { } } - // Redact IP addresses - let ip_re = regex::Regex::new(r"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b") - .unwrap_or_else(|_| regex::Regex::new(r"").unwrap()); - result = ip_re.replace_all(&result, "[IP REDACTED]").to_string(); + // Redact IP addresses, but not four-part versions, which look the same: + // "the publisher now offers 8.9.8.1" lost the one thing it had to say. + // So only where the text says it is an address, or the range is private. + let ip_re = regex::Regex::new( + r"(?i)(?P://|\b(?:to|from|at|host|address|server|proxy|ip)[ :=]+)(?:\d{1,3}\.){3}\d{1,3}\b", + ) + .unwrap_or_else(|_| regex::Regex::new(r"").unwrap()); + result = ip_re + .replace_all(&result, "${lead}[IP REDACTED]") + .to_string(); + let private_re = + regex::Regex::new(r"\b(?:192\.168|172\.(?:1[6-9]|2\d|3[01]))\.\d{1,3}\.\d{1,3}\b") + .unwrap_or_else(|_| regex::Regex::new(r"").unwrap()); + result = private_re.replace_all(&result, "[IP REDACTED]").to_string(); // Redact environment variable values that look like tokens let token_re = regex::Regex::new(r"(?i)(token|key|secret|password|api[_-]?key)\s*[=:]\s*\S+") @@ -184,13 +195,38 @@ mod tests { assert!(e.is_retryable()); } + /// Starting an installer again after a timeout runs it over whatever the + /// first one left, possibly while the first one is still working. #[test] - fn timeouts_are_retryable() { - let e = Error::CommandTimeout { - command: "dnf check-update".into(), - seconds: 300, + fn a_program_that_was_started_is_never_started_again() { + let timeout = Error::CommandTimeout { + command: "installer.exe".into(), + seconds: 1800, }; - assert!(e.is_retryable()); + assert!(!timeout.is_retryable()); + for code in [1, 11, 143, 1603] { + let failed = Error::CommandFailed { + command: "installer.exe".into(), + code, + stderr: String::new(), + }; + assert!(!failed.is_retryable(), "exit code {code}"); + } + } + + #[test] + fn sanitize_keeps_version_numbers() { + let e = Error::Verification { + package: "Notepad++".into(), + detail: "the publisher now offers 8.9.8.1 instead of the approved 8.9.8.0".into(), + }; + let text = e.sanitize(); + assert!( + text.contains("8.9.8.1") && text.contains("8.9.8.0"), + "{text}" + ); + let e = Error::transient("direct", "could not fetch https://203.0.113.9/x", 0); + assert!(!e.sanitize().contains("203.0.113.9")); } #[test] diff --git a/crates/odysync-core/src/history.rs b/crates/odysync-core/src/history.rs index 04c1505..d454d11 100644 --- a/crates/odysync-core/src/history.rs +++ b/crates/odysync-core/src/history.rs @@ -61,25 +61,26 @@ pub struct UpdateHistory { } impl UpdateHistory { - /// Load history from the default config directory, creating the file if - /// it does not exist. + /// Load history from the default config directory. pub fn load() -> Self { - let path = history_path(); - let entries = match std::fs::read_to_string(&path) { - Ok(contents) => serde_json::from_str(&contents).unwrap_or_default(), - Err(_) => Vec::new(), - }; - Self { - entries, - path, - max_entries: 500, - } + Self::load_from(history_path()) } - /// Load from a specific path (useful for testing). + /// Load from a specific path. + /// + /// A file that exists but cannot be read as a history is moved aside, not + /// treated as empty: the next save would replace it. pub fn load_from(path: PathBuf) -> Self { let entries = match std::fs::read_to_string(&path) { - Ok(contents) => serde_json::from_str(&contents).unwrap_or_default(), + Ok(contents) => match serde_json::from_str(&contents) { + Ok(entries) => entries, + Err(e) => { + let aside = path.with_extension("json.corrupt"); + let kept = std::fs::rename(&path, &aside).is_ok(); + tracing::warn!(error = %e, kept, "update history could not be read"); + Vec::new() + } + }, Err(_) => Vec::new(), }; Self { @@ -122,7 +123,10 @@ impl UpdateHistory { std::fs::create_dir_all(parent)?; } let json = serde_json::to_string_pretty(&self.entries)?; - std::fs::write(&self.path, json) + // Write-then-rename, so an interrupted save cannot truncate it. + let tmp = self.path.with_extension("json.tmp"); + std::fs::write(&tmp, json)?; + std::fs::rename(&tmp, &self.path) } /// Return all history entries, most recent last. @@ -161,6 +165,20 @@ fn history_path() -> PathBuf { mod tests { use super::*; + #[test] + fn an_unreadable_history_is_kept_beside_the_new_one() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("history.json"); + std::fs::write(&path, "{ not a history").unwrap(); + let history = UpdateHistory::load_from(path.clone()); + assert!(history.entries().is_empty()); + history.save().unwrap(); + assert_eq!( + std::fs::read_to_string(path.with_extension("json.corrupt")).unwrap(), + "{ not a history" + ); + } + /// Histories written before 3.2 carry the timestamps of another library, /// with nanoseconds and either spelling of UTC. They must keep loading: /// an unreadable entry would empty the whole page. diff --git a/crates/odysync-core/src/lib.rs b/crates/odysync-core/src/lib.rs index 9d34920..859954a 100644 --- a/crates/odysync-core/src/lib.rs +++ b/crates/odysync-core/src/lib.rs @@ -2,6 +2,7 @@ //! apply runner. This crate performs no I/O against package managers — that //! lives in `odysync-backends` — which keeps every safety rule unit-testable. +pub mod apply_lock; pub mod backend; pub mod cleanup; pub mod config; @@ -22,6 +23,7 @@ pub mod version; pub mod version_native; pub mod windows_update; +pub use apply_lock::ApplyLock; pub use backend::{ApplyPhase, ApplyProgress, Backend}; pub use cleanup::{CleanupCategory, CleanupFinding, CleanupOutcome, Reversibility}; pub use config::Config; diff --git a/crates/odysync-core/src/model.rs b/crates/odysync-core/src/model.rs index b1aa576..8c41853 100644 --- a/crates/odysync-core/src/model.rs +++ b/crates/odysync-core/src/model.rs @@ -356,6 +356,9 @@ impl BackendKind { | BackendKind::MsiCenter | BackendKind::Fwupd | BackendKind::MacFirmware + | BackendKind::MacSoftwareUpdate + | BackendKind::VirtualizationGuest + | BackendKind::WindowsOptionalFeature ) } @@ -611,6 +614,8 @@ pub enum SkipReason { RequiresUnelevated, /// The backend needs privileges the current process does not have. RequiresElevation, + /// The run was cancelled before this update was started. + Cancelled, } impl fmt::Display for SkipReason { @@ -633,6 +638,7 @@ impl fmt::Display for SkipReason { f.write_str("Microsoft Store apps cannot be updated from an elevated process") } SkipReason::RequiresElevation => f.write_str("requires administrator privileges"), + SkipReason::Cancelled => f.write_str("cancelled before it was started"), } } } diff --git a/crates/odysync-core/src/runner.rs b/crates/odysync-core/src/runner.rs index 2d0891d..4f54801 100644 --- a/crates/odysync-core/src/runner.rs +++ b/crates/odysync-core/src/runner.rs @@ -7,10 +7,13 @@ //! update that did not converge is reported as a failure. use std::collections::HashMap; +use std::sync::Arc; +use std::sync::atomic::{AtomicBool, Ordering}; use crate::backend::Backend; +use crate::error::Error; use crate::history::UpdateHistory; -use crate::model::{ApplyOutcome, BackendKind, PlannedUpdate}; +use crate::model::{ApplyOutcome, BackendKind, PlannedUpdate, SkipReason}; use crate::report::RunReport; use crate::restore::RestorePointGuard; @@ -23,6 +26,7 @@ pub struct Runner<'a> { dry_run: bool, history: Option, max_retries: u32, + cancel: Option>, } impl<'a> Runner<'a> { @@ -32,9 +36,25 @@ impl<'a> Runner<'a> { dry_run, history: None, max_retries: DEFAULT_MAX_RETRIES, + cancel: None, } } + /// Stop early once `flag` is set. + /// + /// The package being installed is finished: interrupting an installer is + /// how machines break. Everything after it is reported as skipped. + pub fn with_cancel(mut self, flag: Arc) -> Self { + self.cancel = Some(flag); + self + } + + fn cancelled(&self) -> bool { + self.cancel + .as_ref() + .is_some_and(|c| c.load(Ordering::Relaxed)) + } + /// Enable persistent update history recording. pub fn with_history(mut self, history: UpdateHistory) -> Self { self.history = Some(history); @@ -131,6 +151,17 @@ impl<'a> Runner<'a> { continue; } + if self.cancelled() { + report.push( + candidate.id.clone(), + candidate.name.clone(), + ApplyOutcome::Skipped { + reason: SkipReason::Cancelled, + }, + ); + continue; + } + let Some(backend) = self.backends.get(&candidate.id.backend) else { report.push( candidate.id.clone(), @@ -181,6 +212,12 @@ impl<'a> Runner<'a> { candidate.available.raw(), &outcome, ); + // After every package, not once at the end: a run that is + // interrupted half-way must still leave a record of the half + // that happened. + if let Err(e) = history.save() { + tracing::warn!(error = %e, "failed to save update history"); + } } report.push(candidate.id.clone(), candidate.name.clone(), outcome); @@ -188,12 +225,6 @@ impl<'a> Runner<'a> { emit(emitter, &candidate.name, current, "installing"); } - if let Some(history) = &self.history - && let Err(e) = history.save() - { - tracing::warn!(error = %e, "failed to save update history"); - } - // Ask the OS whether it now wants a restart, rather than trusting a // backend to say so. `reboot_required` had three display sites and no // assignment anywhere, so the banners could never appear; asking here @@ -213,11 +244,12 @@ impl<'a> Runner<'a> { report.finish(); } - /// Apply an update with retry logic for transient errors. + /// Apply an update, retrying what failed before anything was changed. /// /// Retries up to `self.max_retries` times with exponential backoff - /// (1s, 2s, 4s, ...) when the error is retryable (transient, timeout, - /// certain I/O errors). + /// (1s, 2s, 4s, ...) when [`Error::is_retryable`] says so. A program that + /// ran into its time limit is never started again; whether it got there + /// after all is read back from the machine. async fn apply_with_retry( &self, backend: &dyn Backend, @@ -229,6 +261,22 @@ impl<'a> Runner<'a> { for attempt in 0..=max_retries { match backend.apply(candidate).await { Ok(()) => return self.confirm(backend, planned).await, + Err(e @ Error::CommandTimeout { .. }) => { + tracing::warn!( + package = %candidate.id, + error = %e, + "time limit reached; checking what is installed" + ); + return match self.confirm(backend, planned).await { + done @ ApplyOutcome::Updated { .. } => done, + _ => ApplyOutcome::Failed { + detail: format!( + "{}; it was stopped and not started again", + e.sanitize() + ), + }, + }; + } Err(e) => { if e.is_retryable() && attempt < max_retries { // Cap the shift so a large configured retry count @@ -322,3 +370,189 @@ pub struct ProgressEvent { pub trait ProgressEmitter: Send + Sync { fn emit_progress(&self, event: ProgressEvent); } + +#[cfg(test)] +mod tests { + use super::*; + use crate::error::Result; + use crate::model::{PackageId, UpdateCandidate}; + use crate::version::Version; + use std::sync::atomic::AtomicUsize; + + /// A backend whose `apply` fails the way a test asks for, and which counts + /// how often it was started. + struct Fake { + error: fn() -> Option, + installed: &'static str, + applies: AtomicUsize, + cancel: Option>, + } + + impl Fake { + fn new(error: fn() -> Option, installed: &'static str) -> Self { + Self { + error, + installed, + applies: AtomicUsize::new(0), + cancel: None, + } + } + + fn applies(&self) -> usize { + self.applies.load(Ordering::Relaxed) + } + } + + #[async_trait::async_trait] + impl Backend for Fake { + fn kind(&self) -> BackendKind { + BackendKind::Direct + } + fn display_name(&self) -> &str { + "fake" + } + async fn is_available(&self) -> bool { + true + } + async fn scan(&self) -> Result> { + Ok(Vec::new()) + } + async fn apply(&self, _: &UpdateCandidate) -> Result<()> { + self.applies.fetch_add(1, Ordering::Relaxed); + if let Some(flag) = &self.cancel { + flag.store(true, Ordering::Relaxed); + } + match (self.error)() { + Some(e) => Err(e), + None => Ok(()), + } + } + async fn installed_version(&self, _: &UpdateCandidate) -> Result> { + Ok(Some(self.installed.to_string())) + } + } + + fn planned(name: &str) -> PlannedUpdate { + PlannedUpdate { + candidate: UpdateCandidate { + id: PackageId::new(BackendKind::Direct, format!("user:{name}")), + name: name.into(), + installed: Version::parse("1.0"), + available: Version::parse("1.1"), + size_bytes: None, + expected_sha256: None, + }, + blocked_by: None, + } + } + + fn timed_out() -> Option { + Some(Error::CommandTimeout { + command: "installer".into(), + seconds: 1, + }) + } + + async fn run(fake: &Fake, plan: &[PlannedUpdate]) -> RunReport { + let mut report = RunReport::new(); + Runner::new([fake as &dyn Backend], false) + .run(plan, &mut report, false) + .await; + report + } + + #[tokio::test] + async fn an_installer_that_timed_out_is_not_started_again() { + let fake = Fake::new(timed_out, "1.0"); + let report = run(&fake, &[planned("a")]).await; + assert_eq!(fake.applies(), 1); + match &report.entries[0].outcome { + ApplyOutcome::Failed { detail } => assert!(detail.contains("not started again")), + other => panic!("{other:?}"), + } + } + + #[tokio::test] + async fn an_installer_that_timed_out_but_finished_is_a_success() { + let fake = Fake::new(timed_out, "1.1"); + let report = run(&fake, &[planned("a")]).await; + assert_eq!(fake.applies(), 1); + assert_eq!(report.updated(), 1); + } + + #[tokio::test] + async fn a_failed_installer_stays_failed() { + let fake = Fake::new( + || { + Some(Error::CommandFailed { + command: "installer".into(), + code: 143, + stderr: String::new(), + }) + }, + "1.0", + ); + let report = run(&fake, &[planned("a")]).await; + assert_eq!(fake.applies(), 1); + assert_eq!(report.failed(), 1); + } + + #[tokio::test] + async fn exit_code_zero_without_a_new_version_is_not_success() { + let fake = Fake::new(|| None, "1.0"); + let report = run(&fake, &[planned("a")]).await; + assert!(matches!( + report.entries[0].outcome, + ApplyOutcome::DidNotConverge { .. } + )); + } + + #[tokio::test] + async fn cancelling_finishes_the_current_package_and_skips_the_rest() { + let flag = Arc::new(AtomicBool::new(false)); + let mut fake = Fake::new(|| None, "1.1"); + fake.cancel = Some(Arc::clone(&flag)); + let mut report = RunReport::new(); + Runner::new([&fake as &dyn Backend], false) + .with_cancel(flag) + .run(&[planned("a"), planned("b")], &mut report, false) + .await; + assert_eq!(fake.applies(), 1); + assert_eq!(report.updated(), 1); + assert_eq!( + report.entries[1].outcome, + ApplyOutcome::Skipped { + reason: SkipReason::Cancelled + } + ); + } + + /// A run that dies half-way must leave a record of the half that happened. + #[tokio::test] + async fn history_is_on_disk_after_every_package() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("history.json"); + struct Watcher(std::path::PathBuf, AtomicUsize); + impl ProgressEmitter for Watcher { + fn emit_progress(&self, event: ProgressEvent) { + if event.phase == "installing" { + let n = UpdateHistory::load_from(self.0.clone()).entries().len(); + self.1.fetch_max(n, Ordering::Relaxed); + } + } + } + let watcher = Watcher(path.clone(), AtomicUsize::new(0)); + let fake = Fake::new(|| None, "1.1"); + let mut report = RunReport::new(); + Runner::new([&fake as &dyn Backend], false) + .with_history(UpdateHistory::load_from(path)) + .run_with_progress( + &[planned("a"), planned("b")], + &mut report, + false, + Some(&watcher), + ) + .await; + assert_eq!(watcher.1.load(Ordering::Relaxed), 2); + } +} From c0007632b831b01d2282c07623e074b6d7d5ebfa Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 16:53:04 +0100 Subject: [PATCH 06/18] fix(windows-update): result codes were off by two orcFailed was taken to be 2, which is orcSucceeded. Every download that succeeded was reported as failed and nothing was installed, every install that succeeded was reported as failed, and a real failure (4) passed as success. This affected security updates, Defender, feature upgrades and drivers. The codes are now checked against the Windows bindings. A search that failed with nothing found is an error instead of "up to date", an incomplete search no longer proves that an update landed, an update that only waits for a restart counts as installed, optional previews are not offered, and a hung Windows Update service stops blocking the scan after 10 minutes and an install after 60. --- .../odysync-backends/src/windows_drivers.rs | 21 +- .../src/windows_update/mod.rs | 40 ++- .../src/windows_update/session.rs | 305 ++++++++++++++---- 3 files changed, 285 insertions(+), 81 deletions(-) diff --git a/crates/odysync-backends/src/windows_drivers.rs b/crates/odysync-backends/src/windows_drivers.rs index dbff03c..57a6ad2 100644 --- a/crates/odysync-backends/src/windows_drivers.rs +++ b/crates/odysync-backends/src/windows_drivers.rs @@ -86,7 +86,12 @@ impl Backend for WindowsDriverBackend { } let updates = session::search_for_scan(CRITERIA_DRIVER).await?; - Ok(updates.iter().map(to_candidate).collect()) + Ok(updates + .updates + .iter() + .filter(|u| !u.reboot_pending) + .map(to_candidate) + .collect()) } async fn apply(&self, candidate: &UpdateCandidate) -> Result<()> { @@ -102,17 +107,15 @@ impl Backend for WindowsDriverBackend { } async fn installed_version(&self, candidate: &UpdateCandidate) -> Result> { - // Convergence means Windows stopped offering the driver. Still listed - // is still pending; gone is installed. + // Convergence means Windows stopped offering the driver, or lists it + // only until the restart. if !cfg!(windows) { return Ok(None); } - let remaining = session::search(CRITERIA_DRIVER).await?; - if remaining.iter().any(|u| u.key() == candidate.id.native) { - return Ok(None); - } - Ok(Some(candidate.available.raw().to_string())) + let after = session::search(CRITERIA_DRIVER).await?; + Ok(session::landed(&after, &candidate.id.native)? + .then(|| candidate.available.raw().to_string())) } } @@ -131,6 +134,8 @@ mod tests { is_downloaded: false, eula_accepted: false, size_bytes: None, + reboot_pending: false, + browse_only: false, class: UpdateClass::Driver, } } diff --git a/crates/odysync-backends/src/windows_update/mod.rs b/crates/odysync-backends/src/windows_update/mod.rs index f356fc7..87238c0 100644 --- a/crates/odysync-backends/src/windows_update/mod.rs +++ b/crates/odysync-backends/src/windows_update/mod.rs @@ -118,6 +118,15 @@ fn to_candidate(kind: BackendKind, update: &WuaUpdate) -> UpdateCandidate { } } +/// Whether a pending update is something to offer. +/// +/// Not the ones that are installed and only wait for a restart, and not the +/// optional previews: Windows itself never installs those unless somebody +/// picks them on its own page, so neither does Odysync. +fn is_offered(update: &WuaUpdate) -> bool { + !update.reboot_pending && !update.browse_only +} + #[async_trait] impl Backend for WindowsUpdateBackend { fn kind(&self) -> BackendKind { @@ -151,8 +160,9 @@ impl Backend for WindowsUpdateBackend { // `session::SHARED_SEARCH_TTL`. let all = session::search_for_scan(CRITERIA_SOFTWARE).await?; Ok(all + .updates .iter() - .filter(|u| self.owns(u)) + .filter(|u| self.owns(u) && is_offered(u)) .map(|u| to_candidate(self.kind, u)) .collect()) } @@ -170,7 +180,7 @@ impl Backend for WindowsUpdateBackend { // boundary between scan and apply in the GUI, and this backend must // never be the one that installs a feature upgrade. let all = session::search(CRITERIA_SOFTWARE).await?; - let Some(update) = all.iter().find(|u| u.key() == candidate.id.native) else { + let Some(update) = all.updates.iter().find(|u| u.key() == candidate.id.native) else { return Err(Error::Verification { package: candidate.id.to_string(), detail: "the update was offered during the scan but Windows no longer offers it" @@ -199,13 +209,12 @@ impl Backend for WindowsUpdateBackend { } // Convergence for a Windows update means "Windows stopped offering - // it". An exit code of zero is not accepted as proof, per the runner's - // contract; this is the read-back that replaces it. - let remaining = session::search(CRITERIA_SOFTWARE).await?; - if remaining.iter().any(|u| u.key() == candidate.id.native) { - return Ok(None); - } - Ok(Some(candidate.available.raw().to_string())) + // it, or lists it only until the restart". An exit code of zero is not + // accepted as proof, per the runner's contract; this is the read-back + // that replaces it. + let after = session::search(CRITERIA_SOFTWARE).await?; + Ok(session::landed(&after, &candidate.id.native)? + .then(|| candidate.available.raw().to_string())) } } @@ -223,10 +232,23 @@ mod tests { is_downloaded: false, eula_accepted: false, size_bytes: None, + reboot_pending: false, + browse_only: false, class, } } + #[test] + fn previews_and_updates_waiting_for_a_restart_are_not_offered() { + let mut u = wua(UpdateClass::Quality, 1); + assert!(is_offered(&u)); + u.browse_only = true; + assert!(!is_offered(&u)); + u.browse_only = false; + u.reboot_pending = true; + assert!(!is_offered(&u)); + } + #[test] fn each_constructor_reports_its_own_kind_and_name() { let all = [ diff --git a/crates/odysync-backends/src/windows_update/session.rs b/crates/odysync-backends/src/windows_update/session.rs index 922ae14..aa35072 100644 --- a/crates/odysync-backends/src/windows_update/session.rs +++ b/crates/odysync-backends/src/windows_update/session.rs @@ -13,11 +13,12 @@ //! * **`RebootRequired` was read and discarded**, which is why //! `RunReport::reboot_required` was never once set to `true`. //! -//! A fourth was found by running the real API against a live machine: a search -//! can return `orcFailed` *and* a populated collection at the same time. The -//! old code returned early on `orcFailed` and threw those results away. On the -//! machine this was written against that meant discarding 14 pending updates, -//! 10 of them security patches. +//! A fourth was worse. The result codes were written down from memory and off +//! by two: `orcFailed` was taken to be 2, which is `orcSucceeded`. A download +//! that succeeded was reported as failed and nothing was installed, an install +//! that succeeded was reported as failed, and a real failure (4) passed as +//! success. The codes now live in [`orc`], checked against the Windows +//! bindings by a test, and every decision about them in pure functions. //! //! Everything here is `cfg(windows)`. The interesting decision — what kind of //! update this is — lives in `odysync_core::windows_update` so it stays @@ -45,9 +46,89 @@ pub struct WuaUpdate { pub is_downloaded: bool, pub eula_accepted: bool, pub size_bytes: Option, + /// Installed, and waiting for a restart to finish. Windows keeps listing + /// such an update as not installed until then. + pub reboot_pending: bool, + /// Offered only to people who go looking: the optional previews under + /// "Advanced options" that Windows never installs on its own. + pub browse_only: bool, pub class: UpdateClass, } +/// What one search found. +#[derive(Debug, Clone, Default)] +pub struct SearchResult { + pub updates: Vec, + /// Whether every source Windows asked answered. A list from an incomplete + /// search is worth showing; that something is *missing* from it proves + /// nothing. + pub complete: bool, +} + +/// `OperationResultCode`, named as Windows names it. +pub mod orc { + pub const SUCCEEDED: i32 = 2; + pub const SUCCEEDED_WITH_ERRORS: i32 = 3; + pub const FAILED: i32 = 4; + pub const ABORTED: i32 = 5; +} + +/// How much a finished search can be trusted. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum SearchVerdict { + Complete, + /// Some source failed, others answered. + Partial, + Failed, +} + +/// Judge a search by its result code and how much it returned. +/// +/// An unsuccessful search that returned nothing is a failure, never "no +/// updates": telling someone a machine is up to date because Windows Update +/// could not be reached is the most harmful answer this module can give. +pub fn search_verdict(code: i32, count: i32) -> SearchVerdict { + match code { + orc::SUCCEEDED => SearchVerdict::Complete, + _ if count > 0 => SearchVerdict::Partial, + _ => SearchVerdict::Failed, + } +} + +/// Whether a download or install of a single update did all of it. +/// +/// `orcSucceededWithErrors` means "some of the updates": with exactly one in +/// the collection that one is the error. +pub fn operation_succeeded(code: i32) -> bool { + code == orc::SUCCEEDED +} + +/// Whether the update `key` is in place, judged by a search made afterwards. +/// +/// `Ok(true)` when Windows no longer offers it, or still lists it only because +/// a restart is outstanding. An incomplete search, and the same update under +/// another revision, are not evidence of anything. +pub fn landed(after: &SearchResult, key: &str) -> Result { + if let Some(u) = after.updates.iter().find(|u| u.key() == key) { + return Ok(u.reboot_pending); + } + let id = key.rsplit_once('.').map_or(key, |(id, _)| id); + if after + .updates + .iter() + .any(|u| u.id.eq_ignore_ascii_case(id) && !u.reboot_pending) + { + return Ok(false); + } + if !after.complete { + return Err(Error::parse( + "Windows Update Agent", + "the search after the install did not complete, so the result could not be confirmed", + )); + } + Ok(true) +} + impl WuaUpdate { /// The stable handle used as a `PackageId::native`. /// @@ -138,10 +219,10 @@ impl Default for SharedSearch { } } -static SOFTWARE_SEARCH: LazyLock>> = LazyLock::new(SharedSearch::new); -static DRIVER_SEARCH: LazyLock>> = LazyLock::new(SharedSearch::new); +static SOFTWARE_SEARCH: LazyLock> = LazyLock::new(SharedSearch::new); +static DRIVER_SEARCH: LazyLock> = LazyLock::new(SharedSearch::new); -fn shared_for(criteria: &'static str) -> Option<&'static SharedSearch>> { +fn shared_for(criteria: &'static str) -> Option<&'static SharedSearch> { match criteria { CRITERIA_SOFTWARE => Some(&SOFTWARE_SEARCH), CRITERIA_DRIVER => Some(&DRIVER_SEARCH), @@ -153,7 +234,7 @@ fn shared_for(criteria: &'static str) -> Option<&'static SharedSearch Result> { +pub async fn search_for_scan(criteria: &'static str) -> Result { match shared_for(criteria) { Some(shared) => { shared @@ -180,6 +261,10 @@ pub async fn install_and_forget(criteria: &'static str, key: String) -> Result(f: F) -> Result + /// so the whole interaction has to happen on one thread. It is a plain + /// thread rather than `spawn_blocking` because the calls cannot be + /// interrupted: when the Windows Update service hangs, all we can do is + /// stop waiting, and the runtime would still wait for a blocking task of + /// its own before the program could exit. + async fn with_com(what: &'static str, limit: Duration, f: F) -> Result where T: Send + 'static, F: FnOnce() -> Result + Send + 'static, { - tokio::task::spawn_blocking(move || { - let initialized = unsafe { CoInitializeEx(None, COINIT_APARTMENTTHREADED) }.is_ok(); - let result = f(); - if initialized { - unsafe { CoUninitialize() }; - } - result - }) - .await - // A `JoinError` carries no HRESULT, so it does not go through - // `wua_err` — there is nothing for the translation table to explain. - .map_err(|e| { - Error::parse( + let (tx, rx) = tokio::sync::oneshot::channel(); + std::thread::Builder::new() + .name("odysync-wua".into()) + .spawn(move || { + let initialized = unsafe { CoInitializeEx(None, COINIT_APARTMENTTHREADED) }.is_ok(); + let result = f(); + if initialized { + unsafe { CoUninitialize() }; + } + // The receiver is gone only when the caller gave up waiting. + let _ = tx.send(result); + })?; + + match tokio::time::timeout(limit, rx).await { + Ok(Ok(result)) => result, + // A lost sender carries no HRESULT, so it does not go through + // `wua_err`: there is nothing for the translation table to explain. + Ok(Err(_)) => Err(Error::parse( "Windows Update Agent", - format!("the COM worker thread panicked: {e}"), - ) - })? + "the COM worker thread panicked", + )), + Err(_) => Err(Error::CommandTimeout { + command: format!("Windows Update ({what})"), + seconds: limit.as_secs(), + }), + } } /// Create an `IUpdateSession`. @@ -340,6 +433,19 @@ mod imp { .map(|b| b.as_bool()) .unwrap_or(false); + // Both live on later versions of the interface, which every supported + // Windows has; on one that did not, "no" is the older behaviour. + let reboot_pending = update + .cast::() + .and_then(|u| unsafe { u.RebootRequired() }) + .map(|b| b.as_bool()) + .unwrap_or(false); + let browse_only = update + .cast::() + .and_then(|u| unsafe { u.BrowseOnly() }) + .map(|b| b.as_bool()) + .unwrap_or(false); + Ok(WuaUpdate { class: classify(&title, &category_ids), id, @@ -354,12 +460,14 @@ mod imp { // an OLE automation dependency this crate does not carry. Left // unreported rather than reported wrongly. size_bytes: None, + reboot_pending, + browse_only, }) } /// Search Windows Update, returning everything it offers for `criteria`. - pub async fn search(criteria: &'static str) -> Result> { - with_com(move || { + pub async fn search(criteria: &'static str) -> Result { + with_com("search", SEARCH_TIMEOUT, move || { let session = create_session()?; let searcher = unsafe { session.CreateUpdateSearcher() } .map_err(|e| wua_err("could not create IUpdateSearcher", e))?; @@ -372,28 +480,28 @@ mod imp { let count = unsafe { updates.Count() } .map_err(|e| wua_err("could not count the search results", e))?; - // A failed ResultCode does *not* imply an empty collection. On a - // real machine this search returned orcFailed alongside 14 valid - // updates — one source in the aggregate had failed while the rest - // succeeded. Reporting the partial result and logging the failure - // beats discarding work Windows already did. + // An unsuccessful result code does not imply an empty collection: + // one source in the aggregate can fail while the rest answer. + // Showing the part Windows did find beats discarding it. let code = unsafe { result.ResultCode() }.map(|c| c.0).unwrap_or(0); - if code == ORC_FAILED || code == ORC_SUCCEEDED_WITH_ERRORS { - if count == 0 { - tracing::info!( + let complete = match search_verdict(code, count) { + SearchVerdict::Complete => true, + SearchVerdict::Partial => { + tracing::warn!( criteria, - "the Windows Update search failed and returned nothing; \ - treating it as no updates available from this source" + code, + count, + "the Windows Update search was incomplete; using what it returned" ); - return Ok(Vec::new()); + false } - tracing::warn!( - criteria, - count, - "the Windows Update search reported a failure but returned \ - results; using them and reporting the list as partial" - ); - } + SearchVerdict::Failed => { + return Err(Error::parse( + "Windows Update Agent", + format!("the update search did not succeed (result code {code})"), + )); + } + }; let mut out: Vec = Vec::new(); for i in 0..count { @@ -414,7 +522,10 @@ mod imp { out.push(read); } - Ok(out) + Ok(SearchResult { + updates: out, + complete, + }) }) .await } @@ -425,7 +536,7 @@ mod imp { /// across the call: COM interfaces are not `Send`, and an offering can be /// superseded between scan and apply — in which case refusing is correct. pub async fn install(criteria: &'static str, key: String) -> Result { - with_com(move || { + with_com("install", INSTALL_TIMEOUT, move || { let session = create_session()?; let searcher = unsafe { session.CreateUpdateSearcher() } .map_err(|e| wua_err("could not create IUpdateSearcher", e))?; @@ -485,7 +596,7 @@ mod imp { let download = unsafe { downloader.Download() } .map_err(|e| wua_err("the download failed", e))?; let code = unsafe { download.ResultCode() }.map(|c| c.0).unwrap_or(0); - if code == ORC_FAILED { + if !operation_succeeded(code) { let hr = unsafe { download.HResult() }.unwrap_or(0); return Err(Error::parse( "Windows Update Agent", @@ -507,8 +618,12 @@ mod imp { .map_err(|e| wua_err("the install could not be started", e))?; let code = unsafe { install.ResultCode() }.map(|c| c.0).unwrap_or(0); - if code == ORC_FAILED || code == ORC_SUCCEEDED_WITH_ERRORS { - let hr = unsafe { install.HResult() }.unwrap_or(0); + if !operation_succeeded(code) { + // The update's own code says more than the batch's. + let hr = unsafe { install.GetUpdateResult(0) } + .and_then(|r| unsafe { r.HResult() }) + .or_else(|_| unsafe { install.HResult() }) + .unwrap_or(0); return Err(Error::parse( "Windows Update Agent", format!("install failed: {}", explain_hresult(hr)), @@ -532,8 +647,11 @@ pub use imp::{install, search}; // these exist so the module itself compiles everywhere and the tests below can // run on Linux and macOS CI. #[cfg(not(windows))] -pub async fn search(_criteria: &'static str) -> Result> { - Ok(Vec::new()) +pub async fn search(_criteria: &'static str) -> Result { + Ok(SearchResult { + updates: Vec::new(), + complete: true, + }) } #[cfg(not(windows))] @@ -545,6 +663,63 @@ pub async fn install(_criteria: &'static str, _key: String) -> Result WuaUpdate { + WuaUpdate { + id: id.into(), + revision, + title: "t".into(), + category_ids: Vec::new(), + kb_ids: Vec::new(), + is_downloaded: true, + eula_accepted: true, + size_bytes: None, + reboot_pending, + browse_only: false, + class: UpdateClass::Security, + } + } + + #[test] + fn an_update_has_landed_when_it_is_gone_or_waits_for_a_restart() { + let list = |updates, complete| SearchResult { updates, complete }; + assert!(landed(&list(vec![], true), "aa.1").unwrap()); + assert!(landed(&list(vec![pending("aa", 1, true)], true), "aa.1").unwrap()); + assert!(!landed(&list(vec![pending("aa", 1, false)], true), "aa.1").unwrap()); + // Revised between the install and the check: proves nothing. + assert!(!landed(&list(vec![pending("AA", 2, false)], true), "aa.1").unwrap()); + // Missing from a list that is not the whole list: cannot tell. + assert!(landed(&list(vec![pending("bb", 1, false)], false), "aa.1").is_err()); + } + /// The code a real elevated run produced. It reached the user as the bare /// string `0x8024001E`, which tells them nothing they can act on — and the /// cause is specific and fixable: UAC on a domain-joined machine can @@ -613,6 +788,8 @@ mod tests { is_downloaded: false, eula_accepted: false, size_bytes: None, + reboot_pending: false, + browse_only: false, class: UpdateClass::Quality, } } From 2c8549dca92e3fd6befa2ae1e03a0c67c68f46b1 Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 17:02:36 +0100 Subject: [PATCH 07/18] fix(core): run Windows' own tools by their full path powershell.exe, which checks every installer's signature, and msiexec.exe were looked up through PATH, which any program of the same user can change. They now come from the directory Windows itself names, not from an environment variable either. --- crates/odysync-core/Cargo.toml | 4 +- crates/odysync-core/src/proc.rs | 76 ++++++++++++++++++++++++++++++--- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/crates/odysync-core/Cargo.toml b/crates/odysync-core/Cargo.toml index 379cdb1..c0d929d 100644 --- a/crates/odysync-core/Cargo.toml +++ b/crates/odysync-core/Cargo.toml @@ -1,4 +1,4 @@ -[package] +[package] name = "odysync-core" version.workspace = true edition.workspace = true @@ -35,6 +35,8 @@ windows = { version = "0.62", features = [ "Win32_System_Threading", # `proc::ProcessTree`: stop everything a timed-out program started. "Win32_System_JobObjects", + # `proc::system_directory`: Windows' own tools by their full path. + "Win32_System_SystemInformation", "Win32_System_Restore", # `platform::reboot_pending` reads the three registry locations Windows # itself uses to record "a restart is needed to finish servicing". diff --git a/crates/odysync-core/src/proc.rs b/crates/odysync-core/src/proc.rs index 0f01bc7..fc5a0f5 100644 --- a/crates/odysync-core/src/proc.rs +++ b/crates/odysync-core/src/proc.rs @@ -92,9 +92,21 @@ fn resolve_program(program: &str) -> std::path::PathBuf { use std::path::{Path, PathBuf}; let raw = Path::new(program); - // An explicit path, or a name that already carries its extension, is - // something `CreateProcess` resolves correctly on its own. - if raw.components().count() > 1 || raw.extension().is_some() { + if raw.components().count() > 1 { + return raw.to_path_buf(); + } + + // Windows' own tools come from Windows' own directory, whatever PATH says. + // This includes the one that checks signatures: found through PATH, a + // `powershell.exe` put in front by any program of the same user would be + // run with Odysync's rights and could call every installer valid. + if let Some(path) = system_tool(program) { + return path; + } + + // A name that already carries its extension is something `CreateProcess` + // resolves correctly on its own. + if raw.extension().is_some() { return raw.to_path_buf(); } @@ -116,6 +128,42 @@ fn resolve_program(program: &str) -> std::path::PathBuf { PathBuf::from(program) } +/// `System32`, asked of Windows itself: `%SystemRoot%` is an environment +/// variable like any other and can be set per user. +#[cfg(windows)] +pub fn system_directory() -> Option { + use std::os::windows::ffi::OsStringExt; + use windows::Win32::System::SystemInformation::GetSystemDirectoryW; + + let mut buf = [0u16; 260]; + // SAFETY: the buffer is a live local and its length goes with it. + let len = unsafe { GetSystemDirectoryW(Some(&mut buf)) } as usize; + if len == 0 || len > buf.len() { + return None; + } + Some(std::ffi::OsString::from_wide(&buf[..len]).into()) +} + +/// The full path of `program` if it is one of Windows' own tools. +#[cfg(windows)] +fn system_tool(program: &str) -> Option { + let system = system_directory()?; + let lower = program.to_ascii_lowercase(); + let file = if lower.ends_with(".exe") { + lower + } else if std::path::Path::new(program).extension().is_none() { + format!("{lower}.exe") + } else { + return None; + }; + let path = if file == "powershell.exe" { + system.join(r"WindowsPowerShell\v1.0").join(&file) + } else { + system.join(&file) + }; + path.is_file().then_some(path) +} + #[cfg(not(windows))] fn resolve_program(program: &str) -> &str { program @@ -369,12 +417,30 @@ mod tests { assert!(resolved.extension().is_some()); } + /// The signature check must not go through whatever `powershell.exe` is + /// first in a PATH that any program of the same user can change. + #[cfg(windows)] + #[test] + fn windows_own_tools_are_used_by_their_full_path() { + let system = system_directory().expect("System32"); + assert!(system.is_absolute()); + for name in ["powershell.exe", "powershell", "PowerShell.exe"] { + let path = resolve_program(name); + assert!(path.starts_with(&system), "{name}: {path:?}"); + assert!(is_windows_powershell(&path.to_string_lossy())); + } + for name in ["msiexec.exe", "schtasks", "pnputil"] { + let path = resolve_program(name); + assert!(path.starts_with(&system), "{name}: {path:?}"); + } + } + #[cfg(windows)] #[test] fn an_explicit_extension_or_path_is_left_alone() { assert_eq!( - resolve_program("powershell.exe"), - std::path::Path::new("powershell.exe") + resolve_program("odysync-not-a-tool.exe"), + std::path::Path::new("odysync-not-a-tool.exe") ); assert_eq!( resolve_program(r"C:\Windows\System32\cmd.exe"), From 7bf3c5d93ad92d0069a7b9018025660fd7631532 Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 17:02:39 +0100 Subject: [PATCH 08/18] fix(direct): close gaps around elevated installs, honest offline result - Elevated downloads go to a fresh directory only administrators can write to. The installer file was locked, but a library planted next to it would have been loaded with its rights. - "Is it running?" fails closed, is asked again after the download, and works for Windows Installer packages that record no location (Node.js, GitHub CLI and four more were never checked). - Installing asks the publisher afresh; a cached or stale answer on disk is never used for it. - With several uninstall entries the newest one counts, so a leftover no longer offers the same update for ever. - Offline is an error instead of "up to date"; a single unreachable publisher is listed as undetermined. - GitHub answers are reused for ten minutes: 304 replies count against the anonymous limit of 60 (measured), the comment said they did not. - The proxy setting and the system proxy reach downloads and lookups. - Leftovers of interrupted downloads are removed after a day. --- Cargo.lock | 54 +++- Cargo.toml | 2 +- crates/odysync-backends/Cargo.toml | 7 +- crates/odysync-backends/src/components.rs | 18 +- .../odysync-backends/src/direct/catalog.json | 6 + crates/odysync-backends/src/direct/catalog.rs | 19 ++ crates/odysync-backends/src/direct/http.rs | 283 ++++++++++++++---- .../odysync-backends/src/direct/inventory.rs | 66 +++- crates/odysync-backends/src/direct/macos.rs | 18 +- crates/odysync-backends/src/direct/mod.rs | 242 ++++++++++----- .../src/direct/private_dir.rs | 140 +++++++++ crates/odysync-backends/src/gpu/nvidia_gpu.rs | 11 +- 12 files changed, 691 insertions(+), 175 deletions(-) create mode 100644 crates/odysync-backends/src/direct/private_dir.rs diff --git a/Cargo.lock b/Cargo.lock index 4c19d55..df8d747 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -681,6 +681,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation" version = "0.10.1" @@ -704,7 +714,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" dependencies = [ "bitflags 2.13.2", - "core-foundation", + "core-foundation 0.10.1", "core-graphics-types", "foreign-types", "libc", @@ -717,7 +727,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ "bitflags 2.13.2", - "core-foundation", + "core-foundation 0.10.1", "libc", ] @@ -1884,9 +1894,11 @@ dependencies = [ "percent-encoding", "pin-project-lite", "socket2", + "system-configuration", "tokio", "tower-service", "tracing", + "windows-registry", ] [[package]] @@ -3713,7 +3725,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1167586491e2b18b8bfbb293e8180ec17c201c4f076d7cb3070ca964e7598f98" dependencies = [ - "core-foundation", + "core-foundation 0.10.1", "core-foundation-sys", "jni 0.22.4", "log", @@ -3834,7 +3846,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ "bitflags 2.13.2", - "core-foundation", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -4367,6 +4379,27 @@ dependencies = [ "syn 3.0.10", ] +[[package]] +name = "system-configuration" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" +dependencies = [ + "bitflags 2.13.2", + "core-foundation 0.9.4", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "system-deps" version = "6.2.2" @@ -4388,7 +4421,7 @@ checksum = "02ca9c0ce2a2fd70dc4ef4449ca5e8d30e6fa0db111cd8008594602a06a68371" dependencies = [ "bitflags 2.13.2", "block2", - "core-foundation", + "core-foundation 0.10.1", "core-graphics", "crossbeam-channel", "dbus", @@ -5685,6 +5718,17 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +dependencies = [ + "windows-link", + "windows-result", + "windows-strings", +] + [[package]] name = "windows-result" version = "0.4.1" diff --git a/Cargo.toml b/Cargo.toml index f3d3b82..8e46857 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ hex = "0.4" directories = "6" async-trait = "0.1" zip = { version = "9", default-features = false, features = ["deflate"] } -reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] } +reqwest = { version = "0.13", default-features = false, features = ["json", "rustls", "system-proxy"] } [profile.release] opt-level = "z" diff --git a/crates/odysync-backends/Cargo.toml b/crates/odysync-backends/Cargo.toml index 6b27389..dbe24ce 100644 --- a/crates/odysync-backends/Cargo.toml +++ b/crates/odysync-backends/Cargo.toml @@ -1,4 +1,4 @@ -[package] +[package] name = "odysync-backends" version.workspace = true edition.workspace = true @@ -47,6 +47,11 @@ windows = { version = "0.62", features = [ # Walking `C:\$Recycle.Bin` instead would under-report (it is per-user and # permission-guarded) and is exactly the shape the root-safety rule refuses. "Win32_UI_Shell", + # `direct::private_dir`: a download directory only administrators can write + # to, for installers that run elevated. + "Win32_Security", + "Win32_Security_Authorization", + "Win32_Storage_FileSystem", ] } [dev-dependencies] diff --git a/crates/odysync-backends/src/components.rs b/crates/odysync-backends/src/components.rs index 2e4e08b..c3483f2 100644 --- a/crates/odysync-backends/src/components.rs +++ b/crates/odysync-backends/src/components.rs @@ -383,7 +383,9 @@ mod windows_impl { return Err(Error::invalid_package_id(id, "unknown .NET product")); } let client = http::client(None, Duration::from_secs(30))?; - let channels = parse_dotnet_index(&http::get_json(&client, DOTNET_INDEX).await?); + let channels = parse_dotnet_index( + &http::get_json_for(&client, DOTNET_INDEX, http::Purpose::Install).await?, + ); let channel = channels .into_iter() .find(|c| c.channel == line) @@ -394,7 +396,9 @@ mod windows_impl { format!(".NET {line} is out of support; Microsoft ships no more patches"), )); } - let releases = http::get_json(&client, &channel.releases_json).await?; + let releases = + http::get_json_for(&client, &channel.releases_json, http::Purpose::Install) + .await?; let (version, url, sha512) = dotnet_installer(&releases, product, rid()) .ok_or_else(|| { Error::unavailable("components", "no installer for this machine") @@ -409,12 +413,8 @@ mod windows_impl { return Err(Error::invalid_package_id(id, "not a known component")); }; - let dir = http::download_dir()?.join(format!( - "component-{id}-{}", - jiff::Timestamp::now().as_millisecond() - )); - tokio::fs::create_dir_all(&dir).await?; - let file = dir.join(http::file_name_for(&url, "installer.exe")); + let dir = http::DownloadDir::new(&format!("component-{id}"))?; + let file = dir.path().join(http::file_name_for(&url, "installer.exe")); let result = async { let client = http::client(None, Duration::from_secs(60 * 60))?; @@ -445,7 +445,7 @@ mod windows_impl { } .await; - let _ = tokio::fs::remove_dir_all(&dir).await; + drop(dir); result } } diff --git a/crates/odysync-backends/src/direct/catalog.json b/crates/odysync-backends/src/direct/catalog.json index 558320f..dc3ff10 100644 --- a/crates/odysync-backends/src/direct/catalog.json +++ b/crates/odysync-backends/src/direct/catalog.json @@ -53,6 +53,7 @@ } }, "installer": "msi", + "processes": ["GitHub CLI\\gh.exe"], "signer": "GitHub, Inc." }, { @@ -85,6 +86,7 @@ "assets": { "x64": "^KeePassXC-[\\d.]+-Win64\\.msi$" } }, "installer": "msi", + "processes": ["KeePassXC.exe", "keepassxc-proxy.exe"], "signer": "DroidMonkey Apps, LLC" }, { @@ -113,6 +115,7 @@ "assets": { "x64": "^audacity-win-[\\d.]+-x86_64\\.msi$" } }, "installer": "msi", + "processes": ["Audacity.exe"], "signer": "MUSECY SM LTD" }, { @@ -173,6 +176,7 @@ "assets": { "x64": "^rustdesk-[\\d.]+-x86_64\\.msi$" } }, "installer": "msi", + "processes": ["RustDesk.exe"], "signer": "PURSLANE" }, { @@ -204,6 +208,7 @@ "match": { "display_name": "^Node\\.js$" }, "source": { "type": "nodejs" }, "installer": "msi", + "processes": ["nodejs\\node.exe"], "signer": "OpenJS Foundation" }, { @@ -218,6 +223,7 @@ "assets": { "x64": "^PowerShell-[\\d.]+-win-x64\\.msi$" } }, "installer": "msi", + "processes": ["PowerShell\\7\\pwsh.exe"], "signer": "Microsoft Corporation" }, { diff --git a/crates/odysync-backends/src/direct/catalog.rs b/crates/odysync-backends/src/direct/catalog.rs index 5e06344..cbc4bb0 100644 --- a/crates/odysync-backends/src/direct/catalog.rs +++ b/crates/odysync-backends/src/direct/catalog.rs @@ -75,6 +75,10 @@ pub struct CatalogApp { pub extra_args: Vec, /// Subject CN or O the installer's code signature must carry. pub signer: String, + /// How the path of the running program ends, for installs that do not + /// record where they live. Windows Installer packages usually do not. + #[serde(default)] + pub processes: Vec, } impl CatalogApp { @@ -343,6 +347,21 @@ mod tests { } } + /// Without it, "is it running?" has no answer for these and the check + /// that protects an open program is skipped. + #[test] + fn every_windows_installer_entry_names_its_program() { + for app in Catalog::embedded().apps { + if app.installer == InstallerKind::Msi { + assert!(!app.processes.is_empty(), "{} names no program", app.id); + } + for p in &app.processes { + assert!(p.to_ascii_lowercase().ends_with(".exe"), "{p}"); + assert!(!p.starts_with('\\'), "{p}"); + } + } + } + #[test] fn the_embedded_catalog_parses_and_every_entry_is_complete() { let catalog = Catalog::embedded(); diff --git a/crates/odysync-backends/src/direct/http.rs b/crates/odysync-backends/src/direct/http.rs index 8629ae5..2eb2881 100644 --- a/crates/odysync-backends/src/direct/http.rs +++ b/crates/odysync-backends/src/direct/http.rs @@ -6,15 +6,18 @@ //! * **HTTPS on every hop.** The redirect policy refuses a redirect to //! `http://`, so a download that starts on `https://github.com` cannot be //! bounced onto plaintext where it could be swapped in transit. -//! * **Conditional requests for metadata.** GitHub allows 60 unauthenticated -//! API calls an hour. A scan touches one release per installed catalog app, -//! and a `304 Not Modified` answer to an `If-None-Match` request does not -//! count against that limit — so repeated scans are effectively free. +//! * **A short memory for metadata.** GitHub allows 60 unauthenticated API +//! calls an hour, and a scan makes one per installed catalog app. A +//! `304 Not Modified` counts against that limit unless the request carries a +//! token (measured: three of them, three calls gone), so a scan reuses an +//! answer that is a few minutes old instead of asking again. Installing +//! always asks afresh and never falls back to what is on disk. //! * **A hard size cap on downloads**, checked while streaming, so a hostile or //! broken server cannot fill the disk. use std::path::{Path, PathBuf}; -use std::time::Duration; +use std::sync::RwLock; +use std::time::{Duration, SystemTime}; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; @@ -47,8 +50,42 @@ fn other(msg: impl Into) -> Error { } } +/// How old an answer a scan may reuse without asking again. +const SCAN_MAX_AGE: Duration = Duration::from_secs(10 * 60); + +/// How old an answer may stand in for one that cannot be had at all. Older +/// than this it says too little about what the publisher offers today. +const STALE_MAX_AGE: Duration = Duration::from_secs(24 * 60 * 60); + +/// The proxy from the settings, for every client that is not given its own. +static PROXY: RwLock> = RwLock::new(None); + +/// Use `proxy_url` for all downloads and lookups from here on. +/// +/// The backends are built without a configuration; the setting used to be +/// shown, saved, and never reach any of them. +pub fn set_proxy(proxy_url: Option<&str>) { + let value = proxy_url + .map(str::trim) + .filter(|p| !p.is_empty()) + .map(str::to_string); + *PROXY.write().unwrap_or_else(|p| p.into_inner()) = value; +} + +/// What a request is for. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Purpose { + /// Listing what is available: a recent answer is good enough, and an older + /// one better than none. + Scan, + /// Deciding what to install: only what the publisher says right now. + Install, +} + /// A client that will only ever speak HTTPS, including across redirects. pub fn client(proxy_url: Option<&str>, timeout: Duration) -> Result { + let configured = PROXY.read().unwrap_or_else(|p| p.into_inner()).clone(); + let proxy_url = proxy_url.or(configured.as_deref()); let policy = reqwest::redirect::Policy::custom(|attempt| { if attempt.previous().len() > 10 { attempt.error("too many redirects") @@ -83,11 +120,67 @@ fn cache_root() -> Result { Ok(dirs.cache_dir().join("direct")) } -/// The directory installers are downloaded into before they are verified. -pub fn download_dir() -> Result { - let dir = cache_root()?.join("downloads"); - std::fs::create_dir_all(&dir)?; - Ok(dir) +/// A fresh, empty directory for one download, removed again when dropped. +/// +/// The installer runs from here. When Odysync is elevated the directory is +/// one that only administrators can write to: locking the installer file stops +/// anyone from swapping *it*, but a program looks for its libraries next to +/// itself first, and an unprivileged process could put a `version.dll` beside +/// an installer that is about to run with administrator rights. +pub struct DownloadDir(PathBuf); + +impl DownloadDir { + pub fn new(label: &str) -> Result { + #[cfg(windows)] + if odysync_core::platform::is_elevated() { + return super::private_dir::create(label).map(Self); + } + + let root = cache_root()?.join("downloads"); + std::fs::create_dir_all(&root)?; + remove_leftovers(&root, ""); + let dir = root.join(format!( + "{label}-{}", + jiff::Timestamp::now().as_millisecond() + )); + // Not `create_dir_all`: a directory that is already there is not ours. + std::fs::create_dir(&dir)?; + Ok(Self(dir)) + } + + pub fn path(&self) -> &Path { + &self.0 + } +} + +impl Drop for DownloadDir { + fn drop(&mut self) { + if let Err(e) = std::fs::remove_dir_all(&self.0) { + tracing::debug!(dir = %self.0.display(), error = %e, "download not removed yet"); + } + } +} + +/// Remove what an interrupted update left behind: directories in `root` that +/// start with `prefix` and have not been touched for a day. +pub(super) fn remove_leftovers(root: &Path, prefix: &str) { + let Ok(entries) = std::fs::read_dir(root) else { + return; + }; + for entry in entries.flatten() { + let old = entry + .metadata() + .and_then(|m| m.modified()) + .ok() + .and_then(|t| SystemTime::now().duration_since(t).ok()) + .is_some_and(|age| age > STALE_MAX_AGE); + if old + && entry.file_name().to_string_lossy().starts_with(prefix) + && entry.file_type().is_ok_and(|t| t.is_dir()) + { + let _ = std::fs::remove_dir_all(entry.path()); + } + } } #[derive(Serialize, Deserialize)] @@ -102,12 +195,30 @@ fn cache_file_for(url: &str) -> Result { Ok(cache_root()?.join("http").join(format!("{key}.json"))) } -/// GET `url` as text, revalidating a cached copy instead of re-downloading it. -/// -/// A network failure with a cached copy on disk returns the cached copy: a -/// stale "latest version" is still a correct one to compare against, and the -/// download it leads to is verified independently anyway. +/// The stored answer for `url` and how old it is. +fn read_cached(path: &Path) -> Option<(CachedResponse, Duration)> { + let text = std::fs::read_to_string(path).ok()?; + let modified = std::fs::metadata(path).ok()?.modified().ok()?; + let age = SystemTime::now() + .duration_since(modified) + // Written "in the future": the clock was changed, so its age is + // unknown and it counts as old. + .unwrap_or(Duration::MAX); + Some((serde_json::from_str(&text).ok()?, age)) +} + +/// GET `url` as text for listing what is available. pub async fn get_text(client: &reqwest::Client, url: &str) -> Result { + get_text_for(client, url, Purpose::Scan).await +} + +/// GET `url` as text. +/// +/// For [`Purpose::Scan`] an answer from the last few minutes is reused, an +/// older one is revalidated, and one from the last day stands in when the +/// network fails: a slightly stale "latest version" is still a version to +/// compare against. For [`Purpose::Install`] nothing on disk is consulted. +pub async fn get_text_for(client: &reqwest::Client, url: &str, purpose: Purpose) -> Result { if !url.starts_with("https://") { return Err(Error::security( "direct", @@ -115,10 +226,22 @@ pub async fn get_text(client: &reqwest::Client, url: &str) -> Result { )); } let cache_path = cache_file_for(url).ok(); - let cached: Option = cache_path - .as_ref() - .and_then(|p| std::fs::read_to_string(p).ok()) - .and_then(|t| serde_json::from_str(&t).ok()); + let cached = match purpose { + Purpose::Scan => cache_path.as_deref().and_then(read_cached), + Purpose::Install => None, + }; + if let Some((c, age)) = &cached + && *age < SCAN_MAX_AGE + { + return Ok(c.body.clone()); + } + let fallback = |why: String| match &cached { + Some((c, age)) if *age < STALE_MAX_AGE => { + tracing::info!(url, why, "using the last known answer"); + Ok(c.body.clone()) + } + _ => Err(other(why)), + }; let mut request = client.get(url).timeout(METADATA_TIMEOUT); if url.starts_with("https://api.github.com/") { @@ -133,7 +256,7 @@ pub async fn get_text(client: &reqwest::Client, url: &str) -> Result { request = request.bearer_auth(token.trim()); } } - if let Some(c) = &cached { + if let Some((c, _)) = &cached { if let Some(etag) = &c.etag { request = request.header("If-None-Match", etag); } @@ -144,50 +267,38 @@ pub async fn get_text(client: &reqwest::Client, url: &str) -> Result { let response = match request.send().await { Ok(r) => r, - Err(e) => { - return match cached { - Some(c) => { - tracing::debug!(url, error = %e, "network error; using the cached response"); - Ok(c.body) - } - None => Err(other(format!("could not fetch {url}: {e}"))), - }; - } + Err(e) => return fallback(format!("could not fetch {url}: {e}")), }; let status = response.status(); - if status == reqwest::StatusCode::NOT_MODIFIED - && let Some(c) = cached + let (etag, last_modified, body) = if status == reqwest::StatusCode::NOT_MODIFIED + && let Some((c, _)) = cached { - return Ok(c.body); - } - if !status.is_success() { - if let Some(c) = cached { - tracing::debug!(url, %status, "server error; using the cached response"); - return Ok(c.body); - } + (c.etag, c.last_modified, c.body) + } else if status.is_success() { + let header = |name: &str| { + response + .headers() + .get(name) + .and_then(|v| v.to_str().ok()) + .map(str::to_string) + }; + let (etag, last_modified) = (header("etag"), header("last-modified")); + let body = response + .text() + .await + .map_err(|e| other(format!("could not read {url}: {e}")))?; + (etag, last_modified, body) + } else { let hint = if status == reqwest::StatusCode::FORBIDDEN && url.contains("api.github.com") { " (GitHub's hourly limit for anonymous requests; set GITHUB_TOKEN to raise it)" } else { "" }; - return Err(other(format!("{url} answered {status}{hint}"))); - } - - let header = |name: &str| { - response - .headers() - .get(name) - .and_then(|v| v.to_str().ok()) - .map(str::to_string) + return fallback(format!("{url} answered {status}{hint}")); }; - let etag = header("etag"); - let last_modified = header("last-modified"); - let body = response - .text() - .await - .map_err(|e| other(format!("could not read {url}: {e}")))?; + // Written after a 304 as well, so that the answer counts as fresh again. if let Some(path) = cache_path { let entry = CachedResponse { etag, @@ -205,9 +316,18 @@ pub async fn get_text(client: &reqwest::Client, url: &str) -> Result { Ok(body) } -/// GET `url` and parse it as JSON. +/// GET `url` and parse it as JSON, for listing what is available. pub async fn get_json(client: &reqwest::Client, url: &str) -> Result { - let text = get_text(client, url).await?; + get_json_for(client, url, Purpose::Scan).await +} + +/// GET `url` and parse it as JSON. +pub async fn get_json_for( + client: &reqwest::Client, + url: &str, + purpose: Purpose, +) -> Result { + let text = get_text_for(client, url, purpose).await?; serde_json::from_str(&text).map_err(|e| other(format!("{url} did not return JSON: {e}"))) } @@ -323,6 +443,59 @@ mod tests { ); } + #[test] + fn a_stored_answer_knows_its_age() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("x.json"); + assert!(read_cached(&path).is_none()); + std::fs::write(&path, r#"{"etag":null,"last_modified":null,"body":"hi"}"#).unwrap(); + let (c, age) = read_cached(&path).expect("stored"); + assert_eq!(c.body, "hi"); + assert!(age < SCAN_MAX_AGE); + + let old = SystemTime::now() - Duration::from_secs(3600); + std::fs::File::options() + .write(true) + .open(&path) + .unwrap() + .set_modified(old) + .unwrap(); + let (_, age) = read_cached(&path).expect("stored"); + assert!(age > SCAN_MAX_AGE && age < STALE_MAX_AGE); + + // A clock that was set back must not make an answer fresh for ever. + let future = SystemTime::now() + Duration::from_secs(3600); + std::fs::File::options() + .write(true) + .open(&path) + .unwrap() + .set_modified(future) + .unwrap(); + assert_eq!(read_cached(&path).expect("stored").1, Duration::MAX); + } + + #[test] + fn a_download_directory_is_new_empty_and_gone_afterwards() { + let dir = DownloadDir::new("unit-test").expect("create"); + let path = dir.path().to_path_buf(); + assert!(path.is_dir()); + assert_eq!(std::fs::read_dir(&path).unwrap().count(), 0); + std::fs::write(path.join("installer.exe"), b"x").unwrap(); + drop(dir); + assert!(!path.exists()); + } + + #[test] + fn only_old_leftovers_with_the_prefix_are_removed() { + let root = tempfile::tempdir().unwrap(); + for name in ["mine-new", "theirs"] { + std::fs::create_dir(root.path().join(name)).unwrap(); + } + remove_leftovers(root.path(), "mine-"); + assert!(root.path().join("mine-new").exists(), "still in use"); + assert!(root.path().join("theirs").exists(), "not ours"); + } + #[test] fn the_client_refuses_plain_http() { let c = client(None, Duration::from_secs(5)).expect("client"); diff --git a/crates/odysync-backends/src/direct/inventory.rs b/crates/odysync-backends/src/direct/inventory.rs index a42c018..f1c631c 100644 --- a/crates/odysync-backends/src/direct/inventory.rs +++ b/crates/odysync-backends/src/direct/inventory.rs @@ -192,22 +192,41 @@ pub fn installed_apps() -> Vec { /// Used to refuse updating a program that is open: an installer that cannot /// replace a locked file either fails half-way or, worse, schedules the /// replacement for the next reboot and reports success now. +/// +/// An error, not an empty list, when the question could not be answered: +/// "nothing is running" is what lets an installer start. #[cfg(windows)] -pub async fn running_executables() -> Vec { +pub async fn running_executables() -> odysync_core::error::Result> { let script = "Get-Process | ForEach-Object { $_.Path } | Where-Object { $_ }"; - match odysync_core::proc::powershell(script, std::time::Duration::from_secs(60)).await { - Ok(out) => out - .stdout - .lines() - .map(str::trim) - .filter(|l| !l.is_empty()) - .map(PathBuf::from) - .collect(), - Err(e) => { - tracing::warn!(error = %e, "could not list running processes"); - Vec::new() - } + let out = odysync_core::proc::powershell(script, std::time::Duration::from_secs(60)).await?; + let running: Vec = out + .stdout + .lines() + .map(str::trim) + .filter(|l| !l.is_empty()) + .map(PathBuf::from) + .collect(); + // PowerShell itself is always in its own list. + if running.is_empty() { + return Err(odysync_core::error::Error::unavailable( + "direct", + "could not tell which programs are running", + )); } + Ok(running) +} + +/// The first running executable whose path ends in one of `suffixes`. +/// +/// For programs whose uninstall entry does not say where they live, which is +/// true of most Windows Installer packages. +pub fn running_named<'a>(suffixes: &[String], running: &'a [PathBuf]) -> Option<&'a PathBuf> { + running.iter().find(|exe| { + let exe = exe.to_string_lossy().to_ascii_lowercase(); + suffixes + .iter() + .any(|s| exe.ends_with(&format!("\\{}", s.to_ascii_lowercase()))) + }) } /// The first running executable inside `dir`, if any. @@ -221,6 +240,27 @@ pub fn running_inside<'a>(dir: &Path, running: &'a [PathBuf]) -> Option<&'a Path mod tests { use super::*; + #[test] + fn a_program_is_found_running_by_the_end_of_its_path() { + let running = vec![ + PathBuf::from(r"C:\Program Files\Microsoft VS Code\node.exe"), + PathBuf::from(r"C:\Program Files\NodeJS\Node.exe"), + PathBuf::from(r"C:\tools\notgh.exe"), + ]; + let hit = |s: &str| running_named(&[s.to_string()], &running).cloned(); + assert_eq!(hit(r"nodejs\node.exe"), Some(running[1].clone())); + assert_eq!(hit("gh.exe"), None, "a longer name is another program"); + assert_eq!(hit("notgh.exe"), Some(running[2].clone())); + assert_eq!(running_named(&[], &running), None); + } + + #[cfg(windows)] + #[tokio::test] + async fn the_running_programs_can_be_listed() { + let running = running_executables().await.expect("list"); + assert!(running.len() > 1); + } + #[test] fn processor_architecture_is_mapped_to_catalog_names() { assert_eq!(arch_from_processor_architecture("AMD64"), "x64"); diff --git a/crates/odysync-backends/src/direct/macos.rs b/crates/odysync-backends/src/direct/macos.rs index 158e1bc..bd37ace 100644 --- a/crates/odysync-backends/src/direct/macos.rs +++ b/crates/odysync-backends/src/direct/macos.rs @@ -482,13 +482,13 @@ pub mod imp { ) })?; - let work = http::download_dir()?.join(format!( - "mac-{}-{}", - bundle_id.replace(|c: char| !c.is_ascii_alphanumeric(), "-"), - jiff::Timestamp::now().as_millisecond() - )); - std::fs::create_dir_all(&work)?; - let archive = work.join(http::file_name_for(&release.url, "update.zip")); + let work = http::DownloadDir::new(&format!( + "mac-{}", + bundle_id.replace(|c: char| !c.is_ascii_alphanumeric(), "-") + ))?; + let archive = work + .path() + .join(http::file_name_for(&release.url, "update.zip")); let result = async { // 2. Download, then the app's own EdDSA key. @@ -510,7 +510,7 @@ pub mod imp { } // 3. Same app, same developer, accepted by Gatekeeper. - let extracted = work.join("extracted"); + let extracted = work.path().join("extracted"); std::fs::create_dir_all(&extracted)?; let expected_name = app .path @@ -578,7 +578,7 @@ pub mod imp { } .await; - let _ = std::fs::remove_dir_all(&work); + drop(work); result } } diff --git a/crates/odysync-backends/src/direct/mod.rs b/crates/odysync-backends/src/direct/mod.rs index d362123..5ae9f8f 100644 --- a/crates/odysync-backends/src/direct/mod.rs +++ b/crates/odysync-backends/src/direct/mod.rs @@ -33,6 +33,8 @@ pub mod catalog; pub mod http; pub mod inventory; pub mod macos; +#[cfg(windows)] +pub mod private_dir; pub mod signer; pub mod sparkle; @@ -49,6 +51,7 @@ use odysync_core::model::{ use odysync_core::version::Version; use catalog::{Catalog, CatalogApp, InstalledApp, Release, Scope, Source}; +use http::Purpose; /// How long one installer may run before it is presumed hung. #[cfg(windows)] @@ -99,28 +102,59 @@ pub fn parse_native_id(native: &str) -> Option<(Scope, &str)> { } /// The installed programs the catalog knows, each with its entry. +/// +/// One per app and scope. A second uninstall entry for the same app is a +/// leftover of an older version, not a second install; the newest one is what +/// is on disk. Taking the first instead offered the same update for ever. fn recognised(catalog: &Catalog, installed: Vec) -> Vec<(InstalledApp, CatalogApp)> { let mut out: Vec<(InstalledApp, CatalogApp)> = Vec::new(); for app in installed { - if let Some(entry) = catalog.match_installed(&app) { - // One candidate per (app, scope). A second uninstall entry for the - // same app and scope is a leftover, not a second install. - if !out - .iter() - .any(|(a, e)| e.id == entry.id && a.scope == app.scope) - { - out.push((app, entry.clone())); - } + let Some(entry) = catalog.match_installed(&app) else { + continue; + }; + match out + .iter_mut() + .find(|(a, e)| e.id == entry.id && a.scope == app.scope) + { + Some((known, _)) if is_newer_entry(known, &app) => *known = app, + Some(_) => {} + None => out.push((app, entry.clone())), } } out } +/// Whether `other` records a newer version of the program than `known`. +fn is_newer_entry(known: &InstalledApp, other: &InstalledApp) -> bool { + let version = |a: &InstalledApp| Version::parse(a.display_version.as_deref().unwrap_or("")); + let (known, other) = (version(known), version(other)); + known.is_upgrade_to(&other) || (!known.is_known() && other.is_known()) +} + +/// The install of `entry` in `scope`, chosen the way a scan chooses it. +fn find_install( + installed: Vec, + entry: &CatalogApp, + scope: Scope, +) -> Option { + installed + .into_iter() + .filter(|a| a.scope == scope && entry.matches(a)) + .reduce(|known, app| { + if is_newer_entry(&known, &app) { + app + } else { + known + } + }) +} + /// Ask the entry's source for its latest release, for this install. async fn resolve( client: &reqwest::Client, entry: &CatalogApp, app: &InstalledApp, + purpose: Purpose, ) -> Result> { match &entry.source { Source::Github { @@ -134,7 +168,7 @@ async fn resolve( return Ok(None); }; let url = format!("https://api.github.com/repos/{repo}/releases/latest"); - let release = http::get_json(client, &url).await?; + let release = http::get_json_for(client, &url, purpose).await?; if release.get("draft").and_then(|v| v.as_bool()) == Some(true) || release.get("prerelease").and_then(|v| v.as_bool()) == Some(true) { @@ -193,7 +227,7 @@ async fn resolve( let Some(endpoint) = endpoints.get(&key) else { return Ok(None); }; - let body = http::get_json(client, endpoint).await?; + let body = http::get_json_for(client, endpoint, purpose).await?; let field = |name: &str| body.get(name).and_then(|v| v.as_str()).map(str::trim); let (Some(version), Some(url)) = (field(version_field), field(url_field)) else { return Err(Error::parse( @@ -224,13 +258,15 @@ async fn resolve( let Some(installed) = app.display_version.as_deref() else { return Ok(None); }; - let index = http::get_json(client, "https://nodejs.org/dist/index.json").await?; + let index = + http::get_json_for(client, "https://nodejs.org/dist/index.json", purpose).await?; let Some(version) = catalog::pick_nodejs_release(&index, installed) else { return Ok(None); }; let file = format!("node-v{version}-{}.msi", app.arch); let base = format!("https://nodejs.org/dist/v{version}/"); - let shasums = http::get_text(client, &format!("{base}SHASUMS256.txt")).await?; + let shasums = + http::get_text_for(client, &format!("{base}SHASUMS256.txt"), purpose).await?; let Some(sha256) = catalog::sha256_from_shasums(&shasums, &file) else { // No published hash means no installer for this arch in this // release; not offering one is the honest answer. @@ -246,6 +282,16 @@ async fn resolve( } } +/// Stands in for a release that could not be read; the policy refuses it. +fn unreadable_release() -> Release { + Release { + version: String::new(), + url: String::new(), + sha256: None, + size_bytes: None, + } +} + fn candidate_for(app: &InstalledApp, entry: &CatalogApp, release: &Release) -> UpdateCandidate { UpdateCandidate { id: PackageId::new(BackendKind::Direct, native_id(app.scope, entry)).with_alias(&entry.id), @@ -290,20 +336,34 @@ impl Backend for DirectBackend { let lookups = found.iter().map(|(app, entry)| { let client = &client; - async move { (app, entry, resolve(client, entry, app).await) } + async move { (app, entry, resolve(client, entry, app, Purpose::Scan).await) } }); + let results = futures::future::join_all(lookups).await; + let asked = results.len(); let mut out = Vec::new(); - for (app, entry, result) in futures::future::join_all(lookups).await { + let mut failures = Vec::new(); + for (app, entry, result) in results { match result { Ok(Some(release)) => out.push(candidate_for(app, entry, &release)), Ok(None) => {} - // One publisher being unreachable must not hide the others. + // One publisher being unreachable must not hide the others, + // and must not make its app look up to date either: it is + // listed as one whose version could not be determined. Err(e) => { - tracing::warn!(app = %entry.id, error = %e, "could not read the latest release") + tracing::warn!(app = %entry.id, error = %e, "could not read the latest release"); + out.push(candidate_for(app, entry, &unreadable_release())); + failures.push(e); } } } + // No publisher answered: that is being offline, not being up to date. + if failures.len() == asked + && mac.is_empty() + && let Some(first) = failures.into_iter().next() + { + return Err(first); + } out.extend(mac); Ok(out) } @@ -353,18 +413,7 @@ impl Backend for DirectBackend { let Some(entry) = catalog.find(id).cloned() else { return Ok(None); }; - Ok(installed_apps() - .await - .into_iter() - .filter(|a| a.scope == scope && entry.matches(a)) - .filter_map(|a| a.display_version) - // Several matching entries means a leftover next to the real - // install; the newest one is the one that was just written. - .max_by(|a, b| { - Version::parse(a) - .compare(&Version::parse(b)) - .unwrap_or(std::cmp::Ordering::Equal) - })) + Ok(find_install(installed_apps().await, &entry, scope).and_then(|a| a.display_version)) } } @@ -488,27 +537,26 @@ pub mod windows_apply { let installed = tokio::task::spawn_blocking(inventory::installed_apps) .await .unwrap_or_default(); - let app = installed - .into_iter() - .find(|a| a.scope == scope && entry.matches(a)) + let app = find_install(installed, &entry, scope).ok_or_else(|| { + Error::unavailable( + "direct", + format!("{} is no longer installed for this scope", entry.name), + ) + })?; + + // 1. Exactly the version that was approved. + let client = backend.client(Duration::from_secs(60))?; + let release = resolve(&client, &entry, &app, Purpose::Install) + .await? .ok_or_else(|| { Error::unavailable( "direct", - format!("{} is no longer installed for this scope", entry.name), + format!( + "{} no longer offers an installer for this machine", + entry.name + ), ) })?; - - // 1. Exactly the version that was approved. - let client = backend.client(Duration::from_secs(60))?; - let release = resolve(&client, &entry, &app).await?.ok_or_else(|| { - Error::unavailable( - "direct", - format!( - "{} no longer offers an installer for this machine", - entry.name - ), - ) - })?; if release.version.trim() != candidate.available.raw().trim() { return Err(Error::Verification { package: entry.name.clone(), @@ -521,42 +569,43 @@ pub mod windows_apply { } // Never replace files under a running program. - if let Some(dir) = &app.install_dir { - let running = inventory::running_executables().await; - if let Some(exe) = inventory::running_inside(dir, &running) { - return Err(Error::unavailable( - "direct", - format!( - "{} is running ({}); close it and try again", - entry.name, - exe.display() - ), - )); - } - } + refuse_if_running(&entry, &app).await?; // A fresh directory per update, so nothing left from an earlier // attempt can be picked up by mistake. - let dir = http::download_dir()?.join(format!( - "{}-{}-{}", - entry.id, - release.version, - jiff::Timestamp::now().as_millisecond() - )); - tokio::fs::create_dir_all(&dir).await?; - let file = dir.join(http::file_name_for(&release.url, "installer.bin")); - - let result = download_verify_install( - backend, + let dir = http::DownloadDir::new(&format!("{}-{}", entry.id, release.version))?; + let file = dir + .path() + .join(http::file_name_for(&release.url, "installer.bin")); + + download_verify_install( &client_for_download(backend)?, &entry, + &app, &release, &file, ) - .await; + .await + } - let _ = tokio::fs::remove_dir_all(&dir).await; - result + async fn refuse_if_running(entry: &CatalogApp, app: &InstalledApp) -> Result<()> { + let running = inventory::running_executables().await?; + let found = match &app.install_dir { + Some(dir) => inventory::running_inside(dir, &running), + None => None, + } + .or_else(|| inventory::running_named(&entry.processes, &running)); + match found { + None => Ok(()), + Some(exe) => Err(Error::unavailable( + "direct", + format!( + "{} is running ({}); close it and try again", + entry.name, + exe.display() + ), + )), + } } fn client_for_download(backend: &DirectBackend) -> Result { @@ -564,9 +613,9 @@ pub mod windows_apply { } async fn download_verify_install( - _backend: &DirectBackend, client: &reqwest::Client, entry: &CatalogApp, + app: &InstalledApp, release: &Release, file: &Path, ) -> Result<()> { @@ -584,6 +633,9 @@ pub mod windows_apply { ) .await?; + // The download took a while; the program may have been started since. + refuse_if_running(entry, app).await?; + let file_arg = file.to_string_lossy().to_string(); let (program, args): (String, Vec) = match entry.installer { catalog::InstallerKind::Msi => { @@ -745,7 +797,7 @@ mod tests { technology: Technology::Other, install_dir: None, }; - let release = resolve(&client, entry, &app) + let release = resolve(&client, entry, &app, Purpose::Install) .await .unwrap_or_else(|e| panic!("{}: {e}", entry.id)) .unwrap_or_else(|| panic!("{}: no release or no x64 asset", entry.id)); @@ -820,5 +872,47 @@ mod tests { }; let found = recognised(&catalog, vec![git("C:/a"), git("C:/b")]); assert_eq!(found.len(), 1); + + // The newest entry is the real one, whatever order the OS lists them. + let mut newer = git("C:/b"); + newer.display_version = Some("2.56.1".into()); + let mut unreadable = git("C:/c"); + unreadable.display_version = None; + for list in [ + vec![git("C:/a"), newer.clone(), unreadable.clone()], + vec![unreadable, newer.clone(), git("C:/a")], + ] { + let found = recognised(&catalog, list.clone()); + assert_eq!(found.len(), 1); + assert_eq!(found[0].0.display_version.as_deref(), Some("2.56.1")); + let entry = catalog.find("git").unwrap(); + let picked = find_install(list, entry, Scope::Machine).unwrap(); + assert_eq!(picked.install_dir, newer.install_dir); + } + } + + /// An app whose publisher could not be reached must not look up to date. + #[test] + fn an_unreachable_publisher_is_listed_and_held_back() { + let catalog = Catalog::embedded(); + let entry = catalog.find("git").unwrap(); + let app = InstalledApp { + display_name: "Git".into(), + display_version: Some("2.56.0".into()), + publisher: Some("The Git Development Community".into()), + scope: Scope::Machine, + arch: "x64", + technology: Technology::Inno, + install_dir: None, + }; + let c = candidate_for(&app, entry, &unreadable_release()); + let policy = odysync_core::Policy { + elevated: true, + ..Default::default() + }; + assert_eq!( + policy.evaluate(&c), + Some(odysync_core::SkipReason::UnknownAvailableVersion) + ); } } diff --git a/crates/odysync-backends/src/direct/private_dir.rs b/crates/odysync-backends/src/direct/private_dir.rs new file mode 100644 index 0000000..48dcc8e --- /dev/null +++ b/crates/odysync-backends/src/direct/private_dir.rs @@ -0,0 +1,140 @@ +//! A download directory only administrators can write to. +//! +//! An installer that runs with administrator rights must not run from a +//! directory an ordinary process can write to; see +//! [`super::http::DownloadDir`]. The directory is created with its access list +//! in the same call, so there is no moment in which it is open, and under a +//! name nobody can guess, so it cannot be put in place beforehand: creating a +//! directory that already exists fails. + +use std::hash::{BuildHasher, Hasher}; +use std::path::{Path, PathBuf}; + +use windows::Win32::Foundation::{HLOCAL, LocalFree}; +use windows::Win32::Security::Authorization::{ + ConvertStringSecurityDescriptorToSecurityDescriptorW, SDDL_REVISION_1, +}; +use windows::Win32::Security::{PSECURITY_DESCRIPTOR, SECURITY_ATTRIBUTES}; +use windows::Win32::Storage::FileSystem::CreateDirectoryW; +use windows::core::{HSTRING, PCWSTR}; + +use odysync_core::error::{Error, Result}; + +const PREFIX: &str = "Odysync-download-"; + +/// Protected (nothing inherited): full control for Administrators and SYSTEM, +/// nothing for anyone else. +const ADMINS_ONLY: &str = "D:P(A;OICI;FA;;;BA)(A;OICI;FA;;;SY)"; + +/// Create a fresh directory for `label` under ProgramData. +pub fn create(label: &str) -> Result { + let root = std::env::var_os("ProgramData") + .map(PathBuf::from) + .filter(|p| p.is_absolute()) + .ok_or_else(|| Error::Config("ProgramData is not set".into()))?; + super::http::remove_leftovers(&root, PREFIX); + create_in(&root, label) +} + +fn create_in(root: &Path, label: &str) -> Result { + let label: String = label + .chars() + .filter(|c| c.is_ascii_alphanumeric() || matches!(c, '-' | '.')) + .take(40) + .collect(); + // `RandomState` is seeded by the operating system for every instance. + let random = std::collections::hash_map::RandomState::new() + .build_hasher() + .finish(); + let dir = root.join(format!("{PREFIX}{label}-{random:016x}")); + create_protected(&dir)?; + Ok(dir) +} + +fn create_protected(dir: &Path) -> Result<()> { + let sddl = HSTRING::from(ADMINS_ONLY); + let path = HSTRING::from(dir.as_os_str()); + let mut descriptor = PSECURITY_DESCRIPTOR::default(); + // SAFETY: every pointer is to a live local; the descriptor Windows + // allocates is released below. + unsafe { + ConvertStringSecurityDescriptorToSecurityDescriptorW( + PCWSTR(sddl.as_ptr()), + SDDL_REVISION_1, + &mut descriptor, + None, + ) + .map_err(std::io::Error::from)?; + let attributes = SECURITY_ATTRIBUTES { + nLength: size_of::() as u32, + lpSecurityDescriptor: descriptor.0, + bInheritHandle: false.into(), + }; + let created = CreateDirectoryW(PCWSTR(path.as_ptr()), Some(&attributes)); + let _ = LocalFree(Some(HLOCAL(descriptor.0))); + created.map_err(std::io::Error::from)?; + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + /// The access list as Windows reports it, e.g. `D:PAI(A;OICI;FA;;;BA)...`. + fn access_list(dir: &Path) -> String { + let out = std::process::Command::new("powershell.exe") + .args([ + "-NoProfile", + "-NonInteractive", + "-Command", + &format!( + "(New-Object System.Security.AccessControl.DirectorySecurity \ + '{}', 'Access').GetSecurityDescriptorSddlForm('Access')", + dir.display() + ), + ]) + .env_remove("PSModulePath") + .output() + .unwrap(); + String::from_utf8_lossy(&out.stdout).trim().to_string() + } + + #[test] + fn only_administrators_can_write_to_it() { + let root = tempfile::tempdir().unwrap(); + let dir = create_in(root.path(), "git-2.56.1").expect("create"); + let name = dir.file_name().unwrap().to_string_lossy().into_owned(); + assert!(name.starts_with("Odysync-download-git-2.56.1-"), "{name}"); + + if odysync_core::platform::is_elevated() { + // CI runs elevated: there the access list itself can be read. + let acl = access_list(&dir); + assert!(acl.starts_with("D:P"), "nothing is inherited: {acl}"); + assert_eq!(acl.matches("(A;").count(), 2, "{acl}"); + assert!(acl.contains(";;;BA)") && acl.contains(";;;SY)"), "{acl}"); + } else { + // This is the attack: an ordinary process of the same user puts a + // library next to the installer. + let err = std::fs::write(dir.join("version.dll"), b"evil").expect_err("refused"); + assert_eq!(err.kind(), std::io::ErrorKind::PermissionDenied); + } + } + + #[test] + fn a_directory_that_is_already_there_is_not_used() { + let root = tempfile::tempdir().unwrap(); + let dir = root.path().join("planted"); + std::fs::create_dir(&dir).unwrap(); + assert!(create_protected(&dir).is_err()); + } + + #[test] + fn names_are_not_guessable_and_stay_inside_the_root() { + let root = tempfile::tempdir().unwrap(); + let a = create_in(root.path(), r"..\..\evil").expect("create"); + let b = create_in(root.path(), r"..\..\evil").expect("create"); + assert_ne!(a, b); + assert_eq!(a.parent(), Some(root.path())); + } +} diff --git a/crates/odysync-backends/src/gpu/nvidia_gpu.rs b/crates/odysync-backends/src/gpu/nvidia_gpu.rs index ebcd146..d2fd6ab 100644 --- a/crates/odysync-backends/src/gpu/nvidia_gpu.rs +++ b/crates/odysync-backends/src/gpu/nvidia_gpu.rs @@ -260,13 +260,8 @@ impl Backend for NvidiaGpuBackend { }); } - let dir = crate::direct::http::download_dir()?.join(format!( - "nvidia-{}-{}", - driver.version, - jiff::Timestamp::now().as_millisecond() - )); - tokio::fs::create_dir_all(&dir).await?; - let file = dir.join(crate::direct::http::file_name_for( + let dir = crate::direct::http::DownloadDir::new(&format!("nvidia-{}", driver.version))?; + let file = dir.path().join(crate::direct::http::file_name_for( &driver.url, "nvidia-driver.exe", )); @@ -305,7 +300,7 @@ impl Backend for NvidiaGpuBackend { } .await; - let _ = tokio::fs::remove_dir_all(&dir).await; + drop(dir); result } #[cfg(not(windows))] From fad8d9214f1ed383fba9f9dae8c4091abccb9056 Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 17:05:38 +0100 Subject: [PATCH 09/18] fix(catalog): KeePassXC and PowerShell updates had gone missing KeePassXC 2.8.0 renamed its installer and PowerShell 7.7 no longer ships one, so both apps silently looked up to date. KeePassXC matches again, PowerShell stays on the installed line (7.6 still gets security fixes), and a release without a matching installer is now listed as undetermined. The live test covers all 15 entries and reports every problem, not the first. --- .../odysync-backends/src/direct/catalog.json | 3 +- crates/odysync-backends/src/direct/catalog.rs | 73 +++++++++++++++++++ crates/odysync-backends/src/direct/mod.rs | 65 +++++++++++------ 3 files changed, 118 insertions(+), 23 deletions(-) diff --git a/crates/odysync-backends/src/direct/catalog.json b/crates/odysync-backends/src/direct/catalog.json index dc3ff10..835c5a0 100644 --- a/crates/odysync-backends/src/direct/catalog.json +++ b/crates/odysync-backends/src/direct/catalog.json @@ -83,7 +83,7 @@ "type": "github", "repo": "keepassxreboot/keepassxc", "tag": "^(?P\\d+\\.\\d+\\.\\d+)$", - "assets": { "x64": "^KeePassXC-[\\d.]+-Win64\\.msi$" } + "assets": { "x64": "^KeePassXC-[\\d.]+-(?:x64|Win64)\\.msi$" } }, "installer": "msi", "processes": ["KeePassXC.exe", "keepassxc-proxy.exe"], @@ -219,6 +219,7 @@ "source": { "type": "github", "repo": "PowerShell/PowerShell", + "same_line": 2, "tag": "^v(?P\\d+\\.\\d+\\.\\d+)$", "assets": { "x64": "^PowerShell-[\\d.]+-win-x64\\.msi$" } }, diff --git a/crates/odysync-backends/src/direct/catalog.rs b/crates/odysync-backends/src/direct/catalog.rs index cbc4bb0..14d3e81 100644 --- a/crates/odysync-backends/src/direct/catalog.rs +++ b/crates/odysync-backends/src/direct/catalog.rs @@ -25,6 +25,7 @@ use std::collections::BTreeMap; +use odysync_core::version::Version; use regex::Regex; use serde::Deserialize; @@ -133,6 +134,13 @@ pub enum Source { /// per-user installer. Falls back to `assets`. #[serde(default)] user_assets: BTreeMap, + /// Stay on the installed line: how many leading version numbers must + /// not change. For publishers who keep several lines alive and where + /// the newest one is not simply the next update. PowerShell 7.7 no + /// longer ships a Windows Installer package, 7.6 still does and still + /// gets security fixes. + #[serde(default)] + same_line: Option, }, /// A vendor JSON endpoint per `-`, returning one object. Json { @@ -263,6 +271,47 @@ pub fn version_from_tag(pattern: &str, tag: &str) -> Option { } } +/// The newest stable release on the same line as `installed`. +/// +/// `parts` is how many leading numbers make a line: 2 keeps 7.6.x on 7.6. +pub fn pick_github_release<'a>( + releases: &'a serde_json::Value, + tag_pattern: &str, + installed: &str, + parts: usize, +) -> Option<&'a serde_json::Value> { + let line = |v: &str| -> Option> { + let numbers: Vec = v + .trim() + .split('.') + .take(parts) + .map(str::parse) + .collect::>() + .ok()?; + (numbers.len() == parts).then_some(numbers) + }; + let wanted = line(installed)?; + let flag = |r: &serde_json::Value, name: &str| { + r.get(name).and_then(serde_json::Value::as_bool) == Some(true) + }; + releases + .as_array()? + .iter() + .filter(|r| !flag(r, "draft") && !flag(r, "prerelease")) + .filter_map(|r| { + let version = version_from_tag(tag_pattern, r.get("tag_name")?.as_str()?)?; + (line(&version)? == wanted).then(|| (Version::parse(&version), r)) + }) + .reduce(|best, next| { + if best.0.is_upgrade_to(&next.0) { + next + } else { + best + } + }) + .map(|(_, r)| r) +} + /// The asset-name pattern for this scope and architecture. pub fn asset_pattern<'a>( assets: &'a BTreeMap, @@ -347,6 +396,29 @@ mod tests { } } + /// PowerShell's real list in November 2026: the newest release has no + /// installer Odysync can use, the installed line still gets fixes. + #[test] + fn a_line_is_kept_when_the_publisher_moves_on() { + let releases = serde_json::json!([ + { "tag_name": "v7.7.0", "draft": false, "prerelease": false }, + { "tag_name": "v7.6.9", "draft": false, "prerelease": false }, + { "tag_name": "v7.6.10", "draft": false, "prerelease": false }, + { "tag_name": "v7.6.11", "draft": true, "prerelease": false }, + { "tag_name": "v7.7.0-rc.1", "draft": false, "prerelease": true }, + { "tag_name": "v7.4.22", "draft": false, "prerelease": false }, + ]); + let tag = r"^v(?P\d+\.\d+\.\d+)$"; + let pick = |installed: &str| { + pick_github_release(&releases, tag, installed, 2).and_then(|r| r["tag_name"].as_str()) + }; + assert_eq!(pick("7.6.8.0"), Some("v7.6.10")); + assert_eq!(pick("7.4.1"), Some("v7.4.22")); + assert_eq!(pick("7.5.0"), None, "a line nobody maintains any more"); + assert_eq!(pick("unknown"), None); + assert_eq!(pick("7"), None); + } + /// Without it, "is it running?" has no answer for these and the check /// that protects an open program is skipped. #[test] @@ -400,6 +472,7 @@ mod tests { tag, assets, user_assets, + .. } => { assert_eq!(repo.split('/').count(), 2, "{}: repo", entry.id); let re = Regex::new(tag).expect("tag regex"); diff --git a/crates/odysync-backends/src/direct/mod.rs b/crates/odysync-backends/src/direct/mod.rs index 5ae9f8f..9a21782 100644 --- a/crates/odysync-backends/src/direct/mod.rs +++ b/crates/odysync-backends/src/direct/mod.rs @@ -162,13 +162,25 @@ async fn resolve( tag, assets, user_assets, + same_line, } => { let Some(pattern) = catalog::asset_pattern(assets, user_assets, app.scope, app.arch) else { return Ok(None); }; - let url = format!("https://api.github.com/repos/{repo}/releases/latest"); - let release = http::get_json_for(client, &url, purpose).await?; + let api = format!("https://api.github.com/repos/{repo}/releases"); + let release = match same_line { + None => http::get_json_for(client, &format!("{api}/latest"), purpose).await?, + Some(parts) => { + let list = + http::get_json_for(client, &format!("{api}?per_page=50"), purpose).await?; + let installed = app.display_version.as_deref().unwrap_or_default(); + match catalog::pick_github_release(&list, tag, installed, *parts) { + Some(release) => release.clone(), + None => return Ok(None), + } + } + }; if release.get("draft").and_then(|v| v.as_bool()) == Some(true) || release.get("prerelease").and_then(|v| v.as_bool()) == Some(true) { @@ -195,7 +207,12 @@ async fn resolve( .is_some_and(|n| asset_re.is_match(n)) }) else { - return Ok(None); + // The publisher renamed or dropped the file. Saying nothing + // would make the app look up to date from then on. + return Err(Error::parse( + format!("{} release", entry.id), + format!("{version} has no installer matching {pattern}"), + )); }; let url = asset .get("browser_download_url") @@ -774,41 +791,45 @@ mod tests { use super::*; use catalog::Technology; - /// Every GitHub-sourced entry still resolves against the live API to a - /// stable version, an installer of that repository and a published + /// Every entry still resolves against its publisher to a stable version, + /// an installer of that publisher and a published /// SHA-256 — the three things `lock_and_verify` will insist on. Run it /// after editing the catalog: `cargo test -p odysync-backends -- --ignored /// catalog_entries_resolve`. #[tokio::test] - #[ignore = "asks the live GitHub API"] - async fn catalog_entries_resolve_against_github() { + #[ignore = "asks the publishers; the weekly CI run includes it"] + async fn catalog_entries_resolve_against_their_publishers() { let client = http::client(None, std::time::Duration::from_secs(30)).expect("http client"); let catalog = Catalog::embedded(); + let mut problems = Vec::new(); for entry in &catalog.apps { - if !matches!(entry.source, Source::Github { .. }) { - continue; - } let app = InstalledApp { display_name: entry.name.clone(), - display_version: Some("0".into()), + // Sources that stay on a line need one that is alive. + display_version: Some( + match entry.id.as_str() { + "powershell" => "7.6.0", + "nodejs" => "24.0.0", + _ => "0", + } + .into(), + ), publisher: None, scope: Scope::Machine, arch: "x64", technology: Technology::Other, install_dir: None, }; - let release = resolve(&client, entry, &app, Purpose::Install) - .await - .unwrap_or_else(|e| panic!("{}: {e}", entry.id)) - .unwrap_or_else(|| panic!("{}: no release or no x64 asset", entry.id)); - assert!( - release.sha256.is_some(), - "{}: {} has no published SHA-256", - entry.id, - release.url - ); - println!("{:<20} {:<14} {}", entry.id, release.version, release.url); + match resolve(&client, entry, &app, Purpose::Install).await { + Ok(Some(r)) if r.sha256.is_some() => { + println!("{:<20} {:<14} {}", entry.id, r.version, r.url); + } + Ok(Some(r)) => problems.push(format!("{}: {} has no SHA-256", entry.id, r.url)), + Ok(None) => problems.push(format!("{}: no release or no x64 asset", entry.id)), + Err(e) => problems.push(format!("{}: {e}", entry.id)), + } } + assert!(problems.is_empty(), "{}", problems.join("\n")); } #[test] From 189509419b8d91c2232ef447e3618ed32912adb6 Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 17:11:50 +0100 Subject: [PATCH 10/18] feat(cli): bounded scans with progress, safe schedules, honest results Every source has its own time limit (the setting existed and did nothing), a hang no longer holds up the rest, and the terminal shows who is still busy. Asking one source no longer probes the thirty others first. apply, care and the daemon record history, honour the retry setting, hold the machine-wide lock and stop after the current package on Ctrl-C. Schedules and the daemon leave drivers, firmware, system upgrades and developer packages to a person (apply --unattended). Windows schedules make up for missed runs and are no longer stopped when a laptop is unplugged. --json always prints exactly one document, and a run in which no source answered exits with 2 instead of looking up to date. --- Cargo.toml | 2 +- crates/odysync-backends/src/lib.rs | 18 +- crates/odysync-backends/src/scan.rs | 273 ++++++++++++++++++ crates/odysync-backends/src/scheduler.rs | 209 ++++++++++++-- crates/odysync-cli/src/daemon.rs | 49 ++-- crates/odysync-cli/src/main.rs | 339 +++++++++++++++++++---- crates/odysync-core/src/error.rs | 4 + 7 files changed, 785 insertions(+), 109 deletions(-) create mode 100644 crates/odysync-backends/src/scan.rs diff --git a/Cargo.toml b/Cargo.toml index 8e46857..5aff36d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ anyhow = "1" thiserror = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" -tokio = { version = "1", features = ["rt-multi-thread", "macros", "process", "time", "sync", "io-util", "fs"] } +tokio = { version = "1", features = ["rt-multi-thread", "macros", "process", "time", "sync", "io-util", "fs", "signal"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } clap = { version = "4", features = ["derive"] } diff --git a/crates/odysync-backends/src/lib.rs b/crates/odysync-backends/src/lib.rs index 8c1af6c..3504f7b 100644 --- a/crates/odysync-backends/src/lib.rs +++ b/crates/odysync-backends/src/lib.rs @@ -39,6 +39,7 @@ pub mod notifications; pub mod oem; pub mod offline; pub mod pacman; +pub mod scan; pub mod scheduler; pub mod scoop; pub mod security; @@ -188,7 +189,22 @@ impl ProbedBackend { /// It is also the only place availability is probed: callers should probe once /// and cache, since a full sweep is roughly one process spawn per backend. pub async fn probe_backends(config: &Config) -> Vec { - let candidates = all_backends(); + probe_kinds(config, &|_| true).await +} + +/// [`probe_backends`] for some of the sources only. +/// +/// Asking one source should not start the thirty others just to find out that +/// they are there. +pub async fn probe_kinds( + config: &Config, + wanted: &dyn Fn(odysync_core::model::BackendKind) -> bool, +) -> Vec { + direct::http::set_proxy(config.proxy_url.as_deref()); + let candidates: Vec<_> = all_backends() + .into_iter() + .filter(|b| wanted(b.kind())) + .collect(); let results = futures::future::join_all(candidates.iter().map(|b| b.is_available())).await; candidates diff --git a/crates/odysync-backends/src/scan.rs b/crates/odysync-backends/src/scan.rs new file mode 100644 index 0000000..4e6b983 --- /dev/null +++ b/crates/odysync-backends/src/scan.rs @@ -0,0 +1,273 @@ +//! Asking every source at once, with a time limit each and a way to stop. +//! +//! The command line, the daemon and the app each had their own copy of this +//! loop, and all three shared its weaknesses: the slowest source decided how +//! long anyone waited, nothing was shown until all of them had answered, a +//! source that hung was waited for, and a scan could not be stopped. + +use std::time::{Duration, Instant}; + +use odysync_core::backend::Backend; +use odysync_core::error::{Error, Result}; +use odysync_core::model::{BackendKind, UpdateCandidate}; +use tokio::sync::watch; + +/// Windows Update may need minutes for its first search after a start. Cutting +/// it off at the general limit would hide security updates exactly on the +/// machines that were off for a while, so it has a floor of its own. +const WINDOWS_UPDATE_MIN: Duration = Duration::from_secs(5 * 60); + +/// What one source answered. +pub struct SourceScan { + pub kind: BackendKind, + pub name: String, + pub elapsed: Duration, + pub result: Result>, +} + +/// Where a source is right now. +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)] +#[serde(rename_all = "lowercase")] +pub enum SourceState { + Started, + Done, + Failed, +} + +/// One step of a scan, for a progress display. +#[derive(Debug, Clone, serde::Serialize)] +pub struct ScanProgress { + pub backend: String, + pub name: String, + pub state: SourceState, + /// Updates this source reported. + pub found: usize, + /// Sources finished so far, this one included once it is. + pub done: usize, + pub total: usize, +} + +/// Stops a scan from outside it. Cheap to clone. +#[derive(Clone)] +pub struct ScanCancel(watch::Sender); + +impl ScanCancel { + pub fn new() -> Self { + Self(watch::Sender::new(false)) + } + + pub fn cancel(&self) { + self.0.send_replace(true); + } + + /// Resolves once [`cancel`](Self::cancel) was called. + async fn cancelled(&self) { + let mut rx = self.0.subscribe(); + // Fails only when every sender is gone, and `self` is one. + let _ = rx.wait_for(|c| *c).await; + } +} + +impl Default for ScanCancel { + fn default() -> Self { + Self::new() + } +} + +/// How long `kind` may take when the general limit is `general`. +pub fn time_limit(kind: BackendKind, general: Duration) -> Duration { + match kind { + BackendKind::WindowsUpdate + | BackendKind::WindowsDefenderUpdate + | BackendKind::WindowsFeatureUpdate + | BackendKind::WindowsDrivers => general.max(WINDOWS_UPDATE_MIN), + _ => general, + } +} + +/// Ask every source, all at the same time. +/// +/// A source that fails, takes longer than its limit or is still busy when the +/// scan is cancelled contributes an error instead of holding up the others. +/// Dropping its future stops the program it was running. +pub async fn scan_sources( + backends: &[&dyn Backend], + limit: Duration, + cancel: &ScanCancel, + progress: &(dyn Fn(ScanProgress) + Sync), +) -> Vec { + let total = backends.len(); + let done = std::sync::atomic::AtomicUsize::new(0); + let report = |b: &dyn Backend, state, found, done| { + progress(ScanProgress { + backend: b.kind().id().to_string(), + name: b.display_name().to_string(), + state, + found, + done, + total, + }); + }; + + futures::future::join_all(backends.iter().map(|b| { + let (done, report) = (&done, &report); + async move { + report(*b, SourceState::Started, 0, done.load(Relaxed)); + let started = Instant::now(); + let limit = time_limit(b.kind(), limit); + let result = tokio::select! { + result = tokio::time::timeout(limit, b.scan()) => match result { + Ok(result) => result, + Err(_) => Err(Error::CommandTimeout { + command: b.display_name().to_string(), + seconds: limit.as_secs(), + }), + }, + () = cancel.cancelled() => Err(Error::Cancelled), + }; + let elapsed = started.elapsed(); + let finished = done.fetch_add(1, Relaxed) + 1; + match &result { + Ok(found) => { + tracing::info!( + backend = %b.kind(), + count = found.len(), + ms = elapsed.as_millis() as u64, + "scan complete" + ); + report(*b, SourceState::Done, found.len(), finished); + } + Err(e) => { + tracing::warn!( + backend = %b.kind(), + error = %e, + ms = elapsed.as_millis() as u64, + "scan failed" + ); + report(*b, SourceState::Failed, 0, finished); + } + } + SourceScan { + kind: b.kind(), + name: b.display_name().to_string(), + elapsed, + result, + } + } + })) + .await +} + +use std::sync::atomic::Ordering::Relaxed; + +#[cfg(test)] +mod tests { + use super::*; + use async_trait::async_trait; + use std::sync::Mutex; + + struct Slow(BackendKind, Duration); + + #[async_trait] + impl Backend for Slow { + fn kind(&self) -> BackendKind { + self.0 + } + fn display_name(&self) -> &str { + self.0.id() + } + async fn is_available(&self) -> bool { + true + } + async fn scan(&self) -> Result> { + tokio::time::sleep(self.1).await; + Ok(Vec::new()) + } + async fn apply(&self, _: &UpdateCandidate) -> Result<()> { + unreachable!("a scan never applies") + } + async fn installed_version(&self, _: &UpdateCandidate) -> Result> { + Ok(None) + } + } + + fn refs(all: &[Slow]) -> Vec<&dyn Backend> { + all.iter().map(|b| b as &dyn Backend).collect() + } + + const MS: Duration = Duration::from_millis(1); + + #[tokio::test] + async fn one_hanging_source_does_not_hold_up_the_rest() { + let all = [ + Slow(BackendKind::Pip, 10 * MS), + Slow(BackendKind::Npm, 60_000 * MS), + ]; + let started = Instant::now(); + let out = scan_sources(&refs(&all), 200 * MS, &ScanCancel::new(), &|_| {}).await; + assert!(started.elapsed() < Duration::from_secs(5)); + assert!(out[0].result.is_ok()); + assert!(matches!(out[1].result, Err(Error::CommandTimeout { .. }))); + } + + #[tokio::test] + async fn cancelling_keeps_what_was_already_answered() { + let all = [ + Slow(BackendKind::Pip, 10 * MS), + Slow(BackendKind::Npm, 60_000 * MS), + ]; + let cancel = ScanCancel::new(); + let stop = cancel.clone(); + tokio::spawn(async move { + tokio::time::sleep(200 * MS).await; + stop.cancel(); + }); + let started = Instant::now(); + let out = scan_sources(&refs(&all), Duration::from_secs(60), &cancel, &|_| {}).await; + assert!(started.elapsed() < Duration::from_secs(5)); + assert!(out[0].result.is_ok()); + assert!(matches!(out[1].result, Err(Error::Cancelled))); + } + + #[tokio::test] + async fn cancelling_before_the_start_is_not_lost() { + let cancel = ScanCancel::new(); + cancel.cancel(); + let all = [Slow(BackendKind::Npm, 60_000 * MS)]; + let out = scan_sources(&refs(&all), Duration::from_secs(60), &cancel, &|_| {}).await; + assert!(out[0].result.is_err()); + } + + #[tokio::test] + async fn progress_names_every_source_and_counts_up_to_the_total() { + let all = [ + Slow(BackendKind::Pip, 5 * MS), + Slow(BackendKind::Npm, 30 * MS), + Slow(BackendKind::Cargo, 60_000 * MS), + ]; + let seen = Mutex::new(Vec::new()); + scan_sources(&refs(&all), 300 * MS, &ScanCancel::new(), &|p| { + seen.lock().unwrap().push(p) + }) + .await; + let seen = seen.into_inner().unwrap(); + let count = |s| seen.iter().filter(|p| p.state == s).count(); + assert_eq!(count(SourceState::Started), 3); + assert_eq!(count(SourceState::Done), 2); + assert_eq!(count(SourceState::Failed), 1); + assert_eq!(seen.last().unwrap().done, 3); + assert!(seen.iter().all(|p| p.total == 3)); + } + + #[test] + fn windows_update_gets_the_time_it_needs() { + let general = Duration::from_secs(120); + assert_eq!(time_limit(BackendKind::Pip, general), general); + assert_eq!( + time_limit(BackendKind::WindowsUpdate, general), + WINDOWS_UPDATE_MIN + ); + let long = Duration::from_secs(3600); + assert_eq!(time_limit(BackendKind::WindowsUpdate, long), long); + } +} diff --git a/crates/odysync-backends/src/scheduler.rs b/crates/odysync-backends/src/scheduler.rs index 22a3581..d6e7424 100644 --- a/crates/odysync-backends/src/scheduler.rs +++ b/crates/odysync-backends/src/scheduler.rs @@ -5,9 +5,10 @@ //! Linux: systemd user timer via `~/.config/systemd/user/`. //! //! The schedule is a simple daily or weekly trigger at a specified time. -//! The scheduled command is `odysync apply --yes`, or `odysync care --yes` -//! for automatic care (updates plus the safe cleanup), followed by any extra -//! arguments. +//! The scheduled command is `odysync apply --yes --unattended`, or +//! `odysync care --yes` for automatic care (updates plus the safe cleanup), +//! followed by any extra arguments. Both leave drivers, firmware, system +//! upgrades and developer packages to a person. // Only the launchd (macOS) and systemd (Linux) paths build file paths; on // Windows this would be an unused import, which `-D warnings` rejects. @@ -87,6 +88,9 @@ impl ScheduleSpec { ScheduledCommand::Care => "care", }; let mut args = vec![verb.to_string(), "--yes".to_string()]; + if self.command == ScheduledCommand::Apply { + args.push("--unattended".to_string()); + } args.extend(self.extra_args.iter().cloned()); args } @@ -99,6 +103,88 @@ impl ScheduleSpec { } } +/// Refuse a task name that is more than a name. +/// +/// It becomes a file name on macOS and Linux and a path in the Task Scheduler, +/// where `..` and separators would reach other people's schedules. +fn check_task_name(name: &str) -> Result<()> { + let ok = !name.is_empty() + && name.len() <= 64 + && name + .chars() + .all(|c| c.is_ascii_alphanumeric() || matches!(c, '-' | '_' | ' ')); + if ok { + Ok(()) + } else { + Err(Error::Config(format!( + "{name:?} is not a usable schedule name; use letters, digits, spaces, '-' and '_'" + ))) + } +} + +/// `text` inside an XML element. +#[cfg(any(windows, target_os = "macos", test))] +fn xml_text(text: &str) -> String { + text.replace('&', "&") + .replace('<', "<") + .replace('>', ">") + .replace('"', """) +} + +/// The Task Scheduler definition for `spec`. +/// +/// `schtasks /SC DAILY` cannot say any of what matters here, and its defaults +/// are wrong for an updater: a run missed because the computer was off is +/// dropped for good, and a run in progress is **stopped** when a laptop is +/// unplugged, in the middle of whatever installer was running. +#[cfg(any(windows, test))] +fn task_xml(spec: &ScheduleSpec, program: &str) -> Result { + let (h, m) = parse_time(&spec.time)?; + let schedule = match spec.frequency { + ScheduleFrequency::Daily => { + "1".to_string() + } + ScheduleFrequency::Weekly => "1\ + " + .to_string(), + }; + Ok(format!( + r#" + + Odysync scheduled run + + + 2026-01-05T{h:02}:{m:02}:00 + {schedule} + + + + + InteractiveToken + LeastPrivilege + + + + IgnoreNew + true + false + false + true + true + PT0S + + + + {command} + {arguments} + + +"#, + command = xml_text(program), + arguments = xml_text(&spec.args().join(" ")), + )) +} + /// Resolve the path to the current executable, for the scheduler to launch. fn current_exe() -> Result { std::env::current_exe() @@ -110,27 +196,24 @@ fn current_exe() -> Result { #[cfg(windows)] pub async fn create_schedule(spec: &ScheduleSpec) -> Result<()> { - let exe = spec.program()?; - let args = spec.args(); - let tr = format!("\"{exe}\" {}", args.join(" ")); + check_task_name(&spec.task_name)?; + let xml = task_xml(spec, &spec.program()?)?; - let sc = match spec.frequency { - ScheduleFrequency::Daily => "DAILY", - ScheduleFrequency::Weekly => "WEEKLY", - }; + // schtasks reads the definition from a file, in the UTF-16 it declares. + let dir = crate::direct::http::DownloadDir::new("schedule")?; + let file = dir.path().join("task.xml"); + let mut bytes = vec![0xFF, 0xFE]; + bytes.extend(xml.encode_utf16().flat_map(u16::to_le_bytes)); + std::fs::write(&file, bytes)?; let out = proc::run( "schtasks", &[ "/Create", - "/SC", - sc, "/TN", &spec.task_name, - "/TR", - &tr, - "/ST", - &spec.time, + "/XML", + &file.to_string_lossy(), "/F", ], std::time::Duration::from_secs(30), @@ -150,6 +233,7 @@ pub async fn create_schedule(spec: &ScheduleSpec) -> Result<()> { #[cfg(windows)] pub async fn remove_schedule(task_name: &str) -> Result<()> { + check_task_name(task_name)?; let out = proc::run( "schtasks", &["/Delete", "/TN", task_name, "/F"], @@ -193,7 +277,8 @@ fn plist_path(task_name: &str) -> PathBuf { #[cfg(target_os = "macos")] pub async fn create_schedule(spec: &ScheduleSpec) -> Result<()> { - let exe = spec.program()?; + check_task_name(&spec.task_name)?; + let exe = xml_text(&spec.program()?); let args = spec.args(); let label = format!("dev.odysync.{}", spec.task_name); @@ -231,7 +316,7 @@ pub async fn create_schedule(spec: &ScheduleSpec) -> Result<()> { "#, args_xml = args .iter() - .map(|a| format!("{a}")) + .map(|a| format!("{}", xml_text(a))) .collect::>() .join("\n "), ); @@ -265,6 +350,7 @@ pub async fn create_schedule(spec: &ScheduleSpec) -> Result<()> { /// written against one platform could not compile on the others. #[cfg(target_os = "macos")] pub async fn remove_schedule(task_name: &str) -> Result<()> { + check_task_name(task_name)?; let path = plist_path(task_name); let _ = proc::run( "launchctl", @@ -298,6 +384,8 @@ fn unit_dir() -> Result { #[cfg(target_os = "linux")] pub async fn create_schedule(spec: &ScheduleSpec) -> Result<()> { + check_task_name(&spec.task_name)?; + parse_time(&spec.time)?; let exe = spec.program()?; let args = spec.args(); @@ -308,7 +396,12 @@ pub async fn create_schedule(spec: &ScheduleSpec) -> Result<()> { let service_name = format!("dev.odysync.{unit}.service"); let timer_name = format!("dev.odysync.{unit}.timer"); - let exec_start = format!("{exe} {}", args.join(" ")); + // systemd splits on spaces and expands `%`; quoting covers the first. + let exec_start = std::iter::once(&exe) + .chain(args.iter()) + .map(|a| format!("\"{}\"", a.replace('%', "%%").replace('"', "\\\""))) + .collect::>() + .join(" "); let service = format!( "[Unit]\nDescription=Odysync scheduled run\n\n[Service]\nType=oneshot\nExecStart={exec_start}\n" @@ -375,6 +468,7 @@ pub async fn create_schedule(spec: &ScheduleSpec) -> Result<()> { /// See the macOS variant: `Result<()>` to match Windows. #[cfg(target_os = "linux")] pub async fn remove_schedule(task_name: &str) -> Result<()> { + check_task_name(task_name)?; let dir = unit_dir()?; let timer_name = format!("dev.odysync.{task_name}.timer"); @@ -437,7 +531,6 @@ pub async fn schedule_exists(_task_name: &str) -> bool { // ── Helpers ───────────────────────────────────────────────────────────────── /// Parse "HH:MM" into (hour, minute). -#[allow(dead_code)] fn parse_time(time: &str) -> Result<(i32, i32)> { let (h, m) = time .split_once(':') @@ -495,7 +588,7 @@ mod tests { fn a_schedule_runs_apply_or_care_unattended() { assert_eq!( spec(ScheduledCommand::Apply).args(), - ["apply", "--yes", "--restore-point"] + ["apply", "--yes", "--unattended", "--restore-point"] ); assert_eq!( spec(ScheduledCommand::Care).args(), @@ -503,6 +596,80 @@ mod tests { ); } + /// A run must not be lost because the computer was off, and an installer + /// must not be stopped because a laptop was unplugged. + #[test] + fn the_task_survives_a_missed_start_and_a_pulled_plug() { + let mut spec = spec(ScheduledCommand::Care); + spec.extra_args = vec!["--config".into(), r#""C:\R&D \c.json""#.into()]; + let xml = task_xml(&spec, r"C:\Program Files\Odysync\odysync.exe").unwrap(); + let doc = + roxmltree::Document::parse(xml.split_once("?>").expect("declaration").1.trim_start()) + .expect("well-formed"); + let text = |name: &str| { + let hits: Vec<_> = doc + .descendants() + .filter(|n| n.tag_name().name() == name) + .collect(); + assert_eq!(hits.len(), 1, "{name}"); + hits[0].text().unwrap_or_default().to_string() + }; + assert_eq!(text("StartWhenAvailable"), "true"); + assert_eq!(text("StopIfGoingOnBatteries"), "false"); + assert_eq!(text("AllowHardTerminate"), "false"); + assert_eq!(text("MultipleInstancesPolicy"), "IgnoreNew"); + assert_eq!(text("RunLevel"), "LeastPrivilege"); + assert_eq!(text("StartBoundary"), "2026-01-05T09:00:00"); + assert_eq!(text("DaysInterval"), "1"); + assert_eq!(text("Command"), r"C:\Program Files\Odysync\odysync.exe"); + assert_eq!( + text("Arguments"), + r#"care --yes --config "C:\R&D \c.json""# + ); + + spec.frequency = ScheduleFrequency::Weekly; + assert!(task_xml(&spec, "x").unwrap().contains("")); + spec.time = "25:00".into(); + assert!(task_xml(&spec, "x").is_err()); + } + + #[test] + fn a_schedule_name_is_only_a_name() { + for ok in ["Odysync", "Odysync weekly", "care_2", "a-b"] { + assert!(check_task_name(ok).is_ok(), "{ok}"); + } + for bad in [ + "", + "..", + "../x", + r"Microsoft\Windows\x", + "a/b", + "a.b", + "a\nb", + ] { + assert!(check_task_name(bad).is_err(), "{bad:?}"); + } + } + + /// Creates, finds and removes a real task. Never run on a computer + /// somebody uses; CI runs it on a throw-away one. + #[cfg(windows)] + #[tokio::test] + #[ignore = "registers a scheduled task; CI only"] + async fn a_real_task_can_be_created_found_and_removed() { + assert!( + std::env::var_os("GITHUB_ACTIONS").is_some(), + "this test changes the machine and only runs in CI" + ); + let mut spec = spec(ScheduledCommand::Care); + spec.task_name = "Odysync-ci-test".into(); + spec.program = Some(r"C:\Windows\System32\whoami.exe".into()); + create_schedule(&spec).await.expect("create"); + assert!(schedule_exists(&spec.task_name).await); + remove_schedule(&spec.task_name).await.expect("remove"); + assert!(!schedule_exists(&spec.task_name).await); + } + #[test] fn a_spec_saved_before_care_existed_still_means_apply() { let old = r#"{"frequency":"daily","time":"09:00","task_name":"Odysync","extra_args":[]}"#; diff --git a/crates/odysync-cli/src/daemon.rs b/crates/odysync-cli/src/daemon.rs index 627b170..062db14 100644 --- a/crates/odysync-cli/src/daemon.rs +++ b/crates/odysync-cli/src/daemon.rs @@ -3,16 +3,15 @@ //! `odysync daemon` runs in the background and periodically checks for updates. //! When updates are found it emits a notification (via the OS notification //! system when run under the GUI, or a log line when headless). If `--apply` -//! is set it installs them automatically; otherwise it just reports. +//! is set it installs them automatically, except for what needs a person in +//! front of the machine: drivers, firmware, system upgrades and developer +//! packages. Otherwise it just reports. use std::time::Duration; use anyhow::{Context, Result}; -use odysync_core::Backend; use odysync_core::config::Config; use odysync_core::platform; -use odysync_core::report::RunReport; -use odysync_core::runner::Runner; /// Daemon options from the CLI. pub struct DaemonOpts { @@ -68,7 +67,10 @@ pub async fn run(opts: &DaemonOpts, config_path: &std::path::Path) -> Result config.policy.elevated = platform::is_elevated(); let backends = odysync_backends::detect_backends(&config).await; - let candidates = scan_all(&backends).await; + let mut candidates = crate::scan_all(&config, &backends).await.candidates; + if opts.auto_apply { + candidates.retain(|c| c.id.backend.in_unattended_care()); + } let plan = config.policy.plan(candidates); let actionable = plan.iter().filter(|p| p.is_actionable()).count(); @@ -79,12 +81,21 @@ pub async fn run(opts: &DaemonOpts, config_path: &std::path::Path) -> Result if opts.auto_apply { tracing::info!("auto-applying updates"); - let refs: Vec<&dyn Backend> = backends.iter().map(|b| b.as_ref()).collect(); - let mut runner = Runner::new(refs, false); - let mut report = RunReport::new(); let restore = opts.restore_point || config.restore_point; - runner.run(&plan, &mut report, restore).await; - report.finish(); + // Someone installing by hand at this moment is no reason to + // stop watching; the next round tries again. + let report = + match crate::run_updates(&config, &backends, &plan, false, restore).await { + Ok(report) => report, + Err(e) => { + tracing::warn!(error = %e, "could not install now"); + if opts.once { + return Err(e); + } + tokio::time::sleep(interval).await; + continue; + } + }; tracing::info!( updated = report.updated(), @@ -118,21 +129,3 @@ pub async fn run(opts: &DaemonOpts, config_path: &std::path::Path) -> Result tokio::time::sleep(interval).await; } } - -async fn scan_all(backends: &[Box]) -> Vec { - let results = futures::future::join_all(backends.iter().map(|b| async move { - match b.scan().await { - Ok(found) => { - tracing::info!(backend = %b.kind(), count = found.len(), "scan complete"); - found - } - Err(e) => { - tracing::warn!(backend = %b.kind(), error = %e, "scan failed"); - Vec::new() - } - } - })) - .await; - - results.into_iter().flatten().collect() -} diff --git a/crates/odysync-cli/src/main.rs b/crates/odysync-cli/src/main.rs index 40412d9..f51edf3 100644 --- a/crates/odysync-cli/src/main.rs +++ b/crates/odysync-cli/src/main.rs @@ -93,6 +93,12 @@ enum Command { /// Create a system restore point before applying (Windows). #[arg(long)] restore_point: bool, + + /// Leave out drivers, firmware, system upgrades and developer packages + /// (pip, npm, cargo ...), which need somebody in front of the machine. + /// Schedules use this. + #[arg(long)] + unattended: bool, }, /// Everything Odysync can do safely without you deciding, in one pass: @@ -444,6 +450,7 @@ async fn run(cli: Cli) -> Result { // The policy engine needs to know our privilege level to apply the // elevation rules; it is a runtime fact, never persisted. config.policy.elevated = platform::is_elevated(); + odysync_backends::direct::http::set_proxy(config.proxy_url.as_deref()); let style = Style::detect(); @@ -496,15 +503,17 @@ async fn run(cli: Cli) -> Result { backend, } => { let backends = select_backends(&config, &backend).await?; - let candidates = scan_all(&backends).await; - let plan = config.policy.plan(candidates); + let scan = scan_all(&config, &backends).await; + let plan = config.policy.plan(scan.candidates); if cli.json { println!("{}", serde_json::to_string_pretty(&plan)?); } else { print!("{}", render::plan_table(&plan, &style, show_skipped)); } - Ok(0) + // Nothing could be asked: whatever calls this must not read the + // empty list as "up to date". + Ok(if scan.nothing_answered { 2 } else { 0 }) } Command::Apply { @@ -516,9 +525,15 @@ async fn run(cli: Cli) -> Result { report: report_path, report_format, restore_point, + unattended, } => { let backends = select_backends(&config, &backend).await?; - let mut candidates = scan_all(&backends).await; + let scan = scan_all(&config, &backends).await; + let nothing_answered = scan.nothing_answered; + let mut candidates = scan.candidates; + if unattended { + candidates.retain(|c| c.id.backend.in_unattended_care()); + } // Narrow before planning, so the summary reflects what the user // actually asked for rather than the whole machine. @@ -535,7 +550,25 @@ async fn run(cli: Cli) -> Result { } if actionable == 0 { - return Ok(0); + if cli.json { + // The same shape as after a run, so a script need not + // treat "nothing to do" as a special case. + let mut report = RunReport::new(); + for p in &plan { + if let Some(reason) = &p.blocked_by { + report.push( + p.candidate.id.clone(), + p.candidate.name.clone(), + odysync_core::ApplyOutcome::Skipped { + reason: reason.clone(), + }, + ); + } + } + report.finish(); + println!("{}", serde_json::to_string_pretty(&report)?); + } + return Ok(if nothing_answered { 2 } else { 0 }); } #[cfg(windows)] @@ -556,15 +589,12 @@ async fn run(cli: Cli) -> Result { } if !yes && !dry_run && !confirm(actionable)? { - println!("Cancelled."); + eprintln!("Cancelled."); return Ok(0); } - let refs: Vec<&dyn Backend> = backends.iter().map(|b| b.as_ref()).collect(); - let mut runner = Runner::new(refs, dry_run); - let mut report = RunReport::new(); let restore = restore_point || config.restore_point; - runner.run(&plan, &mut report, restore).await; + let report = run_updates(&config, &backends, &plan, dry_run, restore).await?; if cli.json { println!("{}", serde_json::to_string_pretty(&report)?); @@ -630,7 +660,8 @@ async fn run(cli: Cli) -> Result { ); }; - let until = jiff::Timestamp::now() + jiff::SignedDuration::from_hours(24 * i64::from(days)); + let until = + jiff::Timestamp::now() + jiff::SignedDuration::from_hours(24 * i64::from(days)); config.pause_backend(kind, until, note); config.save(&config_path)?; @@ -726,6 +757,7 @@ async fn run(cli: Cli) -> Result { .await .context("running maintenance action")?; println!("{}", serde_json::to_string_pretty(&result)?); + return Ok(u8::from(!result.success)); } else { println!("{}", style.bold(&format!("Running: {kind}\n"))); let result = odysync_backends::maintenance::run_maintenance(kind) @@ -735,6 +767,7 @@ async fn run(cli: Cli) -> Result { println!(" {} {}", style.green("ok"), result.summary); } else { println!(" {} {}", style.red("!!"), result.summary); + return Ok(1); } } Ok(0) @@ -785,7 +818,9 @@ async fn run(cli: Cli) -> Result { Command::Unschedule { task_name } => { let existed = odysync_backends::scheduler::schedule_exists(&task_name).await; if existed { - let _ = odysync_backends::scheduler::remove_schedule(&task_name).await; + odysync_backends::scheduler::remove_schedule(&task_name) + .await + .context("removing the scheduled task")?; } if cli.json { println!( @@ -1017,7 +1052,9 @@ async fn run_care( // ── Look ── let backends = select_backends(config, &[]).await?; - let candidates = scan_all(&backends).await; + let scan = scan_all(config, &backends).await; + let nothing_answered = scan.nothing_answered; + let candidates = scan.candidates; // Drivers, firmware, OS upgrades and developer packages wait for a // person; see `BackendKind::in_unattended_care`. let (attended, plan): (Vec<_>, Vec<_>) = config @@ -1071,14 +1108,27 @@ async fn run_care( "reclaimed_bytes": 0, }))? ); + } else if nothing_answered { + println!("\nNo update source could be reached, so there may still be updates."); } else { - println!("\nNothing to do — this machine is up to date and tidy."); + println!("\nNothing to do: this machine is up to date and tidy."); } - return Ok(0); + return Ok(if nothing_answered { 2 } else { 0 }); } if dry_run { - if !json { + if json { + println!( + "{}", + serde_json::to_string_pretty(&serde_json::json!({ + "dry_run": true, + "updates": plan, + "cleanup": to_clean.iter().map(|c| c.id()).collect::>(), + "reclaimable_bytes": reclaimable, + "left_for_you": attended, + }))? + ); + } else { println!( "\n{}", style.dim("Dry run: nothing was installed or deleted.") @@ -1088,12 +1138,11 @@ async fn run_care( } if !yes { - use std::io::{BufRead, Write}; - print!( + use std::io::BufRead; + eprint!( "\nInstall {actionable} update(s) and clear {}? [y/N] ", render::human_bytes(reclaimable) ); - std::io::stdout().flush()?; let mut line = String::new(); // A closed stdin is never consent. if std::io::stdin().lock().read_line(&mut line)? == 0 @@ -1105,12 +1154,11 @@ async fn run_care( } // ── Updates ── - let mut report = RunReport::new(); - if actionable > 0 { - let refs: Vec<&dyn Backend> = backends.iter().map(|b| b.as_ref()).collect(); - let mut runner = Runner::new(refs, false); - runner.run(&plan, &mut report, config.restore_point).await; - } + let report = if actionable > 0 { + run_updates(config, &backends, &plan, false, config.restore_point).await? + } else { + RunReport::new() + }; // ── Cleanup ── let results = if to_clean.is_empty() { @@ -1161,11 +1209,10 @@ async fn run_clean( let findings = odysync_backends::cleanup::scan().await; - if json { + // One document per run: the findings, or after `--apply` the results. + if json && !apply { println!("{}", serde_json::to_string_pretty(&findings)?); - if !apply { - return Ok(0); - } + return Ok(0); } if !json { @@ -1233,7 +1280,7 @@ async fn run_clean( }; if selected.is_empty() { - println!("\nNothing to clean."); + println!("{}", if json { "[]" } else { "\nNothing to clean." }); return Ok(0); } @@ -1244,14 +1291,14 @@ async fn run_clean( .filter(|c| c.reversibility().needs_explicit_confirmation()) .collect(); if !destructive.is_empty() { - println!("\n{}", style.bold("This cannot be undone:")); + eprintln!("\n{}", style.bold("This cannot be undone:")); for c in &destructive { - println!(" {} — {}", c.label(), c.consequence()); + eprintln!(" {}: {}", c.label(), c.consequence()); } } if !yes && !confirm_clean(selected.len())? { - println!("Cancelled."); + eprintln!("Cancelled."); return Ok(0); } @@ -1299,13 +1346,12 @@ async fn run_clean( /// Ask before deleting. A closed stdin is never consent. fn confirm_clean(count: usize) -> Result { - use std::io::{BufRead, Write}; + use std::io::BufRead; - print!( + eprint!( "\nClean {count} categor{}? [y/N] ", if count == 1 { "y" } else { "ies" } ); - std::io::stdout().flush()?; let mut line = String::new(); if std::io::stdin().lock().read_line(&mut line)? == 0 { @@ -1560,28 +1606,155 @@ async fn run_driver_action(action: DriverAction, json: bool, style: &Style) -> R } } +/// What a scan of several sources came to. +pub(crate) struct Scan { + pub candidates: Vec, + /// Sources were asked and not one of them answered. + pub nothing_answered: bool, +} + /// Scan every backend concurrently. /// -/// A backend that errors is logged and contributes nothing rather than failing -/// the whole run — one broken package manager must not hide updates available -/// from the others. -async fn scan_all(backends: &[Box]) -> Vec { - let results = futures::future::join_all(backends.iter().map(|b| async move { - match b.scan().await { - Ok(found) => { - tracing::info!(backend = %b.kind(), count = found.len(), "scan complete"); - found - } - Err(e) => { - tracing::warn!(backend = %b.kind(), error = %e, "scan failed"); - eprintln!("warning: {} scan failed: {e}", b.display_name()); - Vec::new() +/// A backend that errors or takes too long is reported and contributes nothing +/// rather than failing the whole run: one broken package manager must not hide +/// updates available from the others. +pub(crate) async fn scan_all(config: &Config, backends: &[Box]) -> Scan { + use odysync_backends::scan::{ScanCancel, scan_sources}; + + let refs: Vec<&dyn Backend> = backends.iter().map(|b| b.as_ref()).collect(); + let limit = std::time::Duration::from_secs(u64::from(config.backend_timeout_secs.max(10))); + let progress = Progress::new(); + let results = scan_sources(&refs, limit, &ScanCancel::new(), &|p| progress.scan(&p)).await; + progress.clear(); + + let nothing_answered = !results.is_empty() && results.iter().all(|r| r.result.is_err()); + let mut candidates = Vec::new(); + for source in results { + match source.result { + Ok(found) => candidates.extend(found), + Err(e) => eprintln!("warning: {} could not be checked: {e}", source.name), + } + } + Scan { + candidates, + nothing_answered, + } +} + +/// Install `plan`: one run at a time on this machine, recorded in the history, +/// stopping after the current package on Ctrl-C. +pub(crate) async fn run_updates( + config: &Config, + backends: &[Box], + plan: &[odysync_core::PlannedUpdate], + dry_run: bool, + restore_point: bool, +) -> Result { + use std::sync::Arc; + use std::sync::atomic::{AtomicBool, Ordering}; + + let _lock = if dry_run { + None + } else { + Some(odysync_core::ApplyLock::acquire()?) + }; + + let cancel = Arc::new(AtomicBool::new(false)); + let flag = Arc::clone(&cancel); + let ctrl_c = tokio::spawn(async move { + while tokio::signal::ctrl_c().await.is_ok() { + if flag.swap(true, Ordering::Relaxed) { + // Asked twice: they mean it. + std::process::exit(130); } + eprintln!( + "\nStopping after the package being installed. Press Ctrl-C again to quit now." + ); + } + }); + + let refs: Vec<&dyn Backend> = backends.iter().map(|b| b.as_ref()).collect(); + let mut runner = Runner::new(refs, dry_run) + .with_max_retries(config.max_retries) + .with_cancel(cancel); + if !dry_run { + runner = runner.with_history(odysync_core::UpdateHistory::load()); + } + let mut report = RunReport::new(); + let progress = Progress::new(); + runner + .run_with_progress(plan, &mut report, restore_point, Some(&progress)) + .await; + progress.clear(); + ctrl_c.abort(); + Ok(report) +} + +/// One line on the terminal that says what is happening. +/// +/// Goes to stderr, and only when that is a terminal, so neither `--json` nor a +/// log file sees it. +struct Progress { + enabled: bool, + waiting: std::sync::Mutex>, +} + +impl Progress { + fn new() -> Self { + use std::io::IsTerminal; + Self { + enabled: std::io::stderr().is_terminal(), + waiting: std::sync::Mutex::new(Vec::new()), + } + } + + fn line(&self, text: &str) { + if self.enabled { + let text: String = text.chars().take(78).collect(); + eprint!("\r{text:<79}\r"); + } + } + + fn clear(&self) { + self.line(""); + } + + fn scan(&self, p: &odysync_backends::scan::ScanProgress) { + use odysync_backends::scan::SourceState; + let mut waiting = self.waiting.lock().unwrap_or_else(|e| e.into_inner()); + match p.state { + SourceState::Started => waiting.push(p.name.clone()), + SourceState::Done | SourceState::Failed => waiting.retain(|n| *n != p.name), + } + self.line(&scan_line(p.done, p.total, &waiting)); + } +} + +impl odysync_core::ProgressEmitter for Progress { + fn emit_progress(&self, event: odysync_core::ProgressEvent) { + if event.phase != "done" { + self.line(&format!( + "[{}/{}] {}", + (event.current + 1).min(event.total), + event.total, + event.package + )); } - })) - .await; + } +} - results.into_iter().flatten().collect() +/// `Checked 12 of 21 sources, waiting for Python pip, Windows Update ...` +fn scan_line(done: usize, total: usize, waiting: &[String]) -> String { + let mut text = format!("Checked {done} of {total} sources"); + if !waiting.is_empty() && done > 0 { + let names: Vec<&str> = waiting.iter().take(2).map(String::as_str).collect(); + text.push_str(", waiting for "); + text.push_str(&names.join(", ")); + if waiting.len() > 2 { + text.push_str(" ..."); + } + } + text } /// The backends a scan or apply should use. @@ -1604,10 +1777,10 @@ async fn select_backends(config: &Config, named: &[String]) -> Result bool { /// Ask before changing the system. fn confirm(count: usize) -> Result { - use std::io::{BufRead, Write}; + use std::io::BufRead; - print!("\nInstall {count} update(s)? [y/N] "); - std::io::stdout().flush()?; + // On stderr, so that `--json` on stdout stays a document. + eprint!("\nInstall {count} update(s)? [y/N] "); let mut line = String::new(); // A closed stdin (a pipe, a service) must not be read as consent. @@ -1675,6 +1848,56 @@ fn confirm(count: usize) -> Result { #[cfg(test)] mod tests { use super::*; + + #[test] + fn the_command_line_is_consistent() { + use clap::CommandFactory; + Cli::command().debug_assert(); + } + + /// What the scheduler registers must be something the command accepts. + #[test] + fn a_scheduled_command_parses() { + use odysync_backends::scheduler::{ScheduleFrequency, ScheduleSpec, ScheduledCommand}; + for command in [ScheduledCommand::Apply, ScheduledCommand::Care] { + let spec = ScheduleSpec { + frequency: ScheduleFrequency::Daily, + time: "09:00".into(), + task_name: "Odysync".into(), + extra_args: Vec::new(), + program: None, + command, + }; + let args = std::iter::once("odysync".to_string()).chain(spec.args()); + let cli = Cli::try_parse_from(args).expect("parses"); + assert!(matches!( + cli.command, + Command::Apply { + yes: true, + unattended: true, + .. + } | Command::Care { yes: true, .. } + )); + } + } + + #[test] + fn the_scan_line_names_who_is_still_busy() { + let w = |n: &[&str]| n.iter().map(|s| s.to_string()).collect::>(); + assert_eq!( + scan_line(0, 3, &w(&["a", "b", "c"])), + "Checked 0 of 3 sources" + ); + assert_eq!( + scan_line(1, 3, &w(&["b", "c"])), + "Checked 1 of 3 sources, waiting for b, c" + ); + assert_eq!( + scan_line(1, 4, &w(&["b", "c", "d"])), + "Checked 1 of 4 sources, waiting for b, c ..." + ); + assert_eq!(scan_line(3, 3, &[]), "Checked 3 of 3 sources"); + } use odysync_core::model::{BackendKind, PackageId}; use odysync_core::version::Version; diff --git a/crates/odysync-core/src/error.rs b/crates/odysync-core/src/error.rs index 359b0b9..a8e6729 100644 --- a/crates/odysync-core/src/error.rs +++ b/crates/odysync-core/src/error.rs @@ -51,6 +51,10 @@ pub enum Error { #[error("health check failed: {check}: {detail}")] HealthCheckFailed { check: String, detail: String }, + /// Stopped by the user before it was done. + #[error("cancelled")] + Cancelled, + #[error("configuration error: {0}")] Config(String), From df7e40cc1870a4fa142404f32af09aefc852f148 Mon Sep 17 00:00:00 2001 From: SenseiIssei Date: Wed, 25 Nov 2026 17:19:30 +0100 Subject: [PATCH 11/18] feat(app): honest results, cancel, safe quit, accessible - A check that failed or could not reach its source is never shown as "up to date" or a full care score; unknown Defender values are not "off". - Scans show which sources are still busy and can be cancelled. Installs can be cancelled between packages, only one runs at a time, and quitting or restarting as administrator during one asks first. - The scan interval, notifications, proxy and timeout settings work; the two that could not (concurrency, automatic install) are gone. - Drivers, firmware and developer packages are never preselected. The restore point checkbox decides. Holds can be set and released. - Destructive confirmations are a separate button, so a double click no longer starts System Restore. - Text meets 4.5:1 and control borders 3:1 in both themes, checked by a test; keyboard, screen reader and focus handling throughout. - Maximize works (its permission was missing); unused plugins, npm packages and permissions are removed. Frontend tests: 19 to 91. --- Cargo.lock | 245 +------- apps/gui/package-lock.json | 30 - apps/gui/package.json | 3 - apps/gui/public/icons.svg | 24 - apps/gui/src-tauri/Cargo.toml | 2 - apps/gui/src-tauri/capabilities/default.json | 18 +- .../src-tauri/gen/schemas/acl-manifests.json | 2 +- .../src-tauri/gen/schemas/capabilities.json | 2 +- .../src-tauri/gen/schemas/desktop-schema.json | 386 ------------ .../src-tauri/gen/schemas/windows-schema.json | 386 ------------ apps/gui/src-tauri/src/background.rs | 70 +++ apps/gui/src-tauri/src/commands.rs | 168 +++-- apps/gui/src-tauri/src/lib.rs | 7 +- apps/gui/src-tauri/src/state.rs | 152 ++++- apps/gui/src-tauri/src/tray.rs | 31 +- apps/gui/src/App.tsx | 114 +++- apps/gui/src/api.ts | 51 +- apps/gui/src/care.ts | 107 +++- apps/gui/src/coalesce.ts | 72 +++ apps/gui/src/components/CareRing.tsx | 9 +- apps/gui/src/components/ErrorBoundary.tsx | 4 +- apps/gui/src/components/FirmwareWarning.tsx | 9 + apps/gui/src/components/OutcomeIcon.tsx | 28 + apps/gui/src/components/Progress.tsx | 143 +++++ apps/gui/src/components/ui.tsx | 240 ++++--- apps/gui/src/demo/demo.ts | 156 ++++- apps/gui/src/events.ts | 22 +- apps/gui/src/format.ts | 15 +- apps/gui/src/hardware-backends.ts | 15 +- apps/gui/src/index.css | 35 +- apps/gui/src/pages/About.tsx | 20 +- apps/gui/src/pages/Backup.tsx | 68 +- apps/gui/src/pages/Dashboard.tsx | 573 ++++++++++++----- apps/gui/src/pages/Drivers.tsx | 266 +++++--- apps/gui/src/pages/Hardware.tsx | 10 +- apps/gui/src/pages/History.tsx | 35 +- apps/gui/src/pages/Logs.tsx | 26 +- apps/gui/src/pages/Maintenance.tsx | 90 ++- apps/gui/src/pages/Offline.tsx | 40 +- apps/gui/src/pages/Packages.tsx | 8 +- apps/gui/src/pages/Profiles.tsx | 38 +- apps/gui/src/pages/Schedule.tsx | 16 +- apps/gui/src/pages/Security.tsx | 177 ++++-- apps/gui/src/pages/Settings.tsx | 272 +++++--- apps/gui/src/pages/Startup.tsx | 28 +- apps/gui/src/pages/Updates.tsx | 421 +++++++++---- apps/gui/src/scan-health.ts | 52 ++ apps/gui/src/store-context.ts | 153 +++++ apps/gui/src/store.tsx | 589 ++++++++++-------- apps/gui/src/test/app.test.tsx | 79 +++ apps/gui/src/test/care.test.ts | 66 ++ apps/gui/src/test/contrast.test.ts | 151 +++++ apps/gui/src/test/scan.test.ts | 141 +++++ apps/gui/src/test/trust.test.tsx | 449 +++++++++++++ apps/gui/src/types.ts | 41 +- crates/odysync-backends/src/lib.rs | 2 +- crates/odysync-core/src/policy.rs | 51 +- 57 files changed, 4125 insertions(+), 2283 deletions(-) delete mode 100644 apps/gui/public/icons.svg create mode 100644 apps/gui/src-tauri/src/background.rs create mode 100644 apps/gui/src/coalesce.ts create mode 100644 apps/gui/src/components/FirmwareWarning.tsx create mode 100644 apps/gui/src/components/OutcomeIcon.tsx create mode 100644 apps/gui/src/components/Progress.tsx create mode 100644 apps/gui/src/scan-health.ts create mode 100644 apps/gui/src/store-context.ts create mode 100644 apps/gui/src/test/app.test.tsx create mode 100644 apps/gui/src/test/contrast.test.ts create mode 100644 apps/gui/src/test/scan.test.ts create mode 100644 apps/gui/src/test/trust.test.tsx diff --git a/Cargo.lock b/Cargo.lock index df8d747..7e1eb4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -731,12 +731,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core_detect" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" - [[package]] name = "cpufeatures" version = "0.2.17" @@ -1150,20 +1144,6 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" -[[package]] -name = "encoding_rs" -version = "0.8.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89253175e704ab869b04f9db224d38630e0211a53841a79181deae0889e169f5" -dependencies = [ - "cfg-if", - "core_detect", - "multiversion_no_op", - "rustversion", - "scopeguard", - "simdutf8", -] - [[package]] name = "endi" version = "1.1.1" @@ -2083,25 +2063,6 @@ version = "2.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" -[[package]] -name = "is-docker" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" -dependencies = [ - "once_cell", -] - -[[package]] -name = "is-wsl" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" -dependencies = [ - "is-docker", - "once_cell", -] - [[package]] name = "is_terminal_polyfill" version = "1.70.2" @@ -2589,12 +2550,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "multiversion_no_op" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" - [[package]] name = "ndk" version = "0.9.0" @@ -2976,9 +2931,7 @@ dependencies = [ "serde_json", "tauri", "tauri-build", - "tauri-plugin-dialog", "tauri-plugin-notification", - "tauri-plugin-shell", "tokio", "tracing", "tracing-appender", @@ -3009,17 +2962,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" -[[package]] -name = "open" -version = "5.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d8c8b8e725ad26404d6896eb2f064294a0a7b4f1d9120210d85544684c4ca95" -dependencies = [ - "dunce", - "is-wsl", - "libc", -] - [[package]] name = "openssl-probe" version = "0.2.2" @@ -3042,16 +2984,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "os_pipe" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - [[package]] name = "pango" version = "0.18.3" @@ -3606,32 +3538,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "rfd" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20dafead71c16a34e1ff357ddefc8afc11e7d51d6d2b9fbd07eaa48e3e540220" -dependencies = [ - "block2", - "dispatch2", - "glib-sys", - "gobject-sys", - "gtk-sys", - "js-sys", - "libc", - "log", - "objc2", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-foundation", - "percent-encoding", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows-sys 0.61.2", -] - [[package]] name = "ring" version = "0.17.14" @@ -4108,16 +4014,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shared_child" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "607549934f6cc26b89cfecfdc46fa90f1e5d1536a68349b0c3a4f9d1c0d37959" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - [[package]] name = "shlex" version = "2.0.1" @@ -4601,48 +4497,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "tauri-plugin-dialog" -version = "2.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0fb9c2b6d34a9720627ed930ebc8af26f61e648695aecaeb03d5c33c5896f5" -dependencies = [ - "log", - "raw-window-handle", - "rfd", - "serde", - "serde_json", - "tauri", - "tauri-plugin", - "tauri-plugin-fs", - "thiserror 2.0.21", - "url", -] - -[[package]] -name = "tauri-plugin-fs" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d58eb1d4984e535f47a642ffec09a2da6f5c18a12b5902d12126cb7626d628b" -dependencies = [ - "anyhow", - "dunce", - "glob", - "log", - "objc2-foundation", - "percent-encoding", - "schemars 0.8.22", - "serde", - "serde_json", - "serde_repr", - "tauri", - "tauri-plugin", - "tauri-utils", - "thiserror 2.0.21", - "toml 1.2.3+spec-1.1.0", - "url", -] - [[package]] name = "tauri-plugin-notification" version = "2.8.1" @@ -4663,29 +4517,6 @@ dependencies = [ "zbus 5.19.0", ] -[[package]] -name = "tauri-plugin-shell" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7375b25f72f70f6168f27f1ba3a413e30eaa0a2098cff53a4046ebfe9e2f142d" -dependencies = [ - "encoding_rs", - "libc", - "log", - "open", - "os_pipe", - "regex", - "schemars 0.8.22", - "serde", - "serde_json", - "shared_child", - "tauri", - "tauri-plugin", - "thiserror 2.0.21", - "tokio", - "windows-sys 0.60.2", -] - [[package]] name = "tauri-runtime" version = "2.12.4" @@ -5765,15 +5596,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", -] - [[package]] name = "windows-sys" version = "0.61.2" @@ -5807,30 +5629,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", -] - [[package]] name = "windows-threading" version = "0.2.1" @@ -5861,12 +5666,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -5879,12 +5678,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -5897,24 +5690,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -5927,12 +5708,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -5945,12 +5720,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -5963,12 +5732,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -5981,12 +5744,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - [[package]] name = "winnow" version = "0.5.40" diff --git a/apps/gui/package-lock.json b/apps/gui/package-lock.json index 80fa22c..d14d820 100644 --- a/apps/gui/package-lock.json +++ b/apps/gui/package-lock.json @@ -13,9 +13,6 @@ "@fontsource-variable/plus-jakarta-sans": "^5.3.0", "@tailwindcss/vite": "^4.3.3", "@tauri-apps/api": "^2", - "@tauri-apps/plugin-dialog": "^2", - "@tauri-apps/plugin-notification": "^2", - "@tauri-apps/plugin-shell": "^2", "lucide-react": "^1.62.0", "react": "^19.2.7", "react-dom": "^19.2.7" @@ -1608,33 +1605,6 @@ "node": ">= 10" } }, - "node_modules/@tauri-apps/plugin-dialog": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.8.4.tgz", - "integrity": "sha512-+6ZOiXenOaxXwb8qCbBPdT2jX2cFPaVVHGIskrpmJLpmWj+qKRTD6X/z9x7hTdSQn7NedcoXCkWGej4a7dC4lw==", - "license": "MIT OR Apache-2.0", - "dependencies": { - "@tauri-apps/api": "^2.12.0" - } - }, - "node_modules/@tauri-apps/plugin-notification": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-notification/-/plugin-notification-2.8.1.tgz", - "integrity": "sha512-B+OCJv17XCFQxAhe2+fn2bHqQ1fz/hGnYHeT++yv8+q0daOH5o1ghX7MmxWgoGFp7POaNn4UMONclHeZn65mJA==", - "license": "MIT OR Apache-2.0", - "dependencies": { - "@tauri-apps/api": "^2.12.0" - } - }, - "node_modules/@tauri-apps/plugin-shell": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.6.0.tgz", - "integrity": "sha512-z9LZGSr8jfD0FWWJ+CdD99i2FQcmJ26ebNJlYJdrlFdMLcggUS29BYrfS4hJlXO1UAI6A6r084vJUAG5734Y6w==", - "license": "MIT OR Apache-2.0", - "dependencies": { - "@tauri-apps/api": "^2.12.0" - } - }, "node_modules/@testing-library/dom": { "version": "10.4.2", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.2.tgz", diff --git a/apps/gui/package.json b/apps/gui/package.json index 0fd76c6..27ba78b 100644 --- a/apps/gui/package.json +++ b/apps/gui/package.json @@ -18,9 +18,6 @@ "@fontsource-variable/plus-jakarta-sans": "^5.3.0", "@tailwindcss/vite": "^4.3.3", "@tauri-apps/api": "^2", - "@tauri-apps/plugin-dialog": "^2", - "@tauri-apps/plugin-notification": "^2", - "@tauri-apps/plugin-shell": "^2", "lucide-react": "^1.62.0", "react": "^19.2.7", "react-dom": "^19.2.7" diff --git a/apps/gui/public/icons.svg b/apps/gui/public/icons.svg deleted file mode 100644 index e952219..0000000 --- a/apps/gui/public/icons.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/gui/src-tauri/Cargo.toml b/apps/gui/src-tauri/Cargo.toml index aad27a5..2dd2499 100644 --- a/apps/gui/src-tauri/Cargo.toml +++ b/apps/gui/src-tauri/Cargo.toml @@ -22,9 +22,7 @@ tauri-build = { version = "2", features = [] } odysync-core = { workspace = true } odysync-backends = { workspace = true } tauri = { version = "2", features = ["tray-icon"] } -tauri-plugin-shell = "2" tauri-plugin-notification = "2" -tauri-plugin-dialog = "2" serde = { workspace = true } serde_json = { workspace = true } tokio = { workspace = true } diff --git a/apps/gui/src-tauri/capabilities/default.json b/apps/gui/src-tauri/capabilities/default.json index 1fdce10..b9610f8 100644 --- a/apps/gui/src-tauri/capabilities/default.json +++ b/apps/gui/src-tauri/capabilities/default.json @@ -1,18 +1,14 @@ { "identifier": "default", - "description": "Default capabilities for the main window", + "description": "What the main window may ask Tauri for, besides the app's own commands", "windows": ["main"], "permissions": [ - "core:default", - "shell:allow-open", - "notification:default", - "dialog:default", + "core:event:allow-listen", + "core:event:allow-unlisten", "core:window:allow-minimize", - "core:window:allow-unminimize", - "core:window:allow-hide", - "core:window:allow-show", - "core:window:allow-set-focus", - "core:window:allow-close", - "core:window:allow-start-dragging" + "core:window:allow-toggle-maximize", + "core:window:allow-internal-toggle-maximize", + "core:window:allow-start-dragging", + "core:webview:allow-internal-toggle-devtools" ] } diff --git a/apps/gui/src-tauri/gen/schemas/acl-manifests.json b/apps/gui/src-tauri/gen/schemas/acl-manifests.json index 4bc71b4..bf764da 100644 --- a/apps/gui/src-tauri/gen/schemas/acl-manifests.json +++ b/apps/gui/src-tauri/gen/schemas/acl-manifests.json @@ -1 +1 @@ -{"core":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener","allow-supports-multiple-windows"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-set-dock-visibility":{"identifier":"allow-set-dock-visibility","description":"Enables the set_dock_visibility command without any pre-configured scope.","commands":{"allow":["set_dock_visibility"],"deny":[]}},"allow-supports-multiple-windows":{"identifier":"allow-supports-multiple-windows","description":"Enables the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":["supports_multiple_windows"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-bundle-type":{"identifier":"deny-bundle-type","description":"Denies the bundle_type command without any pre-configured scope.","commands":{"allow":[],"deny":["bundle_type"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-fetch-data-store-identifiers":{"identifier":"deny-fetch-data-store-identifiers","description":"Denies the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_data_store_identifiers"]}},"deny-identifier":{"identifier":"deny-identifier","description":"Denies the identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["identifier"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-data-store":{"identifier":"deny-remove-data-store","description":"Denies the remove_data_store command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_data_store"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-set-app-theme":{"identifier":"deny-set-app-theme","description":"Denies the set_app_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_app_theme"]}},"deny-set-dock-visibility":{"identifier":"deny-set-dock-visibility","description":"Denies the set_dock_visibility command without any pre-configured scope.","commands":{"allow":[],"deny":["set_dock_visibility"]}},"deny-supports-multiple-windows":{"identifier":"deny-supports-multiple-windows","description":"Denies the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["supports_multiple_windows"]}},"deny-tauri-version":{"identifier":"deny-tauri-version","description":"Denies the tauri_version command without any pre-configured scope.","commands":{"allow":[],"deny":["tauri_version"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"core:event":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-listen","allow-unlisten","allow-emit","allow-emit-to"]},"permissions":{"allow-emit":{"identifier":"allow-emit","description":"Enables the emit command without any pre-configured scope.","commands":{"allow":["emit"],"deny":[]}},"allow-emit-to":{"identifier":"allow-emit-to","description":"Enables the emit_to command without any pre-configured scope.","commands":{"allow":["emit_to"],"deny":[]}},"allow-listen":{"identifier":"allow-listen","description":"Enables the listen command without any pre-configured scope.","commands":{"allow":["listen"],"deny":[]}},"allow-unlisten":{"identifier":"allow-unlisten","description":"Enables the unlisten command without any pre-configured scope.","commands":{"allow":["unlisten"],"deny":[]}},"deny-emit":{"identifier":"deny-emit","description":"Denies the emit command without any pre-configured scope.","commands":{"allow":[],"deny":["emit"]}},"deny-emit-to":{"identifier":"deny-emit-to","description":"Denies the emit_to command without any pre-configured scope.","commands":{"allow":[],"deny":["emit_to"]}},"deny-listen":{"identifier":"deny-listen","description":"Denies the listen command without any pre-configured scope.","commands":{"allow":[],"deny":["listen"]}},"deny-unlisten":{"identifier":"deny-unlisten","description":"Denies the unlisten command without any pre-configured scope.","commands":{"allow":[],"deny":["unlisten"]}}},"permission_sets":{},"global_scope_schema":null},"core:image":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-from-bytes","allow-from-path","allow-rgba","allow-size"]},"permissions":{"allow-from-bytes":{"identifier":"allow-from-bytes","description":"Enables the from_bytes command without any pre-configured scope.","commands":{"allow":["from_bytes"],"deny":[]}},"allow-from-path":{"identifier":"allow-from-path","description":"Enables the from_path command without any pre-configured scope.","commands":{"allow":["from_path"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-rgba":{"identifier":"allow-rgba","description":"Enables the rgba command without any pre-configured scope.","commands":{"allow":["rgba"],"deny":[]}},"allow-size":{"identifier":"allow-size","description":"Enables the size command without any pre-configured scope.","commands":{"allow":["size"],"deny":[]}},"deny-from-bytes":{"identifier":"deny-from-bytes","description":"Denies the from_bytes command without any pre-configured scope.","commands":{"allow":[],"deny":["from_bytes"]}},"deny-from-path":{"identifier":"deny-from-path","description":"Denies the from_path command without any pre-configured scope.","commands":{"allow":[],"deny":["from_path"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-rgba":{"identifier":"deny-rgba","description":"Denies the rgba command without any pre-configured scope.","commands":{"allow":[],"deny":["rgba"]}},"deny-size":{"identifier":"deny-size","description":"Denies the size command without any pre-configured scope.","commands":{"allow":[],"deny":["size"]}}},"permission_sets":{},"global_scope_schema":null},"core:menu":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-append","allow-prepend","allow-insert","allow-remove","allow-remove-at","allow-items","allow-get","allow-popup","allow-create-default","allow-set-as-app-menu","allow-set-as-window-menu","allow-text","allow-set-text","allow-is-enabled","allow-set-enabled","allow-set-accelerator","allow-set-as-windows-menu-for-nsapp","allow-set-as-help-menu-for-nsapp","allow-is-checked","allow-set-checked","allow-set-icon"]},"permissions":{"allow-append":{"identifier":"allow-append","description":"Enables the append command without any pre-configured scope.","commands":{"allow":["append"],"deny":[]}},"allow-create-default":{"identifier":"allow-create-default","description":"Enables the create_default command without any pre-configured scope.","commands":{"allow":["create_default"],"deny":[]}},"allow-get":{"identifier":"allow-get","description":"Enables the get command without any pre-configured scope.","commands":{"allow":["get"],"deny":[]}},"allow-insert":{"identifier":"allow-insert","description":"Enables the insert command without any pre-configured scope.","commands":{"allow":["insert"],"deny":[]}},"allow-is-checked":{"identifier":"allow-is-checked","description":"Enables the is_checked command without any pre-configured scope.","commands":{"allow":["is_checked"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-items":{"identifier":"allow-items","description":"Enables the items command without any pre-configured scope.","commands":{"allow":["items"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-popup":{"identifier":"allow-popup","description":"Enables the popup command without any pre-configured scope.","commands":{"allow":["popup"],"deny":[]}},"allow-prepend":{"identifier":"allow-prepend","description":"Enables the prepend command without any pre-configured scope.","commands":{"allow":["prepend"],"deny":[]}},"allow-remove":{"identifier":"allow-remove","description":"Enables the remove command without any pre-configured scope.","commands":{"allow":["remove"],"deny":[]}},"allow-remove-at":{"identifier":"allow-remove-at","description":"Enables the remove_at command without any pre-configured scope.","commands":{"allow":["remove_at"],"deny":[]}},"allow-set-accelerator":{"identifier":"allow-set-accelerator","description":"Enables the set_accelerator command without any pre-configured scope.","commands":{"allow":["set_accelerator"],"deny":[]}},"allow-set-as-app-menu":{"identifier":"allow-set-as-app-menu","description":"Enables the set_as_app_menu command without any pre-configured scope.","commands":{"allow":["set_as_app_menu"],"deny":[]}},"allow-set-as-help-menu-for-nsapp":{"identifier":"allow-set-as-help-menu-for-nsapp","description":"Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_help_menu_for_nsapp"],"deny":[]}},"allow-set-as-window-menu":{"identifier":"allow-set-as-window-menu","description":"Enables the set_as_window_menu command without any pre-configured scope.","commands":{"allow":["set_as_window_menu"],"deny":[]}},"allow-set-as-windows-menu-for-nsapp":{"identifier":"allow-set-as-windows-menu-for-nsapp","description":"Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_windows_menu_for_nsapp"],"deny":[]}},"allow-set-checked":{"identifier":"allow-set-checked","description":"Enables the set_checked command without any pre-configured scope.","commands":{"allow":["set_checked"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-text":{"identifier":"allow-set-text","description":"Enables the set_text command without any pre-configured scope.","commands":{"allow":["set_text"],"deny":[]}},"allow-text":{"identifier":"allow-text","description":"Enables the text command without any pre-configured scope.","commands":{"allow":["text"],"deny":[]}},"deny-append":{"identifier":"deny-append","description":"Denies the append command without any pre-configured scope.","commands":{"allow":[],"deny":["append"]}},"deny-create-default":{"identifier":"deny-create-default","description":"Denies the create_default command without any pre-configured scope.","commands":{"allow":[],"deny":["create_default"]}},"deny-get":{"identifier":"deny-get","description":"Denies the get command without any pre-configured scope.","commands":{"allow":[],"deny":["get"]}},"deny-insert":{"identifier":"deny-insert","description":"Denies the insert command without any pre-configured scope.","commands":{"allow":[],"deny":["insert"]}},"deny-is-checked":{"identifier":"deny-is-checked","description":"Denies the is_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["is_checked"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-items":{"identifier":"deny-items","description":"Denies the items command without any pre-configured scope.","commands":{"allow":[],"deny":["items"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-popup":{"identifier":"deny-popup","description":"Denies the popup command without any pre-configured scope.","commands":{"allow":[],"deny":["popup"]}},"deny-prepend":{"identifier":"deny-prepend","description":"Denies the prepend command without any pre-configured scope.","commands":{"allow":[],"deny":["prepend"]}},"deny-remove":{"identifier":"deny-remove","description":"Denies the remove command without any pre-configured scope.","commands":{"allow":[],"deny":["remove"]}},"deny-remove-at":{"identifier":"deny-remove-at","description":"Denies the remove_at command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_at"]}},"deny-set-accelerator":{"identifier":"deny-set-accelerator","description":"Denies the set_accelerator command without any pre-configured scope.","commands":{"allow":[],"deny":["set_accelerator"]}},"deny-set-as-app-menu":{"identifier":"deny-set-as-app-menu","description":"Denies the set_as_app_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_app_menu"]}},"deny-set-as-help-menu-for-nsapp":{"identifier":"deny-set-as-help-menu-for-nsapp","description":"Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_help_menu_for_nsapp"]}},"deny-set-as-window-menu":{"identifier":"deny-set-as-window-menu","description":"Denies the set_as_window_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_window_menu"]}},"deny-set-as-windows-menu-for-nsapp":{"identifier":"deny-set-as-windows-menu-for-nsapp","description":"Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_windows_menu_for_nsapp"]}},"deny-set-checked":{"identifier":"deny-set-checked","description":"Denies the set_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["set_checked"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-text":{"identifier":"deny-set-text","description":"Denies the set_text command without any pre-configured scope.","commands":{"allow":[],"deny":["set_text"]}},"deny-text":{"identifier":"deny-text","description":"Denies the text command without any pre-configured scope.","commands":{"allow":[],"deny":["text"]}}},"permission_sets":{},"global_scope_schema":null},"core:path":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-resolve-directory","allow-resolve","allow-normalize","allow-join","allow-dirname","allow-extname","allow-basename","allow-is-absolute"]},"permissions":{"allow-basename":{"identifier":"allow-basename","description":"Enables the basename command without any pre-configured scope.","commands":{"allow":["basename"],"deny":[]}},"allow-dirname":{"identifier":"allow-dirname","description":"Enables the dirname command without any pre-configured scope.","commands":{"allow":["dirname"],"deny":[]}},"allow-extname":{"identifier":"allow-extname","description":"Enables the extname command without any pre-configured scope.","commands":{"allow":["extname"],"deny":[]}},"allow-is-absolute":{"identifier":"allow-is-absolute","description":"Enables the is_absolute command without any pre-configured scope.","commands":{"allow":["is_absolute"],"deny":[]}},"allow-join":{"identifier":"allow-join","description":"Enables the join command without any pre-configured scope.","commands":{"allow":["join"],"deny":[]}},"allow-normalize":{"identifier":"allow-normalize","description":"Enables the normalize command without any pre-configured scope.","commands":{"allow":["normalize"],"deny":[]}},"allow-resolve":{"identifier":"allow-resolve","description":"Enables the resolve command without any pre-configured scope.","commands":{"allow":["resolve"],"deny":[]}},"allow-resolve-directory":{"identifier":"allow-resolve-directory","description":"Enables the resolve_directory command without any pre-configured scope.","commands":{"allow":["resolve_directory"],"deny":[]}},"deny-basename":{"identifier":"deny-basename","description":"Denies the basename command without any pre-configured scope.","commands":{"allow":[],"deny":["basename"]}},"deny-dirname":{"identifier":"deny-dirname","description":"Denies the dirname command without any pre-configured scope.","commands":{"allow":[],"deny":["dirname"]}},"deny-extname":{"identifier":"deny-extname","description":"Denies the extname command without any pre-configured scope.","commands":{"allow":[],"deny":["extname"]}},"deny-is-absolute":{"identifier":"deny-is-absolute","description":"Denies the is_absolute command without any pre-configured scope.","commands":{"allow":[],"deny":["is_absolute"]}},"deny-join":{"identifier":"deny-join","description":"Denies the join command without any pre-configured scope.","commands":{"allow":[],"deny":["join"]}},"deny-normalize":{"identifier":"deny-normalize","description":"Denies the normalize command without any pre-configured scope.","commands":{"allow":[],"deny":["normalize"]}},"deny-resolve":{"identifier":"deny-resolve","description":"Denies the resolve command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve"]}},"deny-resolve-directory":{"identifier":"deny-resolve-directory","description":"Denies the resolve_directory command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve_directory"]}}},"permission_sets":{},"global_scope_schema":null},"core:resources":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-close"]},"permissions":{"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}}},"permission_sets":{},"global_scope_schema":null},"core:tray":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-get-by-id","allow-remove-by-id","allow-set-icon","allow-set-menu","allow-set-tooltip","allow-set-title","allow-set-visible","allow-set-temp-dir-path","allow-set-icon-as-template","allow-set-icon-with-as-template","allow-set-show-menu-on-left-click"]},"permissions":{"allow-get-by-id":{"identifier":"allow-get-by-id","description":"Enables the get_by_id command without any pre-configured scope.","commands":{"allow":["get_by_id"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-remove-by-id":{"identifier":"allow-remove-by-id","description":"Enables the remove_by_id command without any pre-configured scope.","commands":{"allow":["remove_by_id"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-icon-as-template":{"identifier":"allow-set-icon-as-template","description":"Enables the set_icon_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_as_template"],"deny":[]}},"allow-set-icon-with-as-template":{"identifier":"allow-set-icon-with-as-template","description":"Enables the set_icon_with_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_with_as_template"],"deny":[]}},"allow-set-menu":{"identifier":"allow-set-menu","description":"Enables the set_menu command without any pre-configured scope.","commands":{"allow":["set_menu"],"deny":[]}},"allow-set-show-menu-on-left-click":{"identifier":"allow-set-show-menu-on-left-click","description":"Enables the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":["set_show_menu_on_left_click"],"deny":[]}},"allow-set-temp-dir-path":{"identifier":"allow-set-temp-dir-path","description":"Enables the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":["set_temp_dir_path"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-tooltip":{"identifier":"allow-set-tooltip","description":"Enables the set_tooltip command without any pre-configured scope.","commands":{"allow":["set_tooltip"],"deny":[]}},"allow-set-visible":{"identifier":"allow-set-visible","description":"Enables the set_visible command without any pre-configured scope.","commands":{"allow":["set_visible"],"deny":[]}},"deny-get-by-id":{"identifier":"deny-get-by-id","description":"Denies the get_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["get_by_id"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-remove-by-id":{"identifier":"deny-remove-by-id","description":"Denies the remove_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_by_id"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-icon-as-template":{"identifier":"deny-set-icon-as-template","description":"Denies the set_icon_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_as_template"]}},"deny-set-icon-with-as-template":{"identifier":"deny-set-icon-with-as-template","description":"Denies the set_icon_with_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_with_as_template"]}},"deny-set-menu":{"identifier":"deny-set-menu","description":"Denies the set_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_menu"]}},"deny-set-show-menu-on-left-click":{"identifier":"deny-set-show-menu-on-left-click","description":"Denies the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":[],"deny":["set_show_menu_on_left_click"]}},"deny-set-temp-dir-path":{"identifier":"deny-set-temp-dir-path","description":"Denies the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":[],"deny":["set_temp_dir_path"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-tooltip":{"identifier":"deny-set-tooltip","description":"Denies the set_tooltip command without any pre-configured scope.","commands":{"allow":[],"deny":["set_tooltip"]}},"deny-set-visible":{"identifier":"deny-set-visible","description":"Denies the set_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible"]}}},"permission_sets":{},"global_scope_schema":null},"core:webview":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-webviews","allow-webview-position","allow-webview-size","allow-internal-toggle-devtools"]},"permissions":{"allow-clear-all-browsing-data":{"identifier":"allow-clear-all-browsing-data","description":"Enables the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":["clear_all_browsing_data"],"deny":[]}},"allow-create-webview":{"identifier":"allow-create-webview","description":"Enables the create_webview command without any pre-configured scope.","commands":{"allow":["create_webview"],"deny":[]}},"allow-create-webview-window":{"identifier":"allow-create-webview-window","description":"Enables the create_webview_window command without any pre-configured scope.","commands":{"allow":["create_webview_window"],"deny":[]}},"allow-get-all-webviews":{"identifier":"allow-get-all-webviews","description":"Enables the get_all_webviews command without any pre-configured scope.","commands":{"allow":["get_all_webviews"],"deny":[]}},"allow-internal-toggle-devtools":{"identifier":"allow-internal-toggle-devtools","description":"Enables the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":["internal_toggle_devtools"],"deny":[]}},"allow-print":{"identifier":"allow-print","description":"Enables the print command without any pre-configured scope.","commands":{"allow":["print"],"deny":[]}},"allow-reparent":{"identifier":"allow-reparent","description":"Enables the reparent command without any pre-configured scope.","commands":{"allow":["reparent"],"deny":[]}},"allow-set-webview-auto-resize":{"identifier":"allow-set-webview-auto-resize","description":"Enables the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":["set_webview_auto_resize"],"deny":[]}},"allow-set-webview-background-color":{"identifier":"allow-set-webview-background-color","description":"Enables the set_webview_background_color command without any pre-configured scope.","commands":{"allow":["set_webview_background_color"],"deny":[]}},"allow-set-webview-focus":{"identifier":"allow-set-webview-focus","description":"Enables the set_webview_focus command without any pre-configured scope.","commands":{"allow":["set_webview_focus"],"deny":[]}},"allow-set-webview-position":{"identifier":"allow-set-webview-position","description":"Enables the set_webview_position command without any pre-configured scope.","commands":{"allow":["set_webview_position"],"deny":[]}},"allow-set-webview-size":{"identifier":"allow-set-webview-size","description":"Enables the set_webview_size command without any pre-configured scope.","commands":{"allow":["set_webview_size"],"deny":[]}},"allow-set-webview-zoom":{"identifier":"allow-set-webview-zoom","description":"Enables the set_webview_zoom command without any pre-configured scope.","commands":{"allow":["set_webview_zoom"],"deny":[]}},"allow-webview-close":{"identifier":"allow-webview-close","description":"Enables the webview_close command without any pre-configured scope.","commands":{"allow":["webview_close"],"deny":[]}},"allow-webview-hide":{"identifier":"allow-webview-hide","description":"Enables the webview_hide command without any pre-configured scope.","commands":{"allow":["webview_hide"],"deny":[]}},"allow-webview-position":{"identifier":"allow-webview-position","description":"Enables the webview_position command without any pre-configured scope.","commands":{"allow":["webview_position"],"deny":[]}},"allow-webview-show":{"identifier":"allow-webview-show","description":"Enables the webview_show command without any pre-configured scope.","commands":{"allow":["webview_show"],"deny":[]}},"allow-webview-size":{"identifier":"allow-webview-size","description":"Enables the webview_size command without any pre-configured scope.","commands":{"allow":["webview_size"],"deny":[]}},"deny-clear-all-browsing-data":{"identifier":"deny-clear-all-browsing-data","description":"Denies the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_all_browsing_data"]}},"deny-create-webview":{"identifier":"deny-create-webview","description":"Denies the create_webview command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview"]}},"deny-create-webview-window":{"identifier":"deny-create-webview-window","description":"Denies the create_webview_window command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview_window"]}},"deny-get-all-webviews":{"identifier":"deny-get-all-webviews","description":"Denies the get_all_webviews command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_webviews"]}},"deny-internal-toggle-devtools":{"identifier":"deny-internal-toggle-devtools","description":"Denies the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_devtools"]}},"deny-print":{"identifier":"deny-print","description":"Denies the print command without any pre-configured scope.","commands":{"allow":[],"deny":["print"]}},"deny-reparent":{"identifier":"deny-reparent","description":"Denies the reparent command without any pre-configured scope.","commands":{"allow":[],"deny":["reparent"]}},"deny-set-webview-auto-resize":{"identifier":"deny-set-webview-auto-resize","description":"Denies the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_auto_resize"]}},"deny-set-webview-background-color":{"identifier":"deny-set-webview-background-color","description":"Denies the set_webview_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_background_color"]}},"deny-set-webview-focus":{"identifier":"deny-set-webview-focus","description":"Denies the set_webview_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_focus"]}},"deny-set-webview-position":{"identifier":"deny-set-webview-position","description":"Denies the set_webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_position"]}},"deny-set-webview-size":{"identifier":"deny-set-webview-size","description":"Denies the set_webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_size"]}},"deny-set-webview-zoom":{"identifier":"deny-set-webview-zoom","description":"Denies the set_webview_zoom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_zoom"]}},"deny-webview-close":{"identifier":"deny-webview-close","description":"Denies the webview_close command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_close"]}},"deny-webview-hide":{"identifier":"deny-webview-hide","description":"Denies the webview_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_hide"]}},"deny-webview-position":{"identifier":"deny-webview-position","description":"Denies the webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_position"]}},"deny-webview-show":{"identifier":"deny-webview-show","description":"Denies the webview_show command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_show"]}},"deny-webview-size":{"identifier":"deny-webview-size","description":"Denies the webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_size"]}}},"permission_sets":{},"global_scope_schema":null},"core:window":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-windows","allow-scale-factor","allow-inner-position","allow-outer-position","allow-inner-size","allow-outer-size","allow-is-fullscreen","allow-is-minimized","allow-is-maximized","allow-is-focused","allow-is-decorated","allow-is-resizable","allow-is-maximizable","allow-is-minimizable","allow-is-closable","allow-is-visible","allow-is-enabled","allow-title","allow-current-monitor","allow-primary-monitor","allow-monitor-from-point","allow-available-monitors","allow-cursor-position","allow-theme","allow-is-always-on-top","allow-activity-name","allow-scene-identifier","allow-internal-toggle-maximize"]},"permissions":{"allow-activity-name":{"identifier":"allow-activity-name","description":"Enables the activity_name command without any pre-configured scope.","commands":{"allow":["activity_name"],"deny":[]}},"allow-available-monitors":{"identifier":"allow-available-monitors","description":"Enables the available_monitors command without any pre-configured scope.","commands":{"allow":["available_monitors"],"deny":[]}},"allow-center":{"identifier":"allow-center","description":"Enables the center command without any pre-configured scope.","commands":{"allow":["center"],"deny":[]}},"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"allow-create":{"identifier":"allow-create","description":"Enables the create command without any pre-configured scope.","commands":{"allow":["create"],"deny":[]}},"allow-current-monitor":{"identifier":"allow-current-monitor","description":"Enables the current_monitor command without any pre-configured scope.","commands":{"allow":["current_monitor"],"deny":[]}},"allow-cursor-position":{"identifier":"allow-cursor-position","description":"Enables the cursor_position command without any pre-configured scope.","commands":{"allow":["cursor_position"],"deny":[]}},"allow-destroy":{"identifier":"allow-destroy","description":"Enables the destroy command without any pre-configured scope.","commands":{"allow":["destroy"],"deny":[]}},"allow-get-all-windows":{"identifier":"allow-get-all-windows","description":"Enables the get_all_windows command without any pre-configured scope.","commands":{"allow":["get_all_windows"],"deny":[]}},"allow-hide":{"identifier":"allow-hide","description":"Enables the hide command without any pre-configured scope.","commands":{"allow":["hide"],"deny":[]}},"allow-inner-position":{"identifier":"allow-inner-position","description":"Enables the inner_position command without any pre-configured scope.","commands":{"allow":["inner_position"],"deny":[]}},"allow-inner-size":{"identifier":"allow-inner-size","description":"Enables the inner_size command without any pre-configured scope.","commands":{"allow":["inner_size"],"deny":[]}},"allow-internal-toggle-maximize":{"identifier":"allow-internal-toggle-maximize","description":"Enables the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":["internal_toggle_maximize"],"deny":[]}},"allow-is-always-on-top":{"identifier":"allow-is-always-on-top","description":"Enables the is_always_on_top command without any pre-configured scope.","commands":{"allow":["is_always_on_top"],"deny":[]}},"allow-is-closable":{"identifier":"allow-is-closable","description":"Enables the is_closable command without any pre-configured scope.","commands":{"allow":["is_closable"],"deny":[]}},"allow-is-decorated":{"identifier":"allow-is-decorated","description":"Enables the is_decorated command without any pre-configured scope.","commands":{"allow":["is_decorated"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-is-focused":{"identifier":"allow-is-focused","description":"Enables the is_focused command without any pre-configured scope.","commands":{"allow":["is_focused"],"deny":[]}},"allow-is-fullscreen":{"identifier":"allow-is-fullscreen","description":"Enables the is_fullscreen command without any pre-configured scope.","commands":{"allow":["is_fullscreen"],"deny":[]}},"allow-is-maximizable":{"identifier":"allow-is-maximizable","description":"Enables the is_maximizable command without any pre-configured scope.","commands":{"allow":["is_maximizable"],"deny":[]}},"allow-is-maximized":{"identifier":"allow-is-maximized","description":"Enables the is_maximized command without any pre-configured scope.","commands":{"allow":["is_maximized"],"deny":[]}},"allow-is-minimizable":{"identifier":"allow-is-minimizable","description":"Enables the is_minimizable command without any pre-configured scope.","commands":{"allow":["is_minimizable"],"deny":[]}},"allow-is-minimized":{"identifier":"allow-is-minimized","description":"Enables the is_minimized command without any pre-configured scope.","commands":{"allow":["is_minimized"],"deny":[]}},"allow-is-resizable":{"identifier":"allow-is-resizable","description":"Enables the is_resizable command without any pre-configured scope.","commands":{"allow":["is_resizable"],"deny":[]}},"allow-is-visible":{"identifier":"allow-is-visible","description":"Enables the is_visible command without any pre-configured scope.","commands":{"allow":["is_visible"],"deny":[]}},"allow-maximize":{"identifier":"allow-maximize","description":"Enables the maximize command without any pre-configured scope.","commands":{"allow":["maximize"],"deny":[]}},"allow-minimize":{"identifier":"allow-minimize","description":"Enables the minimize command without any pre-configured scope.","commands":{"allow":["minimize"],"deny":[]}},"allow-monitor-from-point":{"identifier":"allow-monitor-from-point","description":"Enables the monitor_from_point command without any pre-configured scope.","commands":{"allow":["monitor_from_point"],"deny":[]}},"allow-outer-position":{"identifier":"allow-outer-position","description":"Enables the outer_position command without any pre-configured scope.","commands":{"allow":["outer_position"],"deny":[]}},"allow-outer-size":{"identifier":"allow-outer-size","description":"Enables the outer_size command without any pre-configured scope.","commands":{"allow":["outer_size"],"deny":[]}},"allow-primary-monitor":{"identifier":"allow-primary-monitor","description":"Enables the primary_monitor command without any pre-configured scope.","commands":{"allow":["primary_monitor"],"deny":[]}},"allow-request-user-attention":{"identifier":"allow-request-user-attention","description":"Enables the request_user_attention command without any pre-configured scope.","commands":{"allow":["request_user_attention"],"deny":[]}},"allow-scale-factor":{"identifier":"allow-scale-factor","description":"Enables the scale_factor command without any pre-configured scope.","commands":{"allow":["scale_factor"],"deny":[]}},"allow-scene-identifier":{"identifier":"allow-scene-identifier","description":"Enables the scene_identifier command without any pre-configured scope.","commands":{"allow":["scene_identifier"],"deny":[]}},"allow-set-always-on-bottom":{"identifier":"allow-set-always-on-bottom","description":"Enables the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":["set_always_on_bottom"],"deny":[]}},"allow-set-always-on-top":{"identifier":"allow-set-always-on-top","description":"Enables the set_always_on_top command without any pre-configured scope.","commands":{"allow":["set_always_on_top"],"deny":[]}},"allow-set-background-color":{"identifier":"allow-set-background-color","description":"Enables the set_background_color command without any pre-configured scope.","commands":{"allow":["set_background_color"],"deny":[]}},"allow-set-badge-count":{"identifier":"allow-set-badge-count","description":"Enables the set_badge_count command without any pre-configured scope.","commands":{"allow":["set_badge_count"],"deny":[]}},"allow-set-badge-label":{"identifier":"allow-set-badge-label","description":"Enables the set_badge_label command without any pre-configured scope.","commands":{"allow":["set_badge_label"],"deny":[]}},"allow-set-closable":{"identifier":"allow-set-closable","description":"Enables the set_closable command without any pre-configured scope.","commands":{"allow":["set_closable"],"deny":[]}},"allow-set-content-protected":{"identifier":"allow-set-content-protected","description":"Enables the set_content_protected command without any pre-configured scope.","commands":{"allow":["set_content_protected"],"deny":[]}},"allow-set-cursor-grab":{"identifier":"allow-set-cursor-grab","description":"Enables the set_cursor_grab command without any pre-configured scope.","commands":{"allow":["set_cursor_grab"],"deny":[]}},"allow-set-cursor-icon":{"identifier":"allow-set-cursor-icon","description":"Enables the set_cursor_icon command without any pre-configured scope.","commands":{"allow":["set_cursor_icon"],"deny":[]}},"allow-set-cursor-position":{"identifier":"allow-set-cursor-position","description":"Enables the set_cursor_position command without any pre-configured scope.","commands":{"allow":["set_cursor_position"],"deny":[]}},"allow-set-cursor-visible":{"identifier":"allow-set-cursor-visible","description":"Enables the set_cursor_visible command without any pre-configured scope.","commands":{"allow":["set_cursor_visible"],"deny":[]}},"allow-set-decorations":{"identifier":"allow-set-decorations","description":"Enables the set_decorations command without any pre-configured scope.","commands":{"allow":["set_decorations"],"deny":[]}},"allow-set-effects":{"identifier":"allow-set-effects","description":"Enables the set_effects command without any pre-configured scope.","commands":{"allow":["set_effects"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-focus":{"identifier":"allow-set-focus","description":"Enables the set_focus command without any pre-configured scope.","commands":{"allow":["set_focus"],"deny":[]}},"allow-set-focusable":{"identifier":"allow-set-focusable","description":"Enables the set_focusable command without any pre-configured scope.","commands":{"allow":["set_focusable"],"deny":[]}},"allow-set-fullscreen":{"identifier":"allow-set-fullscreen","description":"Enables the set_fullscreen command without any pre-configured scope.","commands":{"allow":["set_fullscreen"],"deny":[]}},"allow-set-fullscreen-on-monitor":{"identifier":"allow-set-fullscreen-on-monitor","description":"Enables the set_fullscreen_on_monitor command without any pre-configured scope.","commands":{"allow":["set_fullscreen_on_monitor"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-ignore-cursor-events":{"identifier":"allow-set-ignore-cursor-events","description":"Enables the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":["set_ignore_cursor_events"],"deny":[]}},"allow-set-max-size":{"identifier":"allow-set-max-size","description":"Enables the set_max_size command without any pre-configured scope.","commands":{"allow":["set_max_size"],"deny":[]}},"allow-set-maximizable":{"identifier":"allow-set-maximizable","description":"Enables the set_maximizable command without any pre-configured scope.","commands":{"allow":["set_maximizable"],"deny":[]}},"allow-set-min-size":{"identifier":"allow-set-min-size","description":"Enables the set_min_size command without any pre-configured scope.","commands":{"allow":["set_min_size"],"deny":[]}},"allow-set-minimizable":{"identifier":"allow-set-minimizable","description":"Enables the set_minimizable command without any pre-configured scope.","commands":{"allow":["set_minimizable"],"deny":[]}},"allow-set-overlay-icon":{"identifier":"allow-set-overlay-icon","description":"Enables the set_overlay_icon command without any pre-configured scope.","commands":{"allow":["set_overlay_icon"],"deny":[]}},"allow-set-position":{"identifier":"allow-set-position","description":"Enables the set_position command without any pre-configured scope.","commands":{"allow":["set_position"],"deny":[]}},"allow-set-progress-bar":{"identifier":"allow-set-progress-bar","description":"Enables the set_progress_bar command without any pre-configured scope.","commands":{"allow":["set_progress_bar"],"deny":[]}},"allow-set-resizable":{"identifier":"allow-set-resizable","description":"Enables the set_resizable command without any pre-configured scope.","commands":{"allow":["set_resizable"],"deny":[]}},"allow-set-shadow":{"identifier":"allow-set-shadow","description":"Enables the set_shadow command without any pre-configured scope.","commands":{"allow":["set_shadow"],"deny":[]}},"allow-set-simple-fullscreen":{"identifier":"allow-set-simple-fullscreen","description":"Enables the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":["set_simple_fullscreen"],"deny":[]}},"allow-set-size":{"identifier":"allow-set-size","description":"Enables the set_size command without any pre-configured scope.","commands":{"allow":["set_size"],"deny":[]}},"allow-set-size-constraints":{"identifier":"allow-set-size-constraints","description":"Enables the set_size_constraints command without any pre-configured scope.","commands":{"allow":["set_size_constraints"],"deny":[]}},"allow-set-skip-taskbar":{"identifier":"allow-set-skip-taskbar","description":"Enables the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":["set_skip_taskbar"],"deny":[]}},"allow-set-theme":{"identifier":"allow-set-theme","description":"Enables the set_theme command without any pre-configured scope.","commands":{"allow":["set_theme"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-title-bar-style":{"identifier":"allow-set-title-bar-style","description":"Enables the set_title_bar_style command without any pre-configured scope.","commands":{"allow":["set_title_bar_style"],"deny":[]}},"allow-set-visible-on-all-workspaces":{"identifier":"allow-set-visible-on-all-workspaces","description":"Enables the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":["set_visible_on_all_workspaces"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"allow-start-dragging":{"identifier":"allow-start-dragging","description":"Enables the start_dragging command without any pre-configured scope.","commands":{"allow":["start_dragging"],"deny":[]}},"allow-start-resize-dragging":{"identifier":"allow-start-resize-dragging","description":"Enables the start_resize_dragging command without any pre-configured scope.","commands":{"allow":["start_resize_dragging"],"deny":[]}},"allow-theme":{"identifier":"allow-theme","description":"Enables the theme command without any pre-configured scope.","commands":{"allow":["theme"],"deny":[]}},"allow-title":{"identifier":"allow-title","description":"Enables the title command without any pre-configured scope.","commands":{"allow":["title"],"deny":[]}},"allow-toggle-maximize":{"identifier":"allow-toggle-maximize","description":"Enables the toggle_maximize command without any pre-configured scope.","commands":{"allow":["toggle_maximize"],"deny":[]}},"allow-unmaximize":{"identifier":"allow-unmaximize","description":"Enables the unmaximize command without any pre-configured scope.","commands":{"allow":["unmaximize"],"deny":[]}},"allow-unminimize":{"identifier":"allow-unminimize","description":"Enables the unminimize command without any pre-configured scope.","commands":{"allow":["unminimize"],"deny":[]}},"deny-activity-name":{"identifier":"deny-activity-name","description":"Denies the activity_name command without any pre-configured scope.","commands":{"allow":[],"deny":["activity_name"]}},"deny-available-monitors":{"identifier":"deny-available-monitors","description":"Denies the available_monitors command without any pre-configured scope.","commands":{"allow":[],"deny":["available_monitors"]}},"deny-center":{"identifier":"deny-center","description":"Denies the center command without any pre-configured scope.","commands":{"allow":[],"deny":["center"]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}},"deny-create":{"identifier":"deny-create","description":"Denies the create command without any pre-configured scope.","commands":{"allow":[],"deny":["create"]}},"deny-current-monitor":{"identifier":"deny-current-monitor","description":"Denies the current_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["current_monitor"]}},"deny-cursor-position":{"identifier":"deny-cursor-position","description":"Denies the cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["cursor_position"]}},"deny-destroy":{"identifier":"deny-destroy","description":"Denies the destroy command without any pre-configured scope.","commands":{"allow":[],"deny":["destroy"]}},"deny-get-all-windows":{"identifier":"deny-get-all-windows","description":"Denies the get_all_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_windows"]}},"deny-hide":{"identifier":"deny-hide","description":"Denies the hide command without any pre-configured scope.","commands":{"allow":[],"deny":["hide"]}},"deny-inner-position":{"identifier":"deny-inner-position","description":"Denies the inner_position command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_position"]}},"deny-inner-size":{"identifier":"deny-inner-size","description":"Denies the inner_size command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_size"]}},"deny-internal-toggle-maximize":{"identifier":"deny-internal-toggle-maximize","description":"Denies the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_maximize"]}},"deny-is-always-on-top":{"identifier":"deny-is-always-on-top","description":"Denies the is_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["is_always_on_top"]}},"deny-is-closable":{"identifier":"deny-is-closable","description":"Denies the is_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_closable"]}},"deny-is-decorated":{"identifier":"deny-is-decorated","description":"Denies the is_decorated command without any pre-configured scope.","commands":{"allow":[],"deny":["is_decorated"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-is-focused":{"identifier":"deny-is-focused","description":"Denies the is_focused command without any pre-configured scope.","commands":{"allow":[],"deny":["is_focused"]}},"deny-is-fullscreen":{"identifier":"deny-is-fullscreen","description":"Denies the is_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["is_fullscreen"]}},"deny-is-maximizable":{"identifier":"deny-is-maximizable","description":"Denies the is_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximizable"]}},"deny-is-maximized":{"identifier":"deny-is-maximized","description":"Denies the is_maximized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximized"]}},"deny-is-minimizable":{"identifier":"deny-is-minimizable","description":"Denies the is_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimizable"]}},"deny-is-minimized":{"identifier":"deny-is-minimized","description":"Denies the is_minimized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimized"]}},"deny-is-resizable":{"identifier":"deny-is-resizable","description":"Denies the is_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_resizable"]}},"deny-is-visible":{"identifier":"deny-is-visible","description":"Denies the is_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["is_visible"]}},"deny-maximize":{"identifier":"deny-maximize","description":"Denies the maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["maximize"]}},"deny-minimize":{"identifier":"deny-minimize","description":"Denies the minimize command without any pre-configured scope.","commands":{"allow":[],"deny":["minimize"]}},"deny-monitor-from-point":{"identifier":"deny-monitor-from-point","description":"Denies the monitor_from_point command without any pre-configured scope.","commands":{"allow":[],"deny":["monitor_from_point"]}},"deny-outer-position":{"identifier":"deny-outer-position","description":"Denies the outer_position command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_position"]}},"deny-outer-size":{"identifier":"deny-outer-size","description":"Denies the outer_size command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_size"]}},"deny-primary-monitor":{"identifier":"deny-primary-monitor","description":"Denies the primary_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["primary_monitor"]}},"deny-request-user-attention":{"identifier":"deny-request-user-attention","description":"Denies the request_user_attention command without any pre-configured scope.","commands":{"allow":[],"deny":["request_user_attention"]}},"deny-scale-factor":{"identifier":"deny-scale-factor","description":"Denies the scale_factor command without any pre-configured scope.","commands":{"allow":[],"deny":["scale_factor"]}},"deny-scene-identifier":{"identifier":"deny-scene-identifier","description":"Denies the scene_identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["scene_identifier"]}},"deny-set-always-on-bottom":{"identifier":"deny-set-always-on-bottom","description":"Denies the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_bottom"]}},"deny-set-always-on-top":{"identifier":"deny-set-always-on-top","description":"Denies the set_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_top"]}},"deny-set-background-color":{"identifier":"deny-set-background-color","description":"Denies the set_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_background_color"]}},"deny-set-badge-count":{"identifier":"deny-set-badge-count","description":"Denies the set_badge_count command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_count"]}},"deny-set-badge-label":{"identifier":"deny-set-badge-label","description":"Denies the set_badge_label command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_label"]}},"deny-set-closable":{"identifier":"deny-set-closable","description":"Denies the set_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_closable"]}},"deny-set-content-protected":{"identifier":"deny-set-content-protected","description":"Denies the set_content_protected command without any pre-configured scope.","commands":{"allow":[],"deny":["set_content_protected"]}},"deny-set-cursor-grab":{"identifier":"deny-set-cursor-grab","description":"Denies the set_cursor_grab command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_grab"]}},"deny-set-cursor-icon":{"identifier":"deny-set-cursor-icon","description":"Denies the set_cursor_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_icon"]}},"deny-set-cursor-position":{"identifier":"deny-set-cursor-position","description":"Denies the set_cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_position"]}},"deny-set-cursor-visible":{"identifier":"deny-set-cursor-visible","description":"Denies the set_cursor_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_visible"]}},"deny-set-decorations":{"identifier":"deny-set-decorations","description":"Denies the set_decorations command without any pre-configured scope.","commands":{"allow":[],"deny":["set_decorations"]}},"deny-set-effects":{"identifier":"deny-set-effects","description":"Denies the set_effects command without any pre-configured scope.","commands":{"allow":[],"deny":["set_effects"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-focus":{"identifier":"deny-set-focus","description":"Denies the set_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focus"]}},"deny-set-focusable":{"identifier":"deny-set-focusable","description":"Denies the set_focusable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focusable"]}},"deny-set-fullscreen":{"identifier":"deny-set-fullscreen","description":"Denies the set_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen"]}},"deny-set-fullscreen-on-monitor":{"identifier":"deny-set-fullscreen-on-monitor","description":"Denies the set_fullscreen_on_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen_on_monitor"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-ignore-cursor-events":{"identifier":"deny-set-ignore-cursor-events","description":"Denies the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":[],"deny":["set_ignore_cursor_events"]}},"deny-set-max-size":{"identifier":"deny-set-max-size","description":"Denies the set_max_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_max_size"]}},"deny-set-maximizable":{"identifier":"deny-set-maximizable","description":"Denies the set_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_maximizable"]}},"deny-set-min-size":{"identifier":"deny-set-min-size","description":"Denies the set_min_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_min_size"]}},"deny-set-minimizable":{"identifier":"deny-set-minimizable","description":"Denies the set_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_minimizable"]}},"deny-set-overlay-icon":{"identifier":"deny-set-overlay-icon","description":"Denies the set_overlay_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_overlay_icon"]}},"deny-set-position":{"identifier":"deny-set-position","description":"Denies the set_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_position"]}},"deny-set-progress-bar":{"identifier":"deny-set-progress-bar","description":"Denies the set_progress_bar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_progress_bar"]}},"deny-set-resizable":{"identifier":"deny-set-resizable","description":"Denies the set_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_resizable"]}},"deny-set-shadow":{"identifier":"deny-set-shadow","description":"Denies the set_shadow command without any pre-configured scope.","commands":{"allow":[],"deny":["set_shadow"]}},"deny-set-simple-fullscreen":{"identifier":"deny-set-simple-fullscreen","description":"Denies the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_simple_fullscreen"]}},"deny-set-size":{"identifier":"deny-set-size","description":"Denies the set_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size"]}},"deny-set-size-constraints":{"identifier":"deny-set-size-constraints","description":"Denies the set_size_constraints command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size_constraints"]}},"deny-set-skip-taskbar":{"identifier":"deny-set-skip-taskbar","description":"Denies the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_skip_taskbar"]}},"deny-set-theme":{"identifier":"deny-set-theme","description":"Denies the set_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_theme"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-title-bar-style":{"identifier":"deny-set-title-bar-style","description":"Denies the set_title_bar_style command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title_bar_style"]}},"deny-set-visible-on-all-workspaces":{"identifier":"deny-set-visible-on-all-workspaces","description":"Denies the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible_on_all_workspaces"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}},"deny-start-dragging":{"identifier":"deny-start-dragging","description":"Denies the start_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_dragging"]}},"deny-start-resize-dragging":{"identifier":"deny-start-resize-dragging","description":"Denies the start_resize_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_resize_dragging"]}},"deny-theme":{"identifier":"deny-theme","description":"Denies the theme command without any pre-configured scope.","commands":{"allow":[],"deny":["theme"]}},"deny-title":{"identifier":"deny-title","description":"Denies the title command without any pre-configured scope.","commands":{"allow":[],"deny":["title"]}},"deny-toggle-maximize":{"identifier":"deny-toggle-maximize","description":"Denies the toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["toggle_maximize"]}},"deny-unmaximize":{"identifier":"deny-unmaximize","description":"Denies the unmaximize command without any pre-configured scope.","commands":{"allow":[],"deny":["unmaximize"]}},"deny-unminimize":{"identifier":"deny-unminimize","description":"Denies the unminimize command without any pre-configured scope.","commands":{"allow":[],"deny":["unminimize"]}}},"permission_sets":{},"global_scope_schema":null},"dialog":{"default_permission":{"identifier":"default","description":"This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n","permissions":["allow-message","allow-save","allow-open"]},"permissions":{"allow-ask":{"identifier":"allow-ask","description":"Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)","commands":{"allow":["message"],"deny":[]}},"allow-confirm":{"identifier":"allow-confirm","description":"Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)","commands":{"allow":["message"],"deny":[]}},"allow-message":{"identifier":"allow-message","description":"Enables the message command without any pre-configured scope.","commands":{"allow":["message"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-save":{"identifier":"allow-save","description":"Enables the save command without any pre-configured scope.","commands":{"allow":["save"],"deny":[]}},"deny-ask":{"identifier":"deny-ask","description":"Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)","commands":{"allow":[],"deny":["message"]}},"deny-confirm":{"identifier":"deny-confirm","description":"Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)","commands":{"allow":[],"deny":["message"]}},"deny-message":{"identifier":"deny-message","description":"Denies the message command without any pre-configured scope.","commands":{"allow":[],"deny":["message"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-save":{"identifier":"deny-save","description":"Denies the save command without any pre-configured scope.","commands":{"allow":[],"deny":["save"]}}},"permission_sets":{},"global_scope_schema":null},"notification":{"default_permission":{"identifier":"default","description":"This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n","permissions":["allow-is-permission-granted","allow-request-permission","allow-notify","allow-register-action-types","allow-register-listener","allow-remove-listener","allow-cancel","allow-get-pending","allow-remove-active","allow-get-active","allow-check-permissions","allow-show","allow-batch","allow-list-channels","allow-delete-channel","allow-create-channel","allow-permission-state"]},"permissions":{"allow-batch":{"identifier":"allow-batch","description":"Enables the batch command without any pre-configured scope.","commands":{"allow":["batch"],"deny":[]}},"allow-cancel":{"identifier":"allow-cancel","description":"Enables the cancel command without any pre-configured scope.","commands":{"allow":["cancel"],"deny":[]}},"allow-check-permissions":{"identifier":"allow-check-permissions","description":"Enables the check_permissions command without any pre-configured scope.","commands":{"allow":["check_permissions"],"deny":[]}},"allow-create-channel":{"identifier":"allow-create-channel","description":"Enables the create_channel command without any pre-configured scope.","commands":{"allow":["create_channel"],"deny":[]}},"allow-delete-channel":{"identifier":"allow-delete-channel","description":"Enables the delete_channel command without any pre-configured scope.","commands":{"allow":["delete_channel"],"deny":[]}},"allow-get-active":{"identifier":"allow-get-active","description":"Enables the get_active command without any pre-configured scope.","commands":{"allow":["get_active"],"deny":[]}},"allow-get-pending":{"identifier":"allow-get-pending","description":"Enables the get_pending command without any pre-configured scope.","commands":{"allow":["get_pending"],"deny":[]}},"allow-is-permission-granted":{"identifier":"allow-is-permission-granted","description":"Enables the is_permission_granted command without any pre-configured scope.","commands":{"allow":["is_permission_granted"],"deny":[]}},"allow-list-channels":{"identifier":"allow-list-channels","description":"Enables the list_channels command without any pre-configured scope.","commands":{"allow":["list_channels"],"deny":[]}},"allow-notify":{"identifier":"allow-notify","description":"Enables the notify command without any pre-configured scope.","commands":{"allow":["notify"],"deny":[]}},"allow-permission-state":{"identifier":"allow-permission-state","description":"Enables the permission_state command without any pre-configured scope.","commands":{"allow":["permission_state"],"deny":[]}},"allow-register-action-types":{"identifier":"allow-register-action-types","description":"Enables the register_action_types command without any pre-configured scope.","commands":{"allow":["register_action_types"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-active":{"identifier":"allow-remove-active","description":"Enables the remove_active command without any pre-configured scope.","commands":{"allow":["remove_active"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-request-permission":{"identifier":"allow-request-permission","description":"Enables the request_permission command without any pre-configured scope.","commands":{"allow":["request_permission"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"deny-batch":{"identifier":"deny-batch","description":"Denies the batch command without any pre-configured scope.","commands":{"allow":[],"deny":["batch"]}},"deny-cancel":{"identifier":"deny-cancel","description":"Denies the cancel command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel"]}},"deny-check-permissions":{"identifier":"deny-check-permissions","description":"Denies the check_permissions command without any pre-configured scope.","commands":{"allow":[],"deny":["check_permissions"]}},"deny-create-channel":{"identifier":"deny-create-channel","description":"Denies the create_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["create_channel"]}},"deny-delete-channel":{"identifier":"deny-delete-channel","description":"Denies the delete_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["delete_channel"]}},"deny-get-active":{"identifier":"deny-get-active","description":"Denies the get_active command without any pre-configured scope.","commands":{"allow":[],"deny":["get_active"]}},"deny-get-pending":{"identifier":"deny-get-pending","description":"Denies the get_pending command without any pre-configured scope.","commands":{"allow":[],"deny":["get_pending"]}},"deny-is-permission-granted":{"identifier":"deny-is-permission-granted","description":"Denies the is_permission_granted command without any pre-configured scope.","commands":{"allow":[],"deny":["is_permission_granted"]}},"deny-list-channels":{"identifier":"deny-list-channels","description":"Denies the list_channels command without any pre-configured scope.","commands":{"allow":[],"deny":["list_channels"]}},"deny-notify":{"identifier":"deny-notify","description":"Denies the notify command without any pre-configured scope.","commands":{"allow":[],"deny":["notify"]}},"deny-permission-state":{"identifier":"deny-permission-state","description":"Denies the permission_state command without any pre-configured scope.","commands":{"allow":[],"deny":["permission_state"]}},"deny-register-action-types":{"identifier":"deny-register-action-types","description":"Denies the register_action_types command without any pre-configured scope.","commands":{"allow":[],"deny":["register_action_types"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-active":{"identifier":"deny-remove-active","description":"Denies the remove_active command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_active"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-request-permission":{"identifier":"deny-request-permission","description":"Denies the request_permission command without any pre-configured scope.","commands":{"allow":[],"deny":["request_permission"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}}},"permission_sets":{},"global_scope_schema":null},"shell":{"default_permission":{"identifier":"default","description":"This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n","permissions":["allow-open"]},"permissions":{"allow-execute":{"identifier":"allow-execute","description":"Enables the execute command without any pre-configured scope.","commands":{"allow":["execute"],"deny":[]}},"allow-kill":{"identifier":"allow-kill","description":"Enables the kill command without any pre-configured scope.","commands":{"allow":["kill"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-spawn":{"identifier":"allow-spawn","description":"Enables the spawn command without any pre-configured scope.","commands":{"allow":["spawn"],"deny":[]}},"allow-stdin-write":{"identifier":"allow-stdin-write","description":"Enables the stdin_write command without any pre-configured scope.","commands":{"allow":["stdin_write"],"deny":[]}},"deny-execute":{"identifier":"deny-execute","description":"Denies the execute command without any pre-configured scope.","commands":{"allow":[],"deny":["execute"]}},"deny-kill":{"identifier":"deny-kill","description":"Denies the kill command without any pre-configured scope.","commands":{"allow":[],"deny":["kill"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-spawn":{"identifier":"deny-spawn","description":"Denies the spawn command without any pre-configured scope.","commands":{"allow":[],"deny":["spawn"]}},"deny-stdin-write":{"identifier":"deny-stdin-write","description":"Denies the stdin_write command without any pre-configured scope.","commands":{"allow":[],"deny":["stdin_write"]}}},"permission_sets":{},"global_scope_schema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"additionalProperties":false,"properties":{"args":{"allOf":[{"$ref":"#/definitions/ShellScopeEntryAllowedArgs"}],"description":"The allowed arguments for the command execution."},"cmd":{"description":"The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.","type":"string"},"name":{"description":"The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.","type":"string"}},"required":["cmd","name"],"type":"object"},{"additionalProperties":false,"properties":{"args":{"allOf":[{"$ref":"#/definitions/ShellScopeEntryAllowedArgs"}],"description":"The allowed arguments for the command execution."},"name":{"description":"The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.","type":"string"},"sidecar":{"description":"If this command is a sidecar command.","type":"boolean"}},"required":["name","sidecar"],"type":"object"}],"definitions":{"ShellScopeEntryAllowedArg":{"anyOf":[{"description":"A non-configurable argument that is passed to the command in the order it was specified.","type":"string"},{"additionalProperties":false,"description":"A variable that is set while calling the command from the webview API.","properties":{"raw":{"default":false,"description":"Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.","type":"boolean"},"validator":{"description":"[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ","type":"string"}},"required":["validator"],"type":"object"}],"description":"A command argument allowed to be executed by the webview API."},"ShellScopeEntryAllowedArgs":{"anyOf":[{"description":"Use a simple boolean to allow all or disable all arguments to this command configuration.","type":"boolean"},{"description":"A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.","items":{"$ref":"#/definitions/ShellScopeEntryAllowedArg"},"type":"array"}],"description":"A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration."}},"description":"Shell scope entry.","title":"ShellScopeEntry"}}} \ No newline at end of file +{"core":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener","allow-supports-multiple-windows"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-set-dock-visibility":{"identifier":"allow-set-dock-visibility","description":"Enables the set_dock_visibility command without any pre-configured scope.","commands":{"allow":["set_dock_visibility"],"deny":[]}},"allow-supports-multiple-windows":{"identifier":"allow-supports-multiple-windows","description":"Enables the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":["supports_multiple_windows"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-bundle-type":{"identifier":"deny-bundle-type","description":"Denies the bundle_type command without any pre-configured scope.","commands":{"allow":[],"deny":["bundle_type"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-fetch-data-store-identifiers":{"identifier":"deny-fetch-data-store-identifiers","description":"Denies the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_data_store_identifiers"]}},"deny-identifier":{"identifier":"deny-identifier","description":"Denies the identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["identifier"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-data-store":{"identifier":"deny-remove-data-store","description":"Denies the remove_data_store command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_data_store"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-set-app-theme":{"identifier":"deny-set-app-theme","description":"Denies the set_app_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_app_theme"]}},"deny-set-dock-visibility":{"identifier":"deny-set-dock-visibility","description":"Denies the set_dock_visibility command without any pre-configured scope.","commands":{"allow":[],"deny":["set_dock_visibility"]}},"deny-supports-multiple-windows":{"identifier":"deny-supports-multiple-windows","description":"Denies the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["supports_multiple_windows"]}},"deny-tauri-version":{"identifier":"deny-tauri-version","description":"Denies the tauri_version command without any pre-configured scope.","commands":{"allow":[],"deny":["tauri_version"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"core:event":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-listen","allow-unlisten","allow-emit","allow-emit-to"]},"permissions":{"allow-emit":{"identifier":"allow-emit","description":"Enables the emit command without any pre-configured scope.","commands":{"allow":["emit"],"deny":[]}},"allow-emit-to":{"identifier":"allow-emit-to","description":"Enables the emit_to command without any pre-configured scope.","commands":{"allow":["emit_to"],"deny":[]}},"allow-listen":{"identifier":"allow-listen","description":"Enables the listen command without any pre-configured scope.","commands":{"allow":["listen"],"deny":[]}},"allow-unlisten":{"identifier":"allow-unlisten","description":"Enables the unlisten command without any pre-configured scope.","commands":{"allow":["unlisten"],"deny":[]}},"deny-emit":{"identifier":"deny-emit","description":"Denies the emit command without any pre-configured scope.","commands":{"allow":[],"deny":["emit"]}},"deny-emit-to":{"identifier":"deny-emit-to","description":"Denies the emit_to command without any pre-configured scope.","commands":{"allow":[],"deny":["emit_to"]}},"deny-listen":{"identifier":"deny-listen","description":"Denies the listen command without any pre-configured scope.","commands":{"allow":[],"deny":["listen"]}},"deny-unlisten":{"identifier":"deny-unlisten","description":"Denies the unlisten command without any pre-configured scope.","commands":{"allow":[],"deny":["unlisten"]}}},"permission_sets":{},"global_scope_schema":null},"core:image":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-from-bytes","allow-from-path","allow-rgba","allow-size"]},"permissions":{"allow-from-bytes":{"identifier":"allow-from-bytes","description":"Enables the from_bytes command without any pre-configured scope.","commands":{"allow":["from_bytes"],"deny":[]}},"allow-from-path":{"identifier":"allow-from-path","description":"Enables the from_path command without any pre-configured scope.","commands":{"allow":["from_path"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-rgba":{"identifier":"allow-rgba","description":"Enables the rgba command without any pre-configured scope.","commands":{"allow":["rgba"],"deny":[]}},"allow-size":{"identifier":"allow-size","description":"Enables the size command without any pre-configured scope.","commands":{"allow":["size"],"deny":[]}},"deny-from-bytes":{"identifier":"deny-from-bytes","description":"Denies the from_bytes command without any pre-configured scope.","commands":{"allow":[],"deny":["from_bytes"]}},"deny-from-path":{"identifier":"deny-from-path","description":"Denies the from_path command without any pre-configured scope.","commands":{"allow":[],"deny":["from_path"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-rgba":{"identifier":"deny-rgba","description":"Denies the rgba command without any pre-configured scope.","commands":{"allow":[],"deny":["rgba"]}},"deny-size":{"identifier":"deny-size","description":"Denies the size command without any pre-configured scope.","commands":{"allow":[],"deny":["size"]}}},"permission_sets":{},"global_scope_schema":null},"core:menu":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-append","allow-prepend","allow-insert","allow-remove","allow-remove-at","allow-items","allow-get","allow-popup","allow-create-default","allow-set-as-app-menu","allow-set-as-window-menu","allow-text","allow-set-text","allow-is-enabled","allow-set-enabled","allow-set-accelerator","allow-set-as-windows-menu-for-nsapp","allow-set-as-help-menu-for-nsapp","allow-is-checked","allow-set-checked","allow-set-icon"]},"permissions":{"allow-append":{"identifier":"allow-append","description":"Enables the append command without any pre-configured scope.","commands":{"allow":["append"],"deny":[]}},"allow-create-default":{"identifier":"allow-create-default","description":"Enables the create_default command without any pre-configured scope.","commands":{"allow":["create_default"],"deny":[]}},"allow-get":{"identifier":"allow-get","description":"Enables the get command without any pre-configured scope.","commands":{"allow":["get"],"deny":[]}},"allow-insert":{"identifier":"allow-insert","description":"Enables the insert command without any pre-configured scope.","commands":{"allow":["insert"],"deny":[]}},"allow-is-checked":{"identifier":"allow-is-checked","description":"Enables the is_checked command without any pre-configured scope.","commands":{"allow":["is_checked"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-items":{"identifier":"allow-items","description":"Enables the items command without any pre-configured scope.","commands":{"allow":["items"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-popup":{"identifier":"allow-popup","description":"Enables the popup command without any pre-configured scope.","commands":{"allow":["popup"],"deny":[]}},"allow-prepend":{"identifier":"allow-prepend","description":"Enables the prepend command without any pre-configured scope.","commands":{"allow":["prepend"],"deny":[]}},"allow-remove":{"identifier":"allow-remove","description":"Enables the remove command without any pre-configured scope.","commands":{"allow":["remove"],"deny":[]}},"allow-remove-at":{"identifier":"allow-remove-at","description":"Enables the remove_at command without any pre-configured scope.","commands":{"allow":["remove_at"],"deny":[]}},"allow-set-accelerator":{"identifier":"allow-set-accelerator","description":"Enables the set_accelerator command without any pre-configured scope.","commands":{"allow":["set_accelerator"],"deny":[]}},"allow-set-as-app-menu":{"identifier":"allow-set-as-app-menu","description":"Enables the set_as_app_menu command without any pre-configured scope.","commands":{"allow":["set_as_app_menu"],"deny":[]}},"allow-set-as-help-menu-for-nsapp":{"identifier":"allow-set-as-help-menu-for-nsapp","description":"Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_help_menu_for_nsapp"],"deny":[]}},"allow-set-as-window-menu":{"identifier":"allow-set-as-window-menu","description":"Enables the set_as_window_menu command without any pre-configured scope.","commands":{"allow":["set_as_window_menu"],"deny":[]}},"allow-set-as-windows-menu-for-nsapp":{"identifier":"allow-set-as-windows-menu-for-nsapp","description":"Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_windows_menu_for_nsapp"],"deny":[]}},"allow-set-checked":{"identifier":"allow-set-checked","description":"Enables the set_checked command without any pre-configured scope.","commands":{"allow":["set_checked"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-text":{"identifier":"allow-set-text","description":"Enables the set_text command without any pre-configured scope.","commands":{"allow":["set_text"],"deny":[]}},"allow-text":{"identifier":"allow-text","description":"Enables the text command without any pre-configured scope.","commands":{"allow":["text"],"deny":[]}},"deny-append":{"identifier":"deny-append","description":"Denies the append command without any pre-configured scope.","commands":{"allow":[],"deny":["append"]}},"deny-create-default":{"identifier":"deny-create-default","description":"Denies the create_default command without any pre-configured scope.","commands":{"allow":[],"deny":["create_default"]}},"deny-get":{"identifier":"deny-get","description":"Denies the get command without any pre-configured scope.","commands":{"allow":[],"deny":["get"]}},"deny-insert":{"identifier":"deny-insert","description":"Denies the insert command without any pre-configured scope.","commands":{"allow":[],"deny":["insert"]}},"deny-is-checked":{"identifier":"deny-is-checked","description":"Denies the is_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["is_checked"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-items":{"identifier":"deny-items","description":"Denies the items command without any pre-configured scope.","commands":{"allow":[],"deny":["items"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-popup":{"identifier":"deny-popup","description":"Denies the popup command without any pre-configured scope.","commands":{"allow":[],"deny":["popup"]}},"deny-prepend":{"identifier":"deny-prepend","description":"Denies the prepend command without any pre-configured scope.","commands":{"allow":[],"deny":["prepend"]}},"deny-remove":{"identifier":"deny-remove","description":"Denies the remove command without any pre-configured scope.","commands":{"allow":[],"deny":["remove"]}},"deny-remove-at":{"identifier":"deny-remove-at","description":"Denies the remove_at command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_at"]}},"deny-set-accelerator":{"identifier":"deny-set-accelerator","description":"Denies the set_accelerator command without any pre-configured scope.","commands":{"allow":[],"deny":["set_accelerator"]}},"deny-set-as-app-menu":{"identifier":"deny-set-as-app-menu","description":"Denies the set_as_app_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_app_menu"]}},"deny-set-as-help-menu-for-nsapp":{"identifier":"deny-set-as-help-menu-for-nsapp","description":"Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_help_menu_for_nsapp"]}},"deny-set-as-window-menu":{"identifier":"deny-set-as-window-menu","description":"Denies the set_as_window_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_window_menu"]}},"deny-set-as-windows-menu-for-nsapp":{"identifier":"deny-set-as-windows-menu-for-nsapp","description":"Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_windows_menu_for_nsapp"]}},"deny-set-checked":{"identifier":"deny-set-checked","description":"Denies the set_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["set_checked"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-text":{"identifier":"deny-set-text","description":"Denies the set_text command without any pre-configured scope.","commands":{"allow":[],"deny":["set_text"]}},"deny-text":{"identifier":"deny-text","description":"Denies the text command without any pre-configured scope.","commands":{"allow":[],"deny":["text"]}}},"permission_sets":{},"global_scope_schema":null},"core:path":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-resolve-directory","allow-resolve","allow-normalize","allow-join","allow-dirname","allow-extname","allow-basename","allow-is-absolute"]},"permissions":{"allow-basename":{"identifier":"allow-basename","description":"Enables the basename command without any pre-configured scope.","commands":{"allow":["basename"],"deny":[]}},"allow-dirname":{"identifier":"allow-dirname","description":"Enables the dirname command without any pre-configured scope.","commands":{"allow":["dirname"],"deny":[]}},"allow-extname":{"identifier":"allow-extname","description":"Enables the extname command without any pre-configured scope.","commands":{"allow":["extname"],"deny":[]}},"allow-is-absolute":{"identifier":"allow-is-absolute","description":"Enables the is_absolute command without any pre-configured scope.","commands":{"allow":["is_absolute"],"deny":[]}},"allow-join":{"identifier":"allow-join","description":"Enables the join command without any pre-configured scope.","commands":{"allow":["join"],"deny":[]}},"allow-normalize":{"identifier":"allow-normalize","description":"Enables the normalize command without any pre-configured scope.","commands":{"allow":["normalize"],"deny":[]}},"allow-resolve":{"identifier":"allow-resolve","description":"Enables the resolve command without any pre-configured scope.","commands":{"allow":["resolve"],"deny":[]}},"allow-resolve-directory":{"identifier":"allow-resolve-directory","description":"Enables the resolve_directory command without any pre-configured scope.","commands":{"allow":["resolve_directory"],"deny":[]}},"deny-basename":{"identifier":"deny-basename","description":"Denies the basename command without any pre-configured scope.","commands":{"allow":[],"deny":["basename"]}},"deny-dirname":{"identifier":"deny-dirname","description":"Denies the dirname command without any pre-configured scope.","commands":{"allow":[],"deny":["dirname"]}},"deny-extname":{"identifier":"deny-extname","description":"Denies the extname command without any pre-configured scope.","commands":{"allow":[],"deny":["extname"]}},"deny-is-absolute":{"identifier":"deny-is-absolute","description":"Denies the is_absolute command without any pre-configured scope.","commands":{"allow":[],"deny":["is_absolute"]}},"deny-join":{"identifier":"deny-join","description":"Denies the join command without any pre-configured scope.","commands":{"allow":[],"deny":["join"]}},"deny-normalize":{"identifier":"deny-normalize","description":"Denies the normalize command without any pre-configured scope.","commands":{"allow":[],"deny":["normalize"]}},"deny-resolve":{"identifier":"deny-resolve","description":"Denies the resolve command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve"]}},"deny-resolve-directory":{"identifier":"deny-resolve-directory","description":"Denies the resolve_directory command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve_directory"]}}},"permission_sets":{},"global_scope_schema":null},"core:resources":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-close"]},"permissions":{"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}}},"permission_sets":{},"global_scope_schema":null},"core:tray":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-get-by-id","allow-remove-by-id","allow-set-icon","allow-set-menu","allow-set-tooltip","allow-set-title","allow-set-visible","allow-set-temp-dir-path","allow-set-icon-as-template","allow-set-icon-with-as-template","allow-set-show-menu-on-left-click"]},"permissions":{"allow-get-by-id":{"identifier":"allow-get-by-id","description":"Enables the get_by_id command without any pre-configured scope.","commands":{"allow":["get_by_id"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-remove-by-id":{"identifier":"allow-remove-by-id","description":"Enables the remove_by_id command without any pre-configured scope.","commands":{"allow":["remove_by_id"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-icon-as-template":{"identifier":"allow-set-icon-as-template","description":"Enables the set_icon_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_as_template"],"deny":[]}},"allow-set-icon-with-as-template":{"identifier":"allow-set-icon-with-as-template","description":"Enables the set_icon_with_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_with_as_template"],"deny":[]}},"allow-set-menu":{"identifier":"allow-set-menu","description":"Enables the set_menu command without any pre-configured scope.","commands":{"allow":["set_menu"],"deny":[]}},"allow-set-show-menu-on-left-click":{"identifier":"allow-set-show-menu-on-left-click","description":"Enables the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":["set_show_menu_on_left_click"],"deny":[]}},"allow-set-temp-dir-path":{"identifier":"allow-set-temp-dir-path","description":"Enables the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":["set_temp_dir_path"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-tooltip":{"identifier":"allow-set-tooltip","description":"Enables the set_tooltip command without any pre-configured scope.","commands":{"allow":["set_tooltip"],"deny":[]}},"allow-set-visible":{"identifier":"allow-set-visible","description":"Enables the set_visible command without any pre-configured scope.","commands":{"allow":["set_visible"],"deny":[]}},"deny-get-by-id":{"identifier":"deny-get-by-id","description":"Denies the get_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["get_by_id"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-remove-by-id":{"identifier":"deny-remove-by-id","description":"Denies the remove_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_by_id"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-icon-as-template":{"identifier":"deny-set-icon-as-template","description":"Denies the set_icon_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_as_template"]}},"deny-set-icon-with-as-template":{"identifier":"deny-set-icon-with-as-template","description":"Denies the set_icon_with_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_with_as_template"]}},"deny-set-menu":{"identifier":"deny-set-menu","description":"Denies the set_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_menu"]}},"deny-set-show-menu-on-left-click":{"identifier":"deny-set-show-menu-on-left-click","description":"Denies the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":[],"deny":["set_show_menu_on_left_click"]}},"deny-set-temp-dir-path":{"identifier":"deny-set-temp-dir-path","description":"Denies the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":[],"deny":["set_temp_dir_path"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-tooltip":{"identifier":"deny-set-tooltip","description":"Denies the set_tooltip command without any pre-configured scope.","commands":{"allow":[],"deny":["set_tooltip"]}},"deny-set-visible":{"identifier":"deny-set-visible","description":"Denies the set_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible"]}}},"permission_sets":{},"global_scope_schema":null},"core:webview":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-webviews","allow-webview-position","allow-webview-size","allow-internal-toggle-devtools"]},"permissions":{"allow-clear-all-browsing-data":{"identifier":"allow-clear-all-browsing-data","description":"Enables the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":["clear_all_browsing_data"],"deny":[]}},"allow-create-webview":{"identifier":"allow-create-webview","description":"Enables the create_webview command without any pre-configured scope.","commands":{"allow":["create_webview"],"deny":[]}},"allow-create-webview-window":{"identifier":"allow-create-webview-window","description":"Enables the create_webview_window command without any pre-configured scope.","commands":{"allow":["create_webview_window"],"deny":[]}},"allow-get-all-webviews":{"identifier":"allow-get-all-webviews","description":"Enables the get_all_webviews command without any pre-configured scope.","commands":{"allow":["get_all_webviews"],"deny":[]}},"allow-internal-toggle-devtools":{"identifier":"allow-internal-toggle-devtools","description":"Enables the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":["internal_toggle_devtools"],"deny":[]}},"allow-print":{"identifier":"allow-print","description":"Enables the print command without any pre-configured scope.","commands":{"allow":["print"],"deny":[]}},"allow-reparent":{"identifier":"allow-reparent","description":"Enables the reparent command without any pre-configured scope.","commands":{"allow":["reparent"],"deny":[]}},"allow-set-webview-auto-resize":{"identifier":"allow-set-webview-auto-resize","description":"Enables the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":["set_webview_auto_resize"],"deny":[]}},"allow-set-webview-background-color":{"identifier":"allow-set-webview-background-color","description":"Enables the set_webview_background_color command without any pre-configured scope.","commands":{"allow":["set_webview_background_color"],"deny":[]}},"allow-set-webview-focus":{"identifier":"allow-set-webview-focus","description":"Enables the set_webview_focus command without any pre-configured scope.","commands":{"allow":["set_webview_focus"],"deny":[]}},"allow-set-webview-position":{"identifier":"allow-set-webview-position","description":"Enables the set_webview_position command without any pre-configured scope.","commands":{"allow":["set_webview_position"],"deny":[]}},"allow-set-webview-size":{"identifier":"allow-set-webview-size","description":"Enables the set_webview_size command without any pre-configured scope.","commands":{"allow":["set_webview_size"],"deny":[]}},"allow-set-webview-zoom":{"identifier":"allow-set-webview-zoom","description":"Enables the set_webview_zoom command without any pre-configured scope.","commands":{"allow":["set_webview_zoom"],"deny":[]}},"allow-webview-close":{"identifier":"allow-webview-close","description":"Enables the webview_close command without any pre-configured scope.","commands":{"allow":["webview_close"],"deny":[]}},"allow-webview-hide":{"identifier":"allow-webview-hide","description":"Enables the webview_hide command without any pre-configured scope.","commands":{"allow":["webview_hide"],"deny":[]}},"allow-webview-position":{"identifier":"allow-webview-position","description":"Enables the webview_position command without any pre-configured scope.","commands":{"allow":["webview_position"],"deny":[]}},"allow-webview-show":{"identifier":"allow-webview-show","description":"Enables the webview_show command without any pre-configured scope.","commands":{"allow":["webview_show"],"deny":[]}},"allow-webview-size":{"identifier":"allow-webview-size","description":"Enables the webview_size command without any pre-configured scope.","commands":{"allow":["webview_size"],"deny":[]}},"deny-clear-all-browsing-data":{"identifier":"deny-clear-all-browsing-data","description":"Denies the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_all_browsing_data"]}},"deny-create-webview":{"identifier":"deny-create-webview","description":"Denies the create_webview command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview"]}},"deny-create-webview-window":{"identifier":"deny-create-webview-window","description":"Denies the create_webview_window command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview_window"]}},"deny-get-all-webviews":{"identifier":"deny-get-all-webviews","description":"Denies the get_all_webviews command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_webviews"]}},"deny-internal-toggle-devtools":{"identifier":"deny-internal-toggle-devtools","description":"Denies the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_devtools"]}},"deny-print":{"identifier":"deny-print","description":"Denies the print command without any pre-configured scope.","commands":{"allow":[],"deny":["print"]}},"deny-reparent":{"identifier":"deny-reparent","description":"Denies the reparent command without any pre-configured scope.","commands":{"allow":[],"deny":["reparent"]}},"deny-set-webview-auto-resize":{"identifier":"deny-set-webview-auto-resize","description":"Denies the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_auto_resize"]}},"deny-set-webview-background-color":{"identifier":"deny-set-webview-background-color","description":"Denies the set_webview_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_background_color"]}},"deny-set-webview-focus":{"identifier":"deny-set-webview-focus","description":"Denies the set_webview_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_focus"]}},"deny-set-webview-position":{"identifier":"deny-set-webview-position","description":"Denies the set_webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_position"]}},"deny-set-webview-size":{"identifier":"deny-set-webview-size","description":"Denies the set_webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_size"]}},"deny-set-webview-zoom":{"identifier":"deny-set-webview-zoom","description":"Denies the set_webview_zoom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_zoom"]}},"deny-webview-close":{"identifier":"deny-webview-close","description":"Denies the webview_close command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_close"]}},"deny-webview-hide":{"identifier":"deny-webview-hide","description":"Denies the webview_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_hide"]}},"deny-webview-position":{"identifier":"deny-webview-position","description":"Denies the webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_position"]}},"deny-webview-show":{"identifier":"deny-webview-show","description":"Denies the webview_show command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_show"]}},"deny-webview-size":{"identifier":"deny-webview-size","description":"Denies the webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_size"]}}},"permission_sets":{},"global_scope_schema":null},"core:window":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-windows","allow-scale-factor","allow-inner-position","allow-outer-position","allow-inner-size","allow-outer-size","allow-is-fullscreen","allow-is-minimized","allow-is-maximized","allow-is-focused","allow-is-decorated","allow-is-resizable","allow-is-maximizable","allow-is-minimizable","allow-is-closable","allow-is-visible","allow-is-enabled","allow-title","allow-current-monitor","allow-primary-monitor","allow-monitor-from-point","allow-available-monitors","allow-cursor-position","allow-theme","allow-is-always-on-top","allow-activity-name","allow-scene-identifier","allow-internal-toggle-maximize"]},"permissions":{"allow-activity-name":{"identifier":"allow-activity-name","description":"Enables the activity_name command without any pre-configured scope.","commands":{"allow":["activity_name"],"deny":[]}},"allow-available-monitors":{"identifier":"allow-available-monitors","description":"Enables the available_monitors command without any pre-configured scope.","commands":{"allow":["available_monitors"],"deny":[]}},"allow-center":{"identifier":"allow-center","description":"Enables the center command without any pre-configured scope.","commands":{"allow":["center"],"deny":[]}},"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"allow-create":{"identifier":"allow-create","description":"Enables the create command without any pre-configured scope.","commands":{"allow":["create"],"deny":[]}},"allow-current-monitor":{"identifier":"allow-current-monitor","description":"Enables the current_monitor command without any pre-configured scope.","commands":{"allow":["current_monitor"],"deny":[]}},"allow-cursor-position":{"identifier":"allow-cursor-position","description":"Enables the cursor_position command without any pre-configured scope.","commands":{"allow":["cursor_position"],"deny":[]}},"allow-destroy":{"identifier":"allow-destroy","description":"Enables the destroy command without any pre-configured scope.","commands":{"allow":["destroy"],"deny":[]}},"allow-get-all-windows":{"identifier":"allow-get-all-windows","description":"Enables the get_all_windows command without any pre-configured scope.","commands":{"allow":["get_all_windows"],"deny":[]}},"allow-hide":{"identifier":"allow-hide","description":"Enables the hide command without any pre-configured scope.","commands":{"allow":["hide"],"deny":[]}},"allow-inner-position":{"identifier":"allow-inner-position","description":"Enables the inner_position command without any pre-configured scope.","commands":{"allow":["inner_position"],"deny":[]}},"allow-inner-size":{"identifier":"allow-inner-size","description":"Enables the inner_size command without any pre-configured scope.","commands":{"allow":["inner_size"],"deny":[]}},"allow-internal-toggle-maximize":{"identifier":"allow-internal-toggle-maximize","description":"Enables the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":["internal_toggle_maximize"],"deny":[]}},"allow-is-always-on-top":{"identifier":"allow-is-always-on-top","description":"Enables the is_always_on_top command without any pre-configured scope.","commands":{"allow":["is_always_on_top"],"deny":[]}},"allow-is-closable":{"identifier":"allow-is-closable","description":"Enables the is_closable command without any pre-configured scope.","commands":{"allow":["is_closable"],"deny":[]}},"allow-is-decorated":{"identifier":"allow-is-decorated","description":"Enables the is_decorated command without any pre-configured scope.","commands":{"allow":["is_decorated"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-is-focused":{"identifier":"allow-is-focused","description":"Enables the is_focused command without any pre-configured scope.","commands":{"allow":["is_focused"],"deny":[]}},"allow-is-fullscreen":{"identifier":"allow-is-fullscreen","description":"Enables the is_fullscreen command without any pre-configured scope.","commands":{"allow":["is_fullscreen"],"deny":[]}},"allow-is-maximizable":{"identifier":"allow-is-maximizable","description":"Enables the is_maximizable command without any pre-configured scope.","commands":{"allow":["is_maximizable"],"deny":[]}},"allow-is-maximized":{"identifier":"allow-is-maximized","description":"Enables the is_maximized command without any pre-configured scope.","commands":{"allow":["is_maximized"],"deny":[]}},"allow-is-minimizable":{"identifier":"allow-is-minimizable","description":"Enables the is_minimizable command without any pre-configured scope.","commands":{"allow":["is_minimizable"],"deny":[]}},"allow-is-minimized":{"identifier":"allow-is-minimized","description":"Enables the is_minimized command without any pre-configured scope.","commands":{"allow":["is_minimized"],"deny":[]}},"allow-is-resizable":{"identifier":"allow-is-resizable","description":"Enables the is_resizable command without any pre-configured scope.","commands":{"allow":["is_resizable"],"deny":[]}},"allow-is-visible":{"identifier":"allow-is-visible","description":"Enables the is_visible command without any pre-configured scope.","commands":{"allow":["is_visible"],"deny":[]}},"allow-maximize":{"identifier":"allow-maximize","description":"Enables the maximize command without any pre-configured scope.","commands":{"allow":["maximize"],"deny":[]}},"allow-minimize":{"identifier":"allow-minimize","description":"Enables the minimize command without any pre-configured scope.","commands":{"allow":["minimize"],"deny":[]}},"allow-monitor-from-point":{"identifier":"allow-monitor-from-point","description":"Enables the monitor_from_point command without any pre-configured scope.","commands":{"allow":["monitor_from_point"],"deny":[]}},"allow-outer-position":{"identifier":"allow-outer-position","description":"Enables the outer_position command without any pre-configured scope.","commands":{"allow":["outer_position"],"deny":[]}},"allow-outer-size":{"identifier":"allow-outer-size","description":"Enables the outer_size command without any pre-configured scope.","commands":{"allow":["outer_size"],"deny":[]}},"allow-primary-monitor":{"identifier":"allow-primary-monitor","description":"Enables the primary_monitor command without any pre-configured scope.","commands":{"allow":["primary_monitor"],"deny":[]}},"allow-request-user-attention":{"identifier":"allow-request-user-attention","description":"Enables the request_user_attention command without any pre-configured scope.","commands":{"allow":["request_user_attention"],"deny":[]}},"allow-scale-factor":{"identifier":"allow-scale-factor","description":"Enables the scale_factor command without any pre-configured scope.","commands":{"allow":["scale_factor"],"deny":[]}},"allow-scene-identifier":{"identifier":"allow-scene-identifier","description":"Enables the scene_identifier command without any pre-configured scope.","commands":{"allow":["scene_identifier"],"deny":[]}},"allow-set-always-on-bottom":{"identifier":"allow-set-always-on-bottom","description":"Enables the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":["set_always_on_bottom"],"deny":[]}},"allow-set-always-on-top":{"identifier":"allow-set-always-on-top","description":"Enables the set_always_on_top command without any pre-configured scope.","commands":{"allow":["set_always_on_top"],"deny":[]}},"allow-set-background-color":{"identifier":"allow-set-background-color","description":"Enables the set_background_color command without any pre-configured scope.","commands":{"allow":["set_background_color"],"deny":[]}},"allow-set-badge-count":{"identifier":"allow-set-badge-count","description":"Enables the set_badge_count command without any pre-configured scope.","commands":{"allow":["set_badge_count"],"deny":[]}},"allow-set-badge-label":{"identifier":"allow-set-badge-label","description":"Enables the set_badge_label command without any pre-configured scope.","commands":{"allow":["set_badge_label"],"deny":[]}},"allow-set-closable":{"identifier":"allow-set-closable","description":"Enables the set_closable command without any pre-configured scope.","commands":{"allow":["set_closable"],"deny":[]}},"allow-set-content-protected":{"identifier":"allow-set-content-protected","description":"Enables the set_content_protected command without any pre-configured scope.","commands":{"allow":["set_content_protected"],"deny":[]}},"allow-set-cursor-grab":{"identifier":"allow-set-cursor-grab","description":"Enables the set_cursor_grab command without any pre-configured scope.","commands":{"allow":["set_cursor_grab"],"deny":[]}},"allow-set-cursor-icon":{"identifier":"allow-set-cursor-icon","description":"Enables the set_cursor_icon command without any pre-configured scope.","commands":{"allow":["set_cursor_icon"],"deny":[]}},"allow-set-cursor-position":{"identifier":"allow-set-cursor-position","description":"Enables the set_cursor_position command without any pre-configured scope.","commands":{"allow":["set_cursor_position"],"deny":[]}},"allow-set-cursor-visible":{"identifier":"allow-set-cursor-visible","description":"Enables the set_cursor_visible command without any pre-configured scope.","commands":{"allow":["set_cursor_visible"],"deny":[]}},"allow-set-decorations":{"identifier":"allow-set-decorations","description":"Enables the set_decorations command without any pre-configured scope.","commands":{"allow":["set_decorations"],"deny":[]}},"allow-set-effects":{"identifier":"allow-set-effects","description":"Enables the set_effects command without any pre-configured scope.","commands":{"allow":["set_effects"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-focus":{"identifier":"allow-set-focus","description":"Enables the set_focus command without any pre-configured scope.","commands":{"allow":["set_focus"],"deny":[]}},"allow-set-focusable":{"identifier":"allow-set-focusable","description":"Enables the set_focusable command without any pre-configured scope.","commands":{"allow":["set_focusable"],"deny":[]}},"allow-set-fullscreen":{"identifier":"allow-set-fullscreen","description":"Enables the set_fullscreen command without any pre-configured scope.","commands":{"allow":["set_fullscreen"],"deny":[]}},"allow-set-fullscreen-on-monitor":{"identifier":"allow-set-fullscreen-on-monitor","description":"Enables the set_fullscreen_on_monitor command without any pre-configured scope.","commands":{"allow":["set_fullscreen_on_monitor"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-ignore-cursor-events":{"identifier":"allow-set-ignore-cursor-events","description":"Enables the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":["set_ignore_cursor_events"],"deny":[]}},"allow-set-max-size":{"identifier":"allow-set-max-size","description":"Enables the set_max_size command without any pre-configured scope.","commands":{"allow":["set_max_size"],"deny":[]}},"allow-set-maximizable":{"identifier":"allow-set-maximizable","description":"Enables the set_maximizable command without any pre-configured scope.","commands":{"allow":["set_maximizable"],"deny":[]}},"allow-set-min-size":{"identifier":"allow-set-min-size","description":"Enables the set_min_size command without any pre-configured scope.","commands":{"allow":["set_min_size"],"deny":[]}},"allow-set-minimizable":{"identifier":"allow-set-minimizable","description":"Enables the set_minimizable command without any pre-configured scope.","commands":{"allow":["set_minimizable"],"deny":[]}},"allow-set-overlay-icon":{"identifier":"allow-set-overlay-icon","description":"Enables the set_overlay_icon command without any pre-configured scope.","commands":{"allow":["set_overlay_icon"],"deny":[]}},"allow-set-position":{"identifier":"allow-set-position","description":"Enables the set_position command without any pre-configured scope.","commands":{"allow":["set_position"],"deny":[]}},"allow-set-progress-bar":{"identifier":"allow-set-progress-bar","description":"Enables the set_progress_bar command without any pre-configured scope.","commands":{"allow":["set_progress_bar"],"deny":[]}},"allow-set-resizable":{"identifier":"allow-set-resizable","description":"Enables the set_resizable command without any pre-configured scope.","commands":{"allow":["set_resizable"],"deny":[]}},"allow-set-shadow":{"identifier":"allow-set-shadow","description":"Enables the set_shadow command without any pre-configured scope.","commands":{"allow":["set_shadow"],"deny":[]}},"allow-set-simple-fullscreen":{"identifier":"allow-set-simple-fullscreen","description":"Enables the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":["set_simple_fullscreen"],"deny":[]}},"allow-set-size":{"identifier":"allow-set-size","description":"Enables the set_size command without any pre-configured scope.","commands":{"allow":["set_size"],"deny":[]}},"allow-set-size-constraints":{"identifier":"allow-set-size-constraints","description":"Enables the set_size_constraints command without any pre-configured scope.","commands":{"allow":["set_size_constraints"],"deny":[]}},"allow-set-skip-taskbar":{"identifier":"allow-set-skip-taskbar","description":"Enables the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":["set_skip_taskbar"],"deny":[]}},"allow-set-theme":{"identifier":"allow-set-theme","description":"Enables the set_theme command without any pre-configured scope.","commands":{"allow":["set_theme"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-title-bar-style":{"identifier":"allow-set-title-bar-style","description":"Enables the set_title_bar_style command without any pre-configured scope.","commands":{"allow":["set_title_bar_style"],"deny":[]}},"allow-set-visible-on-all-workspaces":{"identifier":"allow-set-visible-on-all-workspaces","description":"Enables the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":["set_visible_on_all_workspaces"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"allow-start-dragging":{"identifier":"allow-start-dragging","description":"Enables the start_dragging command without any pre-configured scope.","commands":{"allow":["start_dragging"],"deny":[]}},"allow-start-resize-dragging":{"identifier":"allow-start-resize-dragging","description":"Enables the start_resize_dragging command without any pre-configured scope.","commands":{"allow":["start_resize_dragging"],"deny":[]}},"allow-theme":{"identifier":"allow-theme","description":"Enables the theme command without any pre-configured scope.","commands":{"allow":["theme"],"deny":[]}},"allow-title":{"identifier":"allow-title","description":"Enables the title command without any pre-configured scope.","commands":{"allow":["title"],"deny":[]}},"allow-toggle-maximize":{"identifier":"allow-toggle-maximize","description":"Enables the toggle_maximize command without any pre-configured scope.","commands":{"allow":["toggle_maximize"],"deny":[]}},"allow-unmaximize":{"identifier":"allow-unmaximize","description":"Enables the unmaximize command without any pre-configured scope.","commands":{"allow":["unmaximize"],"deny":[]}},"allow-unminimize":{"identifier":"allow-unminimize","description":"Enables the unminimize command without any pre-configured scope.","commands":{"allow":["unminimize"],"deny":[]}},"deny-activity-name":{"identifier":"deny-activity-name","description":"Denies the activity_name command without any pre-configured scope.","commands":{"allow":[],"deny":["activity_name"]}},"deny-available-monitors":{"identifier":"deny-available-monitors","description":"Denies the available_monitors command without any pre-configured scope.","commands":{"allow":[],"deny":["available_monitors"]}},"deny-center":{"identifier":"deny-center","description":"Denies the center command without any pre-configured scope.","commands":{"allow":[],"deny":["center"]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}},"deny-create":{"identifier":"deny-create","description":"Denies the create command without any pre-configured scope.","commands":{"allow":[],"deny":["create"]}},"deny-current-monitor":{"identifier":"deny-current-monitor","description":"Denies the current_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["current_monitor"]}},"deny-cursor-position":{"identifier":"deny-cursor-position","description":"Denies the cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["cursor_position"]}},"deny-destroy":{"identifier":"deny-destroy","description":"Denies the destroy command without any pre-configured scope.","commands":{"allow":[],"deny":["destroy"]}},"deny-get-all-windows":{"identifier":"deny-get-all-windows","description":"Denies the get_all_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_windows"]}},"deny-hide":{"identifier":"deny-hide","description":"Denies the hide command without any pre-configured scope.","commands":{"allow":[],"deny":["hide"]}},"deny-inner-position":{"identifier":"deny-inner-position","description":"Denies the inner_position command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_position"]}},"deny-inner-size":{"identifier":"deny-inner-size","description":"Denies the inner_size command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_size"]}},"deny-internal-toggle-maximize":{"identifier":"deny-internal-toggle-maximize","description":"Denies the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_maximize"]}},"deny-is-always-on-top":{"identifier":"deny-is-always-on-top","description":"Denies the is_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["is_always_on_top"]}},"deny-is-closable":{"identifier":"deny-is-closable","description":"Denies the is_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_closable"]}},"deny-is-decorated":{"identifier":"deny-is-decorated","description":"Denies the is_decorated command without any pre-configured scope.","commands":{"allow":[],"deny":["is_decorated"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-is-focused":{"identifier":"deny-is-focused","description":"Denies the is_focused command without any pre-configured scope.","commands":{"allow":[],"deny":["is_focused"]}},"deny-is-fullscreen":{"identifier":"deny-is-fullscreen","description":"Denies the is_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["is_fullscreen"]}},"deny-is-maximizable":{"identifier":"deny-is-maximizable","description":"Denies the is_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximizable"]}},"deny-is-maximized":{"identifier":"deny-is-maximized","description":"Denies the is_maximized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximized"]}},"deny-is-minimizable":{"identifier":"deny-is-minimizable","description":"Denies the is_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimizable"]}},"deny-is-minimized":{"identifier":"deny-is-minimized","description":"Denies the is_minimized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimized"]}},"deny-is-resizable":{"identifier":"deny-is-resizable","description":"Denies the is_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_resizable"]}},"deny-is-visible":{"identifier":"deny-is-visible","description":"Denies the is_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["is_visible"]}},"deny-maximize":{"identifier":"deny-maximize","description":"Denies the maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["maximize"]}},"deny-minimize":{"identifier":"deny-minimize","description":"Denies the minimize command without any pre-configured scope.","commands":{"allow":[],"deny":["minimize"]}},"deny-monitor-from-point":{"identifier":"deny-monitor-from-point","description":"Denies the monitor_from_point command without any pre-configured scope.","commands":{"allow":[],"deny":["monitor_from_point"]}},"deny-outer-position":{"identifier":"deny-outer-position","description":"Denies the outer_position command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_position"]}},"deny-outer-size":{"identifier":"deny-outer-size","description":"Denies the outer_size command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_size"]}},"deny-primary-monitor":{"identifier":"deny-primary-monitor","description":"Denies the primary_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["primary_monitor"]}},"deny-request-user-attention":{"identifier":"deny-request-user-attention","description":"Denies the request_user_attention command without any pre-configured scope.","commands":{"allow":[],"deny":["request_user_attention"]}},"deny-scale-factor":{"identifier":"deny-scale-factor","description":"Denies the scale_factor command without any pre-configured scope.","commands":{"allow":[],"deny":["scale_factor"]}},"deny-scene-identifier":{"identifier":"deny-scene-identifier","description":"Denies the scene_identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["scene_identifier"]}},"deny-set-always-on-bottom":{"identifier":"deny-set-always-on-bottom","description":"Denies the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_bottom"]}},"deny-set-always-on-top":{"identifier":"deny-set-always-on-top","description":"Denies the set_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_top"]}},"deny-set-background-color":{"identifier":"deny-set-background-color","description":"Denies the set_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_background_color"]}},"deny-set-badge-count":{"identifier":"deny-set-badge-count","description":"Denies the set_badge_count command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_count"]}},"deny-set-badge-label":{"identifier":"deny-set-badge-label","description":"Denies the set_badge_label command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_label"]}},"deny-set-closable":{"identifier":"deny-set-closable","description":"Denies the set_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_closable"]}},"deny-set-content-protected":{"identifier":"deny-set-content-protected","description":"Denies the set_content_protected command without any pre-configured scope.","commands":{"allow":[],"deny":["set_content_protected"]}},"deny-set-cursor-grab":{"identifier":"deny-set-cursor-grab","description":"Denies the set_cursor_grab command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_grab"]}},"deny-set-cursor-icon":{"identifier":"deny-set-cursor-icon","description":"Denies the set_cursor_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_icon"]}},"deny-set-cursor-position":{"identifier":"deny-set-cursor-position","description":"Denies the set_cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_position"]}},"deny-set-cursor-visible":{"identifier":"deny-set-cursor-visible","description":"Denies the set_cursor_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_visible"]}},"deny-set-decorations":{"identifier":"deny-set-decorations","description":"Denies the set_decorations command without any pre-configured scope.","commands":{"allow":[],"deny":["set_decorations"]}},"deny-set-effects":{"identifier":"deny-set-effects","description":"Denies the set_effects command without any pre-configured scope.","commands":{"allow":[],"deny":["set_effects"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-focus":{"identifier":"deny-set-focus","description":"Denies the set_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focus"]}},"deny-set-focusable":{"identifier":"deny-set-focusable","description":"Denies the set_focusable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focusable"]}},"deny-set-fullscreen":{"identifier":"deny-set-fullscreen","description":"Denies the set_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen"]}},"deny-set-fullscreen-on-monitor":{"identifier":"deny-set-fullscreen-on-monitor","description":"Denies the set_fullscreen_on_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen_on_monitor"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-ignore-cursor-events":{"identifier":"deny-set-ignore-cursor-events","description":"Denies the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":[],"deny":["set_ignore_cursor_events"]}},"deny-set-max-size":{"identifier":"deny-set-max-size","description":"Denies the set_max_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_max_size"]}},"deny-set-maximizable":{"identifier":"deny-set-maximizable","description":"Denies the set_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_maximizable"]}},"deny-set-min-size":{"identifier":"deny-set-min-size","description":"Denies the set_min_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_min_size"]}},"deny-set-minimizable":{"identifier":"deny-set-minimizable","description":"Denies the set_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_minimizable"]}},"deny-set-overlay-icon":{"identifier":"deny-set-overlay-icon","description":"Denies the set_overlay_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_overlay_icon"]}},"deny-set-position":{"identifier":"deny-set-position","description":"Denies the set_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_position"]}},"deny-set-progress-bar":{"identifier":"deny-set-progress-bar","description":"Denies the set_progress_bar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_progress_bar"]}},"deny-set-resizable":{"identifier":"deny-set-resizable","description":"Denies the set_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_resizable"]}},"deny-set-shadow":{"identifier":"deny-set-shadow","description":"Denies the set_shadow command without any pre-configured scope.","commands":{"allow":[],"deny":["set_shadow"]}},"deny-set-simple-fullscreen":{"identifier":"deny-set-simple-fullscreen","description":"Denies the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_simple_fullscreen"]}},"deny-set-size":{"identifier":"deny-set-size","description":"Denies the set_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size"]}},"deny-set-size-constraints":{"identifier":"deny-set-size-constraints","description":"Denies the set_size_constraints command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size_constraints"]}},"deny-set-skip-taskbar":{"identifier":"deny-set-skip-taskbar","description":"Denies the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_skip_taskbar"]}},"deny-set-theme":{"identifier":"deny-set-theme","description":"Denies the set_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_theme"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-title-bar-style":{"identifier":"deny-set-title-bar-style","description":"Denies the set_title_bar_style command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title_bar_style"]}},"deny-set-visible-on-all-workspaces":{"identifier":"deny-set-visible-on-all-workspaces","description":"Denies the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible_on_all_workspaces"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}},"deny-start-dragging":{"identifier":"deny-start-dragging","description":"Denies the start_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_dragging"]}},"deny-start-resize-dragging":{"identifier":"deny-start-resize-dragging","description":"Denies the start_resize_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_resize_dragging"]}},"deny-theme":{"identifier":"deny-theme","description":"Denies the theme command without any pre-configured scope.","commands":{"allow":[],"deny":["theme"]}},"deny-title":{"identifier":"deny-title","description":"Denies the title command without any pre-configured scope.","commands":{"allow":[],"deny":["title"]}},"deny-toggle-maximize":{"identifier":"deny-toggle-maximize","description":"Denies the toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["toggle_maximize"]}},"deny-unmaximize":{"identifier":"deny-unmaximize","description":"Denies the unmaximize command without any pre-configured scope.","commands":{"allow":[],"deny":["unmaximize"]}},"deny-unminimize":{"identifier":"deny-unminimize","description":"Denies the unminimize command without any pre-configured scope.","commands":{"allow":[],"deny":["unminimize"]}}},"permission_sets":{},"global_scope_schema":null},"notification":{"default_permission":{"identifier":"default","description":"This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n","permissions":["allow-is-permission-granted","allow-request-permission","allow-notify","allow-register-action-types","allow-register-listener","allow-remove-listener","allow-cancel","allow-get-pending","allow-remove-active","allow-get-active","allow-check-permissions","allow-show","allow-batch","allow-list-channels","allow-delete-channel","allow-create-channel","allow-permission-state"]},"permissions":{"allow-batch":{"identifier":"allow-batch","description":"Enables the batch command without any pre-configured scope.","commands":{"allow":["batch"],"deny":[]}},"allow-cancel":{"identifier":"allow-cancel","description":"Enables the cancel command without any pre-configured scope.","commands":{"allow":["cancel"],"deny":[]}},"allow-check-permissions":{"identifier":"allow-check-permissions","description":"Enables the check_permissions command without any pre-configured scope.","commands":{"allow":["check_permissions"],"deny":[]}},"allow-create-channel":{"identifier":"allow-create-channel","description":"Enables the create_channel command without any pre-configured scope.","commands":{"allow":["create_channel"],"deny":[]}},"allow-delete-channel":{"identifier":"allow-delete-channel","description":"Enables the delete_channel command without any pre-configured scope.","commands":{"allow":["delete_channel"],"deny":[]}},"allow-get-active":{"identifier":"allow-get-active","description":"Enables the get_active command without any pre-configured scope.","commands":{"allow":["get_active"],"deny":[]}},"allow-get-pending":{"identifier":"allow-get-pending","description":"Enables the get_pending command without any pre-configured scope.","commands":{"allow":["get_pending"],"deny":[]}},"allow-is-permission-granted":{"identifier":"allow-is-permission-granted","description":"Enables the is_permission_granted command without any pre-configured scope.","commands":{"allow":["is_permission_granted"],"deny":[]}},"allow-list-channels":{"identifier":"allow-list-channels","description":"Enables the list_channels command without any pre-configured scope.","commands":{"allow":["list_channels"],"deny":[]}},"allow-notify":{"identifier":"allow-notify","description":"Enables the notify command without any pre-configured scope.","commands":{"allow":["notify"],"deny":[]}},"allow-permission-state":{"identifier":"allow-permission-state","description":"Enables the permission_state command without any pre-configured scope.","commands":{"allow":["permission_state"],"deny":[]}},"allow-register-action-types":{"identifier":"allow-register-action-types","description":"Enables the register_action_types command without any pre-configured scope.","commands":{"allow":["register_action_types"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-active":{"identifier":"allow-remove-active","description":"Enables the remove_active command without any pre-configured scope.","commands":{"allow":["remove_active"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-request-permission":{"identifier":"allow-request-permission","description":"Enables the request_permission command without any pre-configured scope.","commands":{"allow":["request_permission"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"deny-batch":{"identifier":"deny-batch","description":"Denies the batch command without any pre-configured scope.","commands":{"allow":[],"deny":["batch"]}},"deny-cancel":{"identifier":"deny-cancel","description":"Denies the cancel command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel"]}},"deny-check-permissions":{"identifier":"deny-check-permissions","description":"Denies the check_permissions command without any pre-configured scope.","commands":{"allow":[],"deny":["check_permissions"]}},"deny-create-channel":{"identifier":"deny-create-channel","description":"Denies the create_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["create_channel"]}},"deny-delete-channel":{"identifier":"deny-delete-channel","description":"Denies the delete_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["delete_channel"]}},"deny-get-active":{"identifier":"deny-get-active","description":"Denies the get_active command without any pre-configured scope.","commands":{"allow":[],"deny":["get_active"]}},"deny-get-pending":{"identifier":"deny-get-pending","description":"Denies the get_pending command without any pre-configured scope.","commands":{"allow":[],"deny":["get_pending"]}},"deny-is-permission-granted":{"identifier":"deny-is-permission-granted","description":"Denies the is_permission_granted command without any pre-configured scope.","commands":{"allow":[],"deny":["is_permission_granted"]}},"deny-list-channels":{"identifier":"deny-list-channels","description":"Denies the list_channels command without any pre-configured scope.","commands":{"allow":[],"deny":["list_channels"]}},"deny-notify":{"identifier":"deny-notify","description":"Denies the notify command without any pre-configured scope.","commands":{"allow":[],"deny":["notify"]}},"deny-permission-state":{"identifier":"deny-permission-state","description":"Denies the permission_state command without any pre-configured scope.","commands":{"allow":[],"deny":["permission_state"]}},"deny-register-action-types":{"identifier":"deny-register-action-types","description":"Denies the register_action_types command without any pre-configured scope.","commands":{"allow":[],"deny":["register_action_types"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-active":{"identifier":"deny-remove-active","description":"Denies the remove_active command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_active"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-request-permission":{"identifier":"deny-request-permission","description":"Denies the request_permission command without any pre-configured scope.","commands":{"allow":[],"deny":["request_permission"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}}},"permission_sets":{},"global_scope_schema":null}} \ No newline at end of file diff --git a/apps/gui/src-tauri/gen/schemas/capabilities.json b/apps/gui/src-tauri/gen/schemas/capabilities.json index e30a48d..8852d6b 100644 --- a/apps/gui/src-tauri/gen/schemas/capabilities.json +++ b/apps/gui/src-tauri/gen/schemas/capabilities.json @@ -1 +1 @@ -{"default":{"identifier":"default","description":"Default capabilities for the main window","local":true,"windows":["main"],"permissions":["core:default","shell:allow-open","notification:default","dialog:default","core:window:allow-minimize","core:window:allow-unminimize","core:window:allow-hide","core:window:allow-show","core:window:allow-set-focus","core:window:allow-close","core:window:allow-start-dragging"]}} \ No newline at end of file +{"default":{"identifier":"default","description":"What the main window may ask Tauri for, besides the app's own commands","local":true,"windows":["main"],"permissions":["core:event:allow-listen","core:event:allow-unlisten","core:window:allow-minimize","core:window:allow-toggle-maximize","core:window:allow-internal-toggle-maximize","core:window:allow-start-dragging","core:webview:allow-internal-toggle-devtools"]}} \ No newline at end of file diff --git a/apps/gui/src-tauri/gen/schemas/desktop-schema.json b/apps/gui/src-tauri/gen/schemas/desktop-schema.json index 862a165..7ac2b79 100644 --- a/apps/gui/src-tauri/gen/schemas/desktop-schema.json +++ b/apps/gui/src-tauri/gen/schemas/desktop-schema.json @@ -134,216 +134,6 @@ "description": "Reference a permission or permission set by identifier and extends its scope.", "type": "object", "allOf": [ - { - "if": { - "properties": { - "identifier": { - "anyOf": [ - { - "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`", - "type": "string", - "const": "shell:default", - "markdownDescription": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`" - }, - { - "description": "Enables the execute command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-execute", - "markdownDescription": "Enables the execute command without any pre-configured scope." - }, - { - "description": "Enables the kill command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-kill", - "markdownDescription": "Enables the kill command without any pre-configured scope." - }, - { - "description": "Enables the open command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-open", - "markdownDescription": "Enables the open command without any pre-configured scope." - }, - { - "description": "Enables the spawn command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-spawn", - "markdownDescription": "Enables the spawn command without any pre-configured scope." - }, - { - "description": "Enables the stdin_write command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-stdin-write", - "markdownDescription": "Enables the stdin_write command without any pre-configured scope." - }, - { - "description": "Denies the execute command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-execute", - "markdownDescription": "Denies the execute command without any pre-configured scope." - }, - { - "description": "Denies the kill command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-kill", - "markdownDescription": "Denies the kill command without any pre-configured scope." - }, - { - "description": "Denies the open command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-open", - "markdownDescription": "Denies the open command without any pre-configured scope." - }, - { - "description": "Denies the spawn command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-spawn", - "markdownDescription": "Denies the spawn command without any pre-configured scope." - }, - { - "description": "Denies the stdin_write command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-stdin-write", - "markdownDescription": "Denies the stdin_write command without any pre-configured scope." - } - ] - } - } - }, - "then": { - "properties": { - "allow": { - "items": { - "title": "ShellScopeEntry", - "description": "Shell scope entry.", - "anyOf": [ - { - "type": "object", - "required": [ - "cmd", - "name" - ], - "properties": { - "args": { - "description": "The allowed arguments for the command execution.", - "allOf": [ - { - "$ref": "#/definitions/ShellScopeEntryAllowedArgs" - } - ] - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "type": "string" - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "name", - "sidecar" - ], - "properties": { - "args": { - "description": "The allowed arguments for the command execution.", - "allOf": [ - { - "$ref": "#/definitions/ShellScopeEntryAllowedArgs" - } - ] - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, - "sidecar": { - "description": "If this command is a sidecar command.", - "type": "boolean" - } - }, - "additionalProperties": false - } - ] - } - }, - "deny": { - "items": { - "title": "ShellScopeEntry", - "description": "Shell scope entry.", - "anyOf": [ - { - "type": "object", - "required": [ - "cmd", - "name" - ], - "properties": { - "args": { - "description": "The allowed arguments for the command execution.", - "allOf": [ - { - "$ref": "#/definitions/ShellScopeEntryAllowedArgs" - } - ] - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "type": "string" - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "name", - "sidecar" - ], - "properties": { - "args": { - "description": "The allowed arguments for the command execution.", - "allOf": [ - { - "$ref": "#/definitions/ShellScopeEntryAllowedArgs" - } - ] - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, - "sidecar": { - "description": "If this command is a sidecar command.", - "type": "boolean" - } - }, - "additionalProperties": false - } - ] - } - } - } - }, - "properties": { - "identifier": { - "description": "Identifier of the permission or permission set.", - "allOf": [ - { - "$ref": "#/definitions/Identifier" - } - ] - } - } - }, { "properties": { "identifier": { @@ -2426,72 +2216,6 @@ "const": "core:window:deny-unminimize", "markdownDescription": "Denies the unminimize command without any pre-configured scope." }, - { - "description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`", - "type": "string", - "const": "dialog:default", - "markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`" - }, - { - "description": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)", - "type": "string", - "const": "dialog:allow-ask", - "markdownDescription": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)" - }, - { - "description": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)", - "type": "string", - "const": "dialog:allow-confirm", - "markdownDescription": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)" - }, - { - "description": "Enables the message command without any pre-configured scope.", - "type": "string", - "const": "dialog:allow-message", - "markdownDescription": "Enables the message command without any pre-configured scope." - }, - { - "description": "Enables the open command without any pre-configured scope.", - "type": "string", - "const": "dialog:allow-open", - "markdownDescription": "Enables the open command without any pre-configured scope." - }, - { - "description": "Enables the save command without any pre-configured scope.", - "type": "string", - "const": "dialog:allow-save", - "markdownDescription": "Enables the save command without any pre-configured scope." - }, - { - "description": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)", - "type": "string", - "const": "dialog:deny-ask", - "markdownDescription": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)" - }, - { - "description": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)", - "type": "string", - "const": "dialog:deny-confirm", - "markdownDescription": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)" - }, - { - "description": "Denies the message command without any pre-configured scope.", - "type": "string", - "const": "dialog:deny-message", - "markdownDescription": "Denies the message command without any pre-configured scope." - }, - { - "description": "Denies the open command without any pre-configured scope.", - "type": "string", - "const": "dialog:deny-open", - "markdownDescription": "Denies the open command without any pre-configured scope." - }, - { - "description": "Denies the save command without any pre-configured scope.", - "type": "string", - "const": "dialog:deny-save", - "markdownDescription": "Denies the save command without any pre-configured scope." - }, { "description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`", "type": "string", @@ -2701,72 +2425,6 @@ "type": "string", "const": "notification:deny-show", "markdownDescription": "Denies the show command without any pre-configured scope." - }, - { - "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`", - "type": "string", - "const": "shell:default", - "markdownDescription": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`" - }, - { - "description": "Enables the execute command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-execute", - "markdownDescription": "Enables the execute command without any pre-configured scope." - }, - { - "description": "Enables the kill command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-kill", - "markdownDescription": "Enables the kill command without any pre-configured scope." - }, - { - "description": "Enables the open command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-open", - "markdownDescription": "Enables the open command without any pre-configured scope." - }, - { - "description": "Enables the spawn command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-spawn", - "markdownDescription": "Enables the spawn command without any pre-configured scope." - }, - { - "description": "Enables the stdin_write command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-stdin-write", - "markdownDescription": "Enables the stdin_write command without any pre-configured scope." - }, - { - "description": "Denies the execute command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-execute", - "markdownDescription": "Denies the execute command without any pre-configured scope." - }, - { - "description": "Denies the kill command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-kill", - "markdownDescription": "Denies the kill command without any pre-configured scope." - }, - { - "description": "Denies the open command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-open", - "markdownDescription": "Denies the open command without any pre-configured scope." - }, - { - "description": "Denies the spawn command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-spawn", - "markdownDescription": "Denies the spawn command without any pre-configured scope." - }, - { - "description": "Denies the stdin_write command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-stdin-write", - "markdownDescription": "Denies the stdin_write command without any pre-configured scope." } ] }, @@ -2863,50 +2521,6 @@ ] } ] - }, - "ShellScopeEntryAllowedArg": { - "description": "A command argument allowed to be executed by the webview API.", - "anyOf": [ - { - "description": "A non-configurable argument that is passed to the command in the order it was specified.", - "type": "string" - }, - { - "description": "A variable that is set while calling the command from the webview API.", - "type": "object", - "required": [ - "validator" - ], - "properties": { - "raw": { - "description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.", - "default": false, - "type": "boolean" - }, - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ", - "type": "string" - } - }, - "additionalProperties": false - } - ] - }, - "ShellScopeEntryAllowedArgs": { - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellScopeEntryAllowedArg" - } - } - ] } } } \ No newline at end of file diff --git a/apps/gui/src-tauri/gen/schemas/windows-schema.json b/apps/gui/src-tauri/gen/schemas/windows-schema.json index 862a165..7ac2b79 100644 --- a/apps/gui/src-tauri/gen/schemas/windows-schema.json +++ b/apps/gui/src-tauri/gen/schemas/windows-schema.json @@ -134,216 +134,6 @@ "description": "Reference a permission or permission set by identifier and extends its scope.", "type": "object", "allOf": [ - { - "if": { - "properties": { - "identifier": { - "anyOf": [ - { - "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`", - "type": "string", - "const": "shell:default", - "markdownDescription": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`" - }, - { - "description": "Enables the execute command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-execute", - "markdownDescription": "Enables the execute command without any pre-configured scope." - }, - { - "description": "Enables the kill command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-kill", - "markdownDescription": "Enables the kill command without any pre-configured scope." - }, - { - "description": "Enables the open command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-open", - "markdownDescription": "Enables the open command without any pre-configured scope." - }, - { - "description": "Enables the spawn command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-spawn", - "markdownDescription": "Enables the spawn command without any pre-configured scope." - }, - { - "description": "Enables the stdin_write command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-stdin-write", - "markdownDescription": "Enables the stdin_write command without any pre-configured scope." - }, - { - "description": "Denies the execute command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-execute", - "markdownDescription": "Denies the execute command without any pre-configured scope." - }, - { - "description": "Denies the kill command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-kill", - "markdownDescription": "Denies the kill command without any pre-configured scope." - }, - { - "description": "Denies the open command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-open", - "markdownDescription": "Denies the open command without any pre-configured scope." - }, - { - "description": "Denies the spawn command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-spawn", - "markdownDescription": "Denies the spawn command without any pre-configured scope." - }, - { - "description": "Denies the stdin_write command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-stdin-write", - "markdownDescription": "Denies the stdin_write command without any pre-configured scope." - } - ] - } - } - }, - "then": { - "properties": { - "allow": { - "items": { - "title": "ShellScopeEntry", - "description": "Shell scope entry.", - "anyOf": [ - { - "type": "object", - "required": [ - "cmd", - "name" - ], - "properties": { - "args": { - "description": "The allowed arguments for the command execution.", - "allOf": [ - { - "$ref": "#/definitions/ShellScopeEntryAllowedArgs" - } - ] - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "type": "string" - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "name", - "sidecar" - ], - "properties": { - "args": { - "description": "The allowed arguments for the command execution.", - "allOf": [ - { - "$ref": "#/definitions/ShellScopeEntryAllowedArgs" - } - ] - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, - "sidecar": { - "description": "If this command is a sidecar command.", - "type": "boolean" - } - }, - "additionalProperties": false - } - ] - } - }, - "deny": { - "items": { - "title": "ShellScopeEntry", - "description": "Shell scope entry.", - "anyOf": [ - { - "type": "object", - "required": [ - "cmd", - "name" - ], - "properties": { - "args": { - "description": "The allowed arguments for the command execution.", - "allOf": [ - { - "$ref": "#/definitions/ShellScopeEntryAllowedArgs" - } - ] - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "type": "string" - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "name", - "sidecar" - ], - "properties": { - "args": { - "description": "The allowed arguments for the command execution.", - "allOf": [ - { - "$ref": "#/definitions/ShellScopeEntryAllowedArgs" - } - ] - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, - "sidecar": { - "description": "If this command is a sidecar command.", - "type": "boolean" - } - }, - "additionalProperties": false - } - ] - } - } - } - }, - "properties": { - "identifier": { - "description": "Identifier of the permission or permission set.", - "allOf": [ - { - "$ref": "#/definitions/Identifier" - } - ] - } - } - }, { "properties": { "identifier": { @@ -2426,72 +2216,6 @@ "const": "core:window:deny-unminimize", "markdownDescription": "Denies the unminimize command without any pre-configured scope." }, - { - "description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`", - "type": "string", - "const": "dialog:default", - "markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`" - }, - { - "description": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)", - "type": "string", - "const": "dialog:allow-ask", - "markdownDescription": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)" - }, - { - "description": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)", - "type": "string", - "const": "dialog:allow-confirm", - "markdownDescription": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)" - }, - { - "description": "Enables the message command without any pre-configured scope.", - "type": "string", - "const": "dialog:allow-message", - "markdownDescription": "Enables the message command without any pre-configured scope." - }, - { - "description": "Enables the open command without any pre-configured scope.", - "type": "string", - "const": "dialog:allow-open", - "markdownDescription": "Enables the open command without any pre-configured scope." - }, - { - "description": "Enables the save command without any pre-configured scope.", - "type": "string", - "const": "dialog:allow-save", - "markdownDescription": "Enables the save command without any pre-configured scope." - }, - { - "description": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)", - "type": "string", - "const": "dialog:deny-ask", - "markdownDescription": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)" - }, - { - "description": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)", - "type": "string", - "const": "dialog:deny-confirm", - "markdownDescription": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)" - }, - { - "description": "Denies the message command without any pre-configured scope.", - "type": "string", - "const": "dialog:deny-message", - "markdownDescription": "Denies the message command without any pre-configured scope." - }, - { - "description": "Denies the open command without any pre-configured scope.", - "type": "string", - "const": "dialog:deny-open", - "markdownDescription": "Denies the open command without any pre-configured scope." - }, - { - "description": "Denies the save command without any pre-configured scope.", - "type": "string", - "const": "dialog:deny-save", - "markdownDescription": "Denies the save command without any pre-configured scope." - }, { "description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`", "type": "string", @@ -2701,72 +2425,6 @@ "type": "string", "const": "notification:deny-show", "markdownDescription": "Denies the show command without any pre-configured scope." - }, - { - "description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`", - "type": "string", - "const": "shell:default", - "markdownDescription": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`" - }, - { - "description": "Enables the execute command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-execute", - "markdownDescription": "Enables the execute command without any pre-configured scope." - }, - { - "description": "Enables the kill command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-kill", - "markdownDescription": "Enables the kill command without any pre-configured scope." - }, - { - "description": "Enables the open command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-open", - "markdownDescription": "Enables the open command without any pre-configured scope." - }, - { - "description": "Enables the spawn command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-spawn", - "markdownDescription": "Enables the spawn command without any pre-configured scope." - }, - { - "description": "Enables the stdin_write command without any pre-configured scope.", - "type": "string", - "const": "shell:allow-stdin-write", - "markdownDescription": "Enables the stdin_write command without any pre-configured scope." - }, - { - "description": "Denies the execute command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-execute", - "markdownDescription": "Denies the execute command without any pre-configured scope." - }, - { - "description": "Denies the kill command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-kill", - "markdownDescription": "Denies the kill command without any pre-configured scope." - }, - { - "description": "Denies the open command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-open", - "markdownDescription": "Denies the open command without any pre-configured scope." - }, - { - "description": "Denies the spawn command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-spawn", - "markdownDescription": "Denies the spawn command without any pre-configured scope." - }, - { - "description": "Denies the stdin_write command without any pre-configured scope.", - "type": "string", - "const": "shell:deny-stdin-write", - "markdownDescription": "Denies the stdin_write command without any pre-configured scope." } ] }, @@ -2863,50 +2521,6 @@ ] } ] - }, - "ShellScopeEntryAllowedArg": { - "description": "A command argument allowed to be executed by the webview API.", - "anyOf": [ - { - "description": "A non-configurable argument that is passed to the command in the order it was specified.", - "type": "string" - }, - { - "description": "A variable that is set while calling the command from the webview API.", - "type": "object", - "required": [ - "validator" - ], - "properties": { - "raw": { - "description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.", - "default": false, - "type": "boolean" - }, - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ", - "type": "string" - } - }, - "additionalProperties": false - } - ] - }, - "ShellScopeEntryAllowedArgs": { - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellScopeEntryAllowedArg" - } - } - ] } } } \ No newline at end of file diff --git a/apps/gui/src-tauri/src/background.rs b/apps/gui/src-tauri/src/background.rs new file mode 100644 index 0000000..3da1c0e --- /dev/null +++ b/apps/gui/src-tauri/src/background.rs @@ -0,0 +1,70 @@ +//! Looking for updates while the app sits in the tray. +//! +//! The interval in Settings was saved and shown, and nothing ever looked at +//! it. This is what does: every so often it asks the window to scan again, and +//! the scan command shows a notification when it found something. + +use std::time::{Duration, Instant}; + +use tauri::{AppHandle, Emitter, Manager}; + +use crate::state::AppState; + +/// How often to check whether a scan is due. Short, so that a changed setting +/// and a computer waking from sleep are noticed soon. +const TICK: Duration = Duration::from_secs(60); + +pub fn start(app: AppHandle) { + tauri::async_runtime::spawn(async move { + // The window scans when it opens; the first round starts from there. + let mut last = Instant::now(); + loop { + tokio::time::sleep(TICK).await; + let state = app.state::(); + let due = is_due( + last.elapsed(), + state.config().scan_interval_hours, + state.is_applying(), + odysync_core::platform::power_source().allows_background_work(), + ); + if due { + last = Instant::now(); + state.mark_background_scan(); + let _ = app.emit("background-scan", ()); + } + } + }); +} + +/// Whether a background scan should start now. An interval of 0 means the user +/// wants to start scans themselves. +fn is_due(since: Duration, interval_hours: u32, applying: bool, on_mains: bool) -> bool { + interval_hours > 0 + && since >= Duration::from_secs(u64::from(interval_hours) * 3600) + && !applying + && on_mains +} + +#[cfg(test)] +mod tests { + use super::*; + + const HOUR: Duration = Duration::from_secs(3600); + + #[test] + fn a_scan_is_due_after_the_interval_and_not_before() { + assert!(is_due(6 * HOUR, 6, false, true)); + assert!(!is_due(5 * HOUR, 6, false, true)); + } + + #[test] + fn manual_only_means_never() { + assert!(!is_due(1000 * HOUR, 0, false, true)); + } + + #[test] + fn not_while_installing_and_not_on_battery() { + assert!(!is_due(6 * HOUR, 6, true, true)); + assert!(!is_due(6 * HOUR, 6, false, false)); + } +} diff --git a/apps/gui/src-tauri/src/commands.rs b/apps/gui/src-tauri/src/commands.rs index 85a7584..fff269e 100644 --- a/apps/gui/src-tauri/src/commands.rs +++ b/apps/gui/src-tauri/src/commands.rs @@ -174,6 +174,7 @@ pub struct ApplyEntryDto { pub struct ApplyRequest { pub updates: Vec, pub dry_run: bool, + /// Decides for this run; the setting is where the checkbox starts from. pub restore_point: bool, } @@ -243,9 +244,7 @@ pub struct ConfigDto { pub profiles: Vec, pub restore_point: bool, pub scan_interval_hours: u32, - pub concurrency: u32, pub proxy_url: Option, - pub auto_apply: bool, pub notifications: bool, pub max_retries: u32, pub backend_timeout_secs: u32, @@ -281,9 +280,7 @@ impl From<&Config> for ConfigDto { .collect(), restore_point: c.restore_point, scan_interval_hours: c.scan_interval_hours, - concurrency: c.concurrency, proxy_url: c.proxy_url.clone(), - auto_apply: c.auto_apply, notifications: c.notifications, max_retries: c.max_retries, backend_timeout_secs: c.backend_timeout_secs, @@ -309,9 +306,7 @@ impl ConfigDto { config.enabled_backends = self.enabled_backends; config.restore_point = self.restore_point; config.scan_interval_hours = self.scan_interval_hours.min(24 * 7); - config.concurrency = self.concurrency.clamp(1, 16); config.proxy_url = self.proxy_url.filter(|s| !s.trim().is_empty()); - config.auto_apply = self.auto_apply; config.notifications = self.notifications; config.max_retries = self.max_retries.min(10); config.backend_timeout_secs = self.backend_timeout_secs.clamp(10, 3600); @@ -337,28 +332,33 @@ fn backend_kind_from_str(s: &str) -> Option { // ── Tauri commands ─────────────────────────────────────────────────────────── #[tauri::command] -pub async fn scan(state: State<'_, AppState>) -> Result { +pub async fn scan(app: AppHandle, state: State<'_, AppState>) -> Result { let config = state.config(); + let (cancel, generation) = state.begin_scan(); let probed = state.probed_backends().await; - let usable: Vec<_> = probed.iter().filter(|p| p.usable()).collect(); + let usable: Vec<&dyn odysync_core::backend::Backend> = probed + .iter() + .filter(|p| p.usable()) + .map(|p| p.backend.as_ref()) + .collect(); tracing::info!(backends = usable.len(), "starting scan"); - let results = futures::future::join_all(usable.iter().map(|p| async { - let kind_id = p.backend.kind().id().to_string(); - (kind_id, p.backend.scan().await) - })) - .await; + let limit = std::time::Duration::from_secs(u64::from(config.backend_timeout_secs.max(10))); + let emit = |p: odysync_backends::scan::ScanProgress| { + let _ = app.emit("scan-progress", &p); + }; + let results = odysync_backends::scan::scan_sources(&usable, limit, &cancel, &emit).await; let mut actionable = Vec::new(); let mut skipped = Vec::new(); let mut failed_backends = Vec::new(); let mut cache = crate::state::ScanCache::new(); - for (kind_id, result) in results { - let candidates = match result { + for source in results { + let kind_id = source.kind.id().to_string(); + let candidates = match source.result { Ok(c) => c, Err(e) => { - tracing::warn!(backend = %kind_id, error = %e, "scan failed"); failed_backends.push(BackendErrorDto { backend: kind_id, error: e.sanitize(), @@ -392,7 +392,7 @@ pub async fn scan(state: State<'_, AppState>) -> Result { } } - state.replace_scan_cache(cache); + state.adopt_scan(cache, generation); let total = actionable.len() + skipped.len(); tracing::info!( @@ -402,6 +402,9 @@ pub async fn scan(state: State<'_, AppState>) -> Result { failed = failed_backends.len(), "scan complete" ); + if state.take_background_scan() && config.notifications && !actionable.is_empty() { + announce_updates(&app, actionable.len()); + } Ok(ScanResult { actionable, skipped, @@ -410,12 +413,61 @@ pub async fn scan(state: State<'_, AppState>) -> Result { }) } +/// Stop the running scan. What has answered so far is kept. +#[tauri::command] +pub async fn cancel_scan(state: State<'_, AppState>) -> Result<(), String> { + state.cancel_scan(); + Ok(()) +} + +/// Stop installing after the package in progress. +#[tauri::command] +pub async fn cancel_apply(state: State<'_, AppState>) -> Result<(), String> { + state.cancel_apply(); + Ok(()) +} + +/// Tell the user about updates a background scan found, unless they are +/// looking at the window that already shows them. +fn announce_updates(app: &AppHandle, count: usize) { + use tauri::Manager; + use tauri_plugin_notification::NotificationExt; + + let looking = app + .get_webview_window("main") + .is_some_and(|w| w.is_visible().unwrap_or(false) && w.is_focused().unwrap_or(false)); + if looking { + return; + } + let body = if count == 1 { + "1 update is ready to install.".to_string() + } else { + format!("{count} updates are ready to install.") + }; + if let Err(e) = app + .notification() + .builder() + .title("Odysync") + .body(body) + .show() + { + tracing::warn!(error = %e, "could not show a notification"); + } +} + #[tauri::command] pub async fn apply( app: AppHandle, request: ApplyRequest, state: State<'_, AppState>, ) -> Result { + let _claim = state.claim_apply()?; + // The scheduler and a terminal are separate processes. + let _lock = if request.dry_run { + None + } else { + Some(odysync_core::ApplyLock::acquire().map_err(|e| e.to_string())?) + }; tracing::info!( count = request.updates.len(), dry_run = request.dry_run, @@ -472,7 +524,9 @@ pub async fn apply( let plan = config.policy.plan(candidates_to_apply); - let mut runner = Runner::new(backends, request.dry_run).with_max_retries(config.max_retries); + let mut runner = Runner::new(backends, request.dry_run) + .with_max_retries(config.max_retries) + .with_cancel(state.cancel_flag()); if !request.dry_run { // Record what happened so the History page has something to show. runner = runner.with_history(odysync_core::history::UpdateHistory::load()); @@ -481,12 +535,7 @@ pub async fn apply( let emitter = TauriProgressEmitter { app: app.clone() }; let mut report = RunReport::new(); runner - .run_with_progress( - &plan, - &mut report, - request.restore_point || config.restore_point, - Some(&emitter), - ) + .run_with_progress(&plan, &mut report, request.restore_point, Some(&emitter)) .await; let entries: Vec = report @@ -513,7 +562,7 @@ pub async fn apply( // Anything applied invalidates the scan; let every page know. if !request.dry_run { - state.replace_scan_cache(crate::state::ScanCache::new()); + state.forget_scans(); let _ = app.emit("apply-finished", ()); } @@ -599,7 +648,9 @@ pub async fn unhold(request: HoldRequest, state: State<'_, AppState>) -> Result< return Err(format!("unknown backend: {}", request.backend)); }; let id = PackageId::new(kind, request.id); - config.policy.holds.retain(|h| h.package != id.to_string()); + if config.policy.release(&id) == 0 { + return Err(format!("{id} is not held")); + } state.save_config(config).map_err(|e| e.to_string()) } @@ -734,23 +785,6 @@ pub async fn get_system_info(state: State<'_, AppState>) -> Result, -) -> Result { - let result = scan(state).await?; - - if !result.actionable.is_empty() { - let _ = app.emit( - "updates-available", - serde_json::json!({ "count": result.actionable.len() }), - ); - } - - Ok(result) -} - // ── Update History ─────────────────────────────────────────────────────────── #[derive(Serialize)] @@ -1133,15 +1167,27 @@ pub async fn verify_offline_cache() -> Result, String> { // ── App lifecycle ──────────────────────────────────────────────────────────── +/// Leave the app. Refused while an update is being installed, unless `force`: +/// ending in the middle of an installer is how programs end up half installed. #[tauri::command] -pub async fn quit_app(app: AppHandle) -> Result<(), String> { - tracing::info!("user requested quit, exiting application"); +pub async fn quit_app( + app: AppHandle, + state: State<'_, AppState>, + force: bool, +) -> Result<(), String> { + if state.is_applying() && !force { + return Err(crate::state::APPLY_RUNNING.to_string()); + } + tracing::info!(force, "user requested quit, exiting application"); app.exit(0); Ok(()) } #[tauri::command] -pub async fn restart_as_admin(app: AppHandle) -> Result<(), String> { +pub async fn restart_as_admin(app: AppHandle, state: State<'_, AppState>) -> Result<(), String> { + if state.is_applying() { + return Err(crate::state::APPLY_RUNNING.to_string()); + } #[cfg(windows)] { use std::ffi::OsStr; @@ -1272,10 +1318,12 @@ pub async fn security_scan(app: AppHandle) -> Result, + pub tamper_protection: Option, + pub antivirus_enabled: Option, + pub signature_age_days: Option, pub signature_version: String, pub last_quick_scan: Option, pub last_full_scan: Option, @@ -1301,14 +1349,15 @@ pub async fn get_defender_status() -> Result { .map_err(|e| e.to_string())?; let s = snapshot.status.unwrap_or_default(); - // Defender reports ages in days, and "unknown" as an absent field. Treat - // absent as 0 rather than as stale so a machine we cannot read is not - // painted red on a guess. + // Ages come in days, "never" as `u32::MAX` and "unknown" as an absent + // field. Ok(DefenderStatusDto { - real_time_protection: s.real_time_protection_enabled.unwrap_or(false), - tamper_protection: s.is_tamper_protected.unwrap_or(false), - antivirus_enabled: s.antivirus_enabled.unwrap_or(false), - signature_age_days: s.antivirus_signature_age.unwrap_or(0).max(0) as u32, + real_time_protection: s.real_time_protection_enabled, + tamper_protection: s.is_tamper_protected, + antivirus_enabled: s.antivirus_enabled, + signature_age_days: s + .antivirus_signature_age + .and_then(|d| u32::try_from(d.max(0)).ok()), signature_version: s.antivirus_signature_version.unwrap_or_default(), last_quick_scan: describe_scan_age(s.quick_scan_age), last_full_scan: describe_scan_age(s.full_scan_age), @@ -1772,9 +1821,7 @@ mod tests { "enabled_backends": ["winget"], "restore_point": false, "scan_interval_hours": 6, - "concurrency": 99, "proxy_url": " ", - "auto_apply": true, "notifications": false, "max_retries": 3, "backend_timeout_secs": 5 @@ -1791,7 +1838,6 @@ mod tests { assert!(!config.skip_prerelease, "kept in sync with stable_only"); assert_eq!(config.disabled_backends, vec!["scoop".to_string()]); assert_eq!(config.enabled_backends, vec!["winget".to_string()]); - assert_eq!(config.concurrency, 16, "clamped to the supported range"); assert_eq!(config.backend_timeout_secs, 10, "clamped to the minimum"); assert_eq!(config.proxy_url, None, "blank proxy becomes None"); assert_eq!(config.scan_interval_hours, 6); @@ -1808,9 +1854,7 @@ mod tests { "profiles", "restore_point", "scan_interval_hours", - "concurrency", "proxy_url", - "auto_apply", "notifications", "max_retries", "backend_timeout_secs", diff --git a/apps/gui/src-tauri/src/lib.rs b/apps/gui/src-tauri/src/lib.rs index 4d22919..4e9e038 100644 --- a/apps/gui/src-tauri/src/lib.rs +++ b/apps/gui/src-tauri/src/lib.rs @@ -1,3 +1,4 @@ +mod background; mod commands; mod state; mod tools; @@ -32,12 +33,11 @@ pub fn run() { .init(); tauri::Builder::default() - .plugin(tauri_plugin_shell::init()) .plugin(tauri_plugin_notification::init()) - .plugin(tauri_plugin_dialog::init()) .manage(state::AppState::new()) .setup(|app| { tray::setup(app.handle())?; + background::start(app.handle().clone()); // Launched by the Windows "Run" key with --minimized: stay in the // tray instead of stealing focus during login. @@ -59,7 +59,9 @@ pub fn run() { }) .invoke_handler(tauri::generate_handler![ commands::scan, + commands::cancel_scan, commands::apply, + commands::cancel_apply, commands::list_backends, commands::refresh_backends, commands::get_config, @@ -74,7 +76,6 @@ pub fn run() { commands::create_diagnostics, commands::get_system_info, commands::report_frontend_error, - commands::background_scan, commands::get_update_history, commands::clear_update_history, commands::get_hardware_info, diff --git a/apps/gui/src-tauri/src/state.rs b/apps/gui/src-tauri/src/state.rs index 4dc5dcd..44df726 100644 --- a/apps/gui/src-tauri/src/state.rs +++ b/apps/gui/src-tauri/src/state.rs @@ -1,6 +1,8 @@ +use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Mutex, MutexGuard}; use odysync_backends::ProbedBackend; +use odysync_backends::scan::ScanCancel; use odysync_core::config::Config; use odysync_core::model::UpdateCandidate; @@ -19,6 +21,30 @@ pub struct AppState { /// process spawn each (~36 on Windows, several of them PowerShell/CIM), so /// it is done once and reused until explicitly invalidated. backends: tokio::sync::Mutex>>>, + /// Set while updates are being installed. + applying: AtomicBool, + /// Asks the running install to stop after the current package. + cancel_apply: Arc, + /// The scan in progress, so that it can be stopped. + scan: Mutex>, + /// Counts installs that changed the machine. A scan that started before + /// one of them describes a state that is gone. + generation: std::sync::atomic::AtomicU64, + /// The next scan was started by the timer, not by a person. + background_scan: AtomicBool, +} + +/// What the app answers when something must wait for an install to end. The +/// front-end recognises it by this exact text. +pub const APPLY_RUNNING: &str = "apply-running"; + +/// Held while updates are being installed; releases the claim when dropped. +pub struct ApplyClaim<'a>(&'a AppState); + +impl Drop for ApplyClaim<'_> { + fn drop(&mut self) { + self.0.applying.store(false, Ordering::Release); + } } /// Lock a mutex, recovering from poisoning. @@ -33,9 +59,13 @@ fn lock(m: &Mutex) -> MutexGuard<'_, T> { impl AppState { pub fn new() -> Self { - let path = - Config::default_path().unwrap_or_else(|_| std::path::PathBuf::from("config.json")); + Self::with_config( + Config::default_path().unwrap_or_else(|_| std::path::PathBuf::from("config.json")), + ) + } + /// The state for the config file at `path`. + pub fn with_config(path: std::path::PathBuf) -> Self { let (config, config_load_error) = match Config::load(&path) { Ok(c) => (c, None), Err(e) => { @@ -58,15 +88,82 @@ impl AppState { } }; + odysync_backends::direct::http::set_proxy(config.proxy_url.as_deref()); + Self { config: Mutex::new(config), config_path: path, config_load_error, scan_cache: Mutex::new(ScanCache::new()), backends: tokio::sync::Mutex::new(None), + applying: AtomicBool::new(false), + cancel_apply: Arc::new(AtomicBool::new(false)), + scan: Mutex::new(None), + generation: std::sync::atomic::AtomicU64::new(0), + background_scan: AtomicBool::new(false), + } + } + + /// Whether updates are being installed right now. + pub fn is_applying(&self) -> bool { + self.applying.load(Ordering::Acquire) + } + + /// Claim the right to install, which only one run has at a time. + pub fn claim_apply(&self) -> Result, String> { + if self.applying.swap(true, Ordering::AcqRel) { + return Err(APPLY_RUNNING.to_string()); + } + self.cancel_apply.store(false, Ordering::Relaxed); + Ok(ApplyClaim(self)) + } + + /// The flag the running install watches. + pub fn cancel_flag(&self) -> Arc { + Arc::clone(&self.cancel_apply) + } + + pub fn cancel_apply(&self) { + self.cancel_apply.store(true, Ordering::Relaxed); + } + + /// Register a scan that is about to start. + pub fn begin_scan(&self) -> (ScanCancel, u64) { + let cancel = ScanCancel::new(); + *lock(&self.scan) = Some(cancel.clone()); + (cancel, self.generation.load(Ordering::Acquire)) + } + + pub fn cancel_scan(&self) { + if let Some(scan) = lock(&self.scan).as_ref() { + scan.cancel(); } } + /// Adopt what a scan found, unless something was installed meanwhile. + pub fn adopt_scan(&self, cache: ScanCache, generation: u64) { + let mut slot = lock(&self.scan_cache); + if self.generation.load(Ordering::Acquire) == generation { + *slot = cache; + } + } + + /// Something was installed: what scans found so far no longer holds. + pub fn forget_scans(&self) { + let mut slot = lock(&self.scan_cache); + self.generation.fetch_add(1, Ordering::AcqRel); + slot.clear(); + } + + pub fn mark_background_scan(&self) { + self.background_scan.store(true, Ordering::Relaxed); + } + + /// Whether the scan that just ended was the timer's; asking resets it. + pub fn take_background_scan(&self) -> bool { + self.background_scan.swap(false, Ordering::Relaxed) + } + /// A snapshot of the current config. pub fn config(&self) -> Config { lock(&self.config).clone() @@ -83,6 +180,7 @@ impl AppState { /// what the UI shows still matches what is on disk. pub fn save_config(&self, config: Config) -> odysync_core::error::Result<()> { config.save(&self.config_path)?; + odysync_backends::direct::http::set_proxy(config.proxy_url.as_deref()); self.set_config(config); Ok(()) } @@ -91,10 +189,6 @@ impl AppState { lock(&self.scan_cache).clone() } - pub fn replace_scan_cache(&self, cache: ScanCache) { - *lock(&self.scan_cache) = cache; - } - /// Probe results for every compiled-in backend, probing on first use. pub async fn probed_backends(&self) -> Arc> { let mut slot = self.backends.lock().await; @@ -120,3 +214,49 @@ impl Default for AppState { Self::new() } } + +#[cfg(test)] +mod tests { + use super::*; + + /// Never the real config file: an unreadable one would be moved aside. + fn state() -> AppState { + AppState::with_config(std::env::temp_dir().join("odysync-no-such-config.json")) + } + + #[test] + fn only_one_install_at_a_time() { + let state = state(); + let first = state.claim_apply().expect("free"); + assert!(state.is_applying()); + assert_eq!(state.claim_apply().err().as_deref(), Some(APPLY_RUNNING)); + drop(first); + assert!(!state.is_applying()); + assert!(state.claim_apply().is_ok()); + } + + #[test] + fn a_new_install_starts_uncancelled() { + let state = state(); + state.cancel_apply(); + let _claim = state.claim_apply().expect("free"); + assert!(!state.cancel_flag().load(Ordering::Relaxed)); + state.cancel_apply(); + assert!(state.cancel_flag().load(Ordering::Relaxed)); + } + + /// A scan that was already running when something was installed would + /// otherwise bring back the list from before. + #[test] + fn a_scan_from_before_an_install_is_dropped() { + let state = state(); + let found = || ScanCache::from([("direct".to_string(), Vec::new())]); + let (_, generation) = state.begin_scan(); + state.forget_scans(); + state.adopt_scan(found(), generation); + assert!(state.scan_cache().is_empty()); + let (_, generation) = state.begin_scan(); + state.adopt_scan(found(), generation); + assert_eq!(state.scan_cache().len(), 1); + } +} diff --git a/apps/gui/src-tauri/src/tray.rs b/apps/gui/src-tauri/src/tray.rs index 2b0b6ee..69c2355 100644 --- a/apps/gui/src-tauri/src/tray.rs +++ b/apps/gui/src-tauri/src/tray.rs @@ -4,12 +4,23 @@ //! When the window is closed, the app continues running in the tray //! so scheduled background scans can still notify the user. +use crate::state::AppState; + use tauri::{ AppHandle, Emitter, Manager, menu::{Menu, MenuItem}, tray::TrayIconBuilder, }; +/// Bring the window back, also when it is minimised. +fn show_window(app: &AppHandle) { + if let Some(window) = app.get_webview_window("main") { + let _ = window.unminimize(); + let _ = window.show(); + let _ = window.set_focus(); + } +} + pub fn setup(app: &AppHandle) -> tauri::Result<()> { let show = MenuItem::with_id(app, "show", "Show Odysync", true, None::<&str>)?; let scan = MenuItem::with_id(app, "scan", "Scan for Updates", true, None::<&str>)?; @@ -23,20 +34,20 @@ pub fn setup(app: &AppHandle) -> tauri::Result<()> { .menu(&menu) .on_menu_event(|app, event| match event.id.as_ref() { "show" => { - if let Some(window) = app.get_webview_window("main") { - let _ = window.show(); - let _ = window.set_focus(); - } + show_window(app); } "scan" => { - if let Some(window) = app.get_webview_window("main") { - let _ = window.show(); - let _ = window.set_focus(); - let _ = window.emit("tray-scan", ()); - } + show_window(app); + let _ = app.emit("tray-scan", ()); } "quit" => { - app.exit(0); + // While something is being installed the window asks first. + if app.state::().is_applying() { + show_window(app); + let _ = app.emit("tray-quit", ()); + } else { + app.exit(0); + } } _ => {} }) diff --git a/apps/gui/src/App.tsx b/apps/gui/src/App.tsx index e63b04f..2736826 100644 --- a/apps/gui/src/App.tsx +++ b/apps/gui/src/App.tsx @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useMemo, useState } from "react"; +import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { getCurrentWindow } from "@tauri-apps/api/window"; import { AlertTriangle, @@ -14,13 +14,17 @@ import { X, } from "lucide-react"; import * as api from "./api"; -import { StoreProvider, useStore } from "./store"; +import { StoreProvider } from "./store"; +import { useStore } from "./store-context"; import { MORE_TOOLS, NAV_GROUPS, NAV_ITEMS, TABS, isTab, type NavItem, type Tab } from "./nav"; import { safeListen } from "./events"; import { inTauri } from "./bridge"; import { useTheme } from "./theme"; import { ErrorBoundary } from "./components/ErrorBoundary"; import { Logo } from "./components/Logo"; +import { ProgressAnnouncer } from "./components/Progress"; +import { Button, ConfirmBar, ErrorBar } from "./components/ui"; +import { errorText, isApplyRunning } from "./format"; import Dashboard from "./pages/Dashboard"; import Updates from "./pages/Updates"; @@ -92,16 +96,39 @@ function Shell() { const navigate = useCallback((next: Tab) => setTab(next), []); + // While an update is being installed the page shows that instead; a fresh + // scan follows on its own. const refreshScan = store.scan.refresh; + const applying = store.apply.running; useEffect( () => safeListen("tray-scan", () => { setTab("updates"); - void refreshScan(); + if (!applying) void refreshScan(); }), - [refreshScan], + [refreshScan, applying], ); + // Quitting in the middle of an install can leave a program half installed, + // so the command refuses and the user is asked, with staying as the default. + const [askQuit, setAskQuit] = useState(false); + const [windowError, setWindowError] = useState(null); + const quit = useCallback((force: boolean) => { + setWindowError(null); + setAskQuit(false); + api.quitApp(force).catch((e: unknown) => { + if (isApplyRunning(e) && !force) setAskQuit(true); + else setWindowError(`Odysync could not quit: ${errorText(e)}`); + }); + }, []); + useEffect(() => safeListen("tray-quit", () => setAskQuit(true)), []); + const restartAsAdmin = useCallback(() => { + setWindowError(null); + api + .restartAsAdmin() + .catch((e: unknown) => setWindowError(`Not restarted as administrator. ${errorText(e)}`)); + }, []); + // Ctrl+R refreshes the data rather than reloading the webview — a reload in a // Tauri window discards every page's state and re-runs the whole startup load. const refreshAll = store.refreshAll; @@ -152,10 +179,20 @@ function Shell() { onToggleSidebar={() => setSidebarOpen((v) => !v)} theme={theme.resolved} onToggleTheme={() => theme.setChoice(theme.resolved === "dark" ? "light" : "dark")} + onQuit={() => quit(false)} + onRestartAsAdmin={restartAsAdmin} /> + {store.booting && ( -
+
)} + {askQuit && ( +
+ setAskQuit(false)} + onConfirm={() => quit(true)} + /> +
+ )} + {windowError && ( +
+ setWindowError(null)}> + Dismiss + + } + /> +
+ )} + {/* A config file we could not parse is worth interrupting for: the app is running on defaults, and the user's holds are in the .corrupt backup. */} {info?.config_error && ( @@ -206,6 +267,8 @@ function TitleBar({ onToggleSidebar, theme, onToggleTheme, + onQuit, + onRestartAsAdmin, }: { frameless: boolean; macOverlay: boolean; @@ -218,14 +281,17 @@ function TitleBar({ onToggleSidebar: () => void; theme: "light" | "dark"; onToggleTheme: () => void; + onQuit: () => void; + onRestartAsAdmin: () => void; }) { // Resolved lazily and defensively: `getCurrentWindow` throws outside a Tauri // webview, and a throw here used to blank the entire window. const windowAction = (action: "minimize" | "toggleMaximize") => { + const failed = (e: unknown) => console.error(`[odysync] ${action} failed:`, e); try { - void getCurrentWindow()[action](); + getCurrentWindow()[action]().catch(failed); } catch (e) { - console.error(`[odysync] ${action} failed:`, e); + failed(e); } }; @@ -240,6 +306,7 @@ function TitleBar({ {sidebarOpen ? : } @@ -261,7 +328,7 @@ function TitleBar({ {!elevated && platform === "windows" && (
@@ -293,12 +360,15 @@ function IconButton({ children, disabled, danger, + expanded, }: { label: string; onClick: () => void; children: React.ReactNode; disabled?: boolean; danger?: boolean; + /** For a button that opens and closes something. */ + expanded?: boolean; }) { return ( diff --git a/apps/gui/src/components/FirmwareWarning.tsx b/apps/gui/src/components/FirmwareWarning.tsx new file mode 100644 index 0000000..2d93560 --- /dev/null +++ b/apps/gui/src/components/FirmwareWarning.tsx @@ -0,0 +1,9 @@ +/** What to know before a run that includes firmware, wherever it is started. */ +export function FirmwareWarning() { + return ( + <> + Your selection includes firmware or BIOS updates. Keep the machine on mains power and do not + shut it down while they run: an interrupted firmware update can leave a device unbootable. + + ); +} diff --git a/apps/gui/src/components/OutcomeIcon.tsx b/apps/gui/src/components/OutcomeIcon.tsx new file mode 100644 index 0000000..afa0191 --- /dev/null +++ b/apps/gui/src/components/OutcomeIcon.tsx @@ -0,0 +1,28 @@ +import { CheckCircle2, Clock, XCircle } from "lucide-react"; +import type { ApplyStatus } from "../types"; + +const WORDS: Record = { + updated: "Updated", + "did-not-converge": "Failed", + "verification-failed": "Failed", + failed: "Failed", + skipped: "Skipped", +}; + +/** How an update went, as an icon for the eye and a word for a screen reader. */ +export function OutcomeIcon({ status }: { status: ApplyStatus }) { + const icon = + status === "updated" ? ( + + ) : status === "skipped" ? ( + + ) : ( + + ); + return ( + + {icon} + {WORDS[status]}: + + ); +} diff --git a/apps/gui/src/components/Progress.tsx b/apps/gui/src/components/Progress.tsx new file mode 100644 index 0000000..3461b74 --- /dev/null +++ b/apps/gui/src/components/Progress.tsx @@ -0,0 +1,143 @@ +/** The running scan and the running install, shown the same on every page. */ + +import { useState } from "react"; +import { X } from "lucide-react"; +import { errorText } from "../format"; +import { nameList } from "../scan-health"; +import { useStore } from "../store-context"; +import { Button, Card, ErrorBar, Meter } from "./ui"; + +/** A cancel button that says so when the cancel itself fails. */ +function CancelButton({ + label, + cancelling, + onCancel, +}: { + label: string; + cancelling: boolean; + onCancel: () => Promise; +}) { + const [error, setError] = useState(null); + return ( +
+ + {error && } +
+ ); +} + +/** "Checked 12 of 21 sources, still waiting for Windows Update". */ +export function ScanProgressView() { + const { scan } = useStore(); + if (!scan.loading) return null; + const p = scan.progress; + const text = + p === null + ? "Starting the check…" + : `Checked ${p.done} of ${p.total} sources${ + p.waiting.length > 0 ? `, still waiting for ${nameList(p.waiting)}` : "" + }`; + return ( +
+
+ {text} + +
+ 0 ? p.done / p.total : 0} + /> +
+ ); +} + +/** What is being installed, with a way to stop after it. */ +export function ApplyProgressView() { + const { apply } = useStore(); + if (!apply.running) return null; + const p = apply.progress; + const text = apply.cancelling + ? p?.package + ? `Finishing ${p.package}, then stopping` + : "Stopping after the current package" + : p?.phase === "done" + ? "Finishing up…" + : p?.package + ? `${apply.dryRun ? "Simulating" : "Installing"} ${p.package}` + : apply.dryRun + ? "Simulating…" + : "Preparing the installation…"; + return ( + +
+ {text} + + {p && p.total > 0 && ( + + {p.current} of {p.total} + + )} + + +
+ 0 ? (p.percent ?? (p.current / p.total) * 100) / 100 : 0} + /> +
+ ); +} + +/** + * Speaks the progress of a scan or an install. Mounted once, outside the + * pages, so it is heard on whichever page is open. + * + * A scan reports dozens of steps; only every quarter is worth interrupting + * somebody for. + */ +export function ProgressAnnouncer() { + const { scan, apply } = useStore(); + let text = ""; + if (apply.running) { + text = apply.cancelling + ? "Stopping after the current package" + : apply.progress?.package + ? `Installing ${apply.progress.package}, ${apply.progress.current} of ${apply.progress.total}` + : "Installing updates"; + } else if (scan.loading) { + const p = scan.progress; + const quarter = p && p.total > 0 ? Math.floor((p.done / p.total) * 4) * 25 : 0; + text = quarter > 0 ? `Checking for updates, ${quarter} percent` : "Checking for updates"; + } else if (scan.health.state === "failed") { + text = "The check for updates failed"; + } else if (scan.data && !scan.fromCache) { + const n = scan.data.actionable.length; + text = + `Check finished, ${n} update${n === 1 ? "" : "s"} ready` + + (scan.health.state === "partial" ? ", some sources could not be checked" : ""); + } + return ( +
+ {text} +
+ ); +} diff --git a/apps/gui/src/components/ui.tsx b/apps/gui/src/components/ui.tsx index d9b4fbf..10c1961 100644 --- a/apps/gui/src/components/ui.tsx +++ b/apps/gui/src/components/ui.tsx @@ -1,9 +1,16 @@ /** Shared presentational building blocks used across every page. */ -import { AlertTriangle, CheckCircle2, Info, Loader2, RefreshCw, Search } from "lucide-react"; -import type { ButtonHTMLAttributes, ReactNode } from "react"; -import { useCountUp } from "../useCountUp"; -import type { Resource } from "../store"; +import { AlertTriangle, CheckCircle2, Info, Loader2, Search } from "lucide-react"; +import { + useEffect, + useId, + useRef, + type ButtonHTMLAttributes, + type KeyboardEvent, + type ReactNode, + type Ref, +} from "react"; +import type { Resource } from "../store-context"; export function PageHeader({ title, @@ -17,7 +24,10 @@ export function PageHeader({ return (
-

{title}

+ {/* Focusable so that navigation can move the focus here. */} +

+ {title} +

{subtitle &&

{subtitle}

}
{actions &&
{actions}
} @@ -28,12 +38,12 @@ export function PageHeader({ type ButtonVariant = "primary" | "secondary" | "ghost" | "danger"; const BUTTON_STYLES: Record = { - primary: "bg-gradient-accent text-white border border-transparent btn-glow", + primary: "bg-gradient-accent text-accent-fg border border-transparent btn-glow", secondary: "bg-surface/70 text-fg border border-line hover:bg-raised hover:border-line-strong backdrop-blur", ghost: "text-muted hover:text-fg hover:bg-raised border border-transparent", danger: - "bg-danger/10 text-danger border border-danger/25 hover:bg-danger/15 hover:border-danger/40", + "bg-danger/10 text-danger border border-danger/25 hover:bg-danger/12 hover:border-danger/40", }; export function Button({ @@ -45,6 +55,7 @@ export function Button({ className = "", ...rest }: ButtonHTMLAttributes & { + ref?: Ref; variant?: ButtonVariant; size?: "sm" | "md" | "lg"; icon?: ReactNode; @@ -63,33 +74,12 @@ export function Button({ disabled={rest.disabled || busy} className={`inline-flex items-center justify-center font-medium whitespace-nowrap transition-colors disabled:opacity-50 disabled:pointer-events-none ${sizing} ${BUTTON_STYLES[variant]} ${className}`} > - {busy ? : icon} + {busy ? : icon} {children} ); } -export function RefreshButton({ - onClick, - spinning, - label = "Refresh", -}: { - onClick: () => void; - spinning?: boolean; - label?: string; -}) { - return ( - - ); -} - type Tone = "neutral" | "accent" | "success" | "warning" | "danger" | "info"; const TONE_BADGE: Record = { @@ -115,10 +105,12 @@ function Notice({ tone, icon, message, + action, }: { tone: Tone; icon: ReactNode; message: ReactNode; + action?: ReactNode; }) { return (
{icon} - {message} +
{message}
+ {action &&
{action}
}
); } -export function ErrorBar({ message }: { message: string }) { - return } message={message} />; +export function ErrorBar({ message, action }: { message: ReactNode; action?: ReactNode }) { + return ( + } + message={message} + action={action} + /> + ); } export function SuccessBar({ message }: { message: string }) { @@ -143,18 +143,27 @@ export function InfoBar({ message }: { message: ReactNode }) { return } message={message} />; } -export function WarningBar({ message }: { message: ReactNode }) { - return } message={message} />; +export function WarningBar({ message, action }: { message: ReactNode; action?: ReactNode }) { + return ( + } + message={message} + action={action} + /> + ); } export function EmptyState({ icon, title, hint, + action, }: { icon: ReactNode; title: string; hint?: string; + action?: ReactNode; }) { return (
@@ -163,11 +172,12 @@ export function EmptyState({

{title}

{hint &&

{hint}

} + {action &&
{action}
}
); } -export function LoadingState({ label }: { label: string }) { +function LoadingState({ label }: { label: string }) { return (
@@ -247,7 +257,7 @@ export function Switch({ disabled={disabled} onClick={() => onChange(!checked)} className={`relative inline-flex h-[22px] w-[38px] flex-shrink-0 items-center rounded-full border transition-colors disabled:opacity-50 ${ - checked ? "bg-gradient-accent border-transparent" : "bg-raised border-line-strong" + checked ? "bg-gradient-accent border-transparent" : "bg-raised border-control" }`} > onChange(e.target.checked)} - className="h-4 w-4 rounded border-line-strong accent-[var(--accent)] cursor-pointer disabled:cursor-default" + className="h-4 w-4 rounded accent-[var(--accent)] cursor-pointer disabled:cursor-default" /> ); } @@ -293,18 +303,42 @@ export function Segmented({ onChange: (v: T) => void; label: string; }) { + // One tab stop for the group; the arrow keys move the choice within it, as + // they do in a group of native radio buttons. + const onKeyDown = (e: KeyboardEvent) => { + const step = + e.key === "ArrowRight" || e.key === "ArrowDown" + ? 1 + : e.key === "ArrowLeft" || e.key === "ArrowUp" + ? -1 + : 0; + if (step === 0 && e.key !== "Home" && e.key !== "End") return; + e.preventDefault(); + const at = options.findIndex((o) => o.value === value); + const next = + e.key === "Home" + ? 0 + : e.key === "End" + ? options.length - 1 + : (Math.max(at, 0) + step + options.length) % options.length; + onChange(options[next].value); + e.currentTarget.querySelectorAll('[role="radio"]')[next]?.focus(); + }; + const chosen = options.some((o) => o.value === value); return (
- {options.map((o) => ( + {options.map((o, i) => ( + +
+
+ ); } diff --git a/apps/gui/src/demo/demo.ts b/apps/gui/src/demo/demo.ts index eeb44a7..925d4a4 100644 --- a/apps/gui/src/demo/demo.ts +++ b/apps/gui/src/demo/demo.ts @@ -3,9 +3,10 @@ * * This is what the README screenshots show and what the component tests run * against, so it is kept realistic: real app names, plausible versions, the - * same shapes the Rust side returns. It never runs inside the app — `bridge` + * same shapes the Rust side returns. It never runs inside the app: `bridge` * imports it only when there is no Tauri IPC. */ +import { emitLocal } from "../events"; import type { ApplyRequest, ApplyResultDto, @@ -19,8 +20,10 @@ import type { HardwareInfoDto, HealthReportDto, HistoryEntryDto, + HoldRequest, InstalledPackageDto, LargeFileReport, + ScanProgressEvent, ScanReport, ScanResult, StartupProgramDto, @@ -38,6 +41,13 @@ const wait = (ms: number) => new Promise((r) => setTimeout(r, ms)); const applied = new Set(); const cleaned = new Set(); const schedules = new Set(); +/** Held packages, as `backend:id`. */ +const holds = new Set(); + +/** What is running, so that it can be cancelled or refused like in the app. */ +let applyRunning = false; +let applyCancelled = false; +let scanCancelled = false; const health: HealthReportDto = { disks: [ @@ -130,13 +140,11 @@ const config: Config = { profiles: [{ name: "Work tools", packages: ["vscode", "git", "nodejs"] }], restore_point: true, scan_interval_hours: 24, - concurrency: 4, proxy_url: null, - auto_apply: false, notifications: true, max_retries: 2, backend_timeout_secs: 120, -} as Config; +}; const cleanup: CleanupItemDto[] = [ c("temp-files", "Temporary files", "Files applications left behind. A program still using one keeps it.", 3.4 * GB, 18_420, "regenerated", true), @@ -260,6 +268,88 @@ const largeFiles: LargeFileReport = { ], }; +/** A scan that takes a moment and reports every source, like the real one. */ +async function runScan(): Promise { + const sources = backends.filter((s) => s.available && s.enabled); + const total = sources.length; + const failed: ScanResult["failed_backends"] = []; + const answered = new Set(); + const report = (s: BackendDto, state: ScanProgressEvent["state"], found: number) => { + const event: ScanProgressEvent = { + backend: s.kind, + name: s.name, + state, + found, + done: answered.size, + total, + }; + emitLocal("scan-progress", event); + }; + const left = scan.actionable.filter( + (u) => !applied.has(`${u.backend}:${u.id}`) && !holds.has(`${u.backend}:${u.id}`), + ); + + scanCancelled = false; + for (const s of sources) report(s, "started", 0); + for (const s of sources) { + await wait(500 / total); + if (scanCancelled) break; + answered.add(s.kind); + report(s, "done", left.filter((u) => u.backend === s.kind).length); + } + for (const s of sources) { + if (!answered.has(s.kind)) failed.push({ backend: s.kind, error: "cancelled" }); + } + + const actionable = left.filter((u) => answered.has(u.backend)); + const held = scan.actionable + .filter((u) => answered.has(u.backend) && holds.has(`${u.backend}:${u.id}`)) + .map((u) => ({ ...u, reason: "held by policy" })); + const skipped = [...held, ...scan.skipped.filter((s) => answered.has(s.backend))]; + return { actionable, skipped, total: actionable.length + skipped.length, failed_backends: failed }; +} + +async function runApply(request: ApplyRequest | undefined): Promise { + if (applyRunning) throw "apply-running"; + const updates = request?.updates ?? []; + applyRunning = true; + applyCancelled = false; + const entries: ApplyResultDto["entries"] = []; + const progress = (name: string, phase: string) => + emitLocal("apply-progress", { + package: name, + current: entries.length, + total: updates.length, + phase, + percent: updates.length > 0 ? Math.round((entries.length / updates.length) * 100) : 100, + }); + try { + for (const u of updates) { + if (applyCancelled) { + entries.push({ name: u.name, status: "skipped", detail: "cancelled" }); + continue; + } + progress(u.name, "installing"); + await wait(1600 / updates.length); + if (!request?.dry_run) applied.add(`${u.backend}:${u.id}`); + entries.push({ name: u.name, status: "updated", detail: "" }); + } + progress("", "done"); + } finally { + applyRunning = false; + } + if (!request?.dry_run) emitLocal("apply-finished", null); + const skipped = entries.filter((e) => e.status === "skipped").length; + return { + updated: entries.length - skipped, + failed: 0, + skipped, + reboot_required: false, + exit_code: 0, + entries, + }; +} + /** Answer one command the way the Rust side would. */ export async function demoInvoke(command: string, args?: Record): Promise { await wait(120); @@ -269,19 +359,38 @@ export async function demoInvoke(command: string, args?: Record !applied.has(`${u.backend}:${u.id}`)), - }); + return answer(await runScan()); + case "cancel_scan": + scanCancelled = true; + return answer(undefined); case "list_backends": case "refresh_backends": return answer(backends); case "get_config": - return answer(config); + return answer({ + ...config, + policy: { + ...config.policy, + holds: [...holds].map((p) => ({ package: p, pin: null, note: null })), + }, + }); + case "hold": { + const request = args?.request as HoldRequest; + holds.add(`${request.backend}:${request.id}`); + return answer(undefined); + } + case "unhold": { + const request = args?.request as HoldRequest; + holds.delete(`${request.backend}:${request.id}`); + return answer(undefined); + } + case "quit_app": + if (applyRunning && !args?.force) throw "apply-running"; + return answer(undefined); + case "restart_as_admin": + if (applyRunning) throw "apply-running"; + throw "Restarting as administrator is not available in the browser demo."; case "save_config": - case "hold": - case "unhold": case "report_frontend_error": case "create_profile": case "delete_profile": @@ -291,20 +400,11 @@ export async function demoInvoke(command: string, args?: Record ({ name: u.name, status: "updated", detail: "" })), - }; - return answer(result); - } + case "apply": + return answer(await runApply(args?.request as ApplyRequest | undefined)); + case "cancel_apply": + applyCancelled = true; + return answer(undefined); case "get_update_history": return answer(history); case "get_hardware_info": @@ -348,8 +448,6 @@ export async function demoInvoke(command: string, args?: Record(command: string, args?: Record>>(); + +function listenLocally(event: string, handler: EventCallback): () => void { + const handlers = local.get(event) ?? new Set(); + local.set(event, handlers); + handlers.add(handler as EventCallback); + return () => { + handlers.delete(handler as EventCallback); + }; +} + +export function emitLocal(event: string, payload: unknown): void { + for (const handler of local.get(event) ?? []) handler({ event, id: 0, payload }); +} + /** * Subscribe to a Tauri event, returning a synchronous cleanup function. * @@ -9,8 +28,7 @@ import { inTauri } from "./bridge"; * rejection and, in `useEffect`, a cleanup that never runs. */ export function safeListen(event: string, handler: EventCallback): () => void { - // Outside Tauri (the browser demo, tests) there is nothing to listen to. - if (!inTauri) return () => {}; + if (!inTauri) return listenLocally(event, handler); let unlisten: (() => void) | null = null; let cancelled = false; diff --git a/apps/gui/src/format.ts b/apps/gui/src/format.ts index e17f9f0..abc03e7 100644 --- a/apps/gui/src/format.ts +++ b/apps/gui/src/format.ts @@ -17,9 +17,20 @@ export function formatDate(value: string): string { return d.toLocaleString(); } +/** Codes the command layer rejects with, in words. */ +const ERROR_CODES: Record = { + "apply-running": "An update is being installed. Wait for it to finish, or cancel it.", + cancelled: "Cancelled before it answered.", +}; + +/** Whether a command was refused because an update is being installed. */ +export function isApplyRunning(e: unknown): boolean { + return e === "apply-running" || (e instanceof Error && e.message === "apply-running"); +} + export function errorText(e: unknown): string { - if (e instanceof Error) return e.message; - if (typeof e === "string") return e; + if (e instanceof Error) return ERROR_CODES[e.message] ?? e.message; + if (typeof e === "string") return ERROR_CODES[e] ?? e; try { return JSON.stringify(e); } catch { diff --git a/apps/gui/src/hardware-backends.ts b/apps/gui/src/hardware-backends.ts index 75787cb..7791b96 100644 --- a/apps/gui/src/hardware-backends.ts +++ b/apps/gui/src/hardware-backends.ts @@ -5,7 +5,7 @@ * with `backend_kind_from_str` in the Tauri command layer. */ -export const DRIVER_BACKENDS = new Set([ +const DRIVER_BACKENDS = new Set([ "windows-drivers", "nvidia-gpu", "amd-gpu", @@ -15,7 +15,7 @@ export const DRIVER_BACKENDS = new Set([ "intel-dsa", ]); -export const FIRMWARE_BACKENDS = new Set([ +const FIRMWARE_BACKENDS = new Set([ "dell-firmware", "hp-firmware", "lenovo-firmware", @@ -23,7 +23,7 @@ export const FIRMWARE_BACKENDS = new Set([ "mac-firmware", ]); -export const OEM_BACKENDS = new Set([ +const OEM_BACKENDS = new Set([ "dell-command-update", "hp-image-assistant", "lenovo-system-update", @@ -35,7 +35,7 @@ export const OEM_BACKENDS = new Set([ "virtualization-guest", ]); -export type HardwareGroup = "driver" | "firmware" | "oem"; +type HardwareGroup = "driver" | "firmware" | "oem"; export function hardwareGroupOf(backend: string): HardwareGroup | null { if (DRIVER_BACKENDS.has(backend)) return "driver"; @@ -53,10 +53,3 @@ export const GROUP_LABELS: Record = { firmware: "Firmware & BIOS", oem: "Vendor update tools", }; - -export const GROUP_HINTS: Record = { - driver: "Graphics, chipset and device drivers.", - firmware: - "Firmware and BIOS updates. These carry the most risk of the lot — do not interrupt one, and run it on mains power.", - oem: "Updates delivered through your machine vendor's own tool.", -}; diff --git a/apps/gui/src/index.css b/apps/gui/src/index.css index 0ca90fb..19a64b8 100644 --- a/apps/gui/src/index.css +++ b/apps/gui/src/index.css @@ -12,7 +12,9 @@ * The look: a near-black canvas lit by two soft, slowly drifting glows * (violet and blue, with a warm amber accent for what needs attention), * glass cards on top, and one gradient for the things you press. Text colours - * meet WCAG AA against the surfaces they sit on in both themes. + * meet WCAG AA (4.5:1) against every surface and tint they sit on, and + * `--control`, the outline of inputs and switches, meets 3:1. The numbers are + * asserted in src/test/contrast.test.ts, which reads this file. */ :root, :root[data-theme="dark"] { @@ -22,12 +24,13 @@ --raised: #1a1e28; --line: #232835; --line-strong: #323949; + --control: #6b7488; --fg: #eceef3; --muted: #a4abb9; - --faint: #788091; - --accent: #8f8cff; + --faint: #8b94a6; + --accent: #9c99ff; --accent-2: #4fb2ff; - --accent-fg: #ffffff; + --accent-fg: #0b0d14; --warm: #ffc66d; --success: #4fd39a; --warning: #f2bc5c; @@ -48,17 +51,18 @@ --raised: #eef0f6; --line: #e2e5ee; --line-strong: #cdd2de; + --control: #7a8293; --fg: #141821; --muted: #515b6b; - --faint: #727a8a; - --accent: #5a54f0; - --accent-2: #1f86ee; + --faint: #596171; + --accent: #4841d6; + --accent-2: #1668bd; --accent-fg: #ffffff; --warm: #b97a06; - --success: #12875a; - --warning: #9a6410; - --danger: #c93636; - --info: #1b6fc0; + --success: #0b6844; + --warning: #7b4d08; + --danger: #a82424; + --info: #12548f; --glass: rgb(255 255 255 / 0.72); --glass-edge: rgb(255 255 255 / 0.9); --glow-1: rgb(110 96 255 / 0.13); @@ -79,6 +83,7 @@ --color-raised: var(--raised); --color-line: var(--line); --color-line-strong: var(--line-strong); + --color-control: var(--control); --color-fg: var(--fg); --color-muted: var(--muted); --color-faint: var(--faint); @@ -356,6 +361,14 @@ pre { border-radius: 6px; } +/* + * Page headings take focus after navigation so a screen reader announces the + * new page. They are not controls, so they get no focus ring. + */ +h1[tabindex="-1"]:focus { + outline: none; +} + button { font-family: inherit; cursor: pointer; diff --git a/apps/gui/src/pages/About.tsx b/apps/gui/src/pages/About.tsx index 727b6c0..08f3d30 100644 --- a/apps/gui/src/pages/About.tsx +++ b/apps/gui/src/pages/About.tsx @@ -1,15 +1,17 @@ -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Card, Facts } from "../components/ui"; import { Logo } from "../components/Logo"; -const HIGHLIGHTS = [ - "Updates installed programs straight from their publishers — winget is optional", +/** What the app does, without naming a version: that would be wrong by the next one. */ +const FEATURES = [ + "Updates installed programs straight from their publishers; winget is optional", "Every installer Odysync downloads must carry its publisher's signature", - "NVIDIA drivers from NVIDIA's own service, WHQL only", + "Drivers from Windows Update and the hardware makers, never installed without you", "Mac apps through their own Sparkle feeds, checked against the app's own key", + "A care score that lists every point it takes off, and what could not be checked", "Cleanup that measures first and asks before anything permanent", "Runtimes, device problems and driver backups in one place", - "A calmer interface with light and dark themes", + "Automatic care on a schedule, for safe updates and junk files only", ]; const PRINCIPLES = [ @@ -27,17 +29,17 @@ export default function About() { <>
-

Odysync

+

Odysync

Safe software and driver updates for Windows, macOS and Linux.

Version {info?.version ?? "…"} · free and open source (MIT)

- +
    - {HIGHLIGHTS.map((line) => ( + {FEATURES.map((line) => (
  • - + {line}
  • ))} diff --git a/apps/gui/src/pages/Backup.tsx b/apps/gui/src/pages/Backup.tsx index 926c479..63f4897 100644 --- a/apps/gui/src/pages/Backup.tsx +++ b/apps/gui/src/pages/Backup.tsx @@ -1,10 +1,11 @@ import { useState } from "react"; import { DatabaseBackup, Plus, RefreshCw, RotateCcw } from "lucide-react"; import * as api from "../api"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Button, Card, + ConfirmBar, EmptyState, ErrorBar, InfoBar, @@ -21,6 +22,7 @@ export default function Backup() { const [error, setError] = useState(null); const [success, setSuccess] = useState(null); const [confirmRestore, setConfirmRestore] = useState(null); + const [restoring, setRestoring] = useState(false); const { backups, protectionEnabled } = backup.data; const elevated = sysInfo.data?.elevated ?? false; @@ -54,7 +56,7 @@ export default function Backup() { await api.createBackup(name); setSuccess("Restore point created."); setDescription(""); - await backup.refresh(); + await backup.reload(); } catch (e) { setError(errorText(e)); } finally { @@ -63,18 +65,17 @@ export default function Backup() { }; const restore = async (sequenceNumber: number, name: string) => { - if (confirmRestore !== sequenceNumber) { - setConfirmRestore(sequenceNumber); - return; - } setConfirmRestore(null); + setRestoring(true); setError(null); setSuccess(null); try { await api.restoreBackup(sequenceNumber); setSuccess(`Returning to "${name}". Windows will restart.`); } catch (e) { - setError(errorText(e)); + setError(`The restore did not start: ${errorText(e)}`); + } finally { + setRestoring(false); } }; @@ -97,20 +98,21 @@ export default function Backup() { {!elevated && ( )} - {elevated && !protectionEnabled && backup.loadedAt !== null && ( + {elevated && !protectionEnabled && backup.loadedAt !== null && backup.error === null && ( )} {success && } {error && } - {backup.error && } + {backup.error && }
    setDescription(e.target.value)} - className="flex-1 min-w-[240px] h-9 px-3 rounded-lg border border-line bg-canvas text-sm placeholder:text-faint outline-none focus:border-accent" + className="flex-1 min-w-[240px] h-9 px-3 rounded-lg border border-control bg-canvas text-sm placeholder:text-faint outline-none focus:border-accent" placeholder="Description, e.g. before installing a new GPU driver" />
    ) : (
      {backups.map((b, i) => ( -
    • -
      -
      {b.name}
      -
      - {formatDate(b.created_at)} · #{b.sequence_number} +
    • +
      +
      +
      {b.name}
      +
      + {formatDate(b.created_at)} · #{b.sequence_number} +
      +
      - + {confirmRestore === b.sequence_number && ( + void restore(b.sequence_number, b.name)} + onCancel={() => setConfirmRestore(null)} + /> + )}
    • ))}
    diff --git a/apps/gui/src/pages/Dashboard.tsx b/apps/gui/src/pages/Dashboard.tsx index 3f87e1e..84722fa 100644 --- a/apps/gui/src/pages/Dashboard.tsx +++ b/apps/gui/src/pages/Dashboard.tsx @@ -5,6 +5,7 @@ import { CheckCircle2, Circle, CircleAlert, + CircleHelp, HardDrive, Loader2, MemoryStick, @@ -18,43 +19,44 @@ import { Wand2, } from "lucide-react"; import * as api from "../api"; -import { safeListen } from "../events"; -import { useStore, type Resource } from "../store"; +import { useStore, type Resource } from "../store-context"; import { Badge, Button, Card, Segmented, Switch } from "../components/ui"; import { CareRing, type RingMode, type RingTone } from "../components/CareRing"; -import { assess, safeCleanupBytes, safeCleanupItems, type CareIssue } from "../care"; -import { formatSize } from "../format"; +import { ScanProgressView } from "../components/Progress"; +import { + assess, + safeCleanupBytes, + safeCleanupItems, + type CareIssue, + type FailedCheck, +} from "../care"; +import { errorText, formatSize } from "../format"; import type { Tab } from "../nav"; +import type { ApplyEntryDto } from "../types"; /** The schedule automatic care runs under, separate from a plain update schedule. */ -export const CARE_TASK = "OdysyncCare"; +const CARE_TASK = "OdysyncCare"; const CARE_FREQUENCY_KEY = "odysync.careFrequency"; -interface Progress { - phase: string; - current: number; - total: number; - package?: string | null; - percent?: number | null; -} - interface FixOutcome { updated: number; - failed: number; + /** Updates that were tried and did not work, with the reason. */ + failures: ApplyEntryDto[]; + /** Updates that were not started, because the run was cancelled. */ + skipped: number; + cancelled: boolean; cleared: number; reboot: boolean; error: string | null; } -type StepState = "waiting" | "running" | "done"; +type StepState = "unchecked" | "running" | "partial" | "failed" | "done"; -function errorText(e: unknown): string { - return e instanceof Error ? e.message : String(e); -} - -/** Whether a set of background resources is still loading. */ +/** Where a set of background checks stands. A failed one is never "done". */ function stepState(resources: Resource[]): StepState { if (resources.some((r) => r.loading)) return "running"; + if (resources.some((r) => r.error !== null)) return "failed"; + if (resources.some((r) => r.loadedAt === null)) return "unchecked"; return "done"; } @@ -71,9 +73,9 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo defender, health, config, - history, - packages, + apply, } = store; + const windows = sysInfo.data?.platform === "windows"; // ── What the machine looks like ────────────────────────────────────────── const attendedKinds = useMemo( @@ -84,7 +86,14 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo () => new Set(backends.data.filter((b) => b.developer).map((b) => b.kind)), [backends.data], ); - const actionable = useMemo(() => scan.data?.actionable ?? [], [scan.data]); + // After a failed scan the list in hand is an old one. It cannot be installed + // from (the command layer has nothing to match it against) and says nothing + // about today. + const scanUsable = scan.health.state !== "failed"; + const actionable = useMemo( + () => (scanUsable ? (scan.data?.actionable ?? []) : []), + [scan.data, scanUsable], + ); // Only what unattended care may install: no drivers, no developer packages. const updates = useMemo( () => @@ -105,26 +114,55 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo [security.data], ); + const failedChecks = useMemo(() => { + const checks: (FailedCheck | null)[] = [ + failedCheck("devices", "Devices", devices, "drivers"), + failedCheck("runtimes", "Runtimes", components, "drivers"), + failedCheck("cleanup", "Junk files", cleanup, "maintenance"), + failedCheck("health", "Disk and battery health", health, "hardware"), + // Elsewhere these two have nothing to look at. + windows ? failedCheck("defender", "Microsoft Defender", defender, "security") : null, + windows ? failedCheck("security", "Security", security, "security") : null, + ]; + return checks.filter((c) => c !== null); + }, [devices, components, cleanup, health, defender, security, windows]); + + // Outside Windows there is no audit that could be incomplete. + const incompleteSecurity = windows + ? (security.data?.sections ?? []).filter((s) => !s.ok).length + : 0; const assessment = useMemo( () => assess({ + scan: scan.health, + sourceName: (kind) => backends.data.find((b) => b.kind === kind)?.name ?? kind, + failedChecks, + incompleteSecurity, updates, attendedUpdates, developerUpdates, - needsAdmin: (scan.data?.skipped ?? []).filter((s) => - s.reason.toLowerCase().includes("administrator"), - ).length, + needsAdmin: scanUsable + ? (scan.data?.skipped ?? []).filter((s) => + s.reason.toLowerCase().includes("administrator"), + ).length + : 0, devices: devices.data.length, outdatedRuntimes: components.data.filter((c) => c.state === "outdated").length, seriousFindings: findings.filter((f) => f.severity === "critical" || f.severity === "high") .length, minorFindings: findings.filter((f) => f.severity === "medium" || f.severity === "low") .length, - defender: defender.data, + defender: windows ? defender.data : null, safeCleanup, health: health.data, }), [ + scan.health, + scanUsable, + backends.data, + failedChecks, + incompleteSecurity, + windows, updates, attendedUpdates, developerUpdates, @@ -156,9 +194,20 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo }, { id: "health", label: "Disk & battery", icon: , resources: [health as Resource] }, ]; - const states = steps.map((s) => stepState(s.resources)); + const states = steps.map((s): StepState => { + const state = stepState(s.resources); + if (state !== "done") return state; + if (s.id === "security") { + const unread = windows && defender.data?.real_time_protection === null; + return unread || incompleteSecurity > 0 ? "partial" : state; + } + if (s.id !== "updates") return state; + return scan.health.state === "partial" || scan.health.state === "failed" + ? scan.health.state + : state; + }); const checking = states.some((s) => s === "running"); - const checkedFraction = states.filter((s) => s === "done").length / steps.length; + const checkedFraction = states.filter((s) => s !== "running").length / steps.length; const runningStep = steps.find((_, i) => states[i] === "running"); const scanEverything = useCallback(() => { @@ -182,79 +231,85 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo return () => clearTimeout(t); }, [celebrating]); - useEffect( - () => - safeListen("apply-progress", (e) => { - const p = e.payload; - if (p.total > 0) { - setFixing((f) => - f && f.step.startsWith("Installing") - ? { - step: p.package ? `Installing ${p.package}` : "Installing updates", - progress: 5 + Math.round((p.current / p.total) * 60), - } - : f, - ); - } - }), - [], - ); - const fixEverything = useCallback(async () => { const toInstall = updates; const toClean = safeCleanup.map((c) => c.id); setOutcome(null); - let updated = 0; - let failed = 0; - let reboot = false; - let cleared = 0; - let error: string | null = null; + setCelebrating(false); + const done: FixOutcome = { + updated: 0, + failures: [], + skipped: 0, + cancelled: false, + cleared: 0, + reboot: false, + error: null, + }; try { if (toInstall.length > 0) { setFixing({ step: "Installing updates", progress: 5 }); - const result = await api.apply({ + const { result, cancelled } = await apply.run({ updates: toInstall, dry_run: false, restore_point: config.data?.restore_point ?? true, }); - updated = result.updated; - failed = result.failed; - reboot = result.reboot_required; + done.updated = result.updated; + done.failures = result.entries.filter( + (e) => e.status !== "updated" && e.status !== "skipped", + ); + done.skipped = result.skipped; + done.cancelled = cancelled; + done.reboot = result.reboot_required; } - if (toClean.length > 0) { + // Cancel means stop, not "skip to the next step". + if (toClean.length > 0 && !done.cancelled) { setFixing({ step: "Clearing junk files", progress: 70 }); const results = await api.cleanupRun(toClean); - cleared = results.reduce((sum, r) => sum + r.removed_bytes, 0); + done.cleared = results.reduce((sum, r) => sum + r.removed_bytes, 0); } setFixing({ step: "Checking again", progress: 90 }); await Promise.allSettled([ - scan.refresh(), - cleanup.refresh(), - history.refresh(), - packages.refresh(), + // The install already started a fresh scan; this waits for it. + toInstall.length > 0 ? scan.refresh() : null, + cleanup.reload(), ]); } catch (e) { - error = errorText(e); + done.error = errorText(e); } finally { setFixing(null); - setOutcome({ updated, failed, cleared, reboot, error }); - setCelebrating(error === null); + setOutcome(done); + setCelebrating(done.error === null && done.failures.length === 0 && !done.cancelled); } - }, [updates, safeCleanup, config.data, scan, cleanup, history, packages]); + }, [updates, safeCleanup, config.data, apply, scan, cleanup]); // ── The ring ───────────────────────────────────────────────────────────── const booting = store.booting && scan.loadedAt === null; + const { score, scoreKnown } = assessment; + // An install started on another page shows here too. + const installing = apply.running && !apply.dryRun; + const installed = apply.progress && apply.progress.total > 0 + ? apply.progress.current / apply.progress.total + : 0; let ringMode: RingMode = "idle"; - let ringValue = assessment.score; - let ringTone: RingTone = assessment.tone; - let ringLabel = assessment.grade; - let ringCaption: string | undefined = "Care score"; + let ringValue: number | null = scoreKnown ? score : null; + let ringTone: RingTone = scoreKnown ? assessment.tone : "warning"; + let ringLabel = scoreKnown ? assessment.grade : "Not checked"; + let ringCaption: string | undefined = scoreKnown ? "Care score" : "No score"; if (fixing) { ringMode = "busy"; - ringValue = fixing.progress; + ringValue = installing ? 5 + Math.round(installed * 60) : fixing.progress; ringTone = "accent"; ringLabel = "Fixing"; - ringCaption = fixing.step; + ringCaption = + installing && apply.progress?.package + ? `Installing ${apply.progress.package}` + : fixing.step; + } else if (installing) { + ringMode = "busy"; + ringValue = Math.round(installed * 100); + ringTone = "accent"; + ringLabel = "Installing"; + ringCaption = apply.progress?.package || undefined; } else if (booting || checking) { ringMode = "busy"; ringValue = Math.round((booting ? store.bootProgress : checkedFraction) * 100); @@ -265,18 +320,29 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo ringMode = "done"; } - const busy = !!fixing || booting || checking; - const canFix = !busy && assessment.fixable > 0 && backends.loadedAt !== null; + const busy = !!fixing || installing || booting || checking; + const canFix = + !busy && + !apply.running && + assessment.fixable > 0 && + backends.loadedAt !== null && + !(updates.length > 0 && scan.fromCache); const headline = fixing ? "Taking care of it…" - : busy - ? "Checking your PC…" - : assessment.issues.length === 0 - ? "Everything is taken care of" - : assessment.fixable > 0 - ? `${assessment.fixable === 1 ? "One thing" : `${assessment.fixable} things`} can be fixed in one click` - : `${assessment.issues.length === 1 ? "One thing needs" : `${assessment.issues.length} things need`} a look`; + : installing + ? "Installing updates…" + : busy + ? "Checking your PC…" + : scan.health.state === "failed" + ? "Updates could not be checked" + : !scoreKnown + ? "Nothing has been checked yet" + : assessment.issues.length === 0 + ? "Everything is taken care of" + : assessment.fixable > 0 + ? `${assessment.fixable === 1 ? "One thing" : `${assessment.fixable} things`} can be fixed in one click` + : `${assessment.issues.length === 1 ? "One thing needs" : `${assessment.issues.length} things need`} a look`; const info = sysInfo.data; const lastChecked = scan.loadedAt @@ -300,6 +366,8 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo center={ ringMode === "done" ? ( + ) : ringValue === null ? ( + ) : undefined } /> @@ -308,23 +376,27 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo
    Smart care
    -

    +

    {headline.replace("PC", platformName)}

    {fixing ? "Installing safe updates, then clearing junk files. Drivers and firmware are left alone." - : busy && showingLastTime - ? `Showing what Odysync found on ${lastChecked} while it checks again.` - : busy - ? "Updates, drivers, junk files, security and hardware health — all at once." - : assessment.fixable > 0 - ? "Safe updates and junk files, in one go. Drivers and anything risky always wait for you." - : assessment.issues.length > 0 - ? "What is left needs a decision from you — each item below says where to make it." - : lastChecked - ? `Last checked at ${lastChecked}.` - : "Odysync checks updates, drivers, junk files, security and hardware health."} + : installing + ? "Started from another page. A scan follows when it is done." + : busy && showingLastTime + ? `Showing what Odysync found on ${lastChecked} while it checks again.` + : busy + ? "Updates, drivers, junk files, security and hardware health, all at once." + : scan.health.state === "failed" + ? `${scan.health.error} Without it there is no score; what the other checks found is listed below.` + : assessment.fixable > 0 + ? "Safe updates and junk files, in one go. Drivers and anything risky always wait for you." + : assessment.issues.length > 0 + ? "What is left needs a decision from you. Each item below says where to make it." + : lastChecked + ? `Last checked at ${lastChecked}.` + : "Odysync checks updates, drivers, junk files, security and hardware health."}

    @@ -350,14 +422,27 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo icon={} onClick={scanEverything} > - {fixing ? "Working…" : busy ? "Checking…" : "Scan now"} + {fixing || installing + ? "Working…" + : busy + ? "Checking…" + : scan.health.state === "failed" + ? "Try again" + : "Scan now"} )} + {installing && }
    + {scan.loading && !apply.running && ( +
    + +
    + )} +
      {steps.map((s, i) => ( - + ))}
@@ -392,14 +477,25 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo
Nothing to do
- Up to date, tidy, protected and healthy. Turn on automatic care to keep it that way. + {defender.data?.real_time_protection && security.data + ? "Up to date, tidy, protected and healthy." + : windows && !security.data + ? "Up to date, tidy and healthy. The security audit has not run." + : "Up to date, tidy and healthy."}{" "} + Turn on automatic care to keep it that way.
) : (
    {assessment.issues.map((issue) => ( - onNavigate(issue.tab)} /> + onNavigate(issue.tab)} + onRetry={scanEverything} + /> ))}
)} @@ -410,9 +506,7 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo d.state === "good" || d.state === "unknown") : null} + windows={windows} /> @@ -420,45 +514,134 @@ export default function Dashboard({ onNavigate }: { onNavigate: (tab: Tab) => vo ); } +/** The entry for a check whose last attempt failed, or null when it did not. */ +function failedCheck( + id: string, + label: string, + resource: Resource, + tab: Tab, +): FailedCheck | null { + return resource.error === null ? null : { id, label, error: resource.error, tab }; +} + +function CancelInstall() { + const { apply } = useStore(); + const [error, setError] = useState(null); + return ( + <> + + {error &&

Could not cancel: {error}

} + + ); +} + +const STEP: Record = { + done: { box: "bg-success/12 text-success", text: "checked" }, + running: { box: "bg-accent/12 text-accent", text: "being checked" }, + partial: { box: "bg-warning/12 text-warning", text: "only partly checked" }, + failed: { box: "bg-danger/12 text-danger", text: "could not be checked" }, + unchecked: { box: "bg-raised text-faint", text: "not checked" }, +}; + function StepRow({ label, icon, state }: { label: string; icon: ReactNode; state: StepState }) { return (
  • svg]:w-3.5 [&>svg]:h-3.5 ${ - state === "done" ? "bg-success/12 text-success" : state === "running" ? "bg-accent/12 text-accent" : "bg-raised text-faint" - }`} + aria-hidden + className={`w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 transition-colors [&>svg]:w-3.5 [&>svg]:h-3.5 ${STEP[state].box}`} > - {state === "running" ? : state === "done" ? : icon} + {state === "running" ? ( + + ) : state === "done" ? ( + + ) : state === "partial" ? ( + + ) : state === "failed" ? ( + + ) : ( + icon + )} + + + {label} + {state === "done" || state === "running" ? ( + : {STEP[state].text} + ) : ( + {STEP[state].text} + )} - {label}
  • ); } -function IssueRow({ issue, onOpen }: { issue: CareIssue; onOpen: () => void }) { +function IssueRow({ + issue, + busy, + onOpen, + onRetry, +}: { + issue: CareIssue; + busy: boolean; + onOpen: () => void; + onRetry: () => void; +}) { const tone = { - danger: { box: "bg-danger/12 text-danger", icon: }, - warning: { box: "bg-warning/12 text-warning", icon: }, - info: { box: "bg-info/12 text-info", icon: }, + danger: { box: "bg-danger/12 text-danger", word: "Urgent", icon: }, + warning: { box: "bg-warning/12 text-warning", word: "Attention", icon: }, + info: { box: "bg-info/12 text-info", word: "Note", icon: }, }[issue.tone]; return (
  • - {tone.icon} + + {tone.icon} +
    -
    {issue.title}
    -
    +
    + {tone.word}: + {issue.title} +
    +
    {issue.detail}
    - - −{issue.points} - + {issue.points > 0 && ( + + −{issue.points} + {issue.points} points off the care score + + )} {issue.fix ? ( In the fix + ) : issue.retry ? ( + ) : ( - )} @@ -466,26 +649,72 @@ function IssueRow({ issue, onOpen }: { issue: CareIssue; onOpen: () => void }) { ); } +/** How many failures to spell out before pointing at History. */ +const FAILURES_SHOWN = 3; + function OutcomeBanner({ outcome, onHistory }: { outcome: FixOutcome; onHistory: () => void }) { - if (outcome.error) { - return ( -
    - The fix stopped: {outcome.error} -
    - ); - } + const { updated, failures, skipped, cancelled, cleared, reboot, error } = outcome; const parts: string[] = []; - if (outcome.updated > 0) parts.push(`${outcome.updated} update${outcome.updated === 1 ? "" : "s"} installed`); - if (outcome.cleared > 0) parts.push(`${formatSize(outcome.cleared)} cleared`); + if (updated > 0) parts.push(`${updated} update${updated === 1 ? "" : "s"} installed`); + if (cleared > 0) parts.push(`${formatSize(cleared)} cleared`); + const did = parts.join(", "); + + const tone = error !== null ? "danger" : failures.length > 0 || cancelled ? "warning" : "success"; + const box = { + danger: "border-danger/30 bg-danger/10", + warning: "border-warning/30 bg-warning/10", + success: "border-success/30 bg-success/10", + }[tone]; + const title = + error !== null + ? "The fix stopped" + : cancelled + ? "Cancelled" + : failures.length > 0 + ? "Finished, but not everything worked" + : "Done"; + return ( -
    - -
    - Done{parts.length ? ` — ${parts.join(", ")}` : ""}. - {outcome.failed > 0 && {outcome.failed} could not be installed; History says why.} - {outcome.reboot && Restart when convenient to finish.} +
    + {tone === "success" ? ( + + ) : ( + + )} +
    +

    + + {title} + {did ? `: ${did}` : ""}. + + {cancelled && skipped > 0 && ` ${skipped} update${skipped === 1 ? " was" : "s were"} left for later.`} + {reboot && " Restart when convenient to finish."} +

    + {error !== null &&

    {error}

    } + {failures.length > 0 && ( +
      + {failures.slice(0, FAILURES_SHOWN).map((f, i) => ( +
    • + {f.name} was not installed + {f.detail ? `: ${f.detail}` : "."} +
    • + ))} + {failures.length > FAILURES_SHOWN && ( +
    • + {failures.length - FAILURES_SHOWN} more could not be installed. History lists them + with the reason. +
    • + )} +
    + )}
    - {outcome.failed > 0 && ( + {failures.length > 0 && ( @@ -515,7 +744,12 @@ function AutomaticCare() { api .checkSchedule(CARE_TASK) .then((v) => live && setEnabled(v)) - .catch(() => live && setEnabled(false)); + .catch((e: unknown) => { + if (!live) return; + // The switch stays usable: turning it on writes the schedule anew. + setEnabled(false); + setError(`Whether automatic care is on could not be read: ${errorText(e)}`); + }); return () => { live = false; }; @@ -579,7 +813,7 @@ function AutomaticCare() { />
    )} - {error &&

    {error}

    } + {error &&

    {error}

    } ); } @@ -587,27 +821,62 @@ function AutomaticCare() { function Glance({ onNavigate, reclaimable, - updates, - protectedNow, - disksOk, + windows, }: { onNavigate: (tab: Tab) => void; reclaimable: number; - updates: number; - protectedNow: boolean | null; - disksOk: boolean | null; + windows: boolean; }) { + const { scan, cleanup, defender, health } = useStore(); + + const ready = scan.data?.actionable.length ?? 0; + const updates: { value: string; ok: boolean | null } = + scan.health.state === "failed" + ? { value: "Not checked", ok: null } + : scan.health.state === "unknown" + ? { value: "-", ok: null } + : ready > 0 + ? { value: `${ready} ready`, ok: false } + : scan.health.state === "partial" + ? { value: "Not fully checked", ok: null } + : { value: "Up to date", ok: true }; + + const junk: { value: string; ok: boolean | null } = cleanup.error + ? { value: "Not measured", ok: null } + : cleanup.loadedAt === null + ? { value: "-", ok: null } + : { + value: reclaimable > 0 ? formatSize(reclaimable) : "Tidy", + ok: reclaimable < 200 * 1024 * 1024, + }; + + const realTime = defender.data?.real_time_protection ?? null; + const protection: { value: string; ok: boolean | null } = + defender.error || (defender.data && realTime === null) + ? { value: "Could not be read", ok: null } + : realTime === null + ? { value: "-", ok: null } + : { value: realTime ? "On" : "Off", ok: realTime }; + + const disks = health.data?.disks ?? []; + const reported = disks.filter((d) => d.state !== "unknown"); + const disk: { value: string; ok: boolean | null } = health.error + ? { value: "Could not be read", ok: null } + : health.data === null + ? { value: "-", ok: null } + : reported.length === 0 + ? { value: "Not reported", ok: null } + : reported.every((d) => d.state === "good") + ? { value: "Healthy", ok: true } + : { value: "Check", ok: false }; + const rows: { tab: Tab; icon: ReactNode; label: string; value: string; ok: boolean | null }[] = [ - { tab: "updates", icon: , label: "Updates", value: updates === 0 ? "Up to date" : `${updates} ready`, ok: updates === 0 }, - { tab: "maintenance", icon: , label: "Junk files", value: reclaimable > 0 ? formatSize(reclaimable) : "Tidy", ok: reclaimable < 200 * 1024 * 1024 }, - { - tab: "security", - icon: , - label: "Protection", - value: protectedNow === null ? "—" : protectedNow ? "On" : "Off", - ok: protectedNow, - }, - { tab: "hardware", icon: , label: "Disks", value: disksOk === null ? "—" : disksOk ? "Healthy" : "Check", ok: disksOk }, + { tab: "updates", icon: , label: "Updates", ...updates }, + { tab: "maintenance", icon: , label: "Junk files", ...junk }, + ...(windows + ? [{ tab: "security" as const, icon: , label: "Protection", ...protection }] + : []), + { tab: "hardware", icon: , label: "Disks", ...disk }, ]; return ( @@ -623,9 +892,9 @@ function Glance({ {r.label} {r.ok === null ? ( - + ) : ( - + )} {r.value} diff --git a/apps/gui/src/pages/Drivers.tsx b/apps/gui/src/pages/Drivers.tsx index 204c0a7..fe5a298 100644 --- a/apps/gui/src/pages/Drivers.tsx +++ b/apps/gui/src/pages/Drivers.tsx @@ -1,4 +1,4 @@ -import { useCallback, useMemo, useState } from "react"; +import { useMemo, useState } from "react"; import { AlertTriangle, ArrowRight, @@ -10,12 +10,13 @@ import { Wrench, } from "lucide-react"; import * as api from "../api"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Badge, Button, Card, Checkbox, + ConfirmBar, EmptyState, ErrorBar, InfoBar, @@ -26,15 +27,18 @@ import { import { errorText, formatDate, formatSize } from "../format"; import { GROUP_LABELS, hardwareGroupOf, isHardwareBackend } from "../hardware-backends"; import type { ApplyResultDto, ComponentStatus, UpdateDto } from "../types"; -import { OutcomeIcon } from "./Updates"; +import { ApplyProgressView, ScanProgressView } from "../components/Progress"; +import { FirmwareWarning } from "../components/FirmwareWarning"; +import { OutcomeIcon } from "../components/OutcomeIcon"; export default function Drivers() { - const { scan, sysInfo, history, backup } = useStore(); - const [applying, setApplying] = useState(false); + const { scan, apply, sysInfo, backends } = useStore(); const [error, setError] = useState(null); const [result, setResult] = useState(null); const [deselected, setDeselected] = useState>(new Set()); - const [confirmFirmware, setConfirmFirmware] = useState(false); + // The selection the firmware question was asked about; a different one has + // not been asked about, which closes the question. + const [confirmFor, setConfirmFor] = useState(null); const info = sysInfo.data; const elevated = info?.elevated ?? false; @@ -52,11 +56,16 @@ export default function Drivers() { () => (scan.data?.failed_backends ?? []).filter((f) => isHardwareBackend(f.backend)), [scan.data], ); + const scanFailed = scan.health.state === "failed"; + // Failures of sources that carry no drivers do not matter on this page. + const allChecked = !scanFailed && scan.health.state !== "unknown" && failures.length === 0; const selected = useMemo( () => updates.filter((u) => !deselected.has(key(u))), [updates, deselected], ); const selectedHasFirmware = selected.some((u) => hardwareGroupOf(u.backend) === "firmware"); + const selection = selected.map(key).join("|"); + const confirming = confirmFor !== null && confirmFor === selection; const toggle = (u: UpdateDto) => setDeselected((prev) => { @@ -67,31 +76,28 @@ export default function Drivers() { return next; }); - const install = useCallback(async () => { - if (selected.length === 0) return; - if (selectedHasFirmware && !confirmFirmware) { - setConfirmFirmware(true); - return; - } - setConfirmFirmware(false); - setApplying(true); + const install = async () => { + setConfirmFor(null); setError(null); setResult(null); try { - const r = await api.apply({ + const { result: r } = await apply.run({ updates: selected, dry_run: false, // Hardware changes are the ones you most want to be able to roll back. restore_point: true, }); setResult(r); - await Promise.allSettled([scan.refresh(), history.refresh(), backup.refresh()]); } catch (e) { setError(errorText(e)); - } finally { - setApplying(false); } - }, [selected, selectedHasFirmware, confirmFirmware, scan, history, backup]); + }; + + const start = () => { + if (selected.length === 0) return; + if (selectedHasFirmware) setConfirmFor(selection); + else void install(); + }; return ( <> @@ -102,7 +108,7 @@ export default function Drivers() { + } + /> + )} + {failures.length > 0 && !scan.loading && ( {failures.length} driver source{failures.length === 1 ? "" : "s"} could not be checked:{" "} - - {failures.map((f) => `${f.backend}: ${f.error}`).join("; ")} + + {failures + .map( + (f) => + `${backends.data.find((b) => b.kind === f.backend)?.name ?? f.backend}: ${errorText(f.error)}`, + ) + .join("; ")} } @@ -130,10 +155,16 @@ export default function Drivers() { {error && } + + {result && ( 0 + ? "Finished, but not everything was installed" + : "Driver installation finished" + } + description={`${result.updated} updated, ${result.failed} failed${result.skipped > 0 ? `, ${result.skipped} skipped` : ""}.${result.reboot_required ? " Restart to finish." : ""}`} padded={false} >
      @@ -155,20 +186,30 @@ export default function Drivers() { actions={ updates.length > 0 ? ( ) : undefined } > - {confirmFirmware && ( + {confirming && (
      - + } + confirmLabel={`Install ${selected.length}, including firmware`} + onConfirm={() => void install()} + onCancel={() => setConfirmFor(null)} + /> +
      + )} + {scan.loading && ( +
      +
      )} {updates.length === 0 && waiting.length === 0 ? ( @@ -177,15 +218,27 @@ export default function Drivers() { icon={ scan.loading ? ( - ) : ( + ) : allChecked ? ( + ) : ( + ) } - title={scan.loading ? "Checking driver sources…" : "No driver updates"} + title={ + scan.loading + ? "Checking driver sources…" + : allChecked + ? "No driver updates" + : scan.health.state === "unknown" + ? "Not checked yet" + : "Not every driver source could be checked" + } hint={ scan.loading ? undefined - : "Windows Update and the hardware makers have nothing newer for this machine." + : allChecked + ? "Windows Update and the hardware makers have nothing newer for this machine." + : "There may be driver updates nobody saw. Scan again to check." } />
    @@ -239,8 +292,9 @@ function key(u: UpdateDto) { function VersionJump({ from, to }: { from: string; to: string }) { return ( - {from || "—"} - + {from || "-"} + to + {to} ); @@ -265,23 +319,36 @@ function DeviceProblems() { } > - {devices.data.length === 0 ? ( -
    - - {devices.loadedAt === null ? "Checking devices…" : "Every device reports that it is working."} + {devices.error && ( +
    +
    + )} + {devices.data.length === 0 ? ( + devices.error === null && ( +
    + {devices.loadedAt === null ? ( + "Checking devices…" + ) : ( + <> + + Every device reports that it is working. + + )} +
    + ) ) : (
      {devices.data.map((d) => (
    • - + {d.name} {d.class || "Device"} code {d.code}

      {d.meaning}

      -

      {d.suggestion}

      +

      {d.suggestion}

    • ))}
    @@ -308,7 +375,7 @@ function Runtimes({ elevated }: { elevated: boolean }) { try { const text = await api.componentInstall(c.id); setMessage({ ok: true, text }); - await components.refresh(); + await components.reload(); } catch (e) { setMessage({ ok: false, text: errorText(e) }); } finally { @@ -319,7 +386,7 @@ function Runtimes({ elevated }: { elevated: boolean }) { return ( {message && ( @@ -327,8 +394,25 @@ function Runtimes({ elevated }: { elevated: boolean }) { {message.ok ? : }
    )} + {components.error && ( +
    + void components.refresh()} + icon={} + > + Try again + + } + /> +
    + )}
      - {components.loadedAt === null && ( + {components.loadedAt === null && components.error === null && (
    • Checking runtimes…
    • )} {components.data.map((c) => { @@ -378,12 +462,12 @@ function DriverBackups({ elevated }: { elevated: boolean }) { const [message, setMessage] = useState<{ ok: boolean; text: string } | null>(null); const [confirmRestore, setConfirmRestore] = useState(null); - const run = async (label: string, work: () => Promise) => { + const run = async (label: string, work: () => Promise<{ ok: boolean; text: string }>) => { setBusy(label); setMessage(null); try { - setMessage({ ok: true, text: await work() }); - await driverBackups.refresh(); + setMessage(await work()); + await driverBackups.reload(); } catch (e) { setMessage({ ok: false, text: errorText(e) }); } finally { @@ -394,14 +478,14 @@ function DriverBackups({ elevated }: { elevated: boolean }) { const backupNow = () => run("backup", async () => { const b = await api.driverBackupCreate("taken from the Odysync app"); - return `Saved ${b.package_count} driver packages (${formatSize(b.size_bytes)}).${b.complete ? "" : " Some packages could not be exported."}`; + return { + // A backup with holes in it is not a success. + ok: b.complete, + text: `Saved ${b.package_count} driver packages (${formatSize(b.size_bytes)}).${b.complete ? "" : " Some packages could not be exported, so this backup is incomplete."}`, + }; }); const restore = (id: string) => { - if (confirmRestore !== id) { - setConfirmRestore(id); - return; - } setConfirmRestore(null); void run(`restore:${id}`, async () => { const r = await api.driverBackupRestore(id); @@ -410,7 +494,10 @@ function DriverBackups({ elevated }: { elevated: boolean }) { `${r.already_current.length} already current`, r.failed.length > 0 ? `${r.failed.length} failed` : null, ].filter(Boolean); - return `${parts.join(", ")}.${r.reboot_required ? " Restart to finish." : ""}`; + return { + ok: r.failed.length === 0, + text: `${parts.join(", ")}.${r.reboot_required ? " Restart to finish." : ""}${r.failed.length > 0 ? ` Not restored: ${r.failed.join(", ")}.` : ""}`, + }; }); }; @@ -436,44 +523,57 @@ function DriverBackups({ elevated }: { elevated: boolean }) { {message.ok ? : }
    )} - {driverBackups.data.length === 0 ? ( -
    - No backups yet. A full backup is usually 3–6 GB, so Odysync does not take one - automatically unless you turn that on in Settings. + {driverBackups.error && ( +
    +
    + )} + {driverBackups.data.length === 0 ? ( + driverBackups.error === null && ( +
    + {driverBackups.loadedAt === null + ? "Reading the backups…" + : "No backups yet. A full backup is usually 3 to 6 GB, so Odysync takes one only when you ask."} +
    + ) ) : (
      {driverBackups.data.map((b) => ( -
    • -
      -
      {formatDate(b.created_at)}
      -
      - {b.package_count} packages · {formatSize(b.size_bytes)} · {b.reason} - {!b.complete && " · incomplete"} +
    • +
      +
      +
      {formatDate(b.created_at)}
      +
      + {b.package_count} packages · {formatSize(b.size_bytes)} · {b.reason} + {!b.complete && " · incomplete"} +
      +
      - + {confirmRestore === b.id && ( + restore(b.id)} + onCancel={() => setConfirmRestore(null)} + /> + )}
    • ))}
    )} - {confirmRestore && ( -

    - Restoring re-adds the saved packages and lets Windows install them where they fit. - It does not force a downgrade: if a newer driver is still installed, Windows may - keep preferring it. -

    - )} ); } diff --git a/apps/gui/src/pages/Hardware.tsx b/apps/gui/src/pages/Hardware.tsx index 6af850f..ddacf52 100644 --- a/apps/gui/src/pages/Hardware.tsx +++ b/apps/gui/src/pages/Hardware.tsx @@ -1,6 +1,6 @@ import { BatteryMedium, Cpu, HardDrive, HeartPulse, MemoryStick, Monitor, RefreshCw } from "lucide-react"; import type { ReactNode } from "react"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Badge, Button, @@ -28,7 +28,7 @@ export default function Hardware() { <> { @@ -98,7 +98,7 @@ export default function Hardware() { {formatSize(d.free_bytes)} free of {formatSize(d.size_bytes)}
    - 0.9 ? "danger" : used > 0.8 ? "warning" : "accent"} /> + 0.9 ? "danger" : used > 0.8 ? "warning" : "accent"} />
  • ); })} @@ -147,7 +147,7 @@ function HealthCard({ report }: { report: HealthReportDto }) { Hardware health } - description="Disks and batteries wear out on their own. Odysync reads what they report about themselves — nothing is estimated." + description="Disks and batteries wear out on their own. Odysync reads what they report about themselves; nothing is estimated." padded={false} >
      @@ -176,6 +176,7 @@ function HealthCard({ report }: { report: HealthReportDto }) { {d.wear_percent}% = 80 ? "danger" : d.wear_percent >= 50 ? "warning" : "success"} /> @@ -203,6 +204,7 @@ function HealthCard({ report }: { report: HealthReportDto }) { {report.battery.capacity_percent !== null && (
      = 80 diff --git a/apps/gui/src/pages/History.tsx b/apps/gui/src/pages/History.tsx index 1d4e4c1..a52f314 100644 --- a/apps/gui/src/pages/History.tsx +++ b/apps/gui/src/pages/History.tsx @@ -1,11 +1,12 @@ import { useState } from "react"; import { ArrowRight, History as HistoryIcon, RefreshCw, Trash2 } from "lucide-react"; import * as api from "../api"; -import { OutcomeIcon } from "./Updates"; -import { useStore } from "../store"; +import { OutcomeIcon } from "../components/OutcomeIcon"; +import { useStore } from "../store-context"; import { Button, Card, + ConfirmBar, EmptyState, ErrorBar, PageHeader, @@ -32,16 +33,12 @@ export default function History() { const failed = entries.filter((e) => e.status !== "updated" && e.status !== "skipped").length; const clear = async () => { - if (!confirmClear) { - setConfirmClear(true); - return; - } setConfirmClear(false); setClearing(true); setError(null); try { await api.clearUpdateHistory(); - await history.refresh(); + await history.reload(); } catch (e) { setError(errorText(e)); } finally { @@ -69,18 +66,27 @@ export default function History() { {entries.length > 0 && ( )} } /> + {confirmClear && entries.length > 0 && ( + void clear()} + onCancel={() => setConfirmClear(false)} + /> + )} {error && } {history.error && } @@ -97,7 +103,9 @@ export default function History() { history.loading && history.loadedAt === null ? "Loading history…" : entries.length === 0 - ? "Nothing installed yet" + ? history.error + ? "The history could not be read" + : "Nothing installed yet" : "No entry matches the filter" } /> @@ -111,13 +119,14 @@ export default function History() {
      {e.from_version} - + + to {e.to_version} · {e.backend} · {formatDate(e.timestamp)}
      {e.status !== "updated" && e.detail && ( -
      {e.detail}
      +
      {e.detail}
      )}
      diff --git a/apps/gui/src/pages/Logs.tsx b/apps/gui/src/pages/Logs.tsx index c5be845..ed902e7 100644 --- a/apps/gui/src/pages/Logs.tsx +++ b/apps/gui/src/pages/Logs.tsx @@ -1,7 +1,7 @@ import { useEffect, useMemo, useRef, useState } from "react"; import { ArrowDown, FolderOpen, RefreshCw, ScrollText } from "lucide-react"; import * as api from "../api"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Button, Card, @@ -12,6 +12,7 @@ import { Segmented, Switch, } from "../components/ui"; +import { errorText } from "../format"; const AUTO_REFRESH_MS = 5000; @@ -21,6 +22,7 @@ export default function Logs() { const [search, setSearch] = useState(""); const [follow, setFollow] = useState(true); const [autoScroll, setAutoScroll] = useState(true); + const [folderError, setFolderError] = useState(null); const viewportRef = useRef(null); const entries = logs.data; @@ -40,7 +42,7 @@ export default function Logs() { const refresh = logs.refresh; useEffect(() => { if (!follow) return; - const id = setInterval(() => void refresh(), AUTO_REFRESH_MS); + const id = setInterval(() => void refresh({ quiet: true }), AUTO_REFRESH_MS); return () => clearInterval(id); }, [follow, refresh]); @@ -79,12 +81,13 @@ export default function Logs() { @@ -99,7 +102,8 @@ export default function Logs() { } /> - {logs.error && } + {logs.error && } + {folderError && }
      @@ -126,7 +130,9 @@ export default function Logs() { logs.loading && logs.loadedAt === null ? "Reading the log…" : entries.length === 0 - ? "The log is empty" + ? logs.error + ? "The log could not be read" + : "The log is empty" : "No entry matches the filter" } /> @@ -135,6 +141,10 @@ export default function Logs() {
      {filtered.map((l, i) => ( diff --git a/apps/gui/src/pages/Maintenance.tsx b/apps/gui/src/pages/Maintenance.tsx index b853b6d..9dc504e 100644 --- a/apps/gui/src/pages/Maintenance.tsx +++ b/apps/gui/src/pages/Maintenance.tsx @@ -8,16 +8,16 @@ import { Stethoscope, } from "lucide-react"; import * as api from "../api"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Badge, Button, Card, Checkbox, + ConfirmBar, ErrorBar, PageHeader, SuccessBar, - WarningBar, } from "../components/ui"; import { errorText, formatSize } from "../format"; import type { @@ -38,7 +38,7 @@ const GROUPS: { id: Group; title: string; hint: string }[] = [ { id: "choice", title: "Your choice", - hint: "Harmless, but with a small cost — read the line under each before ticking it.", + hint: "Harmless, but with a small cost. Read the line under each before ticking it.", }, { id: "permanent", @@ -66,7 +66,8 @@ export default function Maintenance() { // Choices the user made, layered over each category's default. const [choices, setChoices] = useState>({}); - const [confirming, setConfirming] = useState(false); + // The selection the question was asked about; any other one closes it. + const [confirmFor, setConfirmFor] = useState(null); const [cleaning, setCleaning] = useState(false); const [results, setResults] = useState(null); const [error, setError] = useState(null); @@ -84,21 +85,18 @@ export default function Maintenance() { ); const selectedBytes = selected.reduce((n, i) => n + i.bytes, 0); const permanent = selected.filter((i) => i.needs_confirmation); + const selection = selected.map((i) => i.id).join("|"); + const confirming = confirmFor !== null && confirmFor === selection; const clean = async () => { - if (selected.length === 0) return; - if (permanent.length > 0 && !confirming) { - setConfirming(true); - return; - } - setConfirming(false); + setConfirmFor(null); setCleaning(true); setError(null); setResults(null); try { setResults(await api.cleanupRun(selected.map((i) => i.id))); setChoices({}); - await cleanup.refresh(); + await cleanup.reload(); } catch (e) { setError(errorText(e)); } finally { @@ -106,6 +104,12 @@ export default function Maintenance() { } }; + const start = () => { + if (selected.length === 0) return; + if (permanent.length > 0) setConfirmFor(selection); + else void clean(); + }; + const removed = results?.reduce((n, r) => n + r.removed_bytes, 0) ?? 0; const skippedCount = results?.reduce((n, r) => n + r.skipped.length, 0) ?? 0; @@ -127,6 +131,21 @@ export default function Maintenance() { /> {error && } + {cleanup.error && ( + void cleanup.refresh()} + icon={} + > + Try again + + } + /> + )} {results && (
      Selected
      - {cleanup.loadedAt === null ? "Measuring…" : formatSize(selectedBytes)} + {cleanup.loadedAt !== null + ? formatSize(selectedBytes) + : cleanup.error + ? "Not measured" + : "Measuring…"}
      {confirming && (
      - You selected {permanent.length === 1 ? "something" : "things"} that cannot be undone:{" "} {permanent.map((p) => ( - {p.label} — {p.consequence} + {p.label}: {p.consequence} ))} } + confirmLabel="Yes, delete permanently" + onConfirm={() => void clean()} + onCancel={() => setConfirmFor(null)} />
      )} @@ -188,10 +214,7 @@ export default function Maintenance() { label={`Clean ${item.label}`} checked={isSelected(item)} disabled={!selectable(item) || cleaning} - onChange={(v) => { - setConfirming(false); - setChoices((c) => ({ ...c, [item.id]: v })); - }} + onChange={(v) => setChoices((c) => ({ ...c, [item.id]: v }))} /> )} @@ -202,7 +225,10 @@ export default function Maintenance() {
      {item.error ? ( - could not measure + + could not measure + : {item.error} + ) : ( <>
      @@ -210,7 +236,7 @@ export default function Maintenance() { ? formatSize(item.bytes) : item.id === "component-store" ? "size unknown" - : "—"} + : "-"}
      {item.file_count > 0 && (
      @@ -253,7 +279,7 @@ function LargeFiles() { return ( void find()} busy={busy} icon={}> @@ -284,7 +310,13 @@ function LargeFiles() { size="sm" variant="ghost" icon={} - onClick={() => void api.revealPath(f.path).catch(() => {})} + aria-label={`Show ${f.path} in its folder`} + onClick={() => { + setError(null); + api + .revealPath(f.path) + .catch((e: unknown) => setError(`${f.path} could not be shown: ${errorText(e)}`)); + }} > Show @@ -293,7 +325,7 @@ function LargeFiles() {

    {report.scanned.toLocaleString()} files looked at - {report.truncated ? " — stopped at the time limit, so larger files may exist." : "."} + {report.truncated ? ", stopped at the time limit, so larger files may exist." : "."}

    )} @@ -310,6 +342,7 @@ function DiskTools({ elevated }: { elevated: boolean }) { const run = async (label: string, work: () => Promise) => { setBusy(label); setError(null); + setOutput(null); try { setOutput({ title: label, text: await work() }); } catch (e) { @@ -358,6 +391,7 @@ function DiskTools({ elevated }: { elevated: boolean }) { onClick={() => void (async () => { setBusy("plan"); + setError(null); try { setPlan(await api.diskOptimizationPlan()); } catch (e) { @@ -377,7 +411,7 @@ function DiskTools({ elevated }: { elevated: boolean }) {
    Repair system files

    - Runs DISM and SFC to find and fix damaged Windows files. Takes 10–30 minutes. + Runs DISM and SFC to find and fix damaged Windows files. Takes 10 to 30 minutes.

    - ) : undefined } > + {confirmClear && entries.length > 0 && ( +
    + setConfirmClear(false)} + /> +
    + )} {entries.length === 0 ? (
    - {v === true && } - {v === false && } + {v === true && } + {v === false && }
    -
    {e.package_id}
    +
    + {e.package_id} + {v === true && : checksum verified} + {v === false && ( + : checksum wrong or file missing + )} +
    {e.backend} · v{e.version} · {formatSize(e.size_bytes)} · {formatDate(e.cached_at)}
    @@ -146,10 +159,11 @@ export default function Offline() { size="sm" variant="ghost" disabled={busy} + aria-label={`Remove ${e.package_id} from the cache`} onClick={() => void run(async () => { await api.removeOfflineEntry(e.package_id, e.backend); - await offline.refresh(); + await offline.reload(); }) } > diff --git a/apps/gui/src/pages/Packages.tsx b/apps/gui/src/pages/Packages.tsx index 8e54dab..fef63a0 100644 --- a/apps/gui/src/pages/Packages.tsx +++ b/apps/gui/src/pages/Packages.tsx @@ -1,6 +1,6 @@ import { useMemo, useState } from "react"; import { Layers, RefreshCw } from "lucide-react"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Badge, Button, @@ -56,7 +56,7 @@ export default function Packages() { value={source} onChange={(e) => setSource(e.target.value)} aria-label="Source" - className="h-9 px-3 rounded-lg border border-line bg-canvas text-sm outline-none focus:border-accent" + className="h-9 px-3 rounded-lg border border-control bg-canvas text-sm outline-none focus:border-accent" > {sources.map((b) => ( @@ -77,7 +77,9 @@ export default function Packages() { packages.loading && packages.loadedAt === null ? "Asking every source what is installed…" : all.length === 0 - ? "Nothing found" + ? packages.error + ? "The installed packages could not be read" + : "Nothing found" : "No package matches the filter" } /> diff --git a/apps/gui/src/pages/Profiles.tsx b/apps/gui/src/pages/Profiles.tsx index f15a882..b833992 100644 --- a/apps/gui/src/pages/Profiles.tsx +++ b/apps/gui/src/pages/Profiles.tsx @@ -1,11 +1,12 @@ import { useState } from "react"; import { ListChecks, Plus, Trash2, X } from "lucide-react"; import * as api from "../api"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Badge, Button, Card, + ConfirmBar, EmptyState, ErrorBar, PageHeader, @@ -37,7 +38,7 @@ export default function Profiles() { setNewName(""); setNewPackages(""); setShowCreate(false); - await Promise.allSettled([profiles.refresh(), config.refresh()]); + await Promise.allSettled([profiles.reload(), config.reload()]); } catch (e) { setError(errorText(e)); } finally { @@ -46,16 +47,12 @@ export default function Profiles() { }; const remove = async (name: string) => { - if (confirmDelete !== name) { - setConfirmDelete(name); - return; - } setConfirmDelete(null); setBusy(true); setError(null); try { await api.deleteProfile(name); - await Promise.allSettled([profiles.refresh(), config.refresh()]); + await Promise.allSettled([profiles.reload(), config.reload()]); } catch (e) { setError(errorText(e)); } finally { @@ -67,10 +64,11 @@ export default function Profiles() { <> setShowCreate((v) => !v)} icon={showCreate ? : } > @@ -94,7 +92,7 @@ export default function Profiles() { type="text" value={newName} onChange={(e) => setNewName(e.target.value)} - className="w-full h-9 px-3 rounded-lg border border-line bg-canvas text-sm placeholder:text-faint outline-none focus:border-accent" + className="w-full h-9 px-3 rounded-lg border border-control bg-canvas text-sm placeholder:text-faint outline-none focus:border-accent" placeholder="Work tools" />
    @@ -107,7 +105,7 @@ export default function Profiles() { value={newPackages} onChange={(e) => setNewPackages(e.target.value)} rows={4} - className="w-full px-3 py-2 rounded-lg border border-line bg-canvas text-sm font-mono placeholder:text-faint outline-none focus:border-accent selectable" + className="w-full px-3 py-2 rounded-lg border border-control bg-canvas text-sm font-mono placeholder:text-faint outline-none focus:border-accent selectable" placeholder={"vscode\ngit\nnodejs"} />
    @@ -120,7 +118,7 @@ export default function Profiles() { )} - {list.length === 0 && !showCreate ? ( + {list.length === 0 && profiles.error !== null ? null : list.length === 0 && !showCreate ? ( } @@ -140,15 +138,25 @@ export default function Profiles() { actions={ } > + {confirmDelete === p.name && ( + void remove(p.name)} + onCancel={() => setConfirmDelete(null)} + /> + )} {p.packages.length === 0 ? (

    This profile is empty.

    ) : ( diff --git a/apps/gui/src/pages/Schedule.tsx b/apps/gui/src/pages/Schedule.tsx index 64ec575..3d37baf 100644 --- a/apps/gui/src/pages/Schedule.tsx +++ b/apps/gui/src/pages/Schedule.tsx @@ -1,7 +1,7 @@ import { useCallback, useEffect, useState } from "react"; import { CalendarClock, Trash2 } from "lucide-react"; import * as api from "../api"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Badge, Button, @@ -89,7 +89,7 @@ export default function Schedule() { <> {message && } @@ -99,7 +99,13 @@ export default function Schedule() { title="Automatic scan" actions={ - {checking || scheduled === null ? "Checking…" : scheduled ? "Active" : "Not scheduled"} + {checking + ? "Checking…" + : scheduled === null + ? "Unknown" + : scheduled + ? "Active" + : "Not scheduled"} } > @@ -125,7 +131,7 @@ export default function Schedule() { type="time" value={time} onChange={(e) => setTime(e.target.value)} - className="w-full h-9 px-3 rounded-lg border border-line bg-canvas text-sm outline-none focus:border-accent" + className="w-full h-9 px-3 rounded-lg border border-control bg-canvas text-sm outline-none focus:border-accent" />
    @@ -137,7 +143,7 @@ export default function Schedule() { type="text" value={taskName} onChange={(e) => setTaskName(e.target.value)} - className="w-full h-9 px-3 rounded-lg border border-line bg-canvas text-sm outline-none focus:border-accent" + className="w-full h-9 px-3 rounded-lg border border-control bg-canvas text-sm outline-none focus:border-accent" />
    diff --git a/apps/gui/src/pages/Security.tsx b/apps/gui/src/pages/Security.tsx index f3e77d4..4ac6be3 100644 --- a/apps/gui/src/pages/Security.tsx +++ b/apps/gui/src/pages/Security.tsx @@ -1,9 +1,10 @@ -import { useEffect, useMemo, useState } from "react"; +import { useId, useMemo, useState } from "react"; import { AlertTriangle, Bug, CheckCircle2, Circle, + CircleHelp, Eye, Loader2, Network, @@ -15,12 +16,12 @@ import { Wrench, } from "lucide-react"; import * as api from "../api"; -import { safeListen } from "../events"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { Badge, Button, Card, + ConfirmBar, EmptyState, ErrorBar, InfoBar, @@ -29,7 +30,7 @@ import { WarningBar, } from "../components/ui"; import { errorText, formatDate } from "../format"; -import type { Remediation, SectionProgress, SecurityFinding, Severity } from "../types"; +import type { Remediation, SecurityFinding, Severity } from "../types"; const SECTION_LABELS: Record = { defender: "Microsoft Defender", @@ -51,7 +52,7 @@ const SEVERITY: Record>({}); - useEffect( - () => - safeListen("security-progress", (e) => { - setSectionState((prev) => ({ ...prev, [e.payload.name]: e.payload })); - }), - [], - ); - // Clear the per-section board when a fresh audit starts. - useEffect(() => { - if (security.loading) setSectionState({}); - }, [security.loading]); - const sorted = useMemo( () => [...(report?.findings ?? [])].sort( @@ -154,17 +140,11 @@ export default function Security() { const applyFix = async (finding: SecurityFinding) => { if (!finding.remediation) return; - if (confirming !== finding.id) { - setConfirming(finding.id); - return; - } setConfirming(null); await run( `fix:${finding.id}`, () => api.applyRemediation(finding.remediation as Remediation), - async () => { - await security.refresh(); - }, + () => security.reload(), ); }; @@ -174,7 +154,7 @@ export default function Security() { <> void security.refresh()} @@ -200,9 +180,15 @@ export default function Security() { /> {!elevated && ( - + )} {error && } + {security.error && ( + + )} + {defender.error && ( + + )} {notice && } {d && (
    - - - + + +
    )} @@ -270,21 +263,31 @@ export default function Security() {
      {ALL_SECTIONS.map((name) => { - const s = sectionState[name]; + const s = security.sections[name]; const state = s?.state ?? "pending"; return (
    • {state === "done" ? ( - + ) : state === "failed" ? ( - + ) : state === "started" ? ( - + ) : ( - + )} {SECTION_LABELS[name] ?? name} + + :{" "} + {state === "done" + ? "done" + : state === "failed" + ? "failed" + : state === "started" + ? "running" + : "waiting"} + {s?.durationMs != null && ( @@ -326,7 +329,10 @@ export default function Security() { {open && ( -
      +                
                         {finding.evidence.join("\n")}
                       
      )} )} {finding.remediation?.kind === "manual" && ( -

      +

      What to do: {finding.remediation.instructions}

      @@ -474,16 +527,26 @@ function Finding({ {finding.remediation && finding.remediation.kind !== "manual" && ( )} + {confirming && finding.remediation && ( + + )}
    • ); } diff --git a/apps/gui/src/pages/Settings.tsx b/apps/gui/src/pages/Settings.tsx index 7fa5b13..c3402fd 100644 --- a/apps/gui/src/pages/Settings.tsx +++ b/apps/gui/src/pages/Settings.tsx @@ -1,7 +1,7 @@ -import { useState } from "react"; -import { CheckCircle2, Lock, Monitor, Moon, Sun } from "lucide-react"; +import { useId, useState } from "react"; +import { CheckCircle2, Lock, LockOpen, Monitor, Moon, Sun } from "lucide-react"; import * as api from "../api"; -import { useStore } from "../store"; +import { useStore } from "../store-context"; import { useTheme, type ThemeChoice } from "../theme"; import { Badge, @@ -15,7 +15,14 @@ import { Toggle, } from "../components/ui"; import { errorText } from "../format"; -import type { BackendDto, Config } from "../types"; +import type { BackendDto, Config, Hold } from "../types"; + +/** The exclusion list as it is stored, from what was typed. */ +const parseExclude = (text: string) => + text + .split("\n") + .map((s) => s.trim()) + .filter(Boolean); const same = (a: string, b: string) => a.toLowerCase() === b.toLowerCase(); @@ -25,6 +32,9 @@ export default function Settings() { // Unsaved edits. `null` means "no edits": the form shows the saved config. const [edits, setEdits] = useState(null); const draft = edits ?? config.data; + // The exclusion list as typed. Parsing it on every keystroke would remove + // the line break the moment it is entered. + const [excludeText, setExcludeText] = useState(null); const [error, setError] = useState(null); const [saving, setSaving] = useState(false); const [saved, setSaved] = useState(false); @@ -47,12 +57,17 @@ export default function Settings() { const save = async () => { if (!draft) return; + const toSave = + excludeText === null + ? draft + : { ...draft, policy: { ...draft.policy, exclude: parseExclude(excludeText) } }; setSaving(true); setError(null); try { - await api.saveConfig(draft); - await Promise.all([config.refresh(), backends.refresh()]); + await api.saveConfig(toSave); + await Promise.all([config.reload(), backends.reload()]); setEdits(null); + setExcludeText(null); setSaved(true); } catch (e) { setError(errorText(e)); @@ -64,12 +79,21 @@ export default function Settings() { const revert = async () => { await config.refresh(); setEdits(null); + setExcludeText(null); setSaved(false); setError(null); }; + // Holds are released on the spot and are not part of what is saved here, so + // they do not make the form dirty. + const comparable = (c: Config) => JSON.stringify({ ...c, policy: { ...c.policy, holds: [] } }); + const excludeEdited = + excludeText !== null && + config.data !== null && + parseExclude(excludeText).join("\n") !== config.data.policy.exclude.join("\n"); const dirty = - edits !== null && config.data !== null && JSON.stringify(edits) !== JSON.stringify(config.data); + excludeEdited || + (edits !== null && config.data !== null && comparable(edits) !== comparable(config.data)); /** Whether a source is switched on in the draft. */ const isOn = (b: BackendDto) => { @@ -156,7 +180,7 @@ export default function Settings() { /> patchPolicy({ require_known_versions: v })} /> @@ -168,26 +192,7 @@ export default function Settings() { onChange={(v) => patch({ restore_point: v })} /> )} - {draft.policy.holds.length > 0 && ( -
      -
      - - Held packages -
      -
      - {draft.policy.holds.map((h) => ( - - - - {h.package} - {h.pin ? ` @ ${h.pin}` : ""} - - - - ))} -
      -
      - )} + @@ -195,12 +200,6 @@ export default function Settings() {
      - patch({ auto_apply: v })} - /> -
      -
      - - patch({ proxy_url: e.target.value.trim() || null })} - className="w-full h-9 px-3 rounded-lg border border-line bg-canvas text-sm placeholder:text-faint focus:border-accent outline-none" - placeholder="http://proxy.example.com:8080" - /> -

      Leave empty for a direct connection.

      -
      -
      - - patch({ concurrency: Number(e.target.value) })} - className="w-full accent-[var(--accent)] mt-2" - /> -
      -
      + + patch({ proxy_url: e.target.value.trim() || null })} + aria-describedby="proxy-hint" + className="w-full h-9 px-3 rounded-lg border border-control bg-canvas text-sm placeholder:text-faint focus:border-accent outline-none" + placeholder="http://proxy.example.com:8080" + /> +

      + Leave empty for a direct connection. +