From 23bd8a23b70ab0bdbb4bfe8d54472fca21a0fcc2 Mon Sep 17 00:00:00 2001 From: Shayne Hartford Date: Thu, 15 Feb 2024 05:48:04 -0500 Subject: [PATCH] 2.5.0 - Refactoring --- .gitignore | 3 +- Cargo.lock | 1189 ++++++++++------- Cargo.toml | 6 +- loader/Cargo.toml | 7 +- loader/src/config.rs | 81 -- loader/src/lib.rs | 53 +- loader/src/main.rs | 34 +- plugin-clock/Cargo.toml | 5 + plugin-clock/src/config.rs | 61 - plugin-clock/src/lib.rs | 37 +- plugin-control/Cargo.toml | 6 +- plugin-control/src/windows.rs | 16 +- plugin-debug/Cargo.toml | 4 + plugin-debug/src/lib.rs | 3 +- plugin-lastfm/Cargo.toml | 8 +- plugin-lastfm/src/config.rs | 82 -- plugin-lastfm/src/lib.rs | 65 +- plugin-spotify/Cargo.toml | 13 +- plugin-spotify/src/chatbox.rs | 18 +- plugin-spotify/src/config.rs | 131 -- plugin-spotify/src/control.rs | 11 +- plugin-spotify/src/lib.rs | 177 ++- plugin-steamvr/Cargo.toml | 5 + plugin-steamvr/src/config.rs | 55 - plugin-steamvr/src/lib.rs | 27 +- plugin-steamvr/src/{manifest.rs => openvr.rs} | 29 +- rustfmt.toml | 4 +- 27 files changed, 1126 insertions(+), 1004 deletions(-) delete mode 100644 loader/src/config.rs delete mode 100644 plugin-clock/src/config.rs delete mode 100644 plugin-lastfm/src/config.rs delete mode 100644 plugin-spotify/src/config.rs delete mode 100644 plugin-steamvr/src/config.rs rename plugin-steamvr/src/{manifest.rs => openvr.rs} (76%) diff --git a/.gitignore b/.gitignore index 3d5af4d..72865cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.env .idea/ .vscode/ -target/ +target/ \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 71c5838..d22fdcd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,9 +29,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -54,9 +54,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ "cfg-if", "once_cell", @@ -96,9 +96,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -110,43 +110,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "aquamarine" @@ -179,26 +179,28 @@ dependencies = [ [[package]] name = "async-channel" -version = "1.9.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 2.5.3", + "event-listener 5.0.0", + "event-listener-strategy 0.5.0", "futures-core", + "pin-project-lite", ] [[package]] name = "async-executor" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ - "async-lock", + "async-lock 3.3.0", "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite", + "futures-lite 2.2.0", "slab", ] @@ -208,10 +210,10 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "blocking", - "futures-lite", + "futures-lite 1.13.0", ] [[package]] @@ -220,11 +222,11 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "cfg-if", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", "polling 2.8.0", @@ -236,22 +238,21 @@ dependencies = [ [[package]] name = "async-io" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10da8f3146014722c89e7859e1d7bb97873125d7346d10ca642ffab794355828" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ - "async-lock", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite", + "futures-lite 2.2.0", "parking", - "polling 3.3.0", - "rustix 0.38.21", + "polling 3.4.0", + "rustix 0.38.31", "slab", "tracing", - "waker-fn", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -263,6 +264,17 @@ dependencies = [ "event-listener 2.5.3", ] +[[package]] +name = "async-lock" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +dependencies = [ + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", + "pin-project-lite", +] + [[package]] name = "async-process" version = "1.8.1" @@ -270,13 +282,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ "async-io 1.13.0", - "async-lock", + "async-lock 2.8.0", "async-signal", "blocking", "cfg-if", - "event-listener 3.0.1", - "futures-lite", - "rustix 0.38.21", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.31", "windows-sys 0.48.0", ] @@ -288,7 +300,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -297,13 +309,13 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.1.0", - "async-lock", + "async-io 2.3.1", + "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.21", + "rustix 0.38.31", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -311,19 +323,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.5.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -381,7 +393,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.38", + "syn 2.0.48", "which", ] @@ -394,7 +406,7 @@ dependencies = [ "autocxx-engine", "env_logger", "indexmap 1.9.3", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -421,7 +433,7 @@ dependencies = [ "rustversion", "serde_json", "strum_macros", - "syn 2.0.38", + "syn 2.0.48", "tempfile", "thiserror", "version_check", @@ -437,7 +449,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -454,7 +466,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.38", + "syn 2.0.48", "thiserror", ] @@ -475,9 +487,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bitflags" @@ -487,9 +499,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "block-buffer" @@ -511,16 +523,16 @@ dependencies = [ [[package]] name = "blocking" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ "async-channel", - "async-lock", + "async-lock 3.3.0", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite", + "futures-lite 2.2.0", "piper", "tracing", ] @@ -585,22 +597,22 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", "serde", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] name = "chunked_transfer" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cca491388666e04d7248af3f60f0c40cfb0991c72205595d7c396e3510207d1a" +checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" [[package]] name = "cipher" @@ -614,13 +626,13 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", - "libloading 0.7.4", + "libloading", ] [[package]] @@ -651,26 +663,13 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] -[[package]] -name = "console" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.45.0", -] - [[package]] name = "const-random" version = "0.1.17" @@ -719,9 +718,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cookie" -version = "0.16.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" dependencies = [ "percent-encoding", "time", @@ -730,12 +729,12 @@ dependencies = [ [[package]] name = "cookie_store" -version = "0.16.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d606d0fba62e13cf04db20536c05cb7f13673c161cb47a47a82b9b9e7d3f1daa" +checksum = "387461abbc748185c3a6e1673d826918b450b87ff22639429c694619a83b6cf6" dependencies = [ "cookie", - "idna 0.2.3", + "idna 0.3.0", "log", "publicsuffix", "serde", @@ -747,9 +746,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -757,9 +756,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" @@ -776,9 +775,9 @@ dependencies = [ [[package]] name = "core-graphics-types" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -787,20 +786,42 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crossterm" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" dependencies = [ - "cfg-if", + "bitflags 1.3.2", + "crossterm_winapi", + "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", ] [[package]] @@ -831,9 +852,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.110" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7129e341034ecb940c9072817cd9007974ea696844fc4dd582dc1653a7fbe2e8" +checksum = "8aff472b83efd22bfc0176aa8ba34617dd5c17364670eb201a5f06d339b8abf7" dependencies = [ "cc", "cxxbridge-flags", @@ -843,38 +864,38 @@ dependencies = [ [[package]] name = "cxx-gen" -version = "0.7.110" +version = "0.7.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e0fc77e9f8d61724be90deb42a7e50ba3bf37c7c16dc91cdba821f69a5e0e9" +checksum = "8a2a39f7064dacffa9bf2d33d8dcc7777b60c789a95e1cd62d5fbeb1161428f2" dependencies = [ "codespan-reporting", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "cxxbridge-flags" -version = "1.0.110" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06fdd177fc61050d63f67f5bd6351fac6ab5526694ea8e359cd9cd3b75857f44" +checksum = "589e83d02fc1d4fb78f5ad56ca08835341e23499d086d2821315869426d618dc" [[package]] name = "cxxbridge-macro" -version = "1.0.110" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" +checksum = "e2cb1fd8ffae4230c7cfbbaf3698dbeaf750fa8c5dadf7ed897df581b9b572a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "darling" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" dependencies = [ "darling_core", "darling_macro", @@ -882,34 +903,34 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" dependencies = [ "darling_core", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -926,6 +947,29 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-config" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8056d045da0a44457ac95657fd8d1c64c287b2dc94640abc1fddeaf8ad709ea3" +dependencies = [ + "derive-macros", + "dirs", + "duplicate", + "thiserror", + "toml 0.8.10", +] + +[[package]] +name = "derive-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbe1bc99631ea7de6584eb8cceacf560490d34b46ff083938736d53a23e5f64" +dependencies = [ + "quote", + "syn 2.0.48", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -939,19 +983,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "dialoguer" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" -dependencies = [ - "console", - "shell-words", - "tempfile", - "thiserror", - "zeroize", -] - [[package]] name = "digest" version = "0.10.7" @@ -963,6 +994,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "dlv-list" version = "0.5.2" @@ -973,16 +1025,44 @@ dependencies = [ ] [[package]] -name = "either" -version = "1.9.0" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] -name = "encode_unicode" -version = "0.3.6" +name = "dotenvy_macro" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0235d912a8c749f4e0c9f18ca253b4c28cfefc1d2518096016d6e3230b6424" +dependencies = [ + "dotenvy", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "duplicate" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "de78e66ac9061e030587b2a2e75cc88f22304913c907b11307bca737141230cb" +dependencies = [ + "heck", + "proc-macro-error", +] + +[[package]] +name = "dyn-clone" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" + +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "encoding_rs" @@ -1003,14 +1083,14 @@ dependencies = [ "libc", "objc", "pkg-config", - "windows", + "windows 0.51.1", ] [[package]] name = "enumflags2" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" dependencies = [ "enumflags2_derive", "serde", @@ -1018,13 +1098,13 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1045,7 +1125,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1069,12 +1149,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1085,15 +1165,57 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.0.1" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cec0252c2afff729ee6f00e903d479fba81784c8e2bd77447673471fdfaea1" +checksum = "b72557800024fabbaa2449dd4bf24e37b93702d457a4d4f2b0dd1f0f039f20c1" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +dependencies = [ + "event-listener 5.0.0", + "pin-project-lite", +] + [[package]] name = "fallible-iterator" version = "0.2.0" @@ -1170,7 +1292,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1187,33 +1309,33 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -1230,23 +1352,36 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +dependencies = [ + "fastrand 2.0.1", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", @@ -1270,9 +1405,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -1291,9 +1426,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -1303,9 +1438,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -1313,7 +1448,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.2.3", "slab", "tokio", "tokio-util", @@ -1334,9 +1469,9 @@ checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", @@ -1348,7 +1483,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -1368,9 +1503,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" [[package]] name = "hex" @@ -1389,18 +1524,18 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1409,9 +1544,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -1432,9 +1567,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "human-panic" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b82da652938b83f94cfdaaf9ae7aaadb8430d84b0dfda226998416318727eac2" +checksum = "c4f016c89920bbb30951a8405ecacbb4540db5524313b9445736e7e1855cf370" dependencies = [ "anstream", "anstyle", @@ -1442,7 +1577,7 @@ dependencies = [ "os_info", "serde", "serde_derive", - "toml 0.7.8", + "toml 0.8.10", "uuid", ] @@ -1454,9 +1589,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -1469,7 +1604,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -1505,16 +1640,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -1532,17 +1667,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.3.0" @@ -1555,9 +1679,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1576,12 +1700,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "serde", ] @@ -1601,6 +1725,22 @@ dependencies = [ "generic-array", ] +[[package]] +name = "inquire" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33e7c1ddeb15c9abcbfef6029d8e29f69b52b6d6c891031b88ed91b5065803b" +dependencies = [ + "bitflags 1.3.2", + "crossterm", + "dyn-clone", + "lazy_static", + "newline-converter", + "thiserror", + "unicode-segmentation", + "unicode-width", +] + [[package]] name = "instant" version = "0.1.12" @@ -1616,7 +1756,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.6", "libc", "windows-sys 0.48.0", ] @@ -1647,9 +1787,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jni" @@ -1675,18 +1815,18 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -1705,15 +1845,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libesedb" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40530440586ce2f7a30fc0867a5faf07767c70cb56c7776cc125409bc45432af" +checksum = "365ccadc1c3b42f16af2a582d59699437c1800d9afc3b93682a3259966671519" dependencies = [ "libesedb-sys", "time", @@ -1731,22 +1871,23 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if", - "winapi", + "windows-sys 0.48.0", ] [[package]] -name = "libloading" -version = "0.8.1" +name = "libredox" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "bitflags 2.4.2", + "libc", + "redox_syscall", ] [[package]] @@ -1777,9 +1918,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -1799,9 +1940,9 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lz4_flex" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea9b256699eda7b0387ffbc776dd625e28bde3918446381781245b7a50349d8" +checksum = "912b45c753ff5f7f5208307e8ace7d2a2e30d024e26d3509f3dce546c044ce15" dependencies = [ "twox-hash", ] @@ -1815,28 +1956,22 @@ dependencies = [ "libc", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "maybe-async" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1b8c13cb1f814b634a96b2c725449fe7ed464a7b8781de8688be5ffbd3f305" +checksum = "afc95a651c82daf7004c824405aa1019723644950d488571bd718e3ed84646ed" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memoffset" @@ -1847,6 +1982,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "miette" version = "5.10.0" @@ -1867,7 +2011,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1884,20 +2028,21 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", + "log", "wasi", "windows-sys 0.48.0", ] @@ -1935,6 +2080,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" +[[package]] +name = "newline-converter" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f71d09d5c87634207f894c6b31b6a2b2c64ea3bdcf71bd5599fdbbe1600c00f" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "nix" version = "0.26.4" @@ -1944,7 +2098,7 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", + "memoffset 0.7.1", ] [[package]] @@ -1966,11 +2120,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -1981,7 +2141,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.6", "libc", ] @@ -1996,18 +2156,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -2017,11 +2177,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.59" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if", "foreign-types 0.3.2", "libc", @@ -2038,7 +2198,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -2049,9 +2209,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.95" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -2059,6 +2219,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "ordered-multimap" version = "0.6.0" @@ -2180,9 +2346,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" @@ -2209,35 +2375,36 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plugin-clock" -version = "2.4.0" +version = "2.5.0" dependencies = [ "anyhow", + "derive-config", "rosc", "serde", "tokio", - "toml 0.8.6", + "toml 0.8.10", ] [[package]] name = "plugin-control" -version = "2.4.0" +version = "2.5.0" dependencies = [ "anyhow", "enigo", "rosc", "tokio", - "windows", + "windows 0.52.0", ] [[package]] name = "plugin-debug" -version = "2.4.0" +version = "2.5.0" dependencies = [ "anyhow", "rosc", @@ -2246,10 +2413,12 @@ dependencies = [ [[package]] name = "plugin-lastfm" -version = "2.4.0" +version = "2.5.0" dependencies = [ "anyhow", - "dialoguer", + "derive-config", + "dotenvy_macro", + "inquire", "reqwest", "rosc", "serde", @@ -2257,38 +2426,41 @@ dependencies = [ "structstruck", "terminal-link", "tokio", - "toml 0.8.6", + "toml 0.8.10", ] [[package]] name = "plugin-spotify" -version = "2.4.0" +version = "2.5.0" dependencies = [ "anyhow", - "dialoguer", + "derive-config", + "dotenvy_macro", "ferrispot", + "inquire", "rosc", "serde", "spotify-lyrics", "terminal-link", "tiny_http", "tokio", - "toml 0.8.6", + "toml 0.8.10", "url", "webbrowser", ] [[package]] name = "plugin-steamvr" -version = "2.4.0" +version = "2.5.0" dependencies = [ "anyhow", + "derive-config", "ovr_overlay", "serde", "serde_json", "structstruck", "tokio", - "toml 0.8.6", + "toml 0.8.10", ] [[package]] @@ -2309,16 +2481,16 @@ dependencies = [ [[package]] name = "polling" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14" dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.21", + "rustix 0.38.31", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2347,12 +2519,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -2391,9 +2563,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -2416,9 +2588,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -2468,11 +2640,22 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_users" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -2482,9 +2665,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -2499,9 +2682,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ "base64", "bytes", @@ -2529,6 +2712,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -2544,9 +2728,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", "getrandom", @@ -2558,9 +2742,9 @@ dependencies = [ [[package]] name = "rookie" -version = "0.3.2" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04490157326abe75471b0cbc8f872d93a3905db610d7ab14ebc5a2a6e52aa8c5" +checksum = "2c6cd67ad54afe57c30989d0a70dbd7fbb96d28f1be6f597c6dc96ec2edba671" dependencies = [ "aes", "aes-gcm", @@ -2581,7 +2765,7 @@ dependencies = [ "serde_json", "sha1", "url", - "windows", + "windows 0.51.1", "zbus", "zvariant", ] @@ -2602,7 +2786,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -2657,22 +2841,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys 0.4.10", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.13", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.8" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring", @@ -2682,9 +2866,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64", ] @@ -2707,9 +2891,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -2722,11 +2906,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2770,15 +2954,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] @@ -2794,20 +2978,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -2816,20 +3000,20 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -2848,16 +3032,17 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.4.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +checksum = "15d167997bd841ec232f5b2b8e0e26606df2e7caa4c31b95ea9ca52b200bd270" dependencies = [ "base64", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.1.0", + "indexmap 2.2.3", "serde", + "serde_derive", "serde_json", "serde_with_macros", "time", @@ -2865,14 +3050,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.4.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +checksum = "865f9743393e638991566a8b7a479043c2c8da94a33e0a31f18214c9cae0a64d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -2898,16 +3083,31 @@ dependencies = [ ] [[package]] -name = "shell-words" -version = "1.1.0" +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] -name = "shlex" -version = "1.2.0" +name = "signal-hook" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +dependencies = [ + "libc", + "mio", + "signal-hook", +] [[package]] name = "signal-hook-registry" @@ -2935,9 +3135,9 @@ checksum = "a4f120bb98cb4cb0dab21c882968c3cbff79dd23b46f07b1cf5c25044945ce84" [[package]] name = "smallvec" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" @@ -3039,15 +3239,21 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "system-configuration" version = "0.5.1" @@ -3071,22 +3277,21 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", "fastrand 2.0.1", - "redox_syscall", - "rustix 0.38.21", - "windows-sys 0.48.0", + "rustix 0.38.31", + "windows-sys 0.52.0", ] [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -3099,32 +3304,33 @@ checksum = "253bcead4f3aa96243b0f8fa46f9010e87ca23bd5d0c723d474ff1d2417bbdf8" [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "time" -version = "0.3.30" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -3139,10 +3345,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -3184,9 +3391,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.33.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -3203,13 +3410,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -3257,26 +3464,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff9e3abce27ee2c9a37f9ad37238c1bdd4e789c84ba37df76aa4d528f5072cc" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.20.7", + "toml_edit 0.22.5", ] [[package]] @@ -3294,24 +3489,22 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", - "serde", - "serde_spanned", + "indexmap 2.2.3", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "99e68c159e8f5ba8a28c4eb7b0c0c190d77bb479047ca713270048145a9ad28a" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.3", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.1", ] [[package]] @@ -3339,7 +3532,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -3353,9 +3546,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "twox-hash" @@ -3375,19 +3568,20 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uds_windows" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ + "memoffset 0.9.0", "tempfile", "winapi", ] [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -3404,6 +3598,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + [[package]] name = "unicode-width" version = "0.1.11" @@ -3434,12 +3634,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] @@ -3451,9 +3651,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "getrandom", ] @@ -3482,19 +3682,20 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vrc-osc" -version = "2.4.0" +version = "2.5.0" dependencies = [ "anyhow", - "dialoguer", + "derive-config", "human-panic", - "libloading 0.8.1", + "inquire", + "libloading", "path-absolutize", "reqwest", "rosc", "serde", "terminal-link", "tokio", - "toml 0.8.6", + "toml 0.8.10", "walkdir", "winres", ] @@ -3532,9 +3733,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3542,24 +3743,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -3569,9 +3770,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3579,28 +3780,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", @@ -3625,9 +3826,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "which" @@ -3638,7 +3839,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.21", + "rustix 0.38.31", ] [[package]] @@ -3678,10 +3879,20 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core", + "windows-core 0.51.1", "windows-targets 0.48.5", ] +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core 0.52.0", + "windows-targets 0.52.0", +] + [[package]] name = "windows-core" version = "0.51.1" @@ -3691,6 +3902,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -3709,6 +3929,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -3739,6 +3968,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -3751,6 +3995,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -3763,6 +4013,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -3775,6 +4031,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -3787,6 +4049,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -3799,6 +4067,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -3811,6 +4085,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -3823,11 +4103,26 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + [[package]] name = "winnow" -version = "0.5.19" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "d90f4e0f530c4c69f62b80d839e9ef3855edc9cba471a160c4d692deed62b401" dependencies = [ "memchr", ] @@ -3853,25 +4148,25 @@ dependencies = [ [[package]] name = "xdg-home" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" +checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" dependencies = [ - "nix", + "libc", "winapi", ] [[package]] name = "zbus" -version = "3.14.1" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" +checksum = "c45d06ae3b0f9ba1fb2671268b975557d8f5a84bb5ec6e43964f87e763d8bca8" dependencies = [ "async-broadcast", "async-executor", "async-fs", "async-io 1.13.0", - "async-lock", + "async-lock 2.8.0", "async-process", "async-recursion", "async-task", @@ -3904,9 +4199,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.14.1" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" +checksum = "b4a1ba45ed0ad344b85a2bb5a1fe9830aed23d67812ea39a586e7d0136439c7d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3929,30 +4224,24 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.25" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.25" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] -[[package]] -name = "zeroize" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" - [[package]] name = "zvariant" version = "3.15.0" diff --git a/Cargo.toml b/Cargo.toml index e61bac7..6b5d8ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ ] [workspace.package] -version = "2.4.0" +version = "2.5.0" authors = ["Shayne Hartford "] edition = "2021" readme = "README.md" @@ -20,7 +20,9 @@ license = "MIT" [workspace.dependencies] anyhow = "1" -dialoguer = "0.11" +derive-config = "2" +dotenvy_macro = "0.15" +inquire = "0.6" rosc = "0.10" serde = "1" structstruck = "0.4" diff --git a/loader/Cargo.toml b/loader/Cargo.toml index 41cae2d..72dd2c8 100644 --- a/loader/Cargo.toml +++ b/loader/Cargo.toml @@ -8,8 +8,9 @@ homepage = "https://git.shaybox.com/vrc-osc/releases/latest" [dependencies] anyhow.workspace = true -dialoguer.workspace = true +derive-config = { workspace = true, default-features = false, features = ["toml"] } human-panic = "1" +inquire.workspace = true libloading = "0.8" path-absolutize = "3" reqwest = "0.11" @@ -22,3 +23,7 @@ walkdir = "2" [build-dependencies] winres = "0.1" + +[lints.clippy] +pedantic = "warn" +nursery = "warn" diff --git a/loader/src/config.rs b/loader/src/config.rs deleted file mode 100644 index 2f51ed7..0000000 --- a/loader/src/config.rs +++ /dev/null @@ -1,81 +0,0 @@ -use std::{ - fs::File, - io::{Read, Seek, Write}, - path::PathBuf, - process::exit, -}; - -use anyhow::Result; -use dialoguer::Confirm; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct LoaderConfig { - pub enabled: Vec, - pub bind_addr: String, - pub send_addr: String, -} - -impl Default for LoaderConfig { - fn default() -> Self { - Self { - enabled: Default::default(), - bind_addr: "0.0.0.0:9001".into(), - send_addr: "127.0.0.1:9000".into(), - } - } -} - -impl LoaderConfig { - pub fn get_path() -> Result { - let mut path = std::env::current_exe()?; - path.set_extension("toml"); - - Ok(path) - } - - pub fn load() -> Result { - let path = Self::get_path()?; - let mut file = File::options() - .read(true) - .write(true) - .create(true) - .open(path)?; - - let mut text = String::new(); - file.read_to_string(&mut text)?; - file.rewind()?; - - match toml::from_str(&text) { - Ok(config) => Ok(config), - Err(_) => { - let mut config = LoaderConfig::default(); - config.setup_wizard()?; - - let text = toml::to_string_pretty(&config)?; - file.write_all(text.as_bytes())?; - - Ok(config) - } - } - } - - pub fn setup_wizard(&mut self) -> Result<()> { - let mut filenames = crate::get_plugin_names()?; - filenames.sort(); - - for filename in filenames { - let prompt = format!("Would you like to enable the {filename} plugin"); - if Confirm::new().with_prompt(prompt).interact()? { - self.enabled.push(filename.to_owned()); - } - } - - if self.enabled.is_empty() { - println!("You must enable at least one plugin"); - exit(1); - } - - Ok(()) - } -} diff --git a/loader/src/lib.rs b/loader/src/lib.rs index 9b1b13c..a844b05 100644 --- a/loader/src/lib.rs +++ b/loader/src/lib.rs @@ -3,23 +3,39 @@ use std::{ net::{SocketAddr, UdpSocket}, }; -use anyhow::Result; +use anyhow::{Context, Result}; +use derive_config::DeriveTomlConfig; use libloading::{Library, Symbol}; use path_absolutize::Absolutize; +use serde::{Deserialize, Serialize}; use walkdir::{DirEntry, WalkDir}; -use crate::config::LoaderConfig; - -pub mod config; - pub const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); pub const CARGO_PKG_HOMEPAGE: &str = env!("CARGO_PKG_HOMEPAGE"); +#[derive(Clone, Debug, DeriveTomlConfig, Deserialize, Serialize)] +pub struct Config { + pub enabled: Vec, + pub bind_addr: String, + pub send_addr: String, +} + +impl Default for Config { + fn default() -> Self { + Self { + enabled: Vec::default(), + bind_addr: "0.0.0.0:9001".into(), + send_addr: "127.0.0.1:9000".into(), + } + } +} + +/// # Errors +/// +/// Will return `Err` if couldn't get the current exe or dir path pub fn get_plugin_names() -> Result> { let current_exe = std::env::current_exe()?; - let Some(current_dir) = current_exe.parent() else { - panic!("This shouldn't be possible"); - }; + let current_dir = current_exe.parent().context("This shouldn't be possible")?; let paths = WalkDir::new(current_dir) .max_depth(1) @@ -48,14 +64,16 @@ pub fn get_plugin_names() -> Result> { Ok(libraries) } -pub fn load_plugins( - plugin_names: Vec, - loader_config: &LoaderConfig, -) -> Result> { +/// # Errors +/// +/// Will return `Err` if couldn't get the current exe or dir path +/// +/// # Panics +/// +/// Will panic if a plugin fails to load +pub fn load_plugins(plugin_names: Vec, loader_config: &Config) -> Result> { let current_exe = std::env::current_exe()?; - let Some(current_dir) = current_exe.parent() else { - panic!("This shouldn't be possible"); - }; + let current_dir = current_exe.parent().context("This shouldn't be possible")?; let mut addrs = Vec::new(); for filename in plugin_names { @@ -93,12 +111,15 @@ pub fn load_plugins( Ok(addrs) } +/// # Errors +/// +/// Will return `Err` if couldn't get the GitHub repository pub async fn check_for_updates() -> Result { let response = reqwest::get(CARGO_PKG_HOMEPAGE).await?; let url = response.url(); let path = url.path(); let Some(remote_version) = path.split('/').last() else { - return Ok(false) + return Ok(false); }; Ok(remote_version > CARGO_PKG_VERSION) diff --git a/loader/src/main.rs b/loader/src/main.rs index daea145..6b2ee70 100644 --- a/loader/src/main.rs +++ b/loader/src/main.rs @@ -1,9 +1,11 @@ use std::net::UdpSocket; use anyhow::Result; +use derive_config::DeriveTomlConfig; +use inquire::Confirm; use rosc::decoder::MTU; use terminal_link::Link; -use vrc_osc::{config::LoaderConfig, CARGO_PKG_HOMEPAGE}; +use vrc_osc::{Config, CARGO_PKG_HOMEPAGE}; #[tokio::main] async fn main() -> Result<()> { @@ -14,10 +16,32 @@ async fn main() -> Result<()> { println!("{link}"); } - let loader_config = LoaderConfig::load()?; - let loader_socket = UdpSocket::bind(&loader_config.bind_addr)?; + let config = if let Ok(config) = Config::load() { + config + } else { + let mut config = Config::default(); + let mut filenames = vrc_osc::get_plugin_names()?; + filenames.sort(); + + for filename in filenames { + let prompt = format!("Would you like to enable the {filename} plugin"); + if Confirm::new(&prompt).with_default(false).prompt()? { + config.enabled.push(filename.clone()); + } + } + + if config.enabled.is_empty() { + println!("You must enable at least one plugin"); + std::process::exit(1); + } + + config.save()?; + config + }; + + let loader_socket = UdpSocket::bind(&config.bind_addr)?; let plugin_names = vrc_osc::get_plugin_names()?; - let plugin_addrs = vrc_osc::load_plugins(plugin_names, &loader_config)?; + let plugin_addrs = vrc_osc::load_plugins(plugin_names, &config)?; loop { let mut buf = [0u8; MTU]; @@ -27,7 +51,7 @@ async fn main() -> Result<()> { // Plugins -> VRChat if plugin_addrs.contains(&recv_addr) { - loader_socket.send_to(&buf[..size], &loader_config.send_addr)?; + loader_socket.send_to(&buf[..size], &config.send_addr)?; continue; } diff --git a/plugin-clock/Cargo.toml b/plugin-clock/Cargo.toml index 3342c7d..6a61761 100644 --- a/plugin-clock/Cargo.toml +++ b/plugin-clock/Cargo.toml @@ -11,7 +11,12 @@ crate-type = ["cdylib"] [dependencies] anyhow.workspace = true +derive-config = { workspace = true, default-features = false, features = ["toml"] } rosc.workspace = true serde = { workspace = true, features = ["derive"] } tokio = { workspace = true, features = ["macros", "rt"] } toml.workspace = true + +[lints.clippy] +pedantic = "warn" +nursery = "warn" diff --git a/plugin-clock/src/config.rs b/plugin-clock/src/config.rs deleted file mode 100644 index ef3b00c..0000000 --- a/plugin-clock/src/config.rs +++ /dev/null @@ -1,61 +0,0 @@ -use std::{ - fs::File, - io::{Read, Seek, Write}, - path::PathBuf, -}; - -use anyhow::Result; -use serde::{Deserialize, Serialize}; - -const CARGO_CRATE_NAME: &str = env!("CARGO_CRATE_NAME"); - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct ClockConfig { - pub mode: bool, - pub polling: u64, - pub smooth: bool, -} - -impl Default for ClockConfig { - fn default() -> Self { - Self { - mode: false, - polling: 1000, - smooth: false, - } - } -} - -impl ClockConfig { - pub fn get_path() -> Result { - let mut path = std::env::current_exe()?; - path.set_file_name(CARGO_CRATE_NAME); - path.set_extension("toml"); - - Ok(path) - } - - pub fn load() -> Result { - let path = Self::get_path()?; - let mut file = File::options() - .read(true) - .write(true) - .create(true) - .open(path)?; - - let mut text = String::new(); - file.read_to_string(&mut text)?; - file.rewind()?; - - match toml::from_str(&text) { - Ok(config) => Ok(config), - Err(_) => { - let config = ClockConfig::default(); - let text = toml::to_string_pretty(&config)?; - file.write_all(text.as_bytes())?; - - Ok(config) - } - } - } -} diff --git a/plugin-clock/src/lib.rs b/plugin-clock/src/lib.rs index 5e97309..61bc591 100644 --- a/plugin-clock/src/lib.rs +++ b/plugin-clock/src/lib.rs @@ -1,3 +1,6 @@ +#![allow(clippy::cast_possible_truncation)] +#![allow(clippy::cast_precision_loss)] + use std::{ collections::HashMap, net::UdpSocket, @@ -5,27 +8,43 @@ use std::{ }; use anyhow::Result; +use derive_config::DeriveTomlConfig; use rosc::{OscMessage, OscPacket, OscType}; +use serde::{Deserialize, Serialize}; -use crate::config::ClockConfig; +#[derive(Clone, Debug, DeriveTomlConfig, Deserialize, Serialize)] +pub struct Config { + pub mode: bool, + pub polling: u64, + pub smooth: bool, +} -mod config; +impl Default for Config { + fn default() -> Self { + Self { + mode: false, + polling: 1000, + smooth: false, + } + } +} #[no_mangle] +#[allow(clippy::needless_pass_by_value)] #[tokio::main(flavor = "current_thread")] -async fn load(socket: UdpSocket) -> Result<()> { - let config = ClockConfig::load()?; +async extern "Rust" fn load(socket: UdpSocket) -> Result<()> { + let config = Config::load()?; loop { let duration = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH)?; let seconds = duration.as_secs(); - let mut hours = (seconds / 3600) as f32; - let mut minutes = ((seconds % 3600) / 60) as f32; - let mut seconds = (seconds % 60) as f32; + let mut hours = (seconds / 3600) as f64; + let mut minutes = ((seconds % 3600) / 60) as f64; + let mut seconds = (seconds % 60) as f64; if config.smooth { - let millis = duration.subsec_millis() as f32; + let millis = f64::from(duration.subsec_millis()); seconds += millis / 1000.0; minutes += seconds / 60.0; hours += minutes / 60.0; @@ -41,7 +60,7 @@ async fn load(socket: UdpSocket) -> Result<()> { for (parameter, arg) in parameters { let packet = OscPacket::Message(OscMessage { addr: "/avatar/parameters/VRCOSC/Clock/".to_owned() + parameter, - args: vec![OscType::Float(arg)], + args: vec![OscType::Float(arg as f32)], }); let msg_buf = rosc::encoder::encode(&packet)?; diff --git a/plugin-control/Cargo.toml b/plugin-control/Cargo.toml index 33a85cc..a7a92e2 100644 --- a/plugin-control/Cargo.toml +++ b/plugin-control/Cargo.toml @@ -15,7 +15,11 @@ rosc.workspace = true tokio = { workspace = true, features = ["macros", "rt"] } [target.'cfg(windows)'.dependencies] -windows = { version = "0.51", features = ["Foundation", "Media_Control"] } +windows = { version = "0.52", features = ["Foundation", "Media_Control"] } [target.'cfg(unix)'.dependencies] enigo = "0.1" + +[lints.clippy] +pedantic = "warn" +nursery = "warn" diff --git a/plugin-control/src/windows.rs b/plugin-control/src/windows.rs index dd8c49c..d4b5f43 100644 --- a/plugin-control/src/windows.rs +++ b/plugin-control/src/windows.rs @@ -10,11 +10,16 @@ use windows::Media::{ MediaPlaybackAutoRepeatMode, }; +/// # Errors +/// +/// # Panics #[no_mangle] +#[allow(clippy::needless_pass_by_value)] #[tokio::main(flavor = "current_thread")] -pub async fn load(socket: UdpSocket) -> Result<()> { +pub async extern "Rust" fn load(socket: UdpSocket) -> Result<()> { let manager = GSMTCSM::RequestAsync()?.await?; let mut buf = [0u8; MTU]; + loop { let size = socket.recv(&mut buf)?; let (_buf, packet) = rosc::decoder::decode_udp(&buf[..size])?; @@ -74,12 +79,13 @@ pub async fn load(socket: UdpSocket) -> Result<()> { let timeline = session.GetTimelineProperties()?; let min = timeline.MinSeekTime()?.Duration; let max = timeline.MaxSeekTime()?.Duration; - let playback_position = (min + (max - min) * (position * 100.0) as i64) / 100; + #[allow(clippy::cast_possible_truncation)] + let playback_position = (min + (max - min) * (position * 100.0) as i64) / 100; session.TryChangePlaybackPositionAsync(playback_position) } _ => { - let _ = try_sync_media_state_to_vrchat_menu_parameters(&socket, &session); + let _ = try_sync_media_state(&socket, &session); continue; } }? @@ -87,8 +93,8 @@ pub async fn load(socket: UdpSocket) -> Result<()> { } } -/// Try to synchronize the media session state to the VRChat menu parameters -fn try_sync_media_state_to_vrchat_menu_parameters( +/// Try to synchronize the media session state to the `VRChat` menu parameters +fn try_sync_media_state( socket: &UdpSocket, session: &GlobalSystemMediaTransportControlsSession, ) -> Result<()> { diff --git a/plugin-debug/Cargo.toml b/plugin-debug/Cargo.toml index 68136ad..fe87b8e 100644 --- a/plugin-debug/Cargo.toml +++ b/plugin-debug/Cargo.toml @@ -13,3 +13,7 @@ crate-type = ["cdylib"] anyhow.workspace = true rosc.workspace = true tokio = { workspace = true, features = ["macros", "rt"] } + +[lints.clippy] +pedantic = "warn" +nursery = "warn" diff --git a/plugin-debug/src/lib.rs b/plugin-debug/src/lib.rs index 3b324cc..a7874d0 100644 --- a/plugin-debug/src/lib.rs +++ b/plugin-debug/src/lib.rs @@ -4,8 +4,9 @@ use anyhow::Result; use rosc::OscPacket; #[no_mangle] +#[allow(clippy::needless_pass_by_value)] #[tokio::main(flavor = "current_thread")] -async fn load(socket: UdpSocket) -> Result<()> { +async extern "Rust" fn load(socket: UdpSocket) -> Result<()> { println!("Debug Enabled"); let mut buf = [0u8; rosc::decoder::MTU]; diff --git a/plugin-lastfm/Cargo.toml b/plugin-lastfm/Cargo.toml index f4c8d0e..25d1d2a 100644 --- a/plugin-lastfm/Cargo.toml +++ b/plugin-lastfm/Cargo.toml @@ -11,7 +11,9 @@ crate-type = ["cdylib"] [dependencies] anyhow.workspace = true -dialoguer.workspace = true +derive-config = { workspace = true, default-features = false, features = ["toml"] } +dotenvy_macro.workspace = true +inquire.workspace = true reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "json"] } rosc.workspace = true serde = { workspace = true, features = ["derive"] } @@ -20,3 +22,7 @@ structstruck.workspace = true terminal-link = "0.1" tokio = { workspace = true, features = ["macros", "rt"] } toml.workspace = true + +[lints.clippy] +pedantic = "warn" +nursery = "warn" diff --git a/plugin-lastfm/src/config.rs b/plugin-lastfm/src/config.rs deleted file mode 100644 index ac315df..0000000 --- a/plugin-lastfm/src/config.rs +++ /dev/null @@ -1,82 +0,0 @@ -use std::{ - fs::File, - io::{Read, Seek, Write}, - path::PathBuf, -}; - -use anyhow::Result; -use dialoguer::Input; -use serde::{Deserialize, Serialize}; - -const CARGO_CRATE_NAME: &str = env!("CARGO_CRATE_NAME"); -const LASTFM_API_KEY: &str = env!("LASTFM_API_KEY"); -const LASTFM_USERNAME: &str = env!("LASTFM_USERNAME"); - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct LastFMConfig { - pub api_key: String, - pub username: String, - pub format: String, - pub send_once: bool, - pub polling: u64, -} - -impl Default for LastFMConfig { - fn default() -> Self { - Self { - api_key: LASTFM_API_KEY.into(), - username: LASTFM_USERNAME.into(), - format: "📻 {song} - {artists}".into(), - send_once: false, - polling: 10, - } - } -} - -impl LastFMConfig { - pub fn get_path() -> Result { - let mut path = std::env::current_exe()?; - path.set_file_name(CARGO_CRATE_NAME); - path.set_extension("toml"); - - Ok(path) - } - - pub fn load() -> Result { - let path = Self::get_path()?; - let mut file = File::options() - .read(true) - .write(true) - .create(true) - .open(path)?; - - let mut text = String::new(); - file.read_to_string(&mut text)?; - file.rewind()?; - - match toml::from_str(&text) { - Ok(config) => Ok(config), - Err(_) => { - let mut config = LastFMConfig::default(); - config.setup_wizard()?; - - let text = toml::to_string_pretty(&config)?; - file.write_all(text.as_bytes())?; - - Ok(config) - } - } - } - - pub fn setup_wizard(&mut self) -> Result<()> { - let input = Input::new(); - - println!("The LastFM plugin requires you to setup a scrobbler app or service"); - println!("https://www.last.fm/about/trackmymusic"); - - let prompt = "LastFM Username: "; - self.username = input.with_prompt(prompt).interact_text()?; - - Ok(()) - } -} diff --git a/plugin-lastfm/src/lib.rs b/plugin-lastfm/src/lib.rs index fa0389d..4ce26d3 100644 --- a/plugin-lastfm/src/lib.rs +++ b/plugin-lastfm/src/lib.rs @@ -1,18 +1,65 @@ use std::{net::UdpSocket, time::Duration}; use anyhow::Result; +use derive_config::DeriveTomlConfig; +#[cfg(debug_assertions)] +use dotenvy_macro::dotenv; +use inquire::Text; use rosc::{OscMessage, OscPacket, OscType}; +use serde::{Deserialize, Serialize}; use terminal_link::Link; -use crate::{config::LastFMConfig, model::LastFM}; +use crate::model::LastFM; -mod config; mod model; +#[cfg(debug_assertions)] +const LASTFM_API_KEY: &str = dotenv!("LASTFM_API_KEY"); +#[cfg(debug_assertions)] +const LASTFM_USERNAME: &str = dotenv!("LASTFM_USERNAME"); + +#[cfg(not(debug_assertions))] +const LASTFM_API_KEY: &str = env!("LASTFM_API_KEY"); +#[cfg(not(debug_assertions))] +const LASTFM_USERNAME: &str = env!("LASTFM_USERNAME"); + +#[derive(Clone, Debug, DeriveTomlConfig, Deserialize, Serialize)] +pub struct Config { + pub api_key: String, + pub username: String, + pub format: String, + pub send_once: bool, + pub polling: u64, +} + +impl Default for Config { + fn default() -> Self { + Self { + api_key: LASTFM_API_KEY.into(), + username: LASTFM_USERNAME.into(), + format: "📻 {song} - {artists}".into(), + send_once: false, + polling: 10, + } + } +} + #[no_mangle] +#[allow(clippy::needless_pass_by_value)] #[tokio::main(flavor = "current_thread")] -async fn load(socket: UdpSocket) -> Result<()> { - let config = LastFMConfig::load()?; +async extern "Rust" fn load(socket: UdpSocket) -> Result<()> { + let config = if let Ok(config) = Config::load() { + config + } else { + println!("The LastFM plugin requires you to setup a scrobbler app or service"); + println!("https://www.last.fm/about/trackmymusic"); + + Config { + username: Text::new("LastFM Username: ").prompt()?, + ..Default::default() + } + }; + let mut previous_track = String::new(); loop { std::thread::sleep(Duration::from_secs(config.polling)); @@ -24,13 +71,7 @@ async fn load(socket: UdpSocket) -> Result<()> { .recent .tracks .iter() - .filter(|track| { - if let Some(attr) = &track.attr { - attr.nowplaying - } else { - false - } - }) + .filter(|track| track.attr.as_ref().map_or(false, |attr| attr.nowplaying)) .collect::>(); let Some(track) = tracks.first() else { @@ -43,7 +84,7 @@ async fn load(socket: UdpSocket) -> Result<()> { .replace("{artists}", &track.artist.text); if track.name != previous_track { - previous_track = track.name.to_owned(); + previous_track = track.name.clone(); let link = Link::new(text, &track.url); println!("{link}"); } else if config.send_once { diff --git a/plugin-spotify/Cargo.toml b/plugin-spotify/Cargo.toml index 8283893..3946ed5 100644 --- a/plugin-spotify/Cargo.toml +++ b/plugin-spotify/Cargo.toml @@ -11,8 +11,13 @@ crate-type = ["cdylib"] [dependencies] anyhow.workspace = true -dialoguer.workspace = true -ferrispot = { git = "https://github.com/Spanfile/Ferrispot.git", default-features = false, features = ["async", "rustls-tls"] } +derive-config = { workspace = true, default-features = false, features = ["toml"] } +dotenvy_macro.workspace = true +ferrispot = { git = "https://github.com/Spanfile/Ferrispot.git", default-features = false, features = [ + "async", + "rustls-tls", +] } +inquire.workspace = true rosc.workspace = true serde = { workspace = true, features = ["derive"] } spotify-lyrics = "0.0.5" @@ -22,3 +27,7 @@ tokio = { workspace = true, features = ["macros", "rt", "time"] } toml.workspace = true url = "2" webbrowser = "0.8" + +[lints.clippy] +pedantic = "warn" +nursery = "warn" diff --git a/plugin-spotify/src/chatbox.rs b/plugin-spotify/src/chatbox.rs index 8bbf17b..2e3ab7e 100644 --- a/plugin-spotify/src/chatbox.rs +++ b/plugin-spotify/src/chatbox.rs @@ -4,18 +4,18 @@ use anyhow::Result; use ferrispot::{ client::authorization_code::AsyncAuthorizationCodeUserClient, model::playback::PlayingType, - prelude::*, + prelude::{CommonArtistInformation, *}, }; use rosc::{OscMessage, OscPacket, OscType}; use spotify_lyrics::{Browser, SpotifyLyrics}; use terminal_link::Link; -use crate::config::SpotifyConfig; +use crate::Config; pub async fn task( socket: Arc, spotify: AsyncAuthorizationCodeUserClient, - mut config: SpotifyConfig, + mut config: Config, ) -> Result<()> { let mut previous_lyrics = None; let mut previous_track = String::new(); @@ -52,7 +52,7 @@ pub async fn task( let artists = full_track .artists() .iter() - .map(|artist| artist.name()) + .map(CommonArtistInformation::name) .collect::>() .join(", "); @@ -80,29 +80,27 @@ pub async fn task( continue; }; + #[allow(clippy::cast_possible_truncation)] let Some(current_words) = color_lyrics .lyrics .lines .iter() .rev() .find(|line| line.start_time_ms < item.progress().as_millis() as u64) - .map(|line| line.words.to_owned()) + .map(|line| line.words.clone()) else { continue; }; if current_words == previous_words { continue; - }; + } previous_words = current_words; let message = OscMessage { addr: "/chatbox/input".into(), - args: vec![ - OscType::String(previous_words.to_owned()), - OscType::Bool(true), - ], + args: vec![OscType::String(previous_words.clone()), OscType::Bool(true)], }; let packet = OscPacket::Message(message); diff --git a/plugin-spotify/src/config.rs b/plugin-spotify/src/config.rs deleted file mode 100644 index 2e60c92..0000000 --- a/plugin-spotify/src/config.rs +++ /dev/null @@ -1,131 +0,0 @@ -use std::{ - fs::File, - io::{Read, Seek, Write}, - path::PathBuf, -}; - -use anyhow::Result; -use dialoguer::{Confirm, Input}; -use serde::{Deserialize, Serialize}; - -const CARGO_CRATE_NAME: &str = env!("CARGO_CRATE_NAME"); -const SPOTIFY_CLIENT: &str = env!("SPOTIFY_CLIENT"); -const SPOTIFY_SECRET: &str = env!("SPOTIFY_SECRET"); -const SPOTIFY_CALLBACK: &str = env!("SPOTIFY_CALLBACK"); - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct SpotifyConfig { - pub client_id: String, - pub client_secret: String, - pub redirect_uri: String, - pub format: String, - pub refresh_token: String, - pub enable_chatbox: bool, - pub enable_control: bool, - pub pkce: bool, - pub send_once: bool, - pub send_lyrics: bool, - pub polling: u64, -} - -impl Default for SpotifyConfig { - fn default() -> Self { - Self { - client_id: SPOTIFY_CLIENT.into(), - client_secret: SPOTIFY_SECRET.into(), - redirect_uri: SPOTIFY_CALLBACK.into(), - format: "📻 {song} - {artists}".into(), - refresh_token: String::new(), - enable_chatbox: false, - enable_control: false, - pkce: false, - send_once: true, - send_lyrics: true, - polling: 1, - } - } -} - -impl SpotifyConfig { - pub fn get_path() -> Result { - let mut path = std::env::current_exe()?; - path.set_file_name(CARGO_CRATE_NAME); - path.set_extension("toml"); - - Ok(path) - } - - pub fn load() -> Result { - let path = Self::get_path()?; - let mut file = File::options() - .read(true) - .write(true) - .create(true) - .open(path)?; - - let mut text = String::new(); - file.read_to_string(&mut text)?; - file.rewind()?; - - match toml::from_str(&text) { - Ok(config) => Ok(config), - Err(_) => { - let mut config = SpotifyConfig::default(); - config.setup_wizard()?; - - let text = toml::to_string_pretty(&config)?; - file.write_all(text.as_bytes())?; - - Ok(config) - } - } - } - - pub fn setup_wizard(&mut self) -> Result<()> { - let prompt = "Would you like to enable Spotify Chatbox?"; - self.enable_chatbox = Confirm::new().with_prompt(prompt).interact()?; - - let prompt = "Would you like to enable Spotify Controls? (Requires Spotify Premium)"; - self.enable_control = Confirm::new().with_prompt(prompt).interact()?; - - if self.enable_chatbox || self.enable_control { - println!("The Spotify plugin requires you to create a Spotify Developer Application"); - println!("https://github.com/ShayBox/VRC-OSC/tree/master/plugin-spotify#how-to-setup"); - println!("https://developer.spotify.com/dashboard"); - - let prompt = "Spotify Client ID: "; - self.client_id = Input::new() - .with_prompt(prompt) - .default(self.client_id.to_owned()) - .interact_text()?; - - let prompt = "Spotify Client secret: "; - self.client_secret = Input::new() - .with_prompt(prompt) - .default(self.client_secret.to_owned()) - .interact_text()?; - - let prompt = "Spotify Redirect URI: "; - self.redirect_uri = Input::new() - .with_prompt(prompt) - .default(self.redirect_uri.to_owned()) - .interact_text()?; - } - - Ok(()) - } - - pub fn save(&mut self) -> Result<()> { - let path = Self::get_path()?; - let mut file = File::options() - .write(true) - .create(true) - .truncate(true) - .open(path)?; - - let content = toml::to_string_pretty(&self)?; - file.write_all(content.as_bytes())?; - - Ok(()) - } -} diff --git a/plugin-spotify/src/control.rs b/plugin-spotify/src/control.rs index e81c04f..95abb7d 100644 --- a/plugin-spotify/src/control.rs +++ b/plugin-spotify/src/control.rs @@ -87,6 +87,7 @@ pub async fn task(socket: Arc, spotify: AsyncAuthorizationCodeUserCli continue; }; + #[allow(clippy::cast_sign_loss, clippy::cast_possible_truncation)] spotify.volume((volume * 100.0) as u8) } "Position" => { @@ -96,12 +97,12 @@ pub async fn task(socket: Arc, spotify: AsyncAuthorizationCodeUserCli let min = 0; let max = playback_state.currently_playing_item().timestamp(); - let playback_position = (min + (max - min) * (position * 100.0) as u64) / 100; - spotify.seek(playback_position) + #[allow(clippy::cast_sign_loss, clippy::cast_possible_truncation)] + spotify.seek((min + (max - min) * (position * 100.0) as u64) / 100) } _ => { - let _ = try_sync_media_state_to_vrchat_menu_parameters(&socket, &spotify).await; + let _ = try_sync_media_state(&socket, &spotify).await; continue; } } @@ -110,8 +111,8 @@ pub async fn task(socket: Arc, spotify: AsyncAuthorizationCodeUserCli } } -/// Try to synchronize the media session state to the VRChat menu parameters -async fn try_sync_media_state_to_vrchat_menu_parameters( +/// Try to synchronize the media session state to the `VRChat` menu parameters +async fn try_sync_media_state( socket: &UdpSocket, spotify: &AsyncAuthorizationCodeUserClient, ) -> Result<()> { diff --git a/plugin-spotify/src/lib.rs b/plugin-spotify/src/lib.rs index a9e307e..0086857 100644 --- a/plugin-spotify/src/lib.rs +++ b/plugin-spotify/src/lib.rs @@ -1,6 +1,9 @@ use std::{net::UdpSocket, sync::Arc, time::Duration}; use anyhow::{bail, Result}; +use derive_config::DeriveTomlConfig; +#[cfg(debug_assertions)] +use dotenvy_macro::dotenv; use ferrispot::{ client::{ authorization_code::{ @@ -12,66 +15,142 @@ use ferrispot::{ prelude::*, scope::Scope, }; +use inquire::{Confirm, Text}; +use serde::{Deserialize, Serialize}; use tiny_http::{Header, Response, Server}; use url::Url; -use crate::config::SpotifyConfig; - mod chatbox; -mod config; mod control; +#[cfg(debug_assertions)] +const SPOTIFY_CLIENT: &str = dotenv!("SPOTIFY_CLIENT"); +#[cfg(debug_assertions)] +const SPOTIFY_SECRET: &str = dotenv!("SPOTIFY_SECRET"); +#[cfg(debug_assertions)] +const SPOTIFY_CALLBACK: &str = dotenv!("SPOTIFY_CALLBACK"); + +#[cfg(not(debug_assertions))] +const SPOTIFY_CLIENT: &str = env!("SPOTIFY_CLIENT"); +#[cfg(not(debug_assertions))] +const SPOTIFY_SECRET: &str = env!("SPOTIFY_SECRET"); +#[cfg(not(debug_assertions))] +const SPOTIFY_CALLBACK: &str = env!("SPOTIFY_CALLBACK"); + +#[allow(clippy::struct_excessive_bools)] +#[derive(Clone, Debug, DeriveTomlConfig, Deserialize, Serialize)] +pub struct Config { + pub client: String, + pub secret: String, + pub redirect_uri: String, + pub format: String, + pub refresh_token: String, + pub enable_chatbox: bool, + pub enable_control: bool, + pub pkce: bool, + pub send_once: bool, + pub send_lyrics: bool, + pub polling: u64, +} + +impl Default for Config { + fn default() -> Self { + Self { + client: SPOTIFY_CLIENT.into(), + secret: SPOTIFY_SECRET.into(), + redirect_uri: SPOTIFY_CALLBACK.into(), + format: "📻 {song} - {artists}".into(), + refresh_token: String::new(), + enable_chatbox: false, + enable_control: false, + pkce: false, + send_once: true, + send_lyrics: true, + polling: 1, + } + } +} + #[no_mangle] #[tokio::main(flavor = "current_thread")] -async fn load(socket: UdpSocket) -> Result<()> { - let mut config = SpotifyConfig::load()?; +async extern "Rust" fn load(socket: UdpSocket) -> Result<()> { + let mut config = if let Ok(config) = Config::load() { + config + } else { + let mut config = Config::default(); + + let prompt = "Would you like to enable Spotify Chatbox?"; + config.enable_chatbox = Confirm::new(prompt).with_default(false).prompt()?; + + let prompt = "Would you like to enable Spotify Controls? (Requires Spotify Premium)"; + config.enable_control = Confirm::new(prompt).with_default(false).prompt()?; + + if config.enable_chatbox || config.enable_control { + println!("The Spotify plugin requires you to create a Spotify Developer Application"); + println!("https://github.com/ShayBox/VRC-OSC/tree/master/plugin-spotify#how-to-setup"); + println!("https://developer.spotify.com/dashboard"); + + let prompt = "Spotify Client ID: "; + config.client = Text::new(prompt).with_default(&config.client).prompt()?; + + let prompt = "Spotify Client Secret: "; + config.secret = Text::new(prompt).with_default(&config.secret).prompt()?; + + let prompt = "Spotify Redirect URI: "; + config.redirect_uri = Text::new(prompt) + .with_default(&config.redirect_uri) + .prompt()?; + } + + config.save()?; + config + }; + let user_client = { if config.pkce { - let spotify_client = SpotifyClientBuilder::new(&config.client_id).build_async(); + let spotify_client = SpotifyClientBuilder::new(&config.client).build_async(); let user_client = spotify_client .authorization_code_client_with_refresh_token_and_pkce(&config.refresh_token) .await; - match user_client { - Ok(user_client) => user_client, - Err(_) => { - let incomplete_auth_code_client = spotify_client - .authorization_code_client_with_pkce(&config.redirect_uri) - .show_dialog(config.refresh_token.is_empty()) - .scopes([ - Scope::UserModifyPlaybackState, - Scope::UserReadCurrentlyPlaying, - Scope::UserReadPlaybackState, - ]) - .build(); - - finish_authentication_and_save(&mut config, incomplete_auth_code_client).await? - } + if let Ok(user_client) = user_client { + user_client + } else { + let incomplete_auth_code_client = spotify_client + .authorization_code_client_with_pkce(&config.redirect_uri) + .show_dialog(config.refresh_token.is_empty()) + .scopes([ + Scope::UserModifyPlaybackState, + Scope::UserReadCurrentlyPlaying, + Scope::UserReadPlaybackState, + ]) + .build(); + + finish_authentication_and_save(&mut config, incomplete_auth_code_client).await? } } else { - let spotify_client = SpotifyClientBuilder::new(&config.client_id) - .client_secret(&config.client_secret) + let spotify_client = SpotifyClientBuilder::new(&config.client) + .client_secret(&config.secret) .build_async() .await?; let user_client = spotify_client .authorization_code_client_with_refresh_token(&config.refresh_token) .await; - match user_client { - Ok(user_client) => user_client, - Err(_) => { - let incomplete_auth_code_client = spotify_client - .authorization_code_client(&config.redirect_uri) - .show_dialog(config.refresh_token.is_empty()) - .scopes([ - Scope::UserModifyPlaybackState, - Scope::UserReadCurrentlyPlaying, - Scope::UserReadPlaybackState, - ]) - .build(); - - finish_authentication_and_save(&mut config, incomplete_auth_code_client).await? - } + if let Ok(user_client) = user_client { + user_client + } else { + let incomplete_auth_code_client = spotify_client + .authorization_code_client(&config.redirect_uri) + .show_dialog(config.refresh_token.is_empty()) + .scopes([ + Scope::UserModifyPlaybackState, + Scope::UserReadCurrentlyPlaying, + Scope::UserReadPlaybackState, + ]) + .build(); + + finish_authentication_and_save(&mut config, incomplete_auth_code_client).await? } } }; @@ -86,7 +165,7 @@ async fn load(socket: UdpSocket) -> Result<()> { tokio::spawn(async move { control::task(socket, user_client) .await - .expect("task_control") + .expect("task_control"); }); } @@ -94,7 +173,7 @@ async fn load(socket: UdpSocket) -> Result<()> { tokio::spawn(async move { chatbox::task(socket, user_client, config) .await - .expect("task_chatbox") + .expect("task_chatbox"); }); } @@ -105,7 +184,7 @@ async fn load(socket: UdpSocket) -> Result<()> { } async fn finish_authentication_and_save( - config: &mut SpotifyConfig, + config: &mut Config, client: AsyncIncompleteAuthorizationCodeUserClient, ) -> Result { let authorize_url = client.get_authorize_url(); @@ -126,9 +205,8 @@ fn get_user_authorization(authorize_url: &str, redirect_uri: &str) -> Result<(St match webbrowser::open(authorize_url) { Ok(ok) => ok, Err(why) => eprintln!( - "Error when trying to open an URL in your browser: {:?}. \ - Please navigate here manually: {}", - why, authorize_url + "Error when trying to open an URL in your browser: {why:?}. \ + Please navigate here manually: {authorize_url}", ), } @@ -140,15 +218,14 @@ fn get_user_authorization(authorize_url: &str, redirect_uri: &str) -> Result<(St let parsed_url = Url::parse(&request_url)?; let header = Header::from_bytes(&b"Content-Type"[..], &b"text/html"[..]).unwrap(); - let mut response; - if parsed_url.query_pairs().count() == 2 { - response = Response::from_string( + let mut response = if parsed_url.query_pairs().count() == 2 { + Response::from_string( "

You may close this tab

\ ", - ); + ) } else { - response = Response::from_string("

An error has occurred

"); - } + Response::from_string("

An error has occurred

") + }; response.add_header(header); request.respond(response).expect("Failed to send response"); diff --git a/plugin-steamvr/Cargo.toml b/plugin-steamvr/Cargo.toml index c964be7..78fe86e 100644 --- a/plugin-steamvr/Cargo.toml +++ b/plugin-steamvr/Cargo.toml @@ -11,9 +11,14 @@ crate-type = ["cdylib"] [dependencies] anyhow.workspace = true +derive-config = { workspace = true, default-features = false, features = ["toml"] } ovr_overlay = { git = "https://github.com/Shays-Forks/ovr_overlay.git", features = ["ovr_applications"] } serde = { workspace = true, features = ["derive"] } serde_json = "1" structstruck.workspace = true tokio = { workspace = true, features = ["macros", "rt"] } toml.workspace = true + +[lints.clippy] +pedantic = "warn" +nursery = "warn" diff --git a/plugin-steamvr/src/config.rs b/plugin-steamvr/src/config.rs deleted file mode 100644 index 5067c97..0000000 --- a/plugin-steamvr/src/config.rs +++ /dev/null @@ -1,55 +0,0 @@ -use std::{ - fs::File, - io::{Read, Seek, Write}, - path::PathBuf, -}; - -use anyhow::Result; -use serde::{Deserialize, Serialize}; - -const CARGO_CRATE_NAME: &str = env!("CARGO_CRATE_NAME"); - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct SteamVRConfig { - pub register: bool, -} - -impl Default for SteamVRConfig { - fn default() -> Self { - Self { register: true } - } -} - -impl SteamVRConfig { - pub fn get_path() -> Result { - let mut path = std::env::current_exe()?; - path.set_file_name(CARGO_CRATE_NAME); - path.set_extension("toml"); - - Ok(path) - } - - pub fn load() -> Result { - let path = Self::get_path()?; - let mut file = File::options() - .read(true) - .write(true) - .create(true) - .open(path)?; - - let mut text = String::new(); - file.read_to_string(&mut text)?; - file.rewind()?; - - match toml::from_str(&text) { - Ok(config) => Ok(config), - Err(_) => { - let config = SteamVRConfig::default(); - let text = toml::to_string_pretty(&config)?; - file.write_all(text.as_bytes())?; - - Ok(config) - } - } - } -} diff --git a/plugin-steamvr/src/lib.rs b/plugin-steamvr/src/lib.rs index 326784c..9cea2b4 100644 --- a/plugin-steamvr/src/lib.rs +++ b/plugin-steamvr/src/lib.rs @@ -1,20 +1,33 @@ use std::net::UdpSocket; use anyhow::Result; +use derive_config::DeriveTomlConfig; +use serde::{Deserialize, Serialize}; -use crate::{config::SteamVRConfig, manifest::OVRManifest}; +use crate::openvr::Manifest; -mod config; -mod manifest; +mod openvr; + +#[derive(Clone, Debug, DeriveTomlConfig, Deserialize, Serialize)] +pub struct Config { + pub register: bool, +} + +impl Default for Config { + fn default() -> Self { + Self { register: true } + } +} #[no_mangle] +#[allow(clippy::needless_pass_by_value)] #[tokio::main(flavor = "current_thread")] -async fn load(_socket: UdpSocket) -> Result<()> { +async extern "Rust" fn load(_socket: UdpSocket) -> Result<()> { if let Ok(context) = ovr_overlay::Context::init() { let manager = &mut context.applications_mngr(); - let config = SteamVRConfig::load()?; - let manifest = OVRManifest::load()?; - let path = OVRManifest::get_path()?; + let config = Config::load()?; + let manifest = Manifest::load()?; + let path = Manifest::get_path()?; if manager.is_application_installed(&manifest.applications[0].app_key)? { manager.remove_application_manifest(&path)?; diff --git a/plugin-steamvr/src/manifest.rs b/plugin-steamvr/src/openvr.rs similarity index 76% rename from plugin-steamvr/src/manifest.rs rename to plugin-steamvr/src/openvr.rs index d7afc03..052712d 100644 --- a/plugin-steamvr/src/manifest.rs +++ b/plugin-steamvr/src/openvr.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize}; structstruck::strike! { #[strikethrough[derive(Debug, Serialize, Deserialize)]] - pub struct OVRManifest { + pub struct Manifest { pub source: String, pub applications: Vec Self { Self { - source: "builtin".into(), + source: "builtin".into(), applications: vec![Applications { app_key: "com.shaybox.vrc-osc".into(), launch_type: "binary".into(), @@ -37,7 +37,7 @@ impl Default for OVRManifest { strings: HashMap::from([( "en_us".into(), Strings { - name: "VRC-OSC".into(), + name: "VRC-OSC".into(), description: "VRChat OSC Overlay".into(), }, )]), @@ -46,7 +46,7 @@ impl Default for OVRManifest { } } -impl OVRManifest { +impl Manifest { pub fn get_path() -> Result { let mut path = std::env::current_exe()?; path.set_file_name("vrc-osc"); @@ -58,21 +58,20 @@ impl OVRManifest { pub fn load() -> Result { let path = Self::get_path()?; let file = File::options() - .read(true) - .write(true) + .append(true) .create(true) + .read(true) .open(path)?; let reader = BufReader::new(&file); - match serde_json::from_reader(reader) { - Ok(config) => Ok(config), - Err(_) => { - let manifest = Default::default(); - let writer = BufWriter::new(&file); - serde_json::to_writer_pretty(writer, &manifest)?; + if let Ok(config) = serde_json::from_reader(reader) { + Ok(config) + } else { + let manifest = Self::default(); + let writer = BufWriter::new(&file); + serde_json::to_writer_pretty(writer, &manifest)?; - Ok(manifest) - } + Ok(manifest) } } } diff --git a/rustfmt.toml b/rustfmt.toml index c2aca45..3b27d71 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,3 +1,5 @@ +enum_discrim_align_threshold = 10 group_imports = "StdExternalCrate" imports_granularity = "Crate" -imports_layout = "HorizontalVertical" \ No newline at end of file +imports_layout = "HorizontalVertical" +struct_field_align_threshold = 10