diff --git a/Cargo.lock b/Cargo.lock index 38e4eff..ea0971b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -43,24 +43,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" [[package]] name = "anstyle-parse" @@ -82,9 +81,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -92,9 +91,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arc-swap" @@ -104,9 +103,9 @@ checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" [[package]] name = "ashpd" -version = "0.4.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31688b40eb5d739049f721d8405c33d3796b3f51f2bea84421a542dafe397e41" +checksum = "f3affe251686bd936a0afb74b9693e8bf2f193d51da1b9a45d3f1303a9bd2cc7" dependencies = [ "async-std", "enumflags2", @@ -126,7 +125,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" dependencies = [ - "event-listener", + "event-listener 2.5.3", "futures-core", ] @@ -137,7 +136,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] @@ -156,14 +155,14 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "78f2db9467baa66a700abce2a18c5ad793f6f83310aca1284796fc3921d113fd" dependencies = [ "async-lock", "async-task", "concurrent-queue", - "fastrand 1.9.0", + "fastrand 2.0.1", "futures-lite", "slab", ] @@ -211,46 +210,64 @@ dependencies = [ "polling", "rustix 0.37.23", "slab", - "socket2", + "socket2 0.4.9", "waker-fn", ] [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", ] [[package]] name = "async-process" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +checksum = "bf012553ce51eb7aa6dc2143804cc8252bd1cb681a1c5cb7fa94ca88682dee1d" dependencies = [ "async-io", "async-lock", - "autocfg", + "async-signal", "blocking", "cfg-if", - "event-listener", + "event-listener 3.0.0", "futures-lite", - "rustix 0.37.23", - "signal-hook", + "rustix 0.38.14", "windows-sys 0.48.0", ] [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", +] + +[[package]] +name = "async-signal" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4af361a844928cb7d36590d406709473a1b574f443094422ef166daa3b493208" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "concurrent-queue", + "futures-core", + "futures-io", + "libc", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] [[package]] @@ -281,19 +298,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.4.0" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "b9441c6b2fe128a7c2bf680a44c34d0df31ce09e5b7e401fcca3faa483dbc921" [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -312,9 +329,9 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -324,9 +341,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -345,9 +362,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bitflags" @@ -357,9 +374,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block" @@ -378,24 +395,25 @@ dependencies = [ [[package]] name = "blocking" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +checksum = "94c4ef1f913d78636d78d538eec1f18de81e481f44b1be0a81060090530846e1" dependencies = [ "async-channel", "async-lock", "async-task", - "atomic-waker", - "fastrand 1.9.0", + "fastrand 2.0.1", + "futures-io", "futures-lite", - "log", + "piper", + "tracing", ] [[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 = "byteorder" @@ -405,15 +423,15 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[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" [[package]] name = "cc" -version = "1.0.81" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "libc", ] @@ -426,36 +444,34 @@ 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", "js-sys", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] name = "clap" -version = "4.3.19" +version = "4.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" +checksum = "824956d0dca8334758a5b7f7e50518d66ea319330cbceedcf76905c2f6ab30e3" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.19" +version = "4.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" +checksum = "122ec64120a49b4563ccaedcbea7818d069ed8e9aa6d829b82d8a4128936b2ab" dependencies = [ "anstream", "anstyle", @@ -465,30 +481,30 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.3.2" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" +checksum = "8baeccdb91cd69189985f87f3c7e453a3a451ab5746cf3be6acc92120bd16d24" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "colorchoice" @@ -509,9 +525,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -584,9 +600,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" [[package]] name = "derivative" @@ -601,13 +617,14 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.10.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" dependencies = [ "console", "shell-words", "tempfile", + "thiserror", "zeroize", ] @@ -647,18 +664,18 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[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 = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", "serde", @@ -666,13 +683,13 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -683,9 +700,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -708,6 +725,17 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29e56284f00d94c1bc7fd3c77027b4623c88c1f53d8d2394c6199f2921dea325" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + [[package]] name = "fastrand" version = "1.9.0" @@ -719,9 +747,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "ferinth" @@ -766,9 +794,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -882,7 +910,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -933,14 +961,14 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "gloo-timers" @@ -956,9 +984,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -993,9 +1021,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1048,9 +1076,9 @@ 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" @@ -1069,7 +1097,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1090,6 +1118,7 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls", + "webpki-roots 0.23.1", ] [[package]] @@ -1103,7 +1132,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows", ] [[package]] @@ -1147,9 +1176,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -1191,7 +1220,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.7", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -1225,7 +1254,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "pem", "ring", "serde", @@ -1244,9 +1273,9 @@ dependencies = [ [[package]] name = "lazy-regex" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57451d19ad5e289ff6c3d69c2a2424652995c42b79dafa11e9c4d5508c913c01" +checksum = "e723bd417b2df60a0f6a2b6825f297ea04b245d4ba52b5a22cb679bdf58b05fa" dependencies = [ "lazy-regex-proc_macros", "once_cell", @@ -1262,7 +1291,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -1273,15 +1302,13 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libium" version = "1.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2837694b30daf1d86545fb7747753752c0ce202dac61127174749a42da586f41" dependencies = [ "async-recursion", "async_zip", @@ -1309,15 +1336,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ "value-bag", ] @@ -1333,9 +1360,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memoffset" @@ -1368,7 +1395,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -1380,22 +1407,21 @@ checksum = "fb585ade2549a017db2e35978b77c319214fa4b37cede841e27954dd6e8f3ca8" [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset", - "static_assertions", ] [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -1468,22 +1494,22 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] [[package]] name = "octocrab" -version = "0.29.1" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f5937fa816ca24c81cd817637a29be1eb9be0b4ddfccf3783df3eb095cc4f6" +checksum = "bbed1b1298bc70dd4ae89fd44dd7c13f0a1c80a506d731eb1b939f14f5e367de" dependencies = [ "arc-swap", "async-trait", - "base64 0.21.2", + "base64 0.21.4", "bytes", "cfg-if", "chrono", @@ -1532,9 +1558,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" [[package]] name = "pem" @@ -1568,14 +1594,14 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] name = "pin-project-lite" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c516611246607d0c04186886dbb3a754368ef82c79e9827a802c6d836dd111c" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1583,6 +1609,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "polling" version = "2.8.0" @@ -1607,9 +1644,9 @@ checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" [[package]] name = "portable-atomic" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" +checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" [[package]] name = "ppv-lite86" @@ -1629,18 +1666,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1692,9 +1729,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", @@ -1704,9 +1741,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -1715,17 +1752,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "bytes", "encoding_rs", "futures-core", @@ -1754,15 +1791,15 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.2", "winreg", ] [[package]] name = "rfd" -version = "0.11.4" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe664af397d2b6a13a8ba1d172a2b5c87c6c5149039edbf8fa122b98c9ed96f" +checksum = "241a0deb168c88050d872294f7b3106c1dfa8740942bcc97bc91b98e97b5c501" dependencies = [ "ashpd", "async-io", @@ -1780,7 +1817,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.44.0", + "windows-sys 0.48.0", ] [[package]] @@ -1820,26 +1857,26 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.7" +version = "0.38.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "172891ebdceb05aa0005f533a6cbfca599ddd7d966f6f5d4d9b2e70478e70399" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.7", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.21.6" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.6", "sct", ] @@ -1861,14 +1898,24 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", ] [[package]] name = "rustls-webpki" -version = "0.101.2" +version = "0.100.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring", "untrusted", @@ -1933,29 +1980,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.182" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb30a74471f5b7a1fa299f40b4bf1be93af61116df95465b2b5fc419331e430" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.182" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4c2c6ea4bc09b5c419012eafcdb0fcef1d9119d626c8f3a0708a5b92d38a70" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -1980,7 +2027,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -1997,9 +2044,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", @@ -2012,16 +2059,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -2040,7 +2077,7 @@ dependencies = [ "num-bigint", "num-traits", "thiserror", - "time 0.3.25", + "time", ] [[package]] @@ -2051,9 +2088,9 @@ checksum = "9fed904c7fb2856d868b92464fc8fa597fce366edea1a9cbfaa8cb5fe080bd6d" [[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", ] @@ -2091,6 +2128,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -2122,9 +2169,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -2133,53 +2180,42 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall", - "rustix 0.38.7", + "rustix 0.38.14", "windows-sys 0.48.0", ] [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "syn 2.0.37", ] [[package]] name = "time" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ "deranged", "itoa", @@ -2190,15 +2226,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.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -2220,18 +2256,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", - "socket2", + "socket2 0.5.4", "tokio-macros", "windows-sys 0.48.0", ] @@ -2244,7 +2279,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -2259,9 +2294,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -2279,9 +2314,9 @@ checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.0.0", "toml_datetime", @@ -2307,11 +2342,11 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "bytes", "futures-core", "futures-util", @@ -2356,7 +2391,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -2376,9 +2411,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 = "uds_windows" @@ -2398,9 +2433,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -2413,9 +2448,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "untrusted" @@ -2425,9 +2460,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[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", @@ -2461,9 +2496,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "want" @@ -2474,12 +2509,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2507,7 +2536,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -2541,7 +2570,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2563,23 +2592,19 @@ dependencies = [ ] [[package]] -name = "webpki" -version = "0.22.0" +name = "webpki-roots" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "ring", - "untrusted", + "rustls-webpki 0.100.3", ] [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "winapi" @@ -2603,22 +2628,13 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -2636,7 +2652,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -2656,17 +2672,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +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]] @@ -2677,9 +2693,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" @@ -2689,9 +2705,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" @@ -2701,9 +2717,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" @@ -2713,9 +2729,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" @@ -2725,9 +2741,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" @@ -2737,9 +2753,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" @@ -2749,26 +2765,27 @@ 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.5.4" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acaaa1190073b2b101e15083c38ee8ec891b5e05cbee516521e94ec008f61e64" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" 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]] @@ -2800,7 +2817,7 @@ dependencies = [ "byteorder", "derivative", "enumflags2", - "event-listener", + "event-listener 2.5.3", "futures-core", "futures-sink", "futures-util", diff --git a/Cargo.toml b/Cargo.toml index f8faa23..faaa7c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,25 +21,29 @@ default = ["gui"] gui = ["libium/gui"] [dependencies] -octocrab = { version = "0.29", default-features = false, features = ["rustls"] } +octocrab = { version = "0.30", default-features = false, features = [ + "rustls", + "rustls-webpki-tokio", +] } reqwest = { version = "0.11", default-features = false, features = [ "rustls-tls", ] } -tokio = { version = "1.29", default-features = false, features = [ +tokio = { version = "1.32", default-features = false, features = [ "rt-multi-thread", "macros", ] } -clap = { version = "4.3", features = ["derive"] } -clap_complete = "4.3" +clap = { version = "4.4", features = ["derive"] } +clap_complete = "4.4" serde_json = "1.0" -dialoguer = "0.10" +dialoguer = "0.11" indicatif = "0.17" itertools = "0.11" once_cell = "1.18" fs_extra = "1.3" colored = "2.0" ferinth = "2.9" -libium = "1.23" +# libium = "1.23" +libium = { path = "../libium" } anyhow = "1.0" furse = "1.5" size = "0.4" diff --git a/README.md b/README.md index 1c378f2..80efaac 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ The `nogui` versions do not need this as they won't have a GUI folder picker, ma > From-source builds will install the Rust toolchain and GCC | Installation method | GUI file dialogue | No GUI | -| ----------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------- | +|-------------------------------------------------|-------------------------------------------------------------------------|-------------------------------------------------------------| | Install pre-built binaries from GitHub Releases | **[ferium-gui-bin](https://aur.archlinux.org/packages/ferium-gui-bin)** | [ferium-bin](https://aur.archlinux.org/packages/ferium-bin) | | Build from source at the latest tag | [ferium-gui](https://aur.archlinux.org/packages/ferium-gui) | [ferium](https://aur.archlinux.org/packages/ferium) | | Build from source using the latest commit | [ferium-gui-git](https://aur.archlinux.org/packages/ferium-gui-git) | [ferium-git](https://aur.archlinux.org/packages/ferium-git) | diff --git a/justfile b/justfile index 3de2045..df8c3ab 100644 --- a/justfile +++ b/justfile @@ -12,7 +12,6 @@ install-dev: # Delete all build and test artefacts clean: cargo clean - rm -rf rm -rf tests/mods rm -rf tests/md_modpack rm -rf tests/cf_modpack diff --git a/src/cli.rs b/src/cli.rs index 29f28ac..a4acd4e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,6 +1,6 @@ #![deny(missing_docs)] -use clap::{clap_derive::ValueEnum, Parser, Subcommand, ValueHint}; +use clap::{Parser, Subcommand, ValueHint}; use clap_complete::Shell; use libium::config::structs::ModLoader; use std::path::PathBuf; @@ -12,23 +12,23 @@ use std::path::PathBuf; pub struct Ferium { #[clap(subcommand)] pub subcommand: SubCommands, - #[clap(long, short)] /// Sets the number of worker threads the tokio runtime will use. /// You can also use the environment variable `TOKIO_WORKER_THREADS`. + #[clap(long, short)] pub threads: Option, - #[clap(long)] /// Set a GitHub personal access token for increasing the GitHub API rate limit. /// You can also use the environment variable `GITHUB_TOKEN`. - pub github_token: Option, #[clap(long)] + pub github_token: Option, /// Set a custom CurseForge API key. /// You can also use the environment variable `CURSEFORGE_API_KEY`. + #[clap(long)] pub curseforge_api_key: Option, - #[clap(long, short)] - #[clap(value_hint(ValueHint::FilePath))] /// Set the file to read the config from. /// This does not change the `cache` and `tmp` directories. /// You can also use the environment variable `CONFIG_FILE`. + #[clap(long, short)] + #[clap(value_hint(ValueHint::FilePath))] pub config_file: Option, } @@ -43,43 +43,39 @@ pub enum SubCommands { /// The CurseForge project ID is specified at the top of the right sidebar under 'About Project'. /// The GitHub identifier is the repository's full name, e.g. `gorilla-devs/ferium`. identifier: String, - #[clap(long)] /// The game version will not be checked for this mod - dont_check_game_version: bool, #[clap(long)] + dont_check_game_version: bool, /// The mod loader will not be checked for this mod - dont_check_mod_loader: bool, #[clap(long)] - #[clap(value_enum)] - /// Select which dependencies should be added - dependencies: Option, + dont_check_mod_loader: bool, }, /// Print shell auto completions for the specified shell Complete { - #[clap(value_enum)] /// The shell to generate auto completions for + #[clap(value_enum)] shell: Shell, }, /// List all the mods in the profile, and with some their metadata if verbose List { - #[clap(long, short)] /// Show additional information about the mod - verbose: bool, #[clap(long, short)] + verbose: bool, /// Output information in markdown format and alphabetical order /// /// Useful for creating modpack mod lists. /// Complements the verbose flag. + #[clap(long, short)] markdown: bool, }, - #[clap(arg_required_else_help = true)] /// Add, configure, delete, switch, list, or upgrade modpacks + #[clap(arg_required_else_help = true)] Modpack { #[clap(subcommand)] subcommand: ModpackSubCommands, }, - #[clap(arg_required_else_help = true)] /// Create, configure, delete, switch, or list profiles + #[clap(arg_required_else_help = true)] Profile { #[clap(subcommand)] subcommand: ProfileSubCommands, @@ -99,43 +95,43 @@ pub enum ProfileSubCommands { /// Configure the current profile's name, Minecraft version, mod loader, and output directory. /// Optionally, provide the settings to change as arguments. Configure { - #[clap(long, short = 'v')] /// The Minecraft version to check compatibility for + #[clap(long, short = 'v')] game_version: Option, + /// The mod loader to check compatibility for #[clap(long, short)] #[clap(value_enum)] - /// The mod loader to check compatibility for mod_loader: Option, - #[clap(long, short)] /// The name of the profile + #[clap(long, short)] name: Option, + /// The directory to output mods to #[clap(long, short)] #[clap(value_hint(ValueHint::DirPath))] - /// The directory to output mods to output_dir: Option, }, /// Create a new profile. /// Optionally, provide the settings as arguments. /// Use the import flag to import mods from another profile. Create { - #[clap(long, short)] - #[allow(clippy::option_option)] /// Copy over the mods from an existing profile. /// Optionally, provide the name of the profile to import mods from. + #[clap(long, short)] + #[allow(clippy::option_option)] import: Option>, - #[clap(long, short = 'v')] /// The Minecraft version to check compatibility for + #[clap(long, short = 'v')] game_version: Option, + /// The mod loader to check compatibility for #[clap(long, short)] #[clap(value_enum)] - /// The mod loader to check compatibility for mod_loader: Option, - #[clap(long, short)] /// The name of the profile + #[clap(long, short)] name: Option, + /// The directory to output mods to #[clap(long, short)] #[clap(value_hint(ValueHint::DirPath))] - /// The directory to output mods to output_dir: Option, }, /// Delete a profile. @@ -164,25 +160,25 @@ pub enum ModpackSubCommands { /// You can also use the project slug for this. /// The CurseForge project ID is specified at the top of the right sidebar under 'About Project'. identifier: String, + /// The Minecraft instance directory to install the modpack to #[clap(long, short)] #[clap(value_hint(ValueHint::DirPath))] - /// The Minecraft instance directory to install the modpack to output_dir: Option, - #[clap(long, short)] /// Whether to install the modpack's overrides to the output directory. /// This will override existing files when upgrading. + #[clap(long, short)] install_overrides: Option, }, /// Configure the current modpack's output directory and installation of overrides. /// Optionally, provide the settings to change as arguments. Configure { + /// The Minecraft instance directory to install the modpack to #[clap(long, short)] #[clap(value_hint(ValueHint::DirPath))] - /// The Minecraft instance directory to install the modpack to output_dir: Option, - #[clap(long, short)] /// Whether to install the modpack's overrides to the output directory. /// This will override existing files when upgrading. + #[clap(long, short)] install_overrides: Option, }, /// Delete a modpack. @@ -202,13 +198,3 @@ pub enum ModpackSubCommands { /// Download and install the latest version of the modpack Upgrade, } - -#[derive(Clone, PartialEq, Eq, ValueEnum)] -pub enum DependencyLevel { - /// Do not add any dependencies - None, - /// Add only required dependencies - Required, - /// Add all dependencies - All, -} diff --git a/src/main.rs b/src/main.rs index 5cad22d..2b047d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,6 +31,7 @@ use dialoguer::theme::ColorfulTheme; use ferinth::Ferinth; use furse::Furse; use indicatif::ProgressStyle; +use itertools::Itertools; use libium::config::{ self, structs::{Config, ModIdentifier, Modpack, Profile}, @@ -131,46 +132,64 @@ async fn actual_main(cli_app: Ferium) -> Result<()> { identifier, dont_check_game_version, dont_check_mod_loader, - dependencies, } => { let profile = get_active_profile(&mut config)?; check_internet().await?; + eprint!("Adding mod... "); if let Ok(project_id) = identifier.parse::() { - subcommands::add::curseforge( + let name = libium::add::curseforge( &curseforge, project_id, profile, Some(!dont_check_game_version), Some(!dont_check_mod_loader), - dependencies, ) .await?; + println!("{} {}", *TICK, name.bold()); } else if identifier.split('/').count() == 2 { let split = identifier.split('/').collect::>(); - subcommands::add::github( - github.build()?.repos(split[0], split[1]), + let name = libium::add::github( + &github.build()?.repos(split[0], split[1]), profile, Some(!dont_check_game_version), Some(!dont_check_mod_loader), ) .await?; - } else if let Err(err) = subcommands::add::modrinth( - &modrinth, - &identifier, - profile, - Some(!dont_check_game_version), - Some(!dont_check_mod_loader), - dependencies, - ) - .await - { - return Err( - if err.to_string() == ferinth::Error::InvalidIDorSlug.to_string() { - anyhow!("Invalid indentifier") - } else { - err - }, - ); + println!("{} {}", *TICK, name.bold()); + } else { + match libium::add::modrinth( + &modrinth, + &identifier, + profile, + Some(!dont_check_game_version), + Some(!dont_check_mod_loader), + ) + .await + { + Ok((name, donation_urls)) => { + println!("{} {}", *TICK, name.bold()); + + if !donation_urls.is_empty() { + println!( + "Consider supporting the mod creator on {}", + donation_urls + .iter() + .map(|this| format!( + "{} ({})", + this.platform.bold(), + this.url.to_string().blue().underline() + )) + .format(" or ") + ); + } + } + Err(err) => { + if err.to_string() == ferinth::Error::InvalidIDorSlug.to_string() { + bail!("Invalid identifier") + } + bail!(err) + } + } } } SubCommands::List { verbose, markdown } => { @@ -178,7 +197,6 @@ async fn actual_main(cli_app: Ferium) -> Result<()> { check_empty_profile(profile)?; if verbose { check_internet().await?; - let github = github.build()?; let mut tasks = JoinSet::new(); let mut mr_ids = Vec::<&str>::new(); for mod_ in &profile.mods { @@ -192,7 +210,8 @@ async fn actual_main(cli_app: Ferium) -> Result<()> { .await?; } ModIdentifier::GitHubRepository(full_name) => { - subcommands::list::github_md(&github, full_name.clone()).await?; + subcommands::list::github_md(&github.build()?, full_name.clone()) + .await?; } }; } else { @@ -206,7 +225,7 @@ async fn actual_main(cli_app: Ferium) -> Result<()> { ModIdentifier::ModrinthProject(project_id) => mr_ids.push(project_id), ModIdentifier::GitHubRepository(full_name) => { tasks.spawn(subcommands::list::github( - github.clone(), + github.build()?.clone(), full_name.clone(), )); } @@ -289,7 +308,7 @@ async fn actual_main(cli_app: Ferium) -> Result<()> { { return Err( if err.to_string() == ferinth::Error::InvalidIDorSlug.to_string() { - anyhow!("Invalid indentifier") + anyhow!("Invalid identifier") } else { err }, diff --git a/src/subcommands/add.rs b/src/subcommands/add.rs deleted file mode 100644 index 438f2d4..0000000 --- a/src/subcommands/add.rs +++ /dev/null @@ -1,353 +0,0 @@ -// CurseForge IDs shouldn't be seperated -#![allow(clippy::unreadable_literal)] - -use crate::{cli::DependencyLevel, CROSS, THEME, TICK}; -use anyhow::{bail, Result}; -use colored::Colorize; -use dialoguer::Confirm; -use ferinth::structures::version::DependencyType; -use ferinth::Ferinth; -use furse::{structures::file_structs::FileRelationType, Furse}; -use itertools::Itertools; -use libium::{ - add, - config::structs::{Mod, ModIdentifier, ModLoader, Profile}, -}; -use octocrab::repos::RepoHandler; - -#[allow(clippy::expect_used)] -pub async fn github( - repo_handler: RepoHandler<'_>, - profile: &mut Profile, - should_check_game_version: Option, - should_check_mod_loader: Option, -) -> Result<()> { - eprint!("Adding mod... "); - let (repo, _) = add::github( - &repo_handler, - profile, - should_check_game_version, - should_check_mod_loader, - ) - .await?; - println!("{} {}", *TICK, repo.name.bold()); - profile.mods.push(Mod { - name: repo.name.trim().into(), - identifier: ModIdentifier::GitHubRepository(( - repo.owner.expect("Could not get repository owner").login, - repo.name, - )), - check_game_version: if should_check_game_version == Some(true) { - None - } else { - should_check_game_version - }, - check_mod_loader: if should_check_mod_loader == Some(true) { - None - } else { - should_check_mod_loader - }, - }); - Ok(()) -} - -pub async fn modrinth( - modrinth: &Ferinth, - project_id: &str, - profile: &mut Profile, - should_check_game_version: Option, - should_check_mod_loader: Option, - dependencies: Option, -) -> Result<()> { - eprint!("Adding mod... "); - let project = modrinth.get_project(project_id).await?; - let latest_version = add::modrinth( - modrinth, - &project, - profile, - should_check_game_version, - should_check_mod_loader, - ) - .await?; - println!("{} {}", *TICK, project.title.bold()); - profile.mods.push(Mod { - name: project.title.trim().into(), - identifier: ModIdentifier::ModrinthProject(project.id), - check_game_version: if should_check_game_version == Some(true) { - None - } else { - should_check_game_version - }, - check_mod_loader: if should_check_mod_loader == Some(true) { - None - } else { - should_check_mod_loader - }, - }); - if dependencies != Some(DependencyLevel::None) { - for dependency in &latest_version.dependencies { - let mut id = if let Some(project_id) = &dependency.project_id { - project_id.clone() - } else if let Some(version_id) = &dependency.version_id { - modrinth.get_version(version_id).await?.project_id - } else { - break; - }; - - if profile.mod_loader == ModLoader::Quilt { - // Fabric API - if id == "P7dR8mSH" { - // Quilted Fabric API - id = "qvIfYCYJ".into(); - } - // Fabric Language Kotlin - if id == "Ha28R6CL" { - // Quilt Kotlin Libraries - id = "lwVhp9o5".into(); - } - } - - if dependency.dependency_type == DependencyType::Required { - eprint!("Adding required dependency {}... ", id.dimmed()); - let project = modrinth.get_project(&id).await?; - match add::modrinth(modrinth, &project, profile, None, None).await { - Ok(_) => { - println!("{} {}", *TICK, project.title.bold()); - // If it's required, add it without asking - profile.mods.push(Mod { - name: project.title.trim().into(), - identifier: ModIdentifier::ModrinthProject(project.id), - check_game_version: if should_check_game_version == Some(true) { - None - } else { - should_check_game_version - }, - check_mod_loader: if should_check_mod_loader == Some(true) { - None - } else { - should_check_mod_loader - }, - }); - } - Err(err) => { - if matches!(err, add::Error::AlreadyAdded) { - println!("{} Already added", *TICK); - } else { - bail!(err); - } - } - }; - } else if dependency.dependency_type == DependencyType::Optional - && (dependencies == Some(DependencyLevel::All) || dependencies.is_none()) - { - if dependencies == Some(DependencyLevel::All) { - eprint!("Adding optional dependency {}... ", id.dimmed()); - } else { - eprint!("Checking optional dependency {}... ", id.dimmed()); - } - let project = modrinth.get_project(&id).await?; - match add::modrinth(modrinth, &project, profile, None, None).await { - Ok(_) => { - if dependencies.is_none() { - println!("{}", *TICK); - } - // If it's optional, confirm with the user if they want to add it - if dependencies == Some(DependencyLevel::All) - || Confirm::with_theme(&*THEME) - .with_prompt(format!( - "Add optional dependency {} ({})?", - project.title.bold(), - format!("https://modrinth.com/mod/{}", project.slug) - .blue() - .underline() - )) - .interact()? - { - profile.mods.push(Mod { - name: project.title.trim().into(), - identifier: ModIdentifier::ModrinthProject(project.id), - check_game_version: if should_check_game_version == Some(true) { - None - } else { - should_check_game_version - }, - check_mod_loader: if should_check_mod_loader == Some(true) { - None - } else { - should_check_mod_loader - }, - }); - if dependencies == Some(DependencyLevel::All) { - println!("{} {}", *TICK, project.title.bold()); - } - } - } - Err(err) => { - if matches!(err, add::Error::AlreadyAdded) { - println!("{} Already added", *TICK); - } else { - println!("{}", format!("{CROSS} {err}").yellow()); - } - } - }; - } - } - } - - if !project.donation_urls.is_empty() { - println!( - "Consider supporting the mod creator on {}", - project - .donation_urls - .iter() - .map(|this| format!( - "{} ({})", - this.platform.bold(), - this.url.to_string().blue().underline() - )) - .format(" or ") - ); - } - - Ok(()) -} - -pub async fn curseforge( - curseforge: &Furse, - project_id: i32, - profile: &mut Profile, - should_check_game_version: Option, - should_check_mod_loader: Option, - dependencies: Option, -) -> Result<()> { - eprint!("Adding mod... "); - let project = curseforge.get_mod(project_id).await?; - let latest_file = add::curseforge( - curseforge, - &project, - profile, - should_check_game_version, - should_check_mod_loader, - ) - .await?; - println!("{} {}", *TICK, project.name.bold()); - profile.mods.push(Mod { - name: project.name.trim().into(), - identifier: ModIdentifier::CurseForgeProject(project.id), - check_game_version: if should_check_game_version == Some(true) { - None - } else { - should_check_game_version - }, - check_mod_loader: if should_check_mod_loader == Some(true) { - None - } else { - should_check_mod_loader - }, - }); - if dependencies != Some(DependencyLevel::None) { - for dependency in &latest_file.dependencies { - let mut id = dependency.mod_id; - if profile.mod_loader == ModLoader::Quilt { - // Fabric API - if id == 306612 { - // Quilted Fabric API - id = 634179; - } - // Fabric Language Kotlin - if id == 308769 { - // Quilt Kotlin Libraries - id = 720410; - } - } - - if dependency.relation_type == FileRelationType::RequiredDependency { - eprint!("Adding required dependency {}... ", id.to_string().dimmed()); - let project = curseforge.get_mod(id).await?; - match add::curseforge(curseforge, &project, profile, None, None).await { - Ok(_) => { - println!("{} {}", *TICK, project.name.bold()); - // If it's required, add it without asking - profile.mods.push(Mod { - name: project.name.trim().into(), - identifier: ModIdentifier::CurseForgeProject(project.id), - check_game_version: if should_check_game_version == Some(true) { - None - } else { - should_check_game_version - }, - check_mod_loader: if should_check_mod_loader == Some(true) { - None - } else { - should_check_mod_loader - }, - }); - } - Err(err) => { - if matches!(err, add::Error::AlreadyAdded) { - println!("{} Already added", *TICK); - } else { - bail!(err); - } - } - }; - } else if dependency.relation_type == FileRelationType::OptionalDependency - && (dependencies == Some(DependencyLevel::All) || dependencies.is_none()) - { - if dependencies == Some(DependencyLevel::All) { - eprint!("Adding optional dependency {}... ", id.to_string().dimmed()); - } else { - eprint!( - "Checking optional dependency {}... ", - id.to_string().dimmed() - ); - } - let project = curseforge.get_mod(id).await?; - match add::curseforge(curseforge, &project, profile, None, None).await { - Ok(_) => { - if dependencies.is_none() { - println!("{}", *TICK); - } - // If it's optional, confirm with the user if they want to add it - if dependencies == Some(DependencyLevel::All) - || Confirm::with_theme(&*THEME) - .with_prompt(format!( - "Add optional dependency {} ({})?", - project.name.bold(), - project.links.website_url.to_string().blue().underline() - )) - .interact()? - { - profile.mods.push(Mod { - name: project.name.trim().into(), - identifier: ModIdentifier::CurseForgeProject(project.id), - check_game_version: if should_check_game_version == Some(true) { - None - } else { - should_check_game_version - }, - check_mod_loader: if should_check_mod_loader == Some(true) { - None - } else { - should_check_mod_loader - }, - }); - if dependencies == Some(DependencyLevel::All) { - println!("{} {}", *TICK, project.name.bold()); - } - } - } - Err(err) => { - if matches!(err, add::Error::AlreadyAdded) { - println!("{} Already added", *TICK); - } else { - println!("{}", format!("{CROSS} {err}").yellow()); - } - } - }; - } - } - } - - Ok(()) -} diff --git a/src/subcommands/mod.rs b/src/subcommands/mod.rs index e3940ca..a602293 100644 --- a/src/subcommands/mod.rs +++ b/src/subcommands/mod.rs @@ -1,4 +1,3 @@ -pub mod add; pub mod list; pub mod modpack; pub mod profile; diff --git a/src/subcommands/profile/mod.rs b/src/subcommands/profile/mod.rs index 9cb7344..ae4af88 100644 --- a/src/subcommands/profile/mod.rs +++ b/src/subcommands/profile/mod.rs @@ -24,12 +24,11 @@ use std::{fs::read_dir, path::PathBuf}; use tokio::fs::create_dir_all; pub fn pick_mod_loader(default: Option<&ModLoader>) -> Result { - let mut picker = Select::with_theme(&*THEME); - picker + let mut picker = Select::with_theme(&*THEME) .with_prompt("Which mod loader do you use?") .items(&["Quilt", "Fabric", "Forge"]); if let Some(default) = default { - picker.default(match default { + picker = picker.default(match default { ModLoader::Quilt => 0, ModLoader::Fabric => 1, ModLoader::Forge => 2, diff --git a/src/subcommands/upgrade.rs b/src/subcommands/upgrade.rs index 4a134df..2010d11 100644 --- a/src/subcommands/upgrade.rs +++ b/src/subcommands/upgrade.rs @@ -54,7 +54,7 @@ impl TryFrom for Downloadable { /// Get the latest compatible downloadable for the mods in `profile` /// -/// If an error occures with a resolving task, instead of failing immediately, +/// If an error occurs with a resolving task, instead of failing immediately, /// resolution will continue and the error return flag is set to true. pub async fn get_platform_downloadables( modrinth: Ferinth, @@ -223,13 +223,8 @@ pub async fn upgrade( for file in read_dir(profile.output_dir.join("user"))? { let file = file?; let path = file.path(); - if path.is_file() { - // TODO: Use `path.extension().is_some_and(|ext| ext == "jar")` instead, see [#93050](https://github.com/rust-lang/rust/issues/93050) - if let Some(ext) = path.extension() { - if ext == "jar" { - to_install.push((file.file_name(), path)); - } - } + if path.is_file() && path.extension().is_some_and(|ext| ext == "jar") { + to_install.push((file.file_name(), path)); } } } @@ -239,7 +234,7 @@ pub async fn upgrade( .iter_mut() // Download directly to the output directory .map(|thing| thing.output = thing.filename().into()) - .for_each(drop); // Doesn't drop any data, just runs the interator + .for_each(drop); // Doesn't drop any data, just runs the iterator if to_download.is_empty() && to_install.is_empty() { println!("\n{}", "All up to date!".bold()); } else {