diff --git a/package-lock.json b/package-lock.json index b8d6290..b918bdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,7 @@ "serialize-error": "^11.0.3", "sort-array": "^4.1.5", "tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1", + "uuid": "^9.0.1", "vite-plugin-top-level-await": "^1.4.1", "zustand": "^4.4.7" }, @@ -44,6 +45,7 @@ "@types/react": "^18.2.45", "@types/react-dom": "^18.2.18", "@types/sort-array": "^4.1.2", + "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^6.14.0", "@typescript-eslint/parser": "^6.14.0", "@vitejs/plugin-react": "^4.2.1", @@ -2707,6 +2709,12 @@ "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==", "dev": true }, + "node_modules/@types/uuid": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", + "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.14.0.tgz", @@ -9930,6 +9938,12 @@ "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==", "dev": true }, + "@types/uuid": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", + "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "dev": true + }, "@typescript-eslint/eslint-plugin": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.14.0.tgz", diff --git a/package.json b/package.json index c0f6955..394cd30 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@types/react": "^18.2.45", "@types/react-dom": "^18.2.18", "@types/sort-array": "^4.1.2", + "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^6.14.0", "@typescript-eslint/parser": "^6.14.0", "@vitejs/plugin-react": "^4.2.1", @@ -63,6 +64,7 @@ "serialize-error": "^11.0.3", "sort-array": "^4.1.5", "tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1", + "uuid": "^9.0.1", "vite-plugin-top-level-await": "^1.4.1", "zustand": "^4.4.7" } diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index b0ed9cd..855df8b 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -10,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher", @@ -21,18 +30,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -69,9 +69,20 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "async-trait" +version = "0.1.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] [[package]] name = "atk" @@ -80,7 +91,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "glib", "libc", ] @@ -94,7 +105,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -103,6 +114,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.13.1" @@ -111,9 +137,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -142,6 +168,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "block" version = "0.1.6" @@ -177,9 +209,9 @@ dependencies = [ [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -188,9 +220,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -198,19 +230,20 @@ dependencies = [ [[package]] name = "bstr" -version = "1.5.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" dependencies = [ "memchr", + "regex-automata 0.4.3", "serde", ] [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-unit" @@ -224,21 +257,21 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] @@ -270,7 +303,7 @@ version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-sys-rs", "glib", "libc", @@ -285,7 +318,7 @@ checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" dependencies = [ "glib-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -295,7 +328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" dependencies = [ "serde", - "toml 0.7.3", + "toml 0.7.8", ] [[package]] @@ -309,11 +342,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -344,9 +378,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.2" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70d3ad08698a0568b0562f22710fe6bfc1f4a61a367c77d0398c562eadd453a" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", "target-lexicon", @@ -360,15 +394,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", "serde", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -387,27 +421,42 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" dependencies = [ - "bitflags", + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics 0.22.3", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "cocoa" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +dependencies = [ + "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", - "core-graphics", - "foreign-types", + "core-graphics 0.23.1", + "foreign-types 0.5.0", "libc", "objc", ] [[package]] name = "cocoa-foundation" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", - "foreign-types", "libc", "objc", ] @@ -462,30 +511,42 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types 0.5.0", "libc", ] [[package]] name = "core-graphics-types" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", - "foreign-types", "libc", ] [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -501,9 +562,9 @@ dependencies = [ [[package]] name = "crc-catalog" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" @@ -526,9 +587,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -567,7 +628,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -580,17 +641,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -598,27 +653,37 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.18", + "syn 2.0.39", +] + +[[package]] +name = "deranged" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +dependencies = [ + "powerfmt", + "serde", ] [[package]] @@ -704,9 +769,9 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "dtoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dtoa-short" @@ -725,15 +790,15 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "embed-resource" -version = "2.1.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80663502655af01a2902dff3f06869330782267924bf1788410b74edcd93770a" +checksum = "f54cc3e827ee1c3812239a9a41dede7b4d7d5d5464faa32d71bd7cba28ce2cb2" dependencies = [ "cc", "rustc_version", - "toml 0.7.3", + "toml 0.8.8", "vswhom", - "winreg 0.11.0", + "winreg 0.51.0", ] [[package]] @@ -744,48 +809,40 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] [[package]] -name = "errno" -version = "0.3.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "errno" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" dependencies = [ - "cc", "libc", + "windows-sys 0.48.0", ] [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868" dependencies = [ "simd-adler32", ] @@ -811,21 +868,21 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] [[package]] name = "filetime_creation" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d961767622336521cc48b3de810fce4edbf02d0c21079d78f3a6eeaf45b9450" +checksum = "3aea213d5ab4e6cd49f50c0688a4e20e5b75ff3bc07ff63f814778bd9b1dd42d" dependencies = [ "cfg-if", "filetime", @@ -834,9 +891,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -854,7 +911,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", ] [[package]] @@ -863,6 +941,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.0" @@ -884,24 +968,24 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -910,38 +994,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-core", "futures-io", @@ -969,7 +1053,7 @@ version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -985,7 +1069,7 @@ version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib", @@ -1002,7 +1086,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -1019,7 +1103,7 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -1033,7 +1117,7 @@ dependencies = [ "gobject-sys", "libc", "pkg-config", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -1045,15 +1129,15 @@ dependencies = [ "gdk-sys", "glib-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.2.0", "x11", ] [[package]] name = "generator" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e123d9ae7c02966b4d892e550bdc32164f05853cd40ab570650ad600596a8a" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" dependencies = [ "cc", "libc", @@ -1085,22 +1169,28 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "gio" version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", @@ -1120,7 +1210,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.2.0", "winapi", ] @@ -1130,7 +1220,7 @@ version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-executor", @@ -1166,7 +1256,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" dependencies = [ "libc", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -1177,11 +1267,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -1196,7 +1286,7 @@ checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" dependencies = [ "glib-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -1206,7 +1296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" dependencies = [ "atk", - "bitflags", + "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -1237,7 +1327,7 @@ dependencies = [ "gobject-sys", "libc", "pango-sys", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -1256,9 +1346,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1266,7 +1356,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -1279,6 +1369,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" + [[package]] name = "heck" version = "0.3.3" @@ -1296,18 +1392,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1332,7 +1419,21 @@ checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" dependencies = [ "log", "mac", - "markup5ever", + "markup5ever 0.10.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "html5ever" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" +dependencies = [ + "log", + "mac", + "markup5ever 0.11.0", "proc-macro2", "quote", "syn 1.0.109", @@ -1340,13 +1441,13 @@ dependencies = [ [[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", - "itoa 1.0.6", + "itoa 1.0.9", ] [[package]] @@ -1374,15 +1475,15 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1393,9 +1494,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.6", + "itoa 1.0.9", "pin-project-lite", - "socket2", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -1417,16 +1518,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -1466,11 +1567,10 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" dependencies = [ - "crossbeam-utils", "globset", "lazy_static", "log", @@ -1484,9 +1584,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.6" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" dependencies = [ "bytemuck", "byteorder", @@ -1502,7 +1602,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.2", "serde", ] @@ -1534,22 +1645,11 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" -version = "2.7.2" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itoa" @@ -1559,9 +1659,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "javascriptcore-rs" @@ -1569,7 +1669,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib", "javascriptcore-rs-sys", ] @@ -1608,27 +1708,27 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] [[package]] name = "json-patch" -version = "1.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" +checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" dependencies = [ "serde", "serde_json", @@ -1643,7 +1743,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" dependencies = [ "cssparser", - "html5ever", + "html5ever 0.25.2", + "matches", + "selectors", +] + +[[package]] +name = "kuchikiki" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" +dependencies = [ + "cssparser", + "html5ever 0.26.0", + "indexmap 1.9.3", "matches", "selectors", ] @@ -1656,9 +1769,20 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.145" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc86cde3ff845662b8f4ef6cb50ea0e20c524eb3d29ae048287e06a1b3fa6a81" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] [[package]] name = "line-wrap" @@ -1671,15 +1795,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1687,9 +1811,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ "value-bag", ] @@ -1711,9 +1835,9 @@ dependencies = [ [[package]] name = "lzma-rust" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5dadd5fd2bcf0256ff0340310c47851ef4113d2cc803b606804cd26604d0e1" +checksum = "7f798132166cc040cb70dbab4ccbb89643a6966a4ac33f0b312e76a8238673a5" dependencies = [ "byteorder", ] @@ -1741,7 +1865,21 @@ checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" dependencies = [ "log", "phf 0.8.0", - "phf_codegen", + "phf_codegen 0.8.0", + "string_cache", + "string_cache_codegen", + "tendril", +] + +[[package]] +name = "markup5ever" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" +dependencies = [ + "log", + "phf 0.10.1", + "phf_codegen 0.10.0", "string_cache", "string_cache_codegen", "tendril", @@ -1753,7 +1891,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -1764,9 +1902,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" @@ -1789,7 +1927,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2b6f58413c6cee060115673578e47271838f3c87cb9322c61a3bcd6d740b7d2" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", "rpassword", "scrypt", ] @@ -1812,9 +1950,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -1845,7 +1983,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" dependencies = [ - "bitflags", + "bitflags 1.3.2", "jni-sys", "ndk-sys", "num_enum", @@ -1879,6 +2017,15 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +[[package]] +name = "normpath" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec60c60a693226186f5d6edf073232bfb6464ed97eb22cf3b01c1e8198fd97f5" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "nt-time" version = "0.4.1" @@ -1922,20 +2069,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -2008,6 +2155,15 @@ dependencies = [ "objc", ] +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.18.0" @@ -2030,15 +2186,26 @@ dependencies = [ "windows-sys 0.42.0", ] +[[package]] +name = "opener" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c62dcb6174f9cb326eac248f07e955d5d559c272730b6c03e396b443b562788" +dependencies = [ + "bstr", + "normpath", + "winapi", +] + [[package]] name = "openssl" -version = "0.10.54" +version = "0.10.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b3f656a17a6cbc115b5c7a40c616947d213ba182135b014d6051b73ab6f019" +checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" dependencies = [ - "bitflags", + "bitflags 2.4.1", "cfg-if", - "foreign-types", + "foreign-types 0.3.2", "libc", "once_cell", "openssl-macros", @@ -2053,7 +2220,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -2064,9 +2231,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.88" +version = "0.9.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617" +checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" dependencies = [ "cc", "libc", @@ -2103,7 +2270,7 @@ version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib", "libc", "once_cell", @@ -2119,7 +2286,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -2134,15 +2301,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.4.1", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] [[package]] @@ -2171,14 +2338,14 @@ dependencies = [ "digest 0.10.7", "hmac", "password-hash", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] name = "pbkdf2" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", "hmac", @@ -2222,6 +2389,16 @@ dependencies = [ "phf_shared 0.8.0", ] +[[package]] +name = "phf_codegen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", +] + [[package]] name = "phf_generator" version = "0.8.0" @@ -2290,9 +2467,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2308,12 +2485,12 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plist" -version = "1.4.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" +checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" dependencies = [ - "base64 0.21.2", - "indexmap", + "base64 0.21.5", + "indexmap 2.1.0", "line-wrap", "quick-xml", "serde", @@ -2322,17 +2499,23 @@ dependencies = [ [[package]] name = "png" -version = "0.17.8" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", "miniz_oxide", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2352,7 +2535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", ] [[package]] @@ -2387,27 +2570,27 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.28.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2472,7 +2655,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", ] [[package]] @@ -2495,51 +2678,49 @@ dependencies = [ [[package]] name = "raw-window-handle" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.9", - "redox_syscall 0.2.16", + "getrandom 0.2.11", + "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.8.4" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -2551,6 +2732,17 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + [[package]] name = "regex-syntax" version = "0.6.29" @@ -2559,17 +2751,17 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.2", + "base64 0.21.5", "bytes", "encoding_rs", "futures-core", @@ -2590,6 +2782,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-native-tls", "tokio-util", @@ -2599,7 +2792,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.10.1", + "winreg 0.50.0", ] [[package]] @@ -2628,25 +2821,31 @@ dependencies = [ [[package]] name = "rpassword" -version = "7.2.0" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ "libc", "rtoolbox", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" @@ -2658,13 +2857,12 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.38.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "ffb93593068e9babdad10e4fce47dc9b3ac25315a72a59766ffd9e9a71996a04" dependencies = [ - "bitflags", + "bitflags 2.4.1", "errno", - "io-lifetimes", "libc", "linux-raw-sys", "windows-sys 0.48.0", @@ -2672,15 +2870,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safemem" @@ -2708,11 +2906,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -2723,9 +2921,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scrypt" @@ -2733,18 +2931,18 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" dependencies = [ - "pbkdf2 0.12.1", + "pbkdf2 0.12.2", "salsa20", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2753,9 +2951,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -2767,14 +2965,14 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cssparser", "derive_more", "fxhash", "log", "matches", "phf 0.8.0", - "phf_codegen", + "phf_codegen 0.8.0", "precomputed-hash", "servo_arc", "smallvec", @@ -2783,60 +2981,60 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.163" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -2848,21 +3046,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "serde", ] [[package]] name = "serde_with" -version = "3.0.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513" +checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" dependencies = [ - "base64 0.21.2", + "base64 0.21.5", "chrono", "hex", - "indexmap", + "indexmap 1.9.3", + "indexmap 2.1.0", "serde", "serde_json", "serde_with_macros", @@ -2871,14 +3070,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.0.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" +checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -2935,9 +3134,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -2959,9 +3158,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2970,57 +3169,67 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] [[package]] name = "simd-adler32" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soup2" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2b4d76501d8ba387cf0fefbe055c3e0a59891d09f0f995ae4e4b16f6b60f3c0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gio", "glib", "libc", @@ -3034,7 +3243,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gio-sys", "glib-sys", "gobject-sys", @@ -3108,9 +3317,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -3130,6 +3339,27 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "system-deps" version = "5.0.0" @@ -3145,29 +3375,29 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.1.0" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5fa6fb9ee296c0dc2df41a656ca7948546d061958115ddb0bcaae43ad0d17d2" +checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" dependencies = [ - "cfg-expr 0.15.2", + "cfg-expr 0.15.5", "heck 0.4.1", "pkg-config", - "toml 0.7.3", + "toml 0.8.8", "version-compare 0.1.1", ] [[package]] name = "tao" -version = "0.16.2" +version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6d198e01085564cea63e976ad1566c1ba2c2e4cc79578e35d9f05521505e31" +checksum = "75f5aefd6be4cd3ad3f047442242fd9f57cbfb3e565379f66b5e14749364fa4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "cc", - "cocoa", + "cocoa 0.24.1", "core-foundation", - "core-graphics", + "core-graphics 0.22.3", "crossbeam-channel", "dispatch", "gdk", @@ -3205,9 +3435,9 @@ dependencies = [ [[package]] name = "tao-macros" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b27a4bcc5eb524658234589bdffc7e7bfb996dbae6ce9393bfd39cb4159b445" +checksum = "ec114582505d158b669b136e6851f85840c109819d77c42bb7c0709f727d18c2" dependencies = [ "proc-macro2", "quote", @@ -3216,9 +3446,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -3227,20 +3457,20 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tauri" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbe522898e35407a8e60dc3870f7579fea2fc262a6a6072eccdd37ae1e1d91e" +checksum = "9bfe673cf125ef364d6f56b15e8ce7537d9ca7e4dae1cf6fbbdeed2e024db3d9" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.5", "bytes", - "cocoa", + "cocoa 0.24.1", "dirs-next", "embed_plist", "encoding_rs", @@ -3289,12 +3519,13 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d2edd6a259b5591c8efdeb9d5702cb53515b82a6affebd55c7fd6d3a27b7d1b" +checksum = "defbfc551bd38ab997e5f8e458f87396d2559d05ce32095076ad6c30f7fc5f9c" dependencies = [ "anyhow", "cargo_toml", + "dirs-next", "heck 0.4.1", "json-patch", "semver", @@ -3302,15 +3533,16 @@ dependencies = [ "serde_json", "tauri-utils", "tauri-winres", + "walkdir", ] [[package]] name = "tauri-codegen" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ad2d49fdeab4a08717f5b49a163bdc72efc3b1950b6758245fcde79b645e1a" +checksum = "7b3475e55acec0b4a50fb96435f19631fb58cbcd31923e1a213de5c382536bbb" dependencies = [ - "base64 0.21.2", + "base64 0.21.5", "brotli", "ico", "json-patch", @@ -3322,7 +3554,7 @@ dependencies = [ "semver", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "tauri-utils", "thiserror", "time", @@ -3332,9 +3564,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb12a2454e747896929338d93b0642144bb51e0dddbb36e579035731f0d76b7" +checksum = "613740228de92d9196b795ac455091d3a5fbdac2654abb8bb07d010b62ab43af" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -3347,7 +3579,7 @@ dependencies = [ [[package]] name = "tauri-plugin-log" version = "0.0.0" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#0863f800b81925884a6a37c042f3d92d433d4a37" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#cb1586b4d1ceda3b9144898f6248b487839fad7a" dependencies = [ "byte-unit", "fern", @@ -3361,9 +3593,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "108683199cb18f96d2d4134187bb789964143c845d2d154848dda209191fd769" +checksum = "07f8e9e53e00e9f41212c115749e87d5cd2a9eebccafca77a19722eeecd56d43" dependencies = [ "gtk", "http", @@ -3382,11 +3614,11 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7aa256a1407a3a091b5d843eccc1a5042289baf0a43d1179d9f0fcfea37c1b" +checksum = "8141d72b6b65f2008911e9ef5b98a68d1e3413b7a1464e8f85eb3673bb19a895" dependencies = [ - "cocoa", + "cocoa 0.24.1", "gtk", "percent-encoding", "rand 0.8.5", @@ -3402,19 +3634,20 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fc02bb6072bb397e1d473c6f76c953cda48b4a2d0cce605df284aa74a12e84" +checksum = "34d55e185904a84a419308d523c2c6891d5e2dbcee740c4997eb42e75a7b0f46" dependencies = [ "brotli", "ctor", "dunce", "glob", "heck 0.4.1", - "html5ever", + "html5ever 0.26.0", "infer", "json-patch", - "kuchiki", + "kuchikiki", + "log", "memchr", "phf 0.10.1", "proc-macro2", @@ -3436,20 +3669,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb" dependencies = [ "embed-resource", - "toml 0.7.3", + "toml 0.7.8", ] [[package]] name = "tempfile" -version = "3.5.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "rustix", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -3471,22 +3704,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -3501,13 +3734,15 @@ dependencies = [ [[package]] name = "time" -version = "0.3.22" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ - "itoa 1.0.6", + "deranged", + "itoa 1.0.9", "libc", "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -3515,15 +3750,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -3545,17 +3780,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", - "socket2", + "socket2 0.5.5", "windows-sys 0.48.0", ] @@ -3571,9 +3806,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -3594,32 +3829,57 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.3" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.21.0", ] [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ + "indexmap 2.1.0", "serde", + "serde_spanned", + "toml_datetime", + "winnow", ] [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -3634,11 +3894,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3646,20 +3905,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -3667,20 +3926,20 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -3711,9 +3970,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" @@ -3723,9 +3982,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3744,9 +4003,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3768,11 +4027,11 @@ checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" [[package]] name = "uuid" -version = "1.3.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", ] [[package]] @@ -3783,9 +4042,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" +checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" [[package]] name = "vcpkg" @@ -3833,9 +4092,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -3843,11 +4102,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -3865,9 +4123,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3875,24 +4133,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -3902,9 +4160,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3912,28 +4170,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-streams" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" dependencies = [ "futures-util", "js-sys", @@ -3944,9 +4202,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -3958,7 +4216,7 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "gdk", "gdk-sys", @@ -3983,7 +4241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", @@ -3996,7 +4254,7 @@ dependencies = [ "pango-sys", "pkg-config", "soup2-sys", - "system-deps 6.1.0", + "system-deps 6.2.0", ] [[package]] @@ -4055,9 +4313,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -4070,14 +4328,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window-shadows" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d30320647cfc3dc45554c8ad825b84831def81f967a2f7589931328ff9b16d" +checksum = "67ff424735b1ac21293b0492b069394b0a189c8a463fb015a16dea7c2e221c08" dependencies = [ - "cocoa", + "cocoa 0.25.0", "objc", "raw-window-handle", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -4113,7 +4371,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -4126,6 +4384,15 @@ dependencies = [ "windows-tokens", ] +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-implement" version = "0.39.0" @@ -4172,7 +4439,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -4192,17 +4459,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -4219,9 +4486,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -4243,9 +4510,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -4267,9 +4534,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -4291,9 +4558,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -4315,9 +4582,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -4327,9 +4594,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -4351,55 +4618,56 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.1" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] name = "winreg" -version = "0.11.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a1a57ff50e9b408431e8f97d5456f2807f8eb2a2cd79b06068fc87f8ecf189" +checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc" dependencies = [ "cfg-if", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "wry" -version = "0.24.3" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33748f35413c8a98d45f7a08832d848c0c5915501803d1faade5a4ebcd258cea" +checksum = "88ef04bdad49eba2e01f06e53688c8413bd6a87b0bc14b72284465cf96e3578e" dependencies = [ "base64 0.13.1", "block", - "cocoa", - "core-graphics", + "cocoa 0.24.1", + "core-graphics 0.22.3", "crossbeam-channel", "dunce", "gdk", "gio", "glib", "gtk", - "html5ever", + "html5ever 0.25.2", "http", "kuchiki", "libc", @@ -4409,7 +4677,7 @@ dependencies = [ "once_cell", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "soup2", "tao", "thiserror", @@ -4444,9 +4712,9 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] @@ -4455,10 +4723,12 @@ dependencies = [ name = "yet_another_launcher" version = "0.2.6" dependencies = [ + "async-trait", "directories", "futures-util", "log", "minisign", + "opener", "reqwest", "serde", "serde_json", @@ -4522,11 +4792,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 3ee1613..63a3c16 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -10,12 +10,12 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -tauri-build = { version = "1.4.0", features = [] } +tauri-build = { version = "1.5.0", features = [] } [dependencies] log = "^0.4" tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } -tauri = { version = "1.4.1", features = [ "os-all", "dialog-all", "shell-open", "updater", "window-close", "window-hide", "window-maximize", "window-minimize", "window-show", "window-start-dragging", "window-unmaximize", "window-unminimize"] } +tauri = { version = "1.5.2", features = [ "os-all", "dialog-all", "shell-open", "updater", "window-close", "window-hide", "window-maximize", "window-minimize", "window-show", "window-start-dragging", "window-unmaximize", "window-unminimize"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" reqwest = { version = "0.11.18", features = ["stream"] } @@ -25,6 +25,8 @@ directories = "5.0.1" sevenz-rust = { version = "0.4.3", features = ["aes256"] } window-shadows = "0.2.1" minisign = "0.7.5" +opener = "0.6.1" +async-trait = "0.1.74" [features] # this feature is used for production builds or when `devPath` points to the filesystem diff --git a/src-tauri/src/app_profile/mod.rs b/src-tauri/src/app_profile/mod.rs new file mode 100644 index 0000000..8dc9a2f --- /dev/null +++ b/src-tauri/src/app_profile/mod.rs @@ -0,0 +1,42 @@ +use tauri::AppHandle; +use async_trait::async_trait; + +pub mod yarg; +pub mod official_setlist; + +pub const YARG_PUB_KEY: &str = "untrusted comment: minisign public key C26EBBBEC4C1DB81 +RWSB28HEvrtuwvPn3pweVBodgVi/d+UH22xDsL3K8VBgeRqaIrDdTvps +"; + +#[derive(Clone, serde::Serialize)] +pub struct ProgressPayload { + pub state: String, + pub total: u64, + pub current: u64, +} + +#[async_trait] +pub trait AppProfile { + async fn download_and_install( + &self, + app: &AppHandle, + zip_urls: Vec, + sig_urls: Vec + ) -> Result<(), String>; + + fn install( + &self + ) -> Result<(), String>; + + fn uninstall( + &self + ) -> Result<(), String>; + + fn exists( + &self + ) -> bool; + + fn launch( + &self + ) -> Result<(), String>; +} \ No newline at end of file diff --git a/src-tauri/src/app_profile/official_setlist.rs b/src-tauri/src/app_profile/official_setlist.rs new file mode 100644 index 0000000..e05213e --- /dev/null +++ b/src-tauri/src/app_profile/official_setlist.rs @@ -0,0 +1,100 @@ +use async_trait::async_trait; +use tauri::Manager; +use std::{path::{PathBuf, Path}, fs::{File, remove_file, read_to_string}, io::Write}; + +use crate::utils::*; + +use super::*; + +pub struct OfficialSetlistProfile { + pub root_folder: PathBuf, + pub temp_folder: PathBuf, + pub version: String, + pub profile: String +} + +#[async_trait] +impl AppProfile for OfficialSetlistProfile { + async fn download_and_install( + &self, + app: &tauri::AppHandle, + zip_urls: Vec, + _sig_urls: Vec + ) -> Result<(), String> { + let folder = self.root_folder.join(&self.profile); + + // Delete the old installation + clear_folder(&folder)?; + + // Download the zip(s) + for (index, zip_url) in zip_urls.iter().enumerate() { + // Download the current zip + let zip_path = &self.temp_folder.join(format!("setlist_{}.7z", index)); + download(Some(app), &zip_url, &zip_path).await?; + + // Emit the install + let _ = app.emit_all( + "progress_info", + ProgressPayload { + state: "installing".to_string(), + current: 0, + total: 0, + }, + ); + + // Extract the zip to the game directory + extract_setlist_part(&zip_path, &folder)?; + + // Delete zip + let _ = remove_file(zip_path); + } + + self.install()?; + + Ok(()) + } + + fn install( + &self + ) -> Result<(), String> { + let folder = self.root_folder.join(&self.profile); + + // Create a version.txt + let mut file = File::create(folder.join("version.txt")) + .map_err(|e| format!("Failed to create version file in `{:?}`.\n{:?}", folder, e))?; + file.write_all(&self.version.as_bytes()) + .map_err(|e| format!("Failed to write version file in `{:?}`.\n{:?}", folder, e))?; + + Ok(()) + } + + fn uninstall( + &self + ) -> Result<(), String> { + let folder = self.root_folder.join(&self.profile); + std::fs::remove_dir_all(folder) + .map_err(|e| format!("Failed to remove directory.\n{:?}", e)) + } + + fn exists( + &self + ) -> bool { + let path = self.root_folder.join(&self.profile); + if !Path::new(&path).exists() { + return false; + } + + let contents = match read_to_string(&path.join("version.txt")) { + Ok(contents) => contents, + _ => return false, + }; + + contents == self.version + } + + fn launch( + &self + ) -> Result<(), String> { + Err("Cannot launch the setlist!".to_string()) + } +} \ No newline at end of file diff --git a/src-tauri/src/app_profile/yarg.rs b/src-tauri/src/app_profile/yarg.rs new file mode 100644 index 0000000..7a364b6 --- /dev/null +++ b/src-tauri/src/app_profile/yarg.rs @@ -0,0 +1,151 @@ +use async_trait::async_trait; +use minisign::{PublicKeyBox, SignatureBox}; +use tauri::Manager; +use std::{path::{PathBuf, Path}, fs::{File, remove_file}, process::Command}; + +use crate::utils::*; + +use super::*; + +pub struct YARGAppProfile { + pub root_folder: PathBuf, + pub temp_folder: PathBuf, + pub version: String, + pub profile: String +} + +impl YARGAppProfile { + fn get_exec( + &self + ) -> Result { + let mut path = self.root_folder.join(&self.profile).join(&self.version); + + // Each OS has a different executable + path = match std::env::consts::OS.to_string().as_str() { + "windows" => path.join("YARG.exe"), + "linux" => { + // Stable uses "YARG.x86_64", and nightly uses "YARG". Look for both + let mut p = path.join("YARG.x86_64"); + if !p.exists() { + p = path.join("YARG"); + } + p + } + "macos" => path + .join("YARG.app") + .join("Contents") + .join("MacOS") + .join("YARG"), + _ => Err("Unknown platform for launch!")?, + }; + + Ok(path) + } +} + +#[async_trait] +impl AppProfile for YARGAppProfile { + async fn download_and_install( + &self, + app: &tauri::AppHandle, + zip_urls: Vec, + sig_urls: Vec + ) -> Result<(), String> { + let mut folder = self.root_folder.join(&self.profile); + + let zip_url = zip_urls.first().ok_or("Did not get any zip URLs.")?; + let sig_url = sig_urls.first(); + + // Delete the old installation + clear_folder(&folder)?; + + // Move into the version's folder + folder = folder.join(&self.version); + + // Download the zip + let zip_path = &self.temp_folder.join("update.zip"); + download(Some(app), &zip_url, &zip_path).await?; + + // Verify (if signature is provided) + if let Some(sig_url) = sig_url { + // Emit the verification + let _ = app.emit_all( + "progress_info", + ProgressPayload { + state: "verifying".to_string(), + current: 0, + total: 0, + }, + ); + + // Download sig file (don't pass app so it doesn't emit an update) + let sig_path = &self.temp_folder.join("update.sig"); + download(None, &sig_url, &sig_path).await?; + + // Convert public key + let pk_box = PublicKeyBox::from_string(YARG_PUB_KEY).unwrap(); + let pk = pk_box.into_public_key().unwrap(); + + // Create the signature box + let sig_box = SignatureBox::from_file(sig_path) + .map_err(|e| format!("Invalid signature file! Try reinstalling. If it keeps failing, let us know ASAP!\n{:?}", e))?; + + // Verify + let zip_file = File::open(zip_path) + .map_err(|e| format!("Failed to open zip while verifying.\n{:?}", e))?; + minisign::verify(&pk, &sig_box, zip_file, true, false, false) + .map_err(|_| "Failed to verify downloaded zip file! Try reinstalling. If it keeps failing, let us know ASAP!")?; + } + + // Emit the install (count extracting as installing) + let _ = app.emit_all( + "progress_info", + ProgressPayload { + state: "installing".to_string(), + current: 0, + total: 0, + }, + ); + + // Extract the zip to the game directory + extract(&zip_path, &folder)?; + + // Delete zip + let _ = remove_file(&zip_path); + + // Do the rest of the installation + self.install()?; + + Ok(()) + } + + fn install( + &self + ) -> Result<(), String> { + Ok(()) + } + + fn uninstall( + &self + ) -> Result<(), String> { + let folder = self.root_folder.join(&self.profile); + std::fs::remove_dir_all(folder) + .map_err(|e| format!("Failed to remove directory.\n{:?}", e)) + } + + fn exists( + &self + ) -> bool { + Path::new(&self.root_folder.join(&self.profile).join(&self.version)).exists() + } + + fn launch( + &self + ) -> Result<(), String> { + let path = self.get_exec()?; + Command::new(&path) + .spawn() + .map_err(|e| format!("Failed to start YARG. Is it installed?\n{:?}", e))?; + Ok(()) + } +} \ No newline at end of file diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 4fc73a3..b5d2924 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -2,30 +2,19 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] mod utils; +mod app_profile; +use app_profile::AppProfile; +use app_profile::official_setlist::OfficialSetlistProfile; +use app_profile::yarg::YARGAppProfile; use directories::BaseDirs; -use minisign::{PublicKeyBox, SignatureBox}; -use std::fs::{self, remove_file}; -use std::path::{Path, PathBuf}; -use std::process::Command; -use std::{fs::File, io::Write}; -use tauri::async_runtime::RwLock; +use std::fs::{self, remove_file, File}; +use std::path::PathBuf; +use std::sync::RwLock; use tauri::{AppHandle, Manager}; -use utils::{clear_folder, download, extract, extract_setlist_part}; +use utils::clear_folder; use window_shadows::set_shadow; -// TODO: Move this to a file or something -const YARG_PUB_KEY: &str = "untrusted comment: minisign public key C26EBBBEC4C1DB81 -RWSB28HEvrtuwvPn3pweVBodgVi/d+UH22xDsL3K8VBgeRqaIrDdTvps -"; - -#[derive(Clone, serde::Serialize)] -pub struct ProgressPayload { - pub state: String, - pub total: u64, - pub current: u64, -} - #[derive(Default, serde::Serialize, serde::Deserialize)] pub struct Settings { pub download_location: String, @@ -133,246 +122,128 @@ impl InnerState { Ok(()) } - - pub async fn download_yarg( - &self, - app: &AppHandle, - zip_url: String, - sig_url: Option, - version_id: String, - profile: String, - ) -> Result<(), String> { - let mut folder = self.yarg_folder.join(&profile); - - // Delete the old installation - clear_folder(&folder)?; - - // Move into the version's folder - folder = folder.join(&version_id); - - // Download the zip - let zip_path = &self.temp_folder.join("update.zip"); - download(Some(app), &zip_url, &zip_path).await?; - - // Verify (if signature is provided) - if let Some(sig_url) = sig_url { - // Emit the verification - let _ = app.emit_all( - "progress_info", - ProgressPayload { - state: "verifying".to_string(), - current: 0, - total: 0, - }, - ); - - // Download sig file (don't pass app so it doesn't emit an update) - let sig_path = &self.temp_folder.join("update.sig"); - download(None, &sig_url, &sig_path).await?; - - // Convert public key - let pk_box = PublicKeyBox::from_string(YARG_PUB_KEY).unwrap(); - let pk = pk_box.into_public_key().unwrap(); - - // Create the signature box - let sig_box = SignatureBox::from_file(sig_path) - .map_err(|e| format!("Invalid signature file! Try reinstalling. If it keeps failing, let us know ASAP!\n{:?}", e))?; - - // Verify - let zip_file = File::open(zip_path) - .map_err(|e| format!("Failed to open zip while verifying.\n{:?}", e))?; - minisign::verify(&pk, &sig_box, zip_file, true, false, false) - .map_err(|_| "Failed to verify downloaded zip file! Try reinstalling. If it keeps failing, let us know ASAP!")?; - } - - // Emit the install - let _ = app.emit_all( - "progress_info", - ProgressPayload { - state: "installing".to_string(), - current: 0, - total: 0, - }, - ); - - // Extract the zip to the game directory - extract(&zip_path, &folder)?; - - // Delete zip - let _ = remove_file(&zip_path); - - Ok(()) - } - - fn get_yarg_exec(&self, version_id: String, profile: String) -> Result { - let mut path = self.yarg_folder.join(profile).join(version_id); - path = match get_os().as_str() { - "windows" => path.join("YARG.exe"), - "linux" => { - // Stable uses "YARG.x86_64", and nightly uses "YARG" - let mut p = path.join("YARG.x86_64"); - if !p.exists() { - p = path.join("YARG"); - } - p - } - "macos" => path - .join("YARG.app") - .join("Contents") - .join("MacOS") - .join("YARG"), - _ => Err("Unknown platform for launch!")?, - }; - - Ok(path) - } - - pub fn play_yarg(&self, version_id: String, profile: String) -> Result<(), String> { - let path = self.get_yarg_exec(version_id, profile)?; - Command::new(&path) - .spawn() - .map_err(|e| format!("Failed to start YARG. Is it installed?\n{:?}", e))?; - - Ok(()) - } - - pub fn version_exists_yarg(&self, version_id: String, profile: String) -> bool { - Path::new(&self.yarg_folder.join(profile).join(version_id)).exists() - } - - pub async fn download_setlist( - &self, - app: &AppHandle, - zip_urls: Vec, - id: String, - version: String, - ) -> Result<(), String> { - let folder = self.setlist_folder.join(&id); - - // Delete the old installation - clear_folder(&folder)?; - - // Download the zip(s) - for (index, zip_url) in zip_urls.iter().enumerate() { - // Download the current zip - let zip_path = &self.temp_folder.join(format!("setlist_{}.7z", index)); - download(Some(app), &zip_url, &zip_path).await?; - - // Emit the install - let _ = app.emit_all( - "progress_info", - ProgressPayload { - state: "installing".to_string(), - current: 0, - total: 0, - }, - ); - - // Extract the zip to the game directory - extract_setlist_part(&zip_path, &folder)?; - - // Delete zip - let _ = remove_file(zip_path); - } - - // Create a version.txt - let mut file = File::create(folder.join("version.txt")) - .map_err(|e| format!("Failed to create version file in `{:?}`.\n{:?}", folder, e))?; - file.write_all(version.as_bytes()) - .map_err(|e| format!("Failed to write version file in `{:?}`.\n{:?}", folder, e))?; - - Ok(()) - } - - pub fn version_exists_setlist(&self, id: String, version: String) -> bool { - let path = self.setlist_folder.join(id); - if !Path::new(&path).exists() { - return false; - } - - let contents = match fs::read_to_string(&path.join("version.txt")) { - Ok(contents) => contents, - _ => return false, - }; - - contents == version - } } pub struct State(pub RwLock); -#[tauri::command] -async fn init(state: tauri::State<'_, State>) -> Result<(), String> { - let mut state_guard = state.0.write().await; +#[tauri::command(async)] +fn init(state: tauri::State) -> Result<(), String> { + let mut state_guard = state.0.write().unwrap(); state_guard.init()?; Ok(()) } +#[tauri::command(async)] +fn is_initialized(state: tauri::State) -> Result { + let state_guard = state.0.read().unwrap(); + Ok(state_guard.settings.initialized) +} + +fn create_app_profile( + app_name: String, + state: &tauri::State, + version: String, + profile: String +) -> Result, String> { + let state_guard = state.0.read().unwrap(); + + Ok(match app_name.as_str() { + "yarg" => Box::new(YARGAppProfile { + root_folder: state_guard.yarg_folder.clone(), + temp_folder: state_guard.temp_folder.clone(), + version, + profile + }), + "official_setlist" => Box::new(OfficialSetlistProfile { + root_folder: state_guard.setlist_folder.clone(), + temp_folder: state_guard.temp_folder.clone(), + version, + profile + }), + _ => Err(format!("Unknown app profile `{}`.", app_name))? + }) +} + #[tauri::command] -async fn download_yarg( - app: AppHandle, +async fn download_and_install( state: tauri::State<'_, State>, - zip_url: String, - sig_url: Option, - version_id: String, + app_handle: AppHandle, + app_name: String, + version: String, profile: String, + zip_urls: Vec, + sig_urls: Vec ) -> Result<(), String> { - let state_guard = state.0.read().await; + let app_profile = create_app_profile( + app_name, + &state, + version, + profile + )?; - state_guard - .download_yarg(&app, zip_url, sig_url, version_id, profile) - .await?; + let result = app_profile.download_and_install( + &app_handle, + zip_urls, + sig_urls + ); + + result.await?; Ok(()) } -#[tauri::command] -async fn play_yarg( - state: tauri::State<'_, State>, - version_id: String, - profile: String, +#[tauri::command(async)] +fn uninstall( + state: tauri::State, + app_name: String, + version: String, + profile: String ) -> Result<(), String> { - let state_guard = state.0.read().await; - state_guard.play_yarg(version_id, profile)?; + let app_profile = create_app_profile( + app_name, + &state, + version, + profile + )?; + + app_profile.uninstall()?; Ok(()) } -#[tauri::command] -async fn version_exists_yarg( - state: tauri::State<'_, State>, - version_id: String, - profile: String, +#[tauri::command(async)] +fn exists( + state: tauri::State, + app_name: String, + version: String, + profile: String ) -> Result { - let state_guard = state.0.read().await; - Ok(state_guard.version_exists_yarg(version_id, profile)) + let app_profile = create_app_profile( + app_name, + &state, + version, + profile + )?; + + Ok(app_profile.exists()) } -#[tauri::command] -async fn download_setlist( - app: AppHandle, +#[tauri::command(async)] +fn launch( state: tauri::State<'_, State>, - zip_urls: Vec, - id: String, + app_name: String, version: String, + profile: String ) -> Result<(), String> { - let state_guard = state.0.read().await; - state_guard - .download_setlist(&app, zip_urls, id, version) - .await?; - - Ok(()) -} - -#[tauri::command] -async fn version_exists_setlist( - state: tauri::State<'_, State>, - id: String, - version: String, -) -> Result { - let state_guard = state.0.read().await; - Ok(state_guard.version_exists_setlist(id, version)) + let app_profile = create_app_profile( + app_name, + &state, + version, + profile + )?; + + app_profile.launch() } #[tauri::command] @@ -381,17 +252,19 @@ fn get_os() -> String { } #[tauri::command] -async fn is_initialized(state: tauri::State<'_, State>) -> Result { - let state_guard = state.0.read().await; - Ok(state_guard.settings.initialized) +fn is_dir_empty(path: String) -> bool { + match fs::read_dir(path) { + Ok(mut entries) => entries.next().is_none(), + Err(_) => false, + } } -#[tauri::command] +#[tauri::command(async)] async fn set_download_location( state: tauri::State<'_, State>, path: Option, ) -> Result<(), String> { - let mut state_guard = state.0.write().await; + let mut state_guard = state.0.write().unwrap(); // If this is None, just use the default if let Some(path) = path { @@ -407,19 +280,11 @@ async fn set_download_location( } #[tauri::command] -async fn get_download_location(state: tauri::State<'_, State>) -> Result { - let state_guard = state.0.read().await; +fn get_download_location(state: tauri::State<'_, State>) -> Result { + let state_guard = state.0.read().unwrap(); Ok(state_guard.settings.download_location.clone()) } -#[tauri::command] -fn is_dir_empty(path: String) -> bool { - match fs::read_dir(path) { - Ok(mut entries) => entries.next().is_none(), - Err(_) => false, - } -} - fn main() { tauri::Builder::default() .plugin(tauri_plugin_log::Builder::default().build()) @@ -433,16 +298,18 @@ fn main() { }))) .invoke_handler(tauri::generate_handler![ init, - download_yarg, - play_yarg, - version_exists_yarg, - download_setlist, - version_exists_setlist, - get_os, is_initialized, + + download_and_install, + uninstall, + exists, + launch, + + get_os, + is_dir_empty, + set_download_location, - get_download_location, - is_dir_empty + get_download_location ]) .setup(|app| { let window = app.get_window("main").unwrap(); diff --git a/src-tauri/src/utils.rs b/src-tauri/src/utils.rs index 5a73ddf..f3426ca 100644 --- a/src-tauri/src/utils.rs +++ b/src-tauri/src/utils.rs @@ -5,7 +5,7 @@ use std::path::Path; use std::{fs::File, io::Write}; use tauri::{AppHandle, Manager}; -use crate::ProgressPayload; +use crate::app_profile::ProgressPayload; const LETTERS: &str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; diff --git a/src/components/DropdownButton/index.tsx b/src/components/DropdownButton/index.tsx index 1daf8f4..557e868 100644 --- a/src/components/DropdownButton/index.tsx +++ b/src/components/DropdownButton/index.tsx @@ -42,14 +42,17 @@ const DropdownButton: React.FC = (props: DropdownProps) => { ; }; -type ItemProps = React.PropsWithChildren; +type ItemProps = React.PropsWithChildren<{ + onClick?: React.MouseEventHandler, +}>; const DropdownItem: React.FC = (props: ItemProps) => { const { children, + onClick } = props; - return + return {children} ; }; diff --git a/src/components/Launch/LaunchButton/index.tsx b/src/components/Launch/LaunchButton/index.tsx index 6ecba90..d063433 100644 --- a/src/components/Launch/LaunchButton/index.tsx +++ b/src/components/Launch/LaunchButton/index.tsx @@ -1,10 +1,10 @@ import { YARGStates, YARGVersion } from "@app/hooks/useYARGVersion"; import { ButtonColor } from "../../Button"; import { InstallingIcon, UpdateIcon } from "@app/assets/Icons"; -import { calculatePayloadPercentage } from "@app/utils/Download/payload"; +import { calculatePayloadPercentage } from "@app/tasks/payload"; import PayloadProgress from "../../PayloadProgress"; import Button from "@app/components/Button"; -// import { DropdownButton, DropdownItem } from "@app/components/DropdownButton"; +import { DropdownButton, DropdownItem } from "@app/components/DropdownButton"; interface LaunchButtonProps extends React.PropsWithChildren { version: YARGVersion, @@ -49,25 +49,20 @@ export function LaunchButton(props: LaunchButtonProps) { Play {playName} ; - // const dropdownChildren = <> - // - // Open Folder - // - // - // Clear Caches - // - // - // Uninstall - // - // ; + const dropdownChildren = <> + version.uninstall()}> + Uninstall + + ; - return ; + ; } if (version.state === YARGStates.PLAYING) { diff --git a/src/components/PayloadProgress/index.tsx b/src/components/PayloadProgress/index.tsx index dc12920..d60f785 100644 --- a/src/components/PayloadProgress/index.tsx +++ b/src/components/PayloadProgress/index.tsx @@ -1,7 +1,7 @@ -import { DownloadPayload } from "@app/utils/Download"; +import { TaskPayload } from "@app/tasks/payload"; interface Props { - payload?: DownloadPayload; + payload?: TaskPayload; defaultText?: string; fullMode?: boolean; } @@ -28,7 +28,7 @@ const ProgressWaiting: React.FC = () => { }; interface ProgressDownloadingProps { - payload: DownloadPayload; + payload: TaskPayload; fullMode?: boolean; } diff --git a/src/components/Queue/QueueEntry/Setlist.tsx b/src/components/Queue/QueueEntry/Setlist.tsx index a1df873..f9aafe2 100644 --- a/src/components/Queue/QueueEntry/Setlist.tsx +++ b/src/components/Queue/QueueEntry/Setlist.tsx @@ -1,17 +1,17 @@ -import { SetlistDownload } from "@app/utils/Download/Processors/Setlist"; +import { SetlistTask } from "@app/tasks/Processors/Setlist"; import BaseQueue from "./base"; import SetlistIcon from "@app/assets/SourceIcons/Official.png"; interface Props { - downloader: SetlistDownload, + setlistTask: SetlistTask, bannerMode: boolean, } -const SetlistQueue: React.FC = ({ downloader, bannerMode }: Props) => { +const SetlistQueue: React.FC = ({ setlistTask, bannerMode }: Props) => { return } - versionChannel={downloader.version} + versionChannel={setlistTask.version} bannerMode={bannerMode} />; }; diff --git a/src/components/Queue/QueueEntry/YARG.tsx b/src/components/Queue/QueueEntry/YARG.tsx index 896c906..48e2759 100644 --- a/src/components/Queue/QueueEntry/YARG.tsx +++ b/src/components/Queue/QueueEntry/YARG.tsx @@ -1,28 +1,25 @@ -import { YARGDownload } from "@app/utils/Download/Processors/YARG"; +import { YARGTask } from "@app/tasks/Processors/YARG"; import BaseQueue from "./base"; import StableYARGIcon from "@app/assets/StableYARGIcon.png"; import NightlyYARGIcon from "@app/assets/NightlyYARGIcon.png"; -import DevYARGIcon from "@app/assets/DevYARGIcon.png"; import { YARGChannels } from "@app/hooks/useYARGRelease"; interface Props { - downloader: YARGDownload, + yargTask: YARGTask, bannerMode: boolean, } -const YARGQueue: React.FC = ({ downloader, bannerMode }: Props) => { - +const YARGQueue: React.FC = ({ yargTask, bannerMode }: Props) => { const channelIconPath: { [key in YARGChannels]: string } = { "stable": StableYARGIcon, - "nightly": NightlyYARGIcon, - "newEngine": DevYARGIcon + "nightly": NightlyYARGIcon }; return } - version={downloader.version} - versionChannel={downloader.channel.toUpperCase()} + icon={} + version={yargTask.version} + versionChannel={yargTask.channel.toUpperCase()} bannerMode={bannerMode} />; }; diff --git a/src/components/Setlist/SetlistButton/index.tsx b/src/components/Setlist/SetlistButton/index.tsx new file mode 100644 index 0000000..b29beea --- /dev/null +++ b/src/components/Setlist/SetlistButton/index.tsx @@ -0,0 +1,83 @@ +import { ButtonColor } from "../../Button"; +import { CheckmarkIcon, InstallingIcon, UpdateIcon } from "@app/assets/Icons"; +import { calculatePayloadPercentage } from "@app/tasks/payload"; +import PayloadProgress from "../../PayloadProgress"; +import Button from "@app/components/Button"; +import { DropdownButton, DropdownItem } from "@app/components/DropdownButton"; +import { SetlistStates, SetlistVersion } from "@app/hooks/useSetlistData"; + +interface SetlistButtonProps extends React.PropsWithChildren { + version: SetlistVersion, + style?: React.CSSProperties +} + +export function SetlistButton(props: SetlistButtonProps) { + const version = props.version; + + if (version.state === SetlistStates.NEW_UPDATE) { + const buttonChildren = <> + Update Setlist + ; + + return ; + } + + if (version.state === SetlistStates.DOWNLOADING) { + const buttonChildren = <> + + + ; + + return ; + } + + if (version.state === SetlistStates.AVAILABLE) { + const buttonChildren = <> + Downloaded + ; + + const dropdownChildren = <> + version.uninstall()}> + Uninstall + + ; + + return + + {buttonChildren} + ; + } + + if (version.state === SetlistStates.ERROR) { + const buttonChildren = <> + Error! + ; + + return ; + } + + return ; +} \ No newline at end of file diff --git a/src/routes/Setlist/index.tsx b/src/components/Setlist/SetlistPage/index.tsx similarity index 64% rename from src/routes/Setlist/index.tsx rename to src/components/Setlist/SetlistPage/index.tsx index 349fc86..0b15208 100644 --- a/src/routes/Setlist/index.tsx +++ b/src/components/Setlist/SetlistPage/index.tsx @@ -1,59 +1,34 @@ -import { SetlistID, useSetlistRelease } from "@app/hooks/useSetlistRelease"; +import { SetlistData } from "@app/hooks/useSetlistRelease"; import styles from "./setlist.module.css"; -import { SetlistStates, useSetlistData } from "@app/hooks/useSetlistData"; +import { SetlistVersion } from "@app/hooks/useSetlistData"; import { GenericBox, GenericBoxHeader, GenericBoxSlim } from "@app/components/GenericBox"; import SongEntry from "@app/components/Setlist/SongEntry"; -import { InformationIcon, ChartersIcon, OrganizerIcon, DateIcon, SongIcon, TimeIcon, UpdateIcon, InstallingIcon, CheckmarkIcon } from "@app/assets/Icons"; +import { InformationIcon, ChartersIcon, OrganizerIcon, DateIcon, SongIcon, TimeIcon } from "@app/assets/Icons"; import CreditEntry from "@app/components/Setlist/CreditEntry"; import { isConsideredNewRelease, millisToDisplayLength } from "@app/utils/timeFormat"; -import Button, { ButtonColor } from "@app/components/Button"; -import PayloadProgress from "@app/components/PayloadProgress"; import TooltipWrapper from "@app/components/TooltipWrapper"; -import { calculatePayloadPercentage } from "@app/utils/Download/payload"; -import { useDialogManager } from "@app/dialogs/DialogProvider"; import { intlFormatDistance } from "date-fns"; import NewsSection from "@app/components/NewsSection"; -import SortChanger, { SortType } from "./SortChanger"; +import SortChanger, { SortType } from "@app/components/Setlist/SortChanger"; import { useState } from "react"; import sortArray from "sort-array"; +import { SetlistButton } from "@app/components/Setlist/SetlistButton"; interface Props { - setlistId: SetlistID + version: SetlistVersion, + data: SetlistData, } -interface SetlistButtonProps extends React.PropsWithChildren { - style?: React.CSSProperties -} +const SetlistPage: React.FC = ({ version, data }: Props) => { + // If there isn't a version, something went wrong + if (!version) { + console.log(version); + return

Error: No version.

; + } -const SetlistPage: React.FC = ({ setlistId }: Props) => { - const setlistData = useSetlistRelease(setlistId); - const { state, download, payload } = useSetlistData(setlistData); const [ sortType, setSortType ] = useState("title" as SortType); - const dialogManager = useDialogManager(); - - function SetlistButton(props: SetlistButtonProps) { - if (state === SetlistStates.AVAILABLE) { - return ; - } else if (state === SetlistStates.DOWNLOADING) { - if (!payload) { - return <>; - } - - return ; - } else { - return ; - } - } - - const newestSongRelease = setlistData.songs.reduce((prev, curr) => + const newestSongRelease = data.songs.reduce((prev, curr) => new Date(prev.releaseDate).getTime() > new Date(curr.releaseDate).getTime() ? prev : curr); return <> @@ -63,7 +38,7 @@ const SetlistPage: React.FC = ({ setlistId }: Props) => { setSortType(s)} /> - {sortArray(setlistData.songs, { + {sortArray(data.songs, { by: "order", order: sortType === "releaseDate" ? "desc" : "asc", computed: { @@ -93,18 +68,18 @@ const SetlistPage: React.FC = ({ setlistId }: Props) => {
- + - {setlistData.locales["en-US"].title} + {data.locales["en-US"].title} - {setlistData.locales["en-US"].description} + {data.locales["en-US"].description}
@@ -112,24 +87,24 @@ const SetlistPage: React.FC = ({ setlistId }: Props) => { year: "numeric", month: "long", day: "numeric", - }).format(new Date(setlistData.releaseDate))} + }).format(new Date(data.releaseDate))} - {setlistData.songs.length} songs + {data.songs.length} songs - {millisToDisplayLength(setlistData.songs.reduce( + {millisToDisplayLength(data.songs.reduce( (accumulator, currentValue) => accumulator + currentValue.length, 0), true)} - {setlistData.organizer} + {data.organizer}
@@ -141,7 +116,7 @@ const SetlistPage: React.FC = ({ setlistId }: Props) => {
- {setlistData.credits.map(i => + {data.credits.map(i => )}
diff --git a/src/routes/Setlist/setlist.module.css b/src/components/Setlist/SetlistPage/setlist.module.css similarity index 98% rename from src/routes/Setlist/setlist.module.css rename to src/components/Setlist/SetlistPage/setlist.module.css index 8f12335..260b53a 100644 --- a/src/routes/Setlist/setlist.module.css +++ b/src/components/Setlist/SetlistPage/setlist.module.css @@ -20,6 +20,8 @@ align-items: flex-start; gap: 25px; background: var(--white-background); + + align-items: stretch; } .content { @@ -81,7 +83,7 @@ padding: 0px 1px; align-items: center; gap: 6px; - + color: #333; font-size: 12px; font-style: normal; diff --git a/src/routes/Setlist/SortChanger.module.css b/src/components/Setlist/SortChanger/SortChanger.module.css similarity index 100% rename from src/routes/Setlist/SortChanger.module.css rename to src/components/Setlist/SortChanger/SortChanger.module.css diff --git a/src/routes/Setlist/SortChanger.tsx b/src/components/Setlist/SortChanger/index.tsx similarity index 100% rename from src/routes/Setlist/SortChanger.tsx rename to src/components/Setlist/SortChanger/index.tsx diff --git a/src/components/Sidebar/Versions/Setlist.tsx b/src/components/Sidebar/Versions/Setlist.tsx index d908d8b..bbf3772 100644 --- a/src/components/Sidebar/Versions/Setlist.tsx +++ b/src/components/Sidebar/Versions/Setlist.tsx @@ -9,13 +9,13 @@ interface Props { } const SetlistVersion: React.FC = ({ channel }: Props) => { - const setlistData = useSetlistRelease(channel); - const { state } = useSetlistData(setlistData); + const { data: setlistData } = useSetlistRelease(channel); + const { state } = useSetlistData(setlistData, channel); return ( } // TO-DO: create a util/sourceIcon to get source icon from + icon={} // TO-DO: create a util/sourceIcon to get source icon from type={VersionType.SONG} programName={setlistData?.locales["en-US"].title} // TO-DO: catch the BCP 47 code versionChannel={`${setlistData?.songs?.length} songs`} diff --git a/src/components/Sidebar/Versions/YARG.tsx b/src/components/Sidebar/Versions/YARG.tsx index 684b3ba..4309c20 100644 --- a/src/components/Sidebar/Versions/YARG.tsx +++ b/src/components/Sidebar/Versions/YARG.tsx @@ -3,7 +3,6 @@ import { YARGStates, useYARGVersion } from "@app/hooks/useYARGVersion"; import BaseVersion from "./Base"; import NightlyYARGIcon from "@app/assets/NightlyYARGIcon.png"; import StableYARGIcon from "@app/assets/StableYARGIcon.png"; -import DevYARGIcon from "@app/assets/DevYARGIcon.png"; import { NavLink } from "react-router-dom"; interface Props { @@ -20,8 +19,6 @@ const YARGVersion: React.FC = ({ channel }: Props) => { return StableYARGIcon; case "nightly": return NightlyYARGIcon; - case "newEngine": - return DevYARGIcon; } } @@ -31,8 +28,6 @@ const YARGVersion: React.FC = ({ channel }: Props) => { return "Stable"; case "nightly": return "Nightly"; - case "newEngine": - return "New Engine"; } } diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index 254a6b0..6d6c54f 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -5,23 +5,11 @@ import { NavLink } from "react-router-dom"; import VersionsList from "./Versions/List"; import { useEffect, useState } from "react"; import { getVersion } from "@tauri-apps/api/app"; -import { useDownloadClient } from "@app/utils/Download/provider"; +import QueueStore from "@app/tasks/queue"; const Sidebar: React.FC = () => { const [launcherVersion, setLauncherVersion] = useState(""); - - const downloadClient = useDownloadClient(); - const queue = downloadClient.useQueue(); - const current = downloadClient.useCurrent(); - - function getDownloadCount() { - let count = queue.size; - if (current) { - count++; - } - - return count; - } + const queue = QueueStore.useQueue(); useEffect(() => { (async () => { @@ -39,7 +27,7 @@ const Sidebar: React.FC = () => { {/* }>Settings */} }> - Downloads {getDownloadCount() <= 0 ? "" : `(${getDownloadCount()})`} + Downloads {queue.size <= 0 ? "" : `(${queue.size})`}
diff --git a/src/components/TitleBar/index.tsx b/src/components/TitleBar/index.tsx index 53bf51d..0c9cbef 100644 --- a/src/components/TitleBar/index.tsx +++ b/src/components/TitleBar/index.tsx @@ -2,25 +2,22 @@ import { appWindow } from "@tauri-apps/api/window"; import styles from "./titlebar.module.css"; import { CloseIcon, MinimizeIcon } from "@app/assets/Icons"; -import { useDialogManager } from "@app/dialogs/DialogProvider"; import { TryCloseDialog } from "@app/dialogs/Dialogs/TryCloseDialog"; -import { useDownloadClient } from "@app/utils/Download/provider"; +import { useCurrentTask } from "@app/tasks"; +import { createAndShowDialog } from "@app/dialogs"; const TitleBar: React.FC = () => { - const dialogManager = useDialogManager(); - - const downloadClient = useDownloadClient(); - const current = downloadClient.useCurrent(); + const currentTask = useCurrentTask(); async function tryClose() { // If there is no download, just close - if (!current) { + if (!currentTask?.startedAt) { appWindow.close(); return; } // If there is one, show alert - const output = await dialogManager.createAndShowDialog(TryCloseDialog); + const output = await createAndShowDialog(TryCloseDialog); if (output === "close") { appWindow.close(); } diff --git a/src/dialogs/DialogProvider.tsx b/src/dialogs/DialogProvider.tsx index d3f2791..a87ec06 100644 --- a/src/dialogs/DialogProvider.tsx +++ b/src/dialogs/DialogProvider.tsx @@ -1,37 +1,28 @@ -import { createContext } from "react"; -import { useContext } from "react"; -import { DialogManager } from "."; import * as Dialog from "@radix-ui/react-dialog"; import styles from "./DialogProvider.module.css"; +import { setDialogOpen, useDialog } from "."; -export const DialogManagerContext = createContext({} as DialogManager); - -function DialogContextInner() { - const dialogManager = useDialogManager(); +function DialogComponent() { + const dialog = useDialog(); function prevent(e: Event) { e.preventDefault(); } - const CurrentDialog = dialogManager.useDialog(); - const dialogProps = dialogManager.useProps(); - - return dialogManager.setOpen(v)}> + return setDialogOpen(isOpen)}> - {CurrentDialog ? : "No dialog assigned!"} + {dialog.content ? : "No dialog assigned!"} ; } -export const DialogManagerProvider: React.FC = ({ children }: React.PropsWithChildren) => { - return +export const DialogProvider: React.FC = ({ children }: React.PropsWithChildren) => { + return <> {children} - - ; -}; - -export const useDialogManager = () => useContext(DialogManagerContext); \ No newline at end of file + + ; +}; \ No newline at end of file diff --git a/src/dialogs/Dialogs/BaseDialog.tsx b/src/dialogs/Dialogs/BaseDialog.tsx index 68701b4..bb6194a 100644 --- a/src/dialogs/Dialogs/BaseDialog.tsx +++ b/src/dialogs/Dialogs/BaseDialog.tsx @@ -1,11 +1,7 @@ import React from "react"; import styles from "./BaseDialog.module.css"; -import { DialogManagerContext } from "../DialogProvider"; export abstract class BaseDialog extends React.Component, T> { - static contextType = DialogManagerContext; - declare context: React.ContextType; - constructor(props: Record) { super(props); } diff --git a/src/dialogs/Dialogs/ErrorDialog.tsx b/src/dialogs/Dialogs/ErrorDialog.tsx index 37d11ec..0b5b4d4 100644 --- a/src/dialogs/Dialogs/ErrorDialog.tsx +++ b/src/dialogs/Dialogs/ErrorDialog.tsx @@ -3,6 +3,7 @@ import { BaseDialog } from "./BaseDialog"; import styles from "./ErrorDialog.module.css"; import { error as LogError } from "tauri-plugin-log-api"; import { serializeError } from "serialize-error"; +import { closeDialog } from ".."; export class ErrorDialog extends BaseDialog> { constructor(props: Record) { @@ -35,7 +36,7 @@ export class ErrorDialog extends BaseDialog> { getButtons() { return <> - + ; } } \ No newline at end of file diff --git a/src/dialogs/Dialogs/InstallFolderDialog.tsx b/src/dialogs/Dialogs/InstallFolderDialog.tsx index a5f7018..70e2bff 100644 --- a/src/dialogs/Dialogs/InstallFolderDialog.tsx +++ b/src/dialogs/Dialogs/InstallFolderDialog.tsx @@ -4,6 +4,7 @@ import { open } from "@tauri-apps/api/dialog"; import styles from "./InstallFolderDialog.module.css"; import { DriveIcon, WarningIcon } from "@app/assets/Icons"; import { invoke } from "@tauri-apps/api"; +import { closeDialog } from ".."; interface State { path?: string; @@ -74,13 +75,13 @@ export class InstallFolderDialog extends BaseDialog { getButtons() { return <> - + ; } diff --git a/src/dialogs/Dialogs/TryCloseDialog.tsx b/src/dialogs/Dialogs/TryCloseDialog.tsx index 9dea00a..68c8dda 100644 --- a/src/dialogs/Dialogs/TryCloseDialog.tsx +++ b/src/dialogs/Dialogs/TryCloseDialog.tsx @@ -1,5 +1,6 @@ import Button, { ButtonColor } from "@app/components/Button"; import { BaseDialog } from "./BaseDialog"; +import { closeDialog } from ".."; export class TryCloseDialog extends BaseDialog> { constructor(props: Record) { @@ -21,8 +22,8 @@ export class TryCloseDialog extends BaseDialog> { getButtons() { return <> - - + ; diff --git a/src/dialogs/dialogUtil.ts b/src/dialogs/dialogUtil.ts index 79e3b15..5bed11f 100644 --- a/src/dialogs/dialogUtil.ts +++ b/src/dialogs/dialogUtil.ts @@ -1,11 +1,12 @@ import { invoke } from "@tauri-apps/api"; -import { DialogManager } from "."; import { InstallFolderDialog } from "./Dialogs/InstallFolderDialog"; import { ErrorDialog } from "./Dialogs/ErrorDialog"; +import { createAndShowDialog } from "."; -export async function showInstallFolderDialog(dialogManager: DialogManager) { +export async function showInstallFolderDialog() { if (!await invoke("is_initialized")) { - const dialogOutput = await dialogManager.createAndShowDialog(InstallFolderDialog); + const dialogOutput = await createAndShowDialog(InstallFolderDialog); + if (dialogOutput === "cancel") { return false; } else { @@ -22,6 +23,6 @@ export async function showInstallFolderDialog(dialogManager: DialogManager) { return true; } -export async function showErrorDialog(dialogManager: DialogManager, error: string) { - await dialogManager.createAndShowDialog(ErrorDialog, { error: error }); +export async function showErrorDialog(error: string) { + await createAndShowDialog(ErrorDialog, { error: error }); } \ No newline at end of file diff --git a/src/dialogs/index.ts b/src/dialogs/index.ts index 005a55a..6c57257 100644 --- a/src/dialogs/index.ts +++ b/src/dialogs/index.ts @@ -1,61 +1,51 @@ -import { createStore, useStore } from "zustand"; -import waitUntil, { WAIT_FOREVER } from "async-wait-until"; import { Component } from "react"; - -export class DialogManager { - private dialogStore = createStore(() => undefined); - private propsStore = createStore | undefined>(() => undefined); - private openStore = createStore(() => false); - - dialogOut?: string; - - async createAndShowDialog(dialog: typeof Component, props?: Record): Promise { - console.log("Showing dialog!"); - - // If there's already a dialog open, close the current one - if (this.openStore.getState()) { - return undefined; - } - - // Open the dialog - this.dialogStore.setState(() => dialog, true); - this.propsStore.setState(() => props, true); - this.openStore.setState(() => true, true); - - // Subscribe to the close event - let done = false; - const unsubscribe = this.openStore.subscribe(newState => { - if (!newState) { - done = true; - } - }); - - // Wait until close - await waitUntil(() => done, { - timeout: WAIT_FOREVER +import { useStore } from "zustand"; +import { createStore } from "zustand/vanilla"; + +type DialogStore = { + open: boolean, + props?: Record, + content?: typeof Component, + output?: string +} + +const store = createStore( + () => ({open: false}) +); + +export const createAndShowDialog = async (content: typeof Component, props?: Record): Promise => { + const current = store.getState(); + if(current.open) return; + + store.setState({ + content, + props, + open: true, + }); + + return new Promise((resolve) => { + const unsubscribe = store.subscribe(({open, output}) => { + if(open) return; + + unsubscribe(); + resolve(output); }); - unsubscribe(); - return this.dialogOut; - } - - closeDialog(dialogOut?: string) { - this.openStore.setState(() => false, true); - this.dialogOut = dialogOut; - } - - useDialog() { - return useStore(this.dialogStore); - } - - useOpen() { - return useStore(this.openStore); - } - - useProps() { - return useStore(this.propsStore); - } - - setOpen(value: boolean) { - this.openStore.setState(() => value, true); - } -} \ No newline at end of file + }); +}; + +export const closeDialog = (output?: string) => { + store.setState({ + open: false, + output + }); +}; + +export const useDialog = () => { + return useStore(store); +}; + +export const setDialogOpen = (open: boolean) => { + store.setState({ + open + }); +}; \ No newline at end of file diff --git a/src/hooks/useSetlistData.ts b/src/hooks/useSetlistData.ts index 7ba6904..f6ed470 100644 --- a/src/hooks/useSetlistData.ts +++ b/src/hooks/useSetlistData.ts @@ -1,45 +1,62 @@ import { useSetlistState } from "@app/stores/SetlistStateStore"; import { SetlistData } from "./useSetlistRelease"; -import { useDownloadClient } from "@app/utils/Download/provider"; -import { SetlistDownload, generateSetlistUUID } from "@app/utils/Download/Processors/Setlist"; +import { SetlistDownload, SetlistUninstall } from "@app/tasks/Processors/Setlist"; import { useEffect } from "react"; import { invoke } from "@tauri-apps/api/tauri"; -import { DialogManager } from "@app/dialogs"; import { showErrorDialog, showInstallFolderDialog } from "@app/dialogs/dialogUtil"; +import { addTask, useTask } from "@app/tasks"; +import { TaskPayload, usePayload } from "@app/tasks/payload"; export enum SetlistStates { "AVAILABLE", "DOWNLOADING", "ERROR", + "LOADING", "NEW_UPDATE" } -export const useSetlistData = (setlistData: SetlistData) => { - const { state, setState } = useSetlistState(setlistData?.version); +export type SetlistVersion = { + state: SetlistStates, + download: () => Promise, + uninstall: () => Promise, + payload?: TaskPayload +} - const downloadClient = useDownloadClient(); - const payload = downloadClient.usePayload(generateSetlistUUID(setlistData?.id, setlistData?.version)); +export const useSetlistData = (setlistData: SetlistData | undefined, setlistId: string): SetlistVersion => { + const { state, setState } = useSetlistState(setlistData?.version); + const task = useTask("setlist", setlistId); + const payload = usePayload(task?.taskUUID); useEffect(() => { ( async () => { if (state || !setlistData) return; - const exists = await invoke("version_exists_setlist", { - id: setlistData.id, - version: setlistData.version + const exists = await invoke("exists", { + appName: "official_setlist", + version: setlistData.version, + profile: setlistData.id }); setState(exists ? SetlistStates.AVAILABLE : SetlistStates.NEW_UPDATE); } )(); - }, []); + }, [setlistData]); - const download = async (dialogManager: DialogManager) => { + // If we don't have a release data yet, return a dummy loading version; + if (!setlistData) { + return { + state, + download: async () => {}, + uninstall: async () => {}, + }; + } + + const download = async () => { if (!setlistData || state === SetlistStates.DOWNLOADING) return; // Ask for a download location (if required) - if (!await showInstallFolderDialog(dialogManager)) { + if (!await showInstallFolderDialog()) { // Skip if the dialog is closed or it errors return; } @@ -54,14 +71,38 @@ export const useSetlistData = (setlistData: SetlistData) => { () => { setState(SetlistStates.AVAILABLE); } ); - downloadClient.add(downloader); + addTask(downloader); + } catch (e) { + setState(SetlistStates.ERROR); + + showErrorDialog(e as string); + console.error(e); + } + }; + + const uninstall = async () => { + if (!setlistData || state === SetlistStates.DOWNLOADING) return; + + // You can't uninstall if the launcher is not initialized + if (!await invoke("is_initialized")) return; + + setState(SetlistStates.DOWNLOADING); + + try { + const downloader = new SetlistUninstall( + setlistData.id, + setlistData.version, + () => { setState(SetlistStates.NEW_UPDATE); } + ); + + addTask(downloader); } catch (e) { setState(SetlistStates.ERROR); - showErrorDialog(dialogManager, e as string); + showErrorDialog(e as string); console.error(e); } }; - return { state, payload, download }; + return { state, download, uninstall, payload }; }; \ No newline at end of file diff --git a/src/hooks/useSetlistRelease.ts b/src/hooks/useSetlistRelease.ts index 12d6fef..7443863 100644 --- a/src/hooks/useSetlistRelease.ts +++ b/src/hooks/useSetlistRelease.ts @@ -37,5 +37,5 @@ export const useSetlistRelease = (id: SetlistID) => { queryFn: async (): Promise => await fetch( `https://raw.githubusercontent.com/YARC-Official/Official-Setlist-Public/master/setlists/${id}.json`) .then(res => res.json()) - }).data as SetlistData; + }); }; \ No newline at end of file diff --git a/src/hooks/useYARGRelease.ts b/src/hooks/useYARGRelease.ts index 3dca8f6..42dc9a5 100644 --- a/src/hooks/useYARGRelease.ts +++ b/src/hooks/useYARGRelease.ts @@ -2,8 +2,7 @@ import { useQuery } from "@tanstack/react-query"; import { Endpoints } from "@octokit/types"; import { OsType } from "@tauri-apps/api/os"; - -export type YARGChannels = "stable" | "nightly" | "newEngine"; +export type YARGChannels = "stable" | "nightly"; type ReleaseData = Endpoints["GET /repos/{owner}/{repo}/releases/latest"]["response"]["data"]; export type ExtendedReleaseData = ReleaseData & { @@ -13,8 +12,7 @@ export type ExtendedReleaseData = ReleaseData & { export const useYARGRelease = (channel: YARGChannels) => { const repositoryName = { "stable": "YARG", - "nightly": "YARG-BleedingEdge", - "newEngine": "YARG-NewEngine" + "nightly": "YARG-BleedingEdge" }; return useQuery({ diff --git a/src/hooks/useYARGVersion.ts b/src/hooks/useYARGVersion.ts index 80b789b..87b143e 100644 --- a/src/hooks/useYARGVersion.ts +++ b/src/hooks/useYARGVersion.ts @@ -1,13 +1,12 @@ import { useEffect } from "react"; -import { ExtendedReleaseData, getYARGReleaseZip, getYARGReleaseSigFromZipURL } from "./useYARGRelease"; +import { ExtendedReleaseData, getYARGReleaseZip, getYARGReleaseSigFromZipURL, YARGChannels } from "./useYARGRelease"; import { invoke } from "@tauri-apps/api/tauri"; import { type } from "@tauri-apps/api/os"; import { useYARGState } from "@app/stores/YARGStateStore"; -import { useDownloadClient } from "@app/utils/Download/provider"; -import { YARGDownload, generateYARGUUID } from "@app/utils/Download/Processors/YARG"; -import { DownloadPayload } from "@app/utils/Download"; +import { YARGDownload, YARGUninstall } from "@app/tasks/Processors/YARG"; import { showErrorDialog, showInstallFolderDialog } from "@app/dialogs/dialogUtil"; -import { useDialogManager } from "@app/dialogs/DialogProvider"; +import { addTask, useTask } from "@app/tasks"; +import { usePayload, TaskPayload } from "@app/tasks/payload"; export enum YARGStates { "AVAILABLE", @@ -22,23 +21,24 @@ export type YARGVersion = { state: YARGStates, play: () => Promise, download: () => Promise, - payload?: DownloadPayload + uninstall: () => Promise, + payload?: TaskPayload } -export const useYARGVersion = (releaseData: ExtendedReleaseData | undefined, profileName: string): YARGVersion => { +export const useYARGVersion = (releaseData: ExtendedReleaseData | undefined, profileName: YARGChannels): YARGVersion => { // Initialize hooks before returning const { state, setState } = useYARGState(releaseData?.tag_name); - const dialogManager = useDialogManager(); - const downloadClient = useDownloadClient(); - const payload = downloadClient.usePayload(releaseData ? generateYARGUUID(releaseData.tag_name) : undefined); + const task = useTask("yarg", profileName); + const payload = usePayload(task?.taskUUID); useEffect(() => { ( async () => { if (state || !releaseData) return; - const exists = await invoke("version_exists_yarg", { - versionId: releaseData.tag_name, + const exists = await invoke("exists", { + appName: "yarg", + version: releaseData.tag_name, profile: profileName }); @@ -48,13 +48,14 @@ export const useYARGVersion = (releaseData: ExtendedReleaseData | undefined, pro }, [releaseData]); // If we don't have a release data yet, return a dummy loading version; - if(!releaseData) { + if (!releaseData) { return { state, play: async () => {}, download: async () => {}, + uninstall: async () => {}, }; - } + } const play = async () => { if (!releaseData) return; @@ -62,21 +63,22 @@ export const useYARGVersion = (releaseData: ExtendedReleaseData | undefined, pro setState(YARGStates.LOADING); try { - await invoke("play_yarg", { - versionId: releaseData.tag_name, + await invoke("launch", { + appName: "yarg", + version: releaseData.tag_name, profile: profileName }); setState(YARGStates.PLAYING); - // As we don't have a way to check if the YARG game process is closed, we set a timer to avoid locking the state to PLAYING + // As we don't have a way to check if the YARG game process is closed, we set a timer to avoid locking the state to PLAYING setTimeout(() => { setState(YARGStates.AVAILABLE); }, 10 * 1000); } catch (e) { setState(YARGStates.ERROR); - showErrorDialog(dialogManager, e as string); + showErrorDialog(e as string); console.error(e); } }; @@ -85,7 +87,7 @@ export const useYARGVersion = (releaseData: ExtendedReleaseData | undefined, pro if (!releaseData || state === YARGStates.DOWNLOADING) return; // Ask for a download location (if required) - if (!await showInstallFolderDialog(dialogManager)) { + if (!await showInstallFolderDialog()) { // Skip if the dialog is closed or it errors return; } @@ -106,14 +108,39 @@ export const useYARGVersion = (releaseData: ExtendedReleaseData | undefined, pro () => { setState(YARGStates.AVAILABLE); } ); - downloadClient.add(downloader); + addTask(downloader); } catch (e) { setState(YARGStates.ERROR); - showErrorDialog(dialogManager, e as string); + showErrorDialog(e as string); console.error(e); } }; - return { state, play, download, payload }; + const uninstall = async () => { + if (!releaseData || state === YARGStates.DOWNLOADING) return; + + // You can't uninstall if the launcher is not initialized + if (!await invoke("is_initialized")) return; + + setState(YARGStates.DOWNLOADING); + + try { + const downloader = new YARGUninstall( + releaseData.channel, + releaseData.tag_name, + profileName, + () => { setState(YARGStates.NEW_UPDATE); } + ); + + addTask(downloader); + } catch (e) { + setState(YARGStates.ERROR); + + showErrorDialog(e as string); + console.error(e); + } + }; + + return { state, play, download, uninstall, payload }; }; \ No newline at end of file diff --git a/src/main.tsx b/src/main.tsx index 48edfaa..3618cda 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -7,8 +7,7 @@ import Router from "@app/routes"; import { invoke } from "@tauri-apps/api/tauri"; import { QueryClientProvider } from "@tanstack/react-query"; import { queryClient } from "./query"; -import { DownloadClientProvider } from "@app/utils/Download/provider"; -import { DialogManagerProvider } from "./dialogs/DialogProvider"; +import { DialogProvider } from "./dialogs/DialogProvider"; import { ErrorBoundary } from "react-error-boundary"; import { ErrorScreen, onError } from "./routes/ErrorScreen"; import { error as LogError } from "tauri-plugin-log-api"; @@ -22,21 +21,19 @@ invoke("init").then(() => { ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( - - - - - - - - + + + + + + ); }).catch(e => { console.error(e); LogError(JSON.stringify(serializeError(e))); - + ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( diff --git a/src/routes/Queue/index.tsx b/src/routes/Queue/index.tsx index 894f1ba..593bbff 100644 --- a/src/routes/Queue/index.tsx +++ b/src/routes/Queue/index.tsx @@ -1,10 +1,12 @@ import styles from "./Queue.module.css"; import QueueSection from "@app/components/Queue/QueueSection"; -import { useDownloadClient } from "@app/utils/Download/provider"; import PayloadProgress from "@app/components/PayloadProgress"; import * as Progress from "@radix-ui/react-progress"; import { useEffect, useState } from "react"; import { InstallingIcon, QueueListIcon } from "@app/assets/Icons"; +import QueueStore from "@app/tasks/queue"; +import { usePayload } from "@app/tasks/payload"; +import { useCurrentTask } from "@app/tasks"; function Queue() { // These are for the "You've been staring at this blank page for..." @@ -12,10 +14,9 @@ function Queue() { const [startTime, setStartTime] = useState(Date.now()); const [time, setTime] = useState(Date.now()); - const downloadClient = useDownloadClient(); - const queue = downloadClient.useQueue(); - const current = downloadClient.useCurrent(); - const payload = downloadClient.usePayload(current?.uuid); + const queue = QueueStore.useQueue(); + const currentTask = useCurrentTask(); + const payload = usePayload(currentTask?.taskUUID); // Update the timer so the text also updates useEffect(() => { @@ -34,14 +35,14 @@ function Queue() { } function getBanner() { - if (current) { + if (currentTask) { if (lastWasEmpty) { setLastWasEmpty(false); } return
DOWNLOADING - {current?.getQueueEntry(true)} + {currentTask?.getQueueEntry(true)}
@@ -80,8 +81,8 @@ function Queue() {
} title="QUEUE"> { - queue.size > 0 ? - Array.from(queue).map(downloader => downloader.getQueueEntry(false)) : + queue.size > 1 ? + Array.from(queue).splice(1).map(downloader => downloader.getQueueEntry(false)) :
There are no downloads in the queue.
}
diff --git a/src/routes/Setlist/Official.tsx b/src/routes/Setlist/Official.tsx new file mode 100644 index 0000000..c31fc1b --- /dev/null +++ b/src/routes/Setlist/Official.tsx @@ -0,0 +1,23 @@ +import SetlistPage from "@app/components/Setlist/SetlistPage"; +import { useSetlistData } from "@app/hooks/useSetlistData"; +import { useSetlistRelease } from "@app/hooks/useSetlistRelease"; + +function OfficialSetlistPage() { + const { data: setlistData, error, isSuccess, isLoading } = useSetlistRelease("official"); + const setlistVersion = useSetlistData(setlistData, "official"); + + if (isLoading) return "Loading..."; + + if (error) return `An error has occurred: ${error}`; + + if (isSuccess) { + return (<> + + ); + } +} + +export default OfficialSetlistPage; \ No newline at end of file diff --git a/src/routes/YARG/Nightly.tsx b/src/routes/YARG/Nightly.tsx index 12987a9..877e38e 100644 --- a/src/routes/YARG/Nightly.tsx +++ b/src/routes/YARG/Nightly.tsx @@ -12,18 +12,18 @@ function NightlyYARGPage() { if (error) return `An error has occurred: ${error}`; - if(isSuccess) { + if (isSuccess) { return (<> - YARG Nightly (a.k.a. YARG bleeding-edge) is an alternative version of YARG that is updated twice a day (if changes have been made). These builds are in an extremely early beta, so bugs are expected. If you do notice a bug, please be sure to report it on GitHub, or on our Discord. - } - websiteUrl="https://github.com/YARC-Official/YARG-BleedingEdge" + } + websiteUrl="https://github.com/YARC-Official/YARG-BleedingEdge" icon={NightlyYARGIcon} banner={NightlyYARGBanner} /> diff --git a/src/routes/YARG/Stable.tsx b/src/routes/YARG/Stable.tsx index 3635837..fd54d0b 100644 --- a/src/routes/YARG/Stable.tsx +++ b/src/routes/YARG/Stable.tsx @@ -12,19 +12,19 @@ function StableYARGPage() { if (error) return `An error has occurred: ${error}`; - if(isSuccess) { + if (isSuccess) { return (<> - YARG (a.k.a. Yet Another Rhythm Game) is a free, open-source, plastic guitar game that is still in development. It supports guitar (five fret), drums (plastic or e-kit), vocals, pro-guitar, and more! - } - websiteUrl="https://github.com/YARC-Official/YARG" - icon={StableYARGIcon} + } + websiteUrl="https://github.com/YARC-Official/YARG" + icon={StableYARGIcon} banner={StableYARGBanner} /> ); diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 060299b..0e9551e 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -5,8 +5,8 @@ import Home from "@app/routes/Home"; import Settings from "@app/routes/Settings"; import StableYARGPage from "./YARG/Stable"; import NightlyYARGPage from "./YARG/Nightly"; +import OfficialSetlistPage from "./Setlist/Official"; import Queue from "@app/routes/Queue"; -import SetlistPage from "./Setlist"; import NewsPage from "./NewsPage"; const Router = createBrowserRouter([ @@ -41,7 +41,7 @@ const Router = createBrowserRouter([ { path: "/setlist/official", - element: + element: }, { diff --git a/src/stores/SetlistStateStore.ts b/src/stores/SetlistStateStore.ts index 06a2033..3017e73 100644 --- a/src/stores/SetlistStateStore.ts +++ b/src/stores/SetlistStateStore.ts @@ -20,9 +20,22 @@ const useSetlistStateStore = create()((set) => ({ }, })); -export const useSetlistState = (version: string) => { +interface useSetlistStateInterface { + state: SetlistStates; + setState: (newState: SetlistStates) => void; +} + +export const useSetlistState = (version?: string): useSetlistStateInterface => { const store = useSetlistStateStore(); + // If we don't have a version yet, return a dummy loading version; + if (!version) { + return { + state: SetlistStates.LOADING, + setState: () => {} + }; + } + const state = store.states[version]; const setState = (newState: SetlistStates) => store.update(version, newState); diff --git a/src/stores/YARGStateStore.ts b/src/stores/YARGStateStore.ts index a31f400..df9a9bd 100644 --- a/src/stores/YARGStateStore.ts +++ b/src/stores/YARGStateStore.ts @@ -29,7 +29,7 @@ export const useYARGState = (version?: string): useYARGStateInterface => { const store = useYARGStateStore(); // If we don't have a version yet, return a dummy loading version; - if(!version) { + if (!version) { return { state: YARGStates.LOADING, setState: () => {} diff --git a/src/tasks/Processors/Setlist.tsx b/src/tasks/Processors/Setlist.tsx new file mode 100644 index 0000000..b3cf974 --- /dev/null +++ b/src/tasks/Processors/Setlist.tsx @@ -0,0 +1,55 @@ +import { invoke } from "@tauri-apps/api/tauri"; +import { BaseTask, IBaseTask } from "./base"; +import SetlistQueue from "@app/components/Queue/QueueEntry/Setlist"; + +export abstract class SetlistTask extends BaseTask { + profile: string; + version: string; + onFinish: () => void; + + constructor(profile: string, version: string, onFinish: () => void) { + super("setlist", profile); + + this.profile = profile; + this.version = version; + this.onFinish = onFinish; + } + + getQueueEntry(bannerMode: boolean): React.ReactNode { + return ; + } +} + +export class SetlistDownload extends SetlistTask implements IBaseTask { + zipUrls: string[]; + + constructor(zipUrls: string[], profile: string, version: string, onFinish: () => void) { + super(profile, version, onFinish); + + this.zipUrls = zipUrls; + } + + async start(): Promise { + return await invoke("download_and_install", { + appName: "official_setlist", + version: this.version, + profile: this.profile, + zipUrls: this.zipUrls, + sigUrls: [], + }); + } +} + +export class SetlistUninstall extends SetlistTask implements IBaseTask { + constructor(profile: string, version: string, onFinish: () => void) { + super(profile, version, onFinish); + } + + async start(): Promise { + return await invoke("uninstall", { + appName: "official_setlist", + version: this.version, + profile: this.profile + }); + } +} \ No newline at end of file diff --git a/src/tasks/Processors/YARG.tsx b/src/tasks/Processors/YARG.tsx new file mode 100644 index 0000000..455db5a --- /dev/null +++ b/src/tasks/Processors/YARG.tsx @@ -0,0 +1,67 @@ +import { invoke } from "@tauri-apps/api/tauri"; +import { BaseTask, IBaseTask } from "./base"; +import YARGQueue from "@app/components/Queue/QueueEntry/YARG"; +import { YARGChannels } from "@app/hooks/useYARGRelease"; + +export abstract class YARGTask extends BaseTask { + channel: YARGChannels; + version: string; + profile: string; + onFinish: () => void; + + constructor(channel: YARGChannels, version: string, profile: string, onFinish: () => void) { + super("yarg", profile); + + this.channel = channel; + this.version = version; + this.profile = profile; + this.onFinish = onFinish; + } + + getQueueEntry(bannerMode: boolean): React.ReactNode { + return ; + } +} + +export class YARGDownload extends YARGTask implements IBaseTask { + zipUrl: string; + sigUrl?: string; + + constructor(zipUrl: string, sigUrl: string | undefined, channel: YARGChannels, version: string, + profile: string, onFinish: () => void) { + + super(channel, version, profile, onFinish); + + this.zipUrl = zipUrl; + this.sigUrl = sigUrl; + } + + async start(): Promise { + let sigUrls: string[] = []; + if (this.sigUrl != null) { + sigUrls = [ this.sigUrl ]; + } + + return await invoke("download_and_install", { + appName: "yarg", + version: this.version, + profile: this.profile, + zipUrls: [ this.zipUrl ], + sigUrls: sigUrls, + }); + } +} + +export class YARGUninstall extends YARGTask implements IBaseTask { + constructor(channel: YARGChannels, version: string, profile: string, onFinish: () => void) { + super(channel, version, profile, onFinish); + } + + async start(): Promise { + return await invoke("uninstall", { + appName: "yarg", + version: this.version, + profile: this.profile + }); + } +} \ No newline at end of file diff --git a/src/tasks/Processors/base.ts b/src/tasks/Processors/base.ts new file mode 100644 index 0000000..a5cdb0c --- /dev/null +++ b/src/tasks/Processors/base.ts @@ -0,0 +1,27 @@ +import { v4 as generateUUID } from "uuid"; + +export type TaskTag = "yarg" | "setlist"; + +export interface IBaseTask { + startedAt?: Date, + taskUUID: string, + taskTag: TaskTag, + profile: string, + + onFinish?: () => void; + + start(): Promise; + getQueueEntry(bannerMode: boolean): React.ReactNode; +} + +export class BaseTask { + taskUUID: string; + taskTag: TaskTag; + profile: string; + + constructor(taskTag: TaskTag, profile: string) { + this.taskUUID = generateUUID(); + this.taskTag = taskTag; + this.profile = profile; + } +} \ No newline at end of file diff --git a/src/tasks/index.ts b/src/tasks/index.ts new file mode 100644 index 0000000..540030a --- /dev/null +++ b/src/tasks/index.ts @@ -0,0 +1,44 @@ +import { useStore } from "zustand"; +import { IBaseTask, TaskTag } from "./Processors/base"; +import QueueStore from "./queue"; +import { showErrorDialog } from "@app/dialogs/dialogUtil"; + +const addTask = (task: IBaseTask) => { + QueueStore.add(task); + + if(QueueStore.firstTask() === task) { + processNextTask(); + } +}; + +const processNextTask = async () => { + const next = QueueStore.next(); + if(!next) return; + + try { + next.startedAt = new Date(); + await next.start(); + next.onFinish?.(); + } catch (e) { + showErrorDialog(e as string); + console.error(e); + } + + processNextTask(); +}; + +const useTask = (tag: TaskTag, profile: string) => { + return useStore( + QueueStore.store, + queue => QueueStore.findTask(queue, tag, profile) + ); +}; + +const useCurrentTask = () => { + return useStore( + QueueStore.store, + () => QueueStore.firstTask() + ); +}; + +export { addTask, processNextTask, useTask, useCurrentTask }; \ No newline at end of file diff --git a/src/tasks/payload.ts b/src/tasks/payload.ts new file mode 100644 index 0000000..d36da68 --- /dev/null +++ b/src/tasks/payload.ts @@ -0,0 +1,72 @@ +import { createStore } from "zustand/vanilla"; +import { IBaseTask } from "./Processors/base"; +import QueueStore from "./queue"; +import { listen } from "@tauri-apps/api/event"; +import { throttle } from "lodash"; +import { useStore } from "zustand"; + +export type TaskState = "downloading" | "installing" | "verifying" | "waiting"; + +export interface TaskPayload { + state: TaskState; + current: number; + total: number; +} + +interface TaskPayloadStore { + [key: string]: TaskPayload, +} + +const store = createStore(() => ({})); + +const createPayload = (task: IBaseTask) => { + const initialPayload: TaskPayload = { + state: "waiting", + current: 0, + total: 0, + }; + + setPayload(task, initialPayload); +}; + +const setPayload = (task: IBaseTask, payload: TaskPayload) => { + const uuid = task.taskUUID; + return store.setState({ [uuid]: { ...payload } }); +}; + +const removePayload = (task: IBaseTask) => { + const uuid = task.taskUUID; + return store.setState({ [uuid]: undefined }); +}; + +const usePayload = (uuid?: string) => { + return useStore( + store, + store => uuid ? store[uuid] : undefined + ); +}; + +const calculatePayloadPercentage = (payload?: TaskPayload): number | undefined => { + if (!payload) return undefined; + + return payload.total > 0 ? (payload.current / payload.total) * 100 : undefined; +}; + +export { store, createPayload, updatePayload, removePayload, usePayload, calculatePayloadPercentage }; + +const throttleTime = 25; + +listen("progress_info", + throttle( + ({ payload }: { payload: TaskPayload }) => { + updatePayload(payload); + }, throttleTime + ) +); + +const updatePayload = (payload: TaskPayload) => { + const current = QueueStore.firstTask(); + if(!current) return console.warn("Received a payload but no current task is loaded."); + + return setPayload(current, payload); +}; \ No newline at end of file diff --git a/src/tasks/queue.ts b/src/tasks/queue.ts new file mode 100644 index 0000000..aac004a --- /dev/null +++ b/src/tasks/queue.ts @@ -0,0 +1,49 @@ +import { createStore } from "zustand/vanilla"; +import { IBaseTask, TaskTag } from "./Processors/base"; +import { useStore } from "zustand"; + +type TaskQueueStore = Set; + +const store = createStore(() => new Set()); + +const firstTask = (): IBaseTask | undefined => { + const queue = store.getState(); + return queue.values().next().value; +}; + +const add = (task: IBaseTask) => { + store.setState(previousQueue => new Set(previousQueue).add(task), true); +}; + +const remove = (task: IBaseTask) => { + store.setState(previousQueue => { + const queue = new Set(previousQueue); + queue.delete(task); + + return queue; + }, true); +}; + +const next = () => { + const current = firstTask(); + if(current?.startedAt) { + remove(current); + } + + return firstTask(); +}; + +const findTask = (queue: TaskQueueStore, tag: TaskTag, profile: string) => { + for(const task of queue) { + if(task.taskTag === tag && task.profile === profile) return task; + } + + return undefined; +}; + +const useQueue = () => { + return useStore(store); +}; + +export const QueueStore = { store, firstTask, add, remove, next, findTask, useQueue }; +export default QueueStore; \ No newline at end of file diff --git a/src/utils/Download/Processors/Setlist.tsx b/src/utils/Download/Processors/Setlist.tsx deleted file mode 100644 index 3b7fe9a..0000000 --- a/src/utils/Download/Processors/Setlist.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { invoke } from "@tauri-apps/api/tauri"; -import { BaseDownload, IBaseDownload } from "./base"; -import SetlistQueue from "@app/components/Queue/QueueEntry/Setlist"; - -export class SetlistDownload extends BaseDownload implements IBaseDownload { - zipUrls: string[]; - id: string; - version: string; - onFinish: () => void; - - constructor(zipUrls: string[], id: string, version: string, onFinish: () => void) { - super(generateSetlistUUID(id, version)); - this.zipUrls = zipUrls; - this.id = id; - this.version = version; - this.onFinish = onFinish; - } - - async start(): Promise { - return await invoke("download_setlist", { - zipUrls: this.zipUrls, - id: this.id, - version: this.version, - }); - } - - getQueueEntry(bannerMode: boolean): React.ReactNode { - return ; - } -} - -export function generateSetlistUUID(id: string, version: string) { - return `setlist_${id}_${version}`; -} \ No newline at end of file diff --git a/src/utils/Download/Processors/YARG.tsx b/src/utils/Download/Processors/YARG.tsx deleted file mode 100644 index d6cd5ba..0000000 --- a/src/utils/Download/Processors/YARG.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { invoke } from "@tauri-apps/api/tauri"; -import { BaseDownload, IBaseDownload } from "./base"; -import YARGQueue from "@app/components/Queue/QueueEntry/YARG"; -import { YARGChannels } from "@app/hooks/useYARGRelease"; - -export class YARGDownload extends BaseDownload implements IBaseDownload { - zipUrl: string; - sigUrl?: string; - channel: YARGChannels; - version: string; - profile: string; - onFinish: () => void; - - constructor(zipUrl: string, sigUrl: string | undefined, channel: YARGChannels, version: string, profile: string, onFinish: () => void) { - super(generateYARGUUID(version)); - this.zipUrl = zipUrl; - this.sigUrl = sigUrl; - this.channel = channel; - this.version = version; - this.profile = profile; - this.onFinish = onFinish; - } - - async start(): Promise { - return await invoke("download_yarg", { - zipUrl: this.zipUrl, - sigUrl: this.sigUrl, - versionId: this.version, - profile: this.profile - }); - } - - getQueueEntry(bannerMode: boolean): React.ReactNode { - return ; - } -} - -export function generateYARGUUID(version: string) { - return `YARG_${version}`; -} \ No newline at end of file diff --git a/src/utils/Download/Processors/base.ts b/src/utils/Download/Processors/base.ts deleted file mode 100644 index 21f7402..0000000 --- a/src/utils/Download/Processors/base.ts +++ /dev/null @@ -1,15 +0,0 @@ -export interface IBaseDownload { - uuid: string, - onFinish?: () => void; - - start(): Promise; - getQueueEntry(bannerMode: boolean): React.ReactNode; -} - -export class BaseDownload { - uuid: string; - - constructor(uuid: string) { - this.uuid = uuid; - } -} \ No newline at end of file diff --git a/src/utils/Download/index.ts b/src/utils/Download/index.ts deleted file mode 100644 index 17ce0f6..0000000 --- a/src/utils/Download/index.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { useStore } from "zustand"; -import { IBaseDownload } from "./Processors/base"; -import { listen } from "@tauri-apps/api/event"; -import { DownloadPayloadHandler } from "./payload"; -import { DownloadQueueHandler } from "./queue"; -import { throttle } from "lodash"; -import { showErrorDialog } from "@app/dialogs/dialogUtil"; -import { DialogManager } from "@app/dialogs"; - -export type DownloadState = "downloading" | "installing" | "verifying" | "waiting"; - -export interface DownloadPayload { - state: DownloadState; - current: number; - total: number; -} - -export class DownloadClient { - private payloadHandler: DownloadPayloadHandler; - private queueHandler: DownloadQueueHandler; - - private dialogManager: DialogManager; - - constructor(dialogManager: DialogManager) { - this.dialogManager = dialogManager; - - this.payloadHandler = new DownloadPayloadHandler(); - this.queueHandler = new DownloadQueueHandler(); - - const throttleTime = 25; - - listen("progress_info", - throttle( - ({ payload }: { payload: DownloadPayload }) => { - this.update(payload); - }, throttleTime - ) - ); - } - - add(downloader: IBaseDownload) { - this.queueHandler.add(downloader); - this.payloadHandler.add(downloader); - - if (!this.queueHandler.currentStore.getState()) { - this.processNext(); - } - } - - private async processNext() { - const next = this.queueHandler.next(); - if (!next) return; - - try { - await next.start(); - next.onFinish?.(); - } catch (e) { - showErrorDialog(this.dialogManager, e as string); - console.error(e); - } finally { - this.payloadHandler.remove(next); - } - - this.processNext(); - } - - update(payload: DownloadPayload) { - const current = this.queueHandler.currentStore.getState(); - - if (!current) return; - this.payloadHandler.update(current, payload); - } - - usePayload(uuid?: string) { - return useStore( - this.payloadHandler.payloadStore, - (state) => uuid ? state[uuid] : undefined - ); - } - - useQueue() { - return useStore( - this.queueHandler.queueStore, - (store) => store.queue, - (oldStore, newStore) => oldStore.size === newStore.size - ); - } - - useCurrent() { - return useStore(this.queueHandler.currentStore); - } -} \ No newline at end of file diff --git a/src/utils/Download/payload.ts b/src/utils/Download/payload.ts deleted file mode 100644 index 600562c..0000000 --- a/src/utils/Download/payload.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { createStore } from "zustand/vanilla"; -import { DownloadPayload } from "."; -import { IBaseDownload } from "./Processors/base"; - -interface DownloadPayloadStore { - [key: string]: DownloadPayload, -} - -export class DownloadPayloadHandler { - payloadStore = createStore(() => ({})); - - add(downloader: IBaseDownload) { - const initialPayload: DownloadPayload = { - state: "waiting", - current: 0, - total: 0, - }; - - this.update(downloader, initialPayload); - } - - update(downloader: IBaseDownload, payload: DownloadPayload) { - const uuid = downloader.uuid; - return this.payloadStore.setState({ [uuid]: { ...payload } }); - } - - remove(downloader: IBaseDownload) { - const uuid = downloader.uuid; - return this.payloadStore.setState({ [uuid]: undefined }); - } -} - -export const calculatePayloadPercentage = (payload?: DownloadPayload): number | undefined => { - if (!payload) return undefined; - - return payload.total > 0 ? (payload.current / payload.total) * 100 : undefined; -}; \ No newline at end of file diff --git a/src/utils/Download/provider.tsx b/src/utils/Download/provider.tsx deleted file mode 100644 index 9bfe6e1..0000000 --- a/src/utils/Download/provider.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { createContext } from "react"; -import { DownloadClient } from "."; -import { useContext } from "react"; -import { useDialogManager } from "@app/dialogs/DialogProvider"; - -const DownloadClientContext = createContext({} as DownloadClient); - -type ProviderProps = { - children?: React.ReactNode; -} - -export const DownloadClientProvider: React.FC = ({ children }: ProviderProps) => { - const dialogManager = useDialogManager(); - - return - {children} - ; -}; - -export const useDownloadClient = () => useContext(DownloadClientContext); \ No newline at end of file diff --git a/src/utils/Download/queue.ts b/src/utils/Download/queue.ts deleted file mode 100644 index 8b2e57a..0000000 --- a/src/utils/Download/queue.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { createStore } from "zustand/vanilla"; -import { IBaseDownload } from "./Processors/base"; - -type DownloadQueueStore = { - queue: Set -}; - -export class DownloadQueueHandler { - queueStore = createStore(() => ({ queue: new Set() })); - currentStore = createStore(() => undefined); - - add(downloader: IBaseDownload) { - this.queueStore.setState((prev) => ({ queue: new Set(prev.queue).add(downloader) }), true); - } - - delete(downloader?: IBaseDownload) { - if (!downloader) return; - - this.queueStore.setState((prev) => { - const newQueue = new Set(prev.queue); - newQueue.delete(downloader); - - return { queue: newQueue }; - }, true); - } - - next() { - const next: IBaseDownload | undefined = this.queueStore.getState().queue.values().next().value || undefined; - - this.currentStore.setState(() => next, true); - this.delete(next); - - return next; - } -} \ No newline at end of file