diff --git a/Cargo.lock b/Cargo.lock index a94ad29..8f4bcf8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -24,7 +24,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", "once_cell", "version_check", "zerocopy", @@ -47,9 +46,9 @@ checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "android-tzdata" @@ -68,24 +67,24 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" dependencies = [ "serde", ] [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -94,24 +93,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -131,23 +130,23 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -212,15 +211,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -249,9 +248,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.8" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -259,6 +261,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -274,6 +282,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -293,12 +310,13 @@ dependencies = [ [[package]] name = "cookie_store" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4934e6b7e8419148b6ef56950d277af8561060b56afd59e2aadf98b59fce6baa" +checksum = "2eac901828f88a5241ee0600950ab981148a18f2f756900ffba1b125ca6a3ef9" dependencies = [ "cookie", - "idna 0.5.0", + "document-features", + "idna", "log", "publicsuffix", "serde", @@ -320,15 +338,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" dependencies = [ "libc", ] @@ -412,7 +430,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -423,7 +441,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -433,7 +451,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown", + "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", @@ -480,33 +498,33 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "derive_builder_macro" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -522,59 +540,47 @@ dependencies = [ ] [[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "educe" -version = "0.5.11" +name = "displaydoc" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4bd92664bf78c4d3dba9b7cdafce6fa15b13ed3ed16175218196942e99168a8" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] -name = "either" -version = "1.13.0" +name = "document-features" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" dependencies = [ - "serde", + "litrs", ] [[package]] -name = "encoding_rs" -version = "0.8.34" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] -name = "enum-ordinalize" -version = "4.3.0" +name = "either" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ - "enum-ordinalize-derive", + "serde", ] [[package]] -name = "enum-ordinalize-derive" -version = "4.3.1" +name = "encoding_rs" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", + "cfg-if", ] [[package]] @@ -615,21 +621,26 @@ dependencies = [ [[package]] name = "event-listener" -version = "2.5.3" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] [[package]] name = "fastrand" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "flate2" -version = "1.0.31" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -637,9 +648,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", @@ -743,7 +754,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -802,27 +813,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", -] - -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -878,13 +879,19 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" + [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -892,9 +899,12 @@ name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -993,9 +1003,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1005,9 +1015,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -1029,9 +1039,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -1055,7 +1065,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", @@ -1069,14 +1079,14 @@ checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", - "rustls 0.23.12", + "rustls 0.23.17", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", "tower-service", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", ] [[package]] @@ -1087,7 +1097,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "native-tls", "tokio", @@ -1097,16 +1107,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.0", "pin-project-lite", "socket2", "tokio", @@ -1116,9 +1126,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1137,6 +1147,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1145,32 +1273,33 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "idna" -version = "0.5.0" +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] name = "indexmap" -version = "2.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.1", ] [[package]] @@ -1181,14 +1310,23 @@ checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "itertools" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] [[package]] name = "itoa" @@ -1198,9 +1336,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1216,21 +1354,21 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ "cc", "pkg-config", @@ -1243,6 +1381,18 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "lock_api" version = "0.4.12" @@ -1268,10 +1418,10 @@ dependencies = [ "futures", "mangadex-api-schema-rust", "mangadex-api-types-rust", - "reqwest 0.12.8", + "reqwest 0.12.9", "serde", "serde_qs", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "url", @@ -1284,10 +1434,10 @@ version = "0.9.0" source = "git+https://github.com/j1nxie/mangadex-api?branch=feat/custom_list_resexp#37300f0f22a75602e09ae310b47a2127792335df" dependencies = [ "mangadex-api-types-rust", - "reqwest 0.12.8", + "reqwest 0.12.9", "serde", "serde_qs", - "thiserror", + "thiserror 1.0.69", "url", "uuid", ] @@ -1299,9 +1449,9 @@ source = "git+https://github.com/j1nxie/mangadex-api?branch=feat/custom_list_res dependencies = [ "anyhow", "derive_builder", - "reqwest 0.12.8", + "reqwest 0.12.9", "serde", - "thiserror", + "thiserror 1.0.69", "time", "url", "uuid", @@ -1397,18 +1547,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", @@ -1517,24 +1667,24 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -1553,7 +1703,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1564,9 +1714,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -1585,9 +1735,9 @@ dependencies = [ [[package]] name = "ouroboros" -version = "0.17.2" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ba07320d39dfea882faa70554b4bd342a5f273ed59ba7c1c6b4c840492c954" +checksum = "944fa20996a25aded6b4795c6d63f10014a7a83f8be9828a11860b08c5fc4a67" dependencies = [ "aliasable", "ouroboros_macro", @@ -1596,15 +1746,16 @@ dependencies = [ [[package]] name = "ouroboros_macro" -version = "0.17.2" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4c6225c69b4ca778c0aea097321a64c421cf4577b331c61b229267edabb6f8" +checksum = "39b0deead1528fd0e5947a8546a9642a9777c25f6e1e26f34c97b204bbb465bd" dependencies = [ - "heck", - "proc-macro-error", + "heck 0.4.1", + "itertools", "proc-macro2", + "proc-macro2-diagnostics", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1613,6 +1764,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.3" @@ -1631,7 +1788,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -1659,9 +1816,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1692,9 +1849,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "poise" @@ -1722,7 +1879,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -1741,38 +1898,49 @@ dependencies = [ ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", - "version_check", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ + "proc-macro-error-attr2", "proc-macro2", "quote", - "version_check", + "syn 2.0.87", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "version_check", + "yansi", +] + [[package]] name = "psl-types" version = "2.0.11" @@ -1781,11 +1949,11 @@ checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" [[package]] name = "publicsuffix" -version = "2.2.3" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457" +checksum = "6f42ea446cab60335f76979ec15e12619a2165b5ae2c12166bef27d283a9fadf" dependencies = [ - "idna 0.3.0", + "idna", "psl-types", ] @@ -1802,57 +1970,61 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.12", + "rustls 0.23.17", "socket2", - "thiserror", + "thiserror 2.0.3", "tokio", "tracing", ] [[package]] name = "quinn-proto" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", + "getrandom", "rand", "ring", "rustc-hash", - "rustls 0.23.12", + "rustls 0.23.17", + "rustls-pki-types", "slab", - "thiserror", + "thiserror 2.0.3", "tinyvec", "tracing", + "web-time", ] [[package]] name = "quinn-udp" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1889,31 +2061,22 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -1928,9 +2091,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1963,7 +2126,7 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls 0.24.2", "ipnet", "js-sys", @@ -1995,9 +2158,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -2010,7 +2173,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-rustls 0.27.3", "hyper-tls", "hyper-util", @@ -2024,8 +2187,8 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.12", - "rustls-pemfile 2.1.3", + "rustls 0.23.17", + "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", @@ -2040,7 +2203,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", "windows-registry", ] @@ -2093,9 +2256,9 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -2112,9 +2275,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" dependencies = [ "bitflags 2.6.0", "errno", @@ -2144,21 +2307,21 @@ dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "7f1a745511c54ba6d4465e8d5dfbd81b45791756de28d4981af70d6dca128f1e" dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -2174,19 +2337,21 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -2200,9 +2365,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -2211,9 +2376,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2257,22 +2422,22 @@ dependencies = [ [[package]] name = "sea-bae" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd3534a9978d0aa7edd2808dc1f8f31c4d0ecd31ddf71d997b3c98e9f3c9114" +checksum = "f694a6ab48f14bc063cfadff30ab551d3c7e46d8f81836c51989d548f44a2a25" dependencies = [ - "heck", - "proc-macro-error", + "heck 0.4.1", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "sea-orm" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea1fee0cf8528dbe6eda29d5798afc522a63b75e44c5b15721e6e64af9c7cc4b" +checksum = "d5680a8b686985116607ef5f5af2b1f9e1cc2c228330e93101816a0baa279afa" dependencies = [ "async-stream", "async-trait", @@ -2285,7 +2450,7 @@ dependencies = [ "serde", "sqlx", "strum", - "thiserror", + "thiserror 1.0.69", "time", "tracing", "url", @@ -2294,23 +2459,23 @@ dependencies = [ [[package]] name = "sea-orm-macros" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8737b566799ed0444f278d13c300c4c6f1a91782f60ff5825a591852d5502030" +checksum = "3a239e3bb1b566ad4ec2654d0d193d6ceddfd733487edc9c21a64d214c773910" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "sea-bae", - "syn 2.0.72", + "syn 2.0.87", "unicode-ident", ] [[package]] name = "sea-orm-migration" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5df62369752f91b9295f8d71c146d84f818301a9ae7295106ebe8bbaa989a072" +checksum = "63ba07e9f2479cc671758fcb1edee42ff2e32c34b3e67ab41d0af1e41f73c74e" dependencies = [ "async-trait", "futures", @@ -2322,11 +2487,10 @@ dependencies = [ [[package]] name = "sea-query" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5073b2cfed767511a57d18115f3b3d8bcb5690bf8c89518caec6cb22c0cd74" +checksum = "ff504d13b5e4b52fffcf2fb203d0352a5722fa5151696db768933e41e1e591bb" dependencies = [ - "educe", "inherent", "ordered-float", "sea-query-derive", @@ -2336,9 +2500,9 @@ dependencies = [ [[package]] name = "sea-query-binder" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754965d4aee6145bec25d0898e5c931e6c22859789ce62fd85a42a15ed5a8ce3" +checksum = "b0019f47430f7995af63deda77e238c17323359af241233ec768aba1faea7608" dependencies = [ "sea-query", "sqlx", @@ -2348,22 +2512,23 @@ dependencies = [ [[package]] name = "sea-query-derive" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a82fcb49253abcb45cdcb2adf92956060ec0928635eb21b4f7a6d8f25ab0bc" +checksum = "9834af2c4bd8c5162f00c89f1701fb6886119a88062cf76fe842ea9e232b9839" dependencies = [ - "heck", + "darling", + "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.72", - "thiserror", + "syn 2.0.87", + "thiserror 1.0.69", ] [[package]] name = "sea-schema" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad52149fc81836ea7424c3425d8f6ed8ad448dd16d2e4f6a3907ba46f3f2fd78" +checksum = "aab1592d17860a9a8584d9b549aebcd06f7bdc3ff615f71752486ba0b05b1e6e" dependencies = [ "futures", "sea-query", @@ -2376,10 +2541,10 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "debdc8729c37fdbf88472f97fd470393089f997a909e535ff67c544d18cfccf0" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -2407,9 +2572,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -2426,9 +2591,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.205" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -2444,20 +2609,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.205" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.122" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -2473,7 +2638,7 @@ checksum = "cd34f36fe4c5ba9654417139a9b3a20d2e1de6012ee678ad14d240c22c78d8d6" dependencies = [ "percent-encoding", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2490,9 +2655,9 @@ dependencies = [ [[package]] name = "serenity" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880a04106592d0a8f5bdacb1d935889bfbccb4a14f7074984d9cd857235d34ac" +checksum = "3d72ec4323681bf9a3cabe40fd080abc2435859b502a1b5aa9bf693f125bfa76" dependencies = [ "arrayvec", "async-trait", @@ -2552,6 +2717,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signature" version = "2.2.0" @@ -2591,6 +2762,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -2623,9 +2797,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ "nom", "unicode_categories", @@ -2633,9 +2807,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" +checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" dependencies = [ "sqlx-core", "sqlx-macros", @@ -2646,11 +2820,10 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" +checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" dependencies = [ - "ahash", "atoi", "byteorder", "bytes", @@ -2663,6 +2836,7 @@ dependencies = [ "futures-intrusive", "futures-io", "futures-util", + "hashbrown 0.14.5", "hashlink", "hex", "indexmap", @@ -2671,45 +2845,45 @@ dependencies = [ "once_cell", "paste", "percent-encoding", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", + "rustls 0.23.17", + "rustls-pemfile 2.2.0", "serde", "serde_json", "sha2", "smallvec", "sqlformat", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tokio-stream", "tracing", "url", "uuid", - "webpki-roots 0.25.4", + "webpki-roots 0.26.6", ] [[package]] name = "sqlx-macros" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" +checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 1.0.109", + "syn 2.0.87", ] [[package]] name = "sqlx-macros-core" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" +checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", - "heck", + "heck 0.5.0", "hex", "once_cell", "proc-macro2", @@ -2721,7 +2895,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 1.0.109", + "syn 2.0.87", "tempfile", "tokio", "url", @@ -2729,12 +2903,12 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed31390216d20e538e447a7a9b959e06ed9fc51c37b514b46eb758016ecd418" +checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" dependencies = [ "atoi", - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "byteorder", "bytes", @@ -2764,7 +2938,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "time", "tracing", "uuid", @@ -2773,12 +2947,12 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" +checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ "atoi", - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "byteorder", "crc", @@ -2804,7 +2978,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "time", "tracing", "uuid", @@ -2813,9 +2987,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" +checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680" dependencies = [ "atoi", "flume", @@ -2828,14 +3002,20 @@ dependencies = [ "log", "percent-encoding", "serde", + "serde_urlencoded", "sqlx-core", "time", "tracing", "url", - "urlencoding", "uuid", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -2884,9 +3064,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -2908,6 +3088,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -2958,9 +3149,9 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -2971,22 +3162,42 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3032,6 +3243,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -3049,9 +3270,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -3072,7 +3293,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3112,16 +3333,16 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.12", + "rustls 0.23.17", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -3141,14 +3362,14 @@ dependencies = [ "tokio", "tokio-rustls 0.25.0", "tungstenite", - "webpki-roots 0.26.3", + "webpki-roots 0.26.6", ] [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -3159,9 +3380,9 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3183,7 +3404,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] @@ -3227,9 +3448,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" [[package]] name = "try-lock" @@ -3253,7 +3474,7 @@ dependencies = [ "rustls 0.22.4", "rustls-pki-types", "sha1", - "thiserror", + "thiserror 1.0.69", "url", "utf-8", ] @@ -3272,13 +3493,13 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typesize" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb704842c709bc76f63e99e704cb208beeccca2abbabd0d9aec02e48ca1cee0f" +checksum = "549e54551d85ba6718a95333d9bc4367f69793d7aba638de30f8d25a1f554a1d" dependencies = [ "chrono", "dashmap", - "hashbrown", + "hashbrown 0.14.5", "mini-moka", "parking_lot", "secrecy", @@ -3290,56 +3511,47 @@ dependencies = [ [[package]] name = "typesize-derive" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905e88c2a4cc27686bd57e495121d451f027e441388a67f773be729ad4be1ea8" +checksum = "fd9fc0ad9e03a2b0c2e2a0eafaecccef2121829e1ab6ce9c9d790e6c6766bd1c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", ] [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-properties" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" - -[[package]] -name = "unicode-segmentation" -version = "1.11.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" [[package]] name = "unicode_categories" @@ -3355,33 +3567,39 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna", "percent-encoding", "serde", ] -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - [[package]] name = "utf-8" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "serde", @@ -3401,9 +3619,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "9.0.0" +version = "9.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32e7318e93a9ac53693b6caccfb05ff22e04a44c7cf8a279051f24c09da286f" +checksum = "349ed9e45296a581f455bc18039878f409992999bc1d5da12a6800eb18c8752f" dependencies = [ "anyhow", "derive_builder", @@ -3413,9 +3631,9 @@ dependencies = [ [[package]] name = "vergen-gitcl" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bbdc9746577cb4767f218d320ee0b623d415e8130332f8f562b910b61cc2c4e" +checksum = "2a3a7f91caabecefc3c249fd864b11d4abe315c166fbdb568964421bccfd2b7a" dependencies = [ "anyhow", "derive_builder", @@ -3427,13 +3645,12 @@ dependencies = [ [[package]] name = "vergen-lib" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e06bee42361e43b60f363bad49d63798d0f42fb1768091812270eca00c784720" +checksum = "229eaddb0050920816cf051e619affaf18caa3dd512de8de5839ccbc8e53abb0" dependencies = [ "anyhow", "derive_builder", - "getset", "rustversion", ] @@ -3476,34 +3693,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -3513,9 +3731,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3523,28 +3741,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -3555,9 +3773,19 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -3571,20 +3799,20 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall", "wasite", ] @@ -3816,6 +4044,48 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -3834,7 +4104,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -3842,3 +4133,25 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] diff --git a/src/chapter_tracker.rs b/src/chapter_tracker.rs index 8600a05..72a2d44 100644 --- a/src/chapter_tracker.rs +++ b/src/chapter_tracker.rs @@ -4,6 +4,7 @@ use sea_orm::{ActiveModelTrait, EntityTrait, IntoActiveModel, Set}; use crate::{constants::MD_BLOCKED_LIST, models::manga, Data, Error}; +#[tracing::instrument(skip_all)] pub async fn chapter_tracker(http: &Http, webhook: &Webhook, data: &Data) -> Result<(), Error> { let manga_list = manga::Entity::find().all(&data.db).await?; @@ -18,25 +19,29 @@ pub async fn chapter_tracker(http: &Http, webhook: &Webhook, data: &Data) -> Res .id(db_manga.manga_dex_id) .get() .send() - .await?; + .await + .inspect_err(|e| + tracing::error!(err = ?e, uuid = %db_manga.manga_dex_id, "an error occurred when fetching manga"), + )?; let manga_id = manga.data.id; let manga = manga.data.attributes; - let title = - if let Some(en_title) = manga.title.get(&mangadex_api_types_rust::Language::English) { - en_title - } else if let Some(jp_ro) = manga - .title - .get(&mangadex_api_types_rust::Language::JapaneseRomanized) - { - jp_ro - } else { - manga + let title = match manga.title.get(&mangadex_api_types_rust::Language::English) { + Some(en_title) => en_title, + None => { + match manga .title - .get(&mangadex_api_types_rust::Language::Japanese) - .unwrap() - }; + .get(&mangadex_api_types_rust::Language::JapaneseRomanized) + { + Some(jp_ro) => jp_ro, + None => manga + .title + .get(&mangadex_api_types_rust::Language::Japanese) + .unwrap(), + } + } + }; let chapter_feed = data .md @@ -56,7 +61,10 @@ pub async fn chapter_tracker(http: &Http, webhook: &Webhook, data: &Data) -> Res .excluded_groups(MD_BLOCKED_LIST.clone()) .limit(1u32) .send() - .await?; + .await + .inspect_err(|e| + tracing::error!(err = ?e, uuid = %db_manga.manga_dex_id, "an error occurred when fetching chapter feed"), + )?; let mut db_manga_insert = db_manga.into_active_model(); let now = time::OffsetDateTime::now_utc(); @@ -70,10 +78,9 @@ pub async fn chapter_tracker(http: &Http, webhook: &Webhook, data: &Data) -> Res match &chapter_data.chapter { Some(chap) => { - let mut vol_chap_str = if let Some(vol) = &chapter_data.volume { - format!("Vol. {}, Ch. {}", vol, chap) - } else { - format!("Ch. {}", chap) + let mut vol_chap_str = match &chapter_data.volume { + Some(vol) => format!("Vol. {}, Ch. {}", vol, chap), + None => format!("Ch. {}", chap), }; if let Some(chapter_title) = &chapter_data.title { diff --git a/src/commands/fluff.rs b/src/commands/fluff.rs index 34e48f6..647af27 100644 --- a/src/commands/fluff.rs +++ b/src/commands/fluff.rs @@ -6,6 +6,7 @@ use crate::{Context, Error}; /// /// you want to listen to squartatrice? here you go. #[poise::command(prefix_command, slash_command)] +#[tracing::instrument(skip_all)] pub async fn squartatrice(ctx: Context<'_>) -> Result<(), Error> { let random_number = rand::random::(); @@ -21,7 +22,8 @@ pub async fn squartatrice(ctx: Context<'_>) -> Result<(), Error> { .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) .content(content), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; Ok(()) } diff --git a/src/commands/help.rs b/src/commands/help.rs index c45d5bf..44f2fee 100644 --- a/src/commands/help.rs +++ b/src/commands/help.rs @@ -2,6 +2,7 @@ use crate::{Context, Error}; /// print the list of commands and their usage #[poise::command(slash_command, prefix_command)] +#[tracing::instrument(skip_all)] pub async fn help( ctx: Context<'_>, #[description = "specific command to show help about"] command: Option, @@ -10,7 +11,10 @@ pub async fn help( extra_text_at_bottom: "Type `s>help command` for more info on a command.", ..Default::default() }; - poise::builtins::help(ctx, command.as_deref(), config).await?; + + poise::builtins::help(ctx, command.as_deref(), config) + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; Ok(()) } diff --git a/src/commands/manga.rs b/src/commands/manga.rs index 3771f00..4700ce0 100644 --- a/src/commands/manga.rs +++ b/src/commands/manga.rs @@ -26,7 +26,8 @@ async fn check_md_client(ctx: Context<'_>) -> Result<(), Error> { .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) .content("mangadex client is not initialized. this command will not work."), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; return Err("mangadex client is not initialized.".into()); } @@ -38,7 +39,8 @@ async fn check_md_client(ctx: Context<'_>) -> Result<(), Error> { .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) .content("mdlist uuid is not set. this command will not work."), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; return Err("mdlist uuid is not set.".into()); } @@ -54,12 +56,14 @@ async fn check_md_client(ctx: Context<'_>) -> Result<(), Error> { guild_only, subcommands("add", "list", "sync") )] +#[tracing::instrument(skip_all)] pub async fn manga(_: Context<'_>) -> Result<(), Error> { Ok(()) } /// add a manga to the tracking list. #[poise::command(prefix_command, slash_command)] +#[tracing::instrument(skip_all, fields(input = %input))] pub async fn add( ctx: Context<'_>, #[description = "mangadex uuid or link of the manga you want to add."] input: String, @@ -75,39 +79,58 @@ pub async fn add( .oauth() .refresh() .send() - .await?; - - let uuid = if let Some(captures) = MD_URL_REGEX.captures(&input) { - if let Ok(u) = uuid::Uuid::try_parse(&captures[1]) { - tracing::info!("got uuid from link: {}", u); - u - } else { - ctx.send( - poise::CreateReply::default() - .reply(true) - .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) - .content("invalid uuid supplied."), - ) - .await?; - - return Ok(()); - } - } else if let Ok(u) = uuid::Uuid::try_parse(&input) { - tracing::info!("got uuid from input string: {}", u); - u - } else { - ctx.send( - poise::CreateReply::default() - .reply(true) - .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) - .content("invalid link supplied."), - ) - .await?; - - return Ok(()); + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when refreshing token"))?; + + let uuid = match MD_URL_REGEX.captures(&input) { + Some(captures) => match uuid::Uuid::try_parse(&captures[1]) { + Ok(u) => { + tracing::info!(uuid = %u, "got uuid from link"); + u + } + _ => { + ctx.send( + poise::CreateReply::default() + .reply(true) + .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) + .content("invalid uuid supplied."), + ) + .await + .inspect_err( + |e| tracing::error!(err = ?e, "an error occurred when sending reply"), + )?; + + return Ok(()); + } + }, + None => match uuid::Uuid::try_parse(&input) { + Ok(u) => { + tracing::info!(uuid = %u, "got uuid from input string"); + u + } + _ => { + ctx.send( + poise::CreateReply::default() + .reply(true) + .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) + .content("invalid link supplied."), + ) + .await + .inspect_err( + |e| tracing::error!(err = ?e, "an error occurred when sending reply"), + )?; + + return Ok(()); + } + }, }; - let manga_list = manga::Entity::find().all(&ctx.data().db).await?; + let manga_list = manga::Entity::find() + .all(&ctx.data().db) + .await + .inspect_err( + |e| tracing::error!(err = ?e, "an error occurred when fetching manga from database"), + )?; let mdlist = ctx .data() @@ -118,7 +141,8 @@ pub async fn add( .id(ctx.data().mdlist_id.unwrap()) .get() .send() - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when fetching mdlist"))?; let manga = ctx .data() @@ -129,7 +153,10 @@ pub async fn add( .id(uuid) .get() .send() - .await?; + .await + .inspect_err( + |e| tracing::error!(err = ?e, uuid = %uuid, "an error occurred when fetching manga"), + )?; let chapter_feed = ctx .data() @@ -147,29 +174,37 @@ pub async fn add( .excluded_groups(MD_BLOCKED_LIST.clone()) .limit(1u32) .send() - .await?; + .await + .inspect_err( + |e| tracing::error!(err = ?e, uuid = %uuid, "an error occurred when fetching chapter feed"), + )?; let manga = manga.data.attributes; - let title = if let Some(en_title) = manga.title.get(&mangadex_api_types_rust::Language::English) - { - en_title - } else if let Some(jp_ro) = manga - .title - .get(&mangadex_api_types_rust::Language::JapaneseRomanized) - { - jp_ro - } else { - manga - .title - .get(&mangadex_api_types_rust::Language::Japanese) - .unwrap() + let title = match manga.title.get(&mangadex_api_types_rust::Language::English) { + Some(en_title) => en_title, + None => { + match manga + .title + .get(&mangadex_api_types_rust::Language::JapaneseRomanized) + { + Some(jp_ro) => jp_ro, + None => { + // FIXME: don't unwrap here - this will literally kill the main thread + manga + .title + .get(&mangadex_api_types_rust::Language::Japanese) + .unwrap() + } + } + } }; if manga::Entity::find() .filter(manga::Column::MangaDexId.eq(uuid)) .one(&ctx.data().db) - .await? + .await. + inspect_err(|e| tracing::error!(err = ?e, uuid = %uuid, "an error occurred when fetching manga from database"))? .is_some() { ctx.send( @@ -181,7 +216,8 @@ pub async fn add( title )), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; return Ok(()); } @@ -193,13 +229,12 @@ pub async fn add( let chapter_data = &chapter.attributes; - if let Some(timestamp) = chapter_data.publish_at { - Set(Some(time::PrimitiveDateTime::new( + match chapter_data.publish_at { + Some(timestamp) => Set(Some(time::PrimitiveDateTime::new( timestamp.as_ref().date(), timestamp.as_ref().time(), - ))) - } else { - NotSet + ))), + _ => NotSet, } } else { NotSet @@ -214,7 +249,9 @@ pub async fn add( ..Default::default() }; - model.insert(&ctx.data().db).await?; + model.insert(&ctx.data().db).await.inspect_err( + |e| tracing::error!(err = ?e, "an error occurred when inserting manga into database"), + )?; let mut builder = ctx .data() @@ -239,7 +276,7 @@ pub async fn add( .send() .await .map_err(|e| { - tracing::warn!("an error happened while updating the mdlist: {}", e); + tracing::warn!(err = ?e, "an error occurred when updating the mdlist"); resp_string = "*failed to update the mdlist. it will (hopefully) be updated the next time you add a manga. you can also try running `s>manga sync` to sync the mdlist.*\n\n".to_string() }); @@ -249,13 +286,15 @@ pub async fn add( .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) .content(resp_string + &format!("added title [**{}**](https://mangadex.org/title/{}) to the tracking list! you will be notified when a new chapter is uploaded.", title, uuid)), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; Ok(()) } /// print the currently tracked list. #[poise::command(prefix_command, slash_command)] +#[tracing::instrument(skip_all)] pub async fn list(ctx: Context<'_>) -> Result<(), Error> { if check_md_client(ctx).await.is_err() { return Ok(()); @@ -268,15 +307,15 @@ pub async fn list(ctx: Context<'_>) -> Result<(), Error> { .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) .content("loading... please watch warmly..."), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; let manga_list = manga::Entity::find() .all(&ctx.data().db) .await - .map_err(|e| { - tracing::error!("there was an error fetching from database: {}", e); - e - })?; + .inspect_err( + |e| tracing::error!(err = ?e, "there was an error fetching manga list from database"), + )?; if manga_list.is_empty() { msg.edit( @@ -286,7 +325,8 @@ pub async fn list(ctx: Context<'_>) -> Result<(), Error> { .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) .content("there are no manga in the tracking list."), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; return Ok(()); } @@ -305,24 +345,28 @@ pub async fn list(ctx: Context<'_>) -> Result<(), Error> { .id(db_manga.manga_dex_id) .get() .send() - .await?; + .await + .inspect_err( + |e| tracing::error!(err = ?e, uuid = %db_manga.manga_dex_id, "an error occurred when fetching manga"), + )?; let manga = manga.data.attributes; - let title = - if let Some(en_title) = manga.title.get(&mangadex_api_types_rust::Language::English) { - en_title - } else if let Some(jp_ro) = manga - .title - .get(&mangadex_api_types_rust::Language::JapaneseRomanized) - { - jp_ro - } else { - manga + let title = match manga.title.get(&mangadex_api_types_rust::Language::English) { + Some(en_title) => en_title, + None => { + match manga .title - .get(&mangadex_api_types_rust::Language::Japanese) - .unwrap() - }; + .get(&mangadex_api_types_rust::Language::JapaneseRomanized) + { + Some(jp_ro) => jp_ro, + None => manga + .title + .get(&mangadex_api_types_rust::Language::Japanese) + .unwrap(), + } + } + }; result_list.push(InternalManga { title: title.to_string(), @@ -349,21 +393,24 @@ pub async fn list(ctx: Context<'_>) -> Result<(), Error> { for (page, chunk) in result_list.chunks(10).enumerate() { let mut manga_list_str = String::new(); for (idx, manga) in chunk.iter().enumerate() { - let entry_str = if let Some(timestamp) = manga.last_updated { - format!( - "{}. [{}](https://mangadex.org/title/{}) (last updated: )\n", - idx + 1 + page * 10, - manga.title, - manga.id, - timestamp.assume_utc().unix_timestamp(), - ) - } else { - format!( - "{}. [{}](https://mangadex.org/title/{})\n", - idx + 1 + page * 10, - manga.title, - manga.id, - ) + let entry_str = match manga.last_updated { + Some(timestamp) => { + format!( + "{}. [{}](https://mangadex.org/title/{}) (last updated: )\n", + idx + 1 + page * 10, + manga.title, + manga.id, + timestamp.assume_utc().unix_timestamp(), + ) + } + _ => { + format!( + "{}. [{}](https://mangadex.org/title/{})\n", + idx + 1 + page * 10, + manga.title, + manga.id, + ) + } }; manga_list_str = manga_list_str + &entry_str; @@ -410,7 +457,8 @@ pub async fn list(ctx: Context<'_>) -> Result<(), Error> { serenity_prelude::CreateButton::new(&last_id).emoji('⏭'), ])]), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when editing message"))?; while let Some(press) = serenity_prelude::collector::ComponentInteractionCollector::new(ctx) .filter(move |press| press.data.custom_id.starts_with(&ctx_id.to_string())) @@ -427,7 +475,10 @@ pub async fn list(ctx: Context<'_>) -> Result<(), Error> { .ephemeral(true), ), ) - .await?; + .await + .inspect_err( + |e| tracing::error!(err = ?e, "an error occurred when creating response"), + )?; continue; } @@ -479,19 +530,24 @@ pub async fn list(ctx: Context<'_>) -> Result<(), Error> { ])]), ), ) - .await?; + .await + .inspect_err( + |e| tracing::error!(err = ?e, "an error occurred when creating response"), + )?; } msg.into_message() .await? .edit(ctx, EditMessage::default().components(vec![])) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when editing message"))?; Ok(()) } /// sync the local database to the mdlist. #[poise::command(prefix_command, slash_command)] +#[tracing::instrument(skip_all)] pub async fn sync(ctx: Context<'_>) -> Result<(), Error> { if check_md_client(ctx).await.is_err() { return Ok(()); @@ -504,7 +560,10 @@ pub async fn sync(ctx: Context<'_>) -> Result<(), Error> { .oauth() .refresh() .send() - .await?; + .await + .inspect_err( + |e| tracing::error!(err = ?e, "an error occurred when refreshing mangadex token"), + )?; let msg = ctx .send( @@ -513,9 +572,13 @@ pub async fn sync(ctx: Context<'_>) -> Result<(), Error> { .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) .content("fetching the manga list from the database..."), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; - let manga_list = manga::Entity::find().all(&ctx.data().db).await?; + let manga_list = manga::Entity::find() + .all(&ctx.data().db) + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when fetching manga list from database"))?; let mdlist = ctx .data() @@ -556,18 +619,20 @@ pub async fn sync(ctx: Context<'_>) -> Result<(), Error> { .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) .content("successfully updated the mdlist!"), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when editing message"))?; } Err(e) => { - tracing::warn!("failed to update the mdlist: {}", e); + tracing::warn!(err = ?e, "an error occurred when updating mdlist"); msg.edit( ctx, poise::CreateReply::default() .reply(true) .content("failed to update the mdlist. check back later!"), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when editing message"))?; } } diff --git a/src/commands/role.rs b/src/commands/role.rs index d1f8d30..fe3fccd 100644 --- a/src/commands/role.rs +++ b/src/commands/role.rs @@ -17,70 +17,90 @@ use crate::{models::roles, Context, Error}; guild_only, subcommands("add", "remove") )] +#[tracing::instrument(skip_all)] pub async fn role(_: Context<'_>) -> Result<(), Error> { Ok(()) } /// add a self-assignable role from list. #[poise::command(slash_command, prefix_command)] +#[tracing::instrument(skip_all)] pub async fn add(ctx: Context<'_>) -> Result<(), Error> { let mut db_roles_find = roles::Entity::find().paginate(&ctx.data().db, 10); let db_roles = db_roles_find.fetch_and_next().await?; - if let Some(roles) = db_roles { - let data: Vec = roles - .iter() - .map(|role| CreateSelectMenuOption::new(&role.name, &role.role_id)) - .collect(); - - let mut roles_str = String::new(); + match db_roles { + Some(roles) => { + let data: Vec = roles + .iter() + .map(|role| CreateSelectMenuOption::new(&role.name, &role.role_id)) + .collect(); - for (idx, role) in roles.iter().enumerate() { - roles_str = roles_str + &format!("{}. <@&{}>\n", idx, role.role_id); - } + let mut roles_str = String::new(); - let msg = ctx - .send( - poise::CreateReply::default() - .reply(true) - .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) - .components(vec![CreateActionRow::SelectMenu(CreateSelectMenu::new( - "role_menu", - CreateSelectMenuKind::String { options: data }, - ))]) - .embed(CreateEmbed::default().field( - "list of self-assignable roles", - roles_str, - false, - )), - ) - .await?; + for (idx, role) in roles.iter().enumerate() { + roles_str = roles_str + &format!("{}. <@&{}>\n", idx, role.role_id); + } - while let Some(mci) = ComponentInteractionCollector::new(ctx) - .author_id(ctx.author().id) - .channel_id(ctx.channel_id()) - .timeout(std::time::Duration::from_secs(120)) - .await - { - let mut msg = mci.message.clone(); + let msg = ctx + .send( + poise::CreateReply::default() + .reply(true) + .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) + .components(vec![CreateActionRow::SelectMenu(CreateSelectMenu::new( + "role_menu", + CreateSelectMenuKind::String { options: data }, + ))]) + .embed(CreateEmbed::default().field( + "list of self-assignable roles", + roles_str, + false, + )), + ) + .await?; - if let ComponentInteractionDataKind::StringSelect { values: roles } = - mci.data.kind.clone() + while let Some(mci) = ComponentInteractionCollector::new(ctx) + .author_id(ctx.author().id) + .channel_id(ctx.channel_id()) + .timeout(std::time::Duration::from_secs(120)) + .await { - let member = ctx - .http() - .get_member(ctx.guild_id().unwrap(), ctx.author().id) - .await?; + let mut msg = mci.message.clone(); - if member - .roles - .contains(&RoleId::new(roles[0].parse::().unwrap())) + if let ComponentInteractionDataKind::StringSelect { values: roles } = + mci.data.kind.clone() { + let member = ctx + .http() + .get_member(ctx.guild_id().unwrap(), ctx.author().id) + .await?; + + if member + .roles + .contains(&RoleId::new(roles[0].parse::().unwrap())) + { + msg.edit( + ctx, + EditMessage::new() + .content(format!("you already have <@&{}>!", roles[0])) + .components(vec![]) + .embeds(vec![]), + ) + .await?; + + std::thread::sleep(std::time::Duration::from_secs(10)); + break; + } + + member + .add_role(ctx, roles[0].parse::().unwrap()) + .await?; + msg.edit( ctx, EditMessage::new() - .content(format!("you already have <@&{}>!", roles[0])) + .content(format!("added <@&{}> to your account.", roles[0])) .components(vec![]) .embeds(vec![]), ) @@ -89,34 +109,19 @@ pub async fn add(ctx: Context<'_>) -> Result<(), Error> { std::thread::sleep(std::time::Duration::from_secs(10)); break; } - - member - .add_role(ctx, roles[0].parse::().unwrap()) - .await?; - - msg.edit( - ctx, - EditMessage::new() - .content(format!("added <@&{}> to your account.", roles[0])) - .components(vec![]) - .embeds(vec![]), - ) - .await?; - - std::thread::sleep(std::time::Duration::from_secs(10)); - break; } - } - msg.delete(ctx).await?; - } else { - ctx.send( - poise::CreateReply::default() - .reply(true) - .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) - .content("no self-assignable roles were configured!"), - ) - .await?; + msg.delete(ctx).await?; + } + _ => { + ctx.send( + poise::CreateReply::default() + .reply(true) + .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) + .content("no self-assignable roles were configured!"), + ) + .await?; + } } Ok(()) @@ -124,98 +129,113 @@ pub async fn add(ctx: Context<'_>) -> Result<(), Error> { /// remove a self-assignable role from your role list. #[poise::command(slash_command, prefix_command)] +#[tracing::instrument(skip_all)] pub async fn remove(ctx: Context<'_>) -> Result<(), Error> { let mut db_roles_find = roles::Entity::find().paginate(&ctx.data().db, 10); let db_roles = db_roles_find.fetch_and_next().await?; - if let Some(roles) = db_roles { - let roles_set: HashSet = HashSet::from_iter( - roles - .iter() - .map(|role| RoleId::new(role.role_id.parse::().unwrap())), - ); - - let mut roles_str = String::new(); + match db_roles { + Some(roles) => { + let roles_set: HashSet = HashSet::from_iter( + roles + .iter() + .map(|role| RoleId::new(role.role_id.parse::().unwrap())), + ); - let member = ctx - .http() - .get_member(ctx.guild_id().unwrap(), ctx.author().id) - .await?; + let mut roles_str = String::new(); - let user_roles_set: HashSet = HashSet::from_iter(member.roles.iter().copied()); + let member = ctx + .http() + .get_member(ctx.guild_id().unwrap(), ctx.author().id) + .await?; - let self_assignable_roles = roles_set.intersection(&user_roles_set); + let user_roles_set: HashSet = HashSet::from_iter(member.roles.iter().copied()); - let data: Vec = self_assignable_roles - .clone() - .map(|role| { - let guild = ctx.guild().unwrap(); - let role = guild.roles.get(role).unwrap(); + let self_assignable_roles = roles_set.intersection(&user_roles_set); - CreateSelectMenuOption::new(&role.name, role.id.to_string()) - }) - .collect(); + let data: Vec = self_assignable_roles + .clone() + .map(|role| { + let guild = ctx.guild().unwrap(); + let role = guild.roles.get(role).unwrap(); - for (idx, role) in self_assignable_roles.clone().enumerate() { - roles_str = roles_str + &format!("{}. <@&{}>\n", idx, role); - } + CreateSelectMenuOption::new(&role.name, role.id.to_string()) + }) + .collect(); - if self_assignable_roles.count() == 0 { - ctx.send( - poise::CreateReply::default() - .reply(true) - .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) - .content("you don't have any self-assignable roles!"), - ) - .await?; - return Ok(()); - } + for (idx, role) in self_assignable_roles.clone().enumerate() { + roles_str = roles_str + &format!("{}. <@&{}>\n", idx, role); + } - let msg = ctx - .send( - poise::CreateReply::default() - .reply(true) - .components(vec![CreateActionRow::SelectMenu(CreateSelectMenu::new( - "role_menu", - CreateSelectMenuKind::String { options: data }, - ))]) - .embed(CreateEmbed::default().field( - "list of your self-assignable roles", - roles_str, - false, - )), - ) - .await?; + if self_assignable_roles.count() == 0 { + ctx.send( + poise::CreateReply::default() + .reply(true) + .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) + .content("you don't have any self-assignable roles!"), + ) + .await?; + return Ok(()); + } - while let Some(mci) = ComponentInteractionCollector::new(ctx) - .author_id(ctx.author().id) - .channel_id(ctx.channel_id()) - .timeout(std::time::Duration::from_secs(120)) - .await - { - let mut msg = mci.message.clone(); + let msg = ctx + .send( + poise::CreateReply::default() + .reply(true) + .components(vec![CreateActionRow::SelectMenu(CreateSelectMenu::new( + "role_menu", + CreateSelectMenuKind::String { options: data }, + ))]) + .embed(CreateEmbed::default().field( + "list of your self-assignable roles", + roles_str, + false, + )), + ) + .await?; - if let ComponentInteractionDataKind::StringSelect { values: roles } = - mci.data.kind.clone() + while let Some(mci) = ComponentInteractionCollector::new(ctx) + .author_id(ctx.author().id) + .channel_id(ctx.channel_id()) + .timeout(std::time::Duration::from_secs(120)) + .await { - let member = ctx - .http() - .get_member(ctx.guild_id().unwrap(), ctx.author().id) - .await?; + let mut msg = mci.message.clone(); - if member - .roles - .contains(&RoleId::new(roles[0].parse::().unwrap())) + if let ComponentInteractionDataKind::StringSelect { values: roles } = + mci.data.kind.clone() { - member - .remove_role(ctx, roles[0].parse::().unwrap()) + let member = ctx + .http() + .get_member(ctx.guild_id().unwrap(), ctx.author().id) .await?; + if member + .roles + .contains(&RoleId::new(roles[0].parse::().unwrap())) + { + member + .remove_role(ctx, roles[0].parse::().unwrap()) + .await?; + + msg.edit( + ctx, + EditMessage::default() + .content(format!("i removed the role <@&{}> for you!", roles[0])) + .components(vec![]) + .embeds(vec![]), + ) + .await?; + + std::thread::sleep(std::time::Duration::from_secs(10)); + break; + } + msg.edit( ctx, - EditMessage::default() - .content(format!("i removed the role <@&{}> for you!", roles[0])) + EditMessage::new() + .content(format!("you don't seem to have the role <@&{}>...? how did you get here to begin with?", roles[0])) .components(vec![]) .embeds(vec![]), ) @@ -224,30 +244,19 @@ pub async fn remove(ctx: Context<'_>) -> Result<(), Error> { std::thread::sleep(std::time::Duration::from_secs(10)); break; } - - msg.edit( - ctx, - EditMessage::new() - .content(format!("you don't seem to have the role <@&{}>...? how did you get here to begin with?", roles[0])) - .components(vec![]) - .embeds(vec![]), - ) - .await?; - - std::thread::sleep(std::time::Duration::from_secs(10)); - break; } - } - msg.delete(ctx).await?; - } else { - ctx.send( - poise::CreateReply::default() - .reply(true) - .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) - .content("no self-assignable roles were configured!"), - ) - .await?; + msg.delete(ctx).await?; + } + _ => { + ctx.send( + poise::CreateReply::default() + .reply(true) + .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) + .content("no self-assignable roles were configured!"), + ) + .await?; + } } Ok(()) diff --git a/src/commands/status.rs b/src/commands/status.rs index 9bb8381..a88ea19 100644 --- a/src/commands/status.rs +++ b/src/commands/status.rs @@ -9,6 +9,7 @@ use poise::serenity_prelude as serenity; /// get the bot's status. #[poise::command(prefix_command, slash_command)] +#[tracing::instrument(skip_all)] pub async fn status(ctx: Context<'_>) -> Result<(), Error> { ctx.send(poise::CreateReply::default().embed( serenity::CreateEmbed::new() @@ -22,7 +23,9 @@ pub async fn status(ctx: Context<'_>) -> Result<(), Error> { .field("poise", format!("[{0}](https://docs.rs/crate/poise/{0})", POISE_VERSION), true) .field("uptime", format!("", STARTUP_TIME.duration_since(UNIX_EPOCH).unwrap().as_secs()), true) .thumbnail(get_bot_avatar(ctx)) - )).await?; + )) + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when sending reply"))?; Ok(()) } diff --git a/src/main.rs b/src/main.rs index 8c9251a..2333829 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,10 +7,10 @@ use poise::serenity_prelude::{ self as serenity, ChannelId, CreateAllowedMentions, CreateEmbed, CreateMessage, EditMessage, MessageReference, }; -use sea_orm::{Database, DatabaseConnection}; +use sea_orm::{ConnectOptions, Database, DatabaseConnection}; use sea_orm_migration::MigratorTrait; -use tracing::level_filters::LevelFilter; -use tracing_subscriber::EnvFilter; +use tracing::{level_filters::LevelFilter, Instrument}; +use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; #[derive(Clone)] struct Data { @@ -29,6 +29,7 @@ mod constants; mod migrator; mod models; +#[tracing::instrument(skip_all)] async fn event_handler( ctx: &serenity::Context, event: &serenity::FullEvent, @@ -63,7 +64,10 @@ async fn event_handler( .allowed_mentions(CreateAllowedMentions::new().replied_user(false)) .content("got a mangadex link! fetching data..."), ) - .await?; + .await + .inspect_err( + |e| tracing::error!(err = ?e, "an error occurred when sending reply"), + )?; // FIXME: better error handling here // this currently silently errors and hangs instead of returning - the message will just hang at "fetching data...". @@ -75,25 +79,30 @@ async fn event_handler( .id(uuid) .get() .send() - .await?; + .await + .inspect_err( + |e| tracing::error!(err = ?e, uuid = %uuid, "an error occurred when fetching manga"), + )?; let manga_id = manga.data.id; let manga = manga.data.attributes; let en_title = manga.title.get(&mangadex_api_types_rust::Language::English); - let title = if let Some(en_title) = en_title { - en_title - } else if let Some(jp_ro) = manga - .title - .get(&mangadex_api_types_rust::Language::JapaneseRomanized) - { - jp_ro - } else { - manga - .title - .get(&mangadex_api_types_rust::Language::Japanese) - .unwrap() + let title = match en_title { + Some(en_title) => en_title, + None => { + match manga + .title + .get(&mangadex_api_types_rust::Language::JapaneseRomanized) + { + Some(jp_ro) => jp_ro, + None => manga + .title + .get(&mangadex_api_types_rust::Language::Japanese) + .unwrap(), + } + } }; let tags = manga @@ -118,7 +127,10 @@ async fn event_handler( .id(uuid) .get() .send() - .await?; + .await + .inspect_err( + |e| tracing::error!(err = ?e, uuid = %uuid, "an error occurred when fetching manga stats"), + )?; let statistics = statistics.statistics.get(&uuid).unwrap(); @@ -140,61 +152,59 @@ async fn event_handler( .field("status", manga.status.to_string(), true) .field( "year", - if let Some(year) = manga.year { - year.to_string() - } else { - "unknown".to_string() + match manga.year { + Some(year) => year.to_string(), + None => "unknown".to_string(), }, true, ) .field( "demographic", - if let Some(demographic) = manga.publication_demographic { - demographic.to_string() - } else { - "unknown".to_string() + match manga.publication_demographic { + Some(demographic) => demographic.to_string(), + None => "unknown".to_string(), }, true, ) .field( "rating", - if let Some(avg) = statistics.rating.average { - avg.to_string() - } else { - "unknown".to_string() + match statistics.rating.average { + Some(avg) => avg.to_string(), + None => "unknown".to_string(), }, true, ) .field("follows", statistics.follows.to_string(), true) .field( "content rating", - if let Some(content_rating) = manga.content_rating { - content_rating.to_string() - } else { - "unknown".to_string() + match manga.content_rating { + Some(content_rating) => content_rating.to_string(), + None => "unknown".to_string(), }, true, ) .field("tags", tags, false), ), ) - .await?; + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when editing message"))?; } } Ok(()) } #[tokio::main] -async fn main() -> Result<(), anyhow::Error> { +async fn main() -> anyhow::Result<()> { let _ = dotenvy::dotenv(); let _ = &*STARTUP_TIME; - tracing_subscriber::fmt() - .with_env_filter( - EnvFilter::builder() + tracing_subscriber::registry() + .with( + tracing_subscriber::EnvFilter::builder() .with_default_directive(LevelFilter::INFO.into()) .from_env_lossy(), ) + .with(tracing_subscriber::fmt::layer()) .init(); tracing::info!("initializing... please wait warmly."); @@ -204,77 +214,82 @@ async fn main() -> Result<(), anyhow::Error> { serenity::GatewayIntents::non_privileged() | serenity::GatewayIntents::MESSAGE_CONTENT; tracing::info!("initializing database connection..."); - let db = Database::connect(db_url).await?; + let db_opts = ConnectOptions::new(db_url) + .sqlx_logging_level(tracing::log::LevelFilter::Debug) + .to_owned(); + let db = Database::connect(db_opts).await?; Migrator::up(&db, None).await?; tracing::info!("initializing mangadex client..."); - let md_client_id = std::env::var("MANGADEX_CLIENT_ID").map_err(|_| { + let md_client_id = std::env::var("MANGADEX_CLIENT_ID").inspect_err(|_| { tracing::warn!("missing mangadex client id. manga commands will not be initialized."); }); - let md_client_secret = std::env::var("MANGADEX_CLIENT_SECRET").map_err(|_| { + let md_client_secret = std::env::var("MANGADEX_CLIENT_SECRET").inspect_err(|_| { tracing::warn!("missing mangadex client secret. manga commands will not be initialized."); }); - let md_mdlist_id = std::env::var("MANGADEX_MDLIST_ID").map_err(|_| { + let md_mdlist_id = std::env::var("MANGADEX_MDLIST_ID").inspect_err(|_| { tracing::warn!("missing mangadex mdlist id. manga commands will not be initialized."); }); - let md_username = std::env::var("MANGADEX_USERNAME").map_err(|_| { + let md_username = std::env::var("MANGADEX_USERNAME").inspect_err(|_| { tracing::warn!("missing mangadex username. mdlist commands will not be initialized."); }); - let md_password = std::env::var("MANGADEX_PASSWORD").map_err(|_| { + let md_password = std::env::var("MANGADEX_PASSWORD").inspect_err(|_| { tracing::warn!("missing mangadex password. mdlist commands will not be initialized."); }); - let md = if let (Ok(client_id), Ok(client_secret)) = (md_client_id, md_client_secret) { - let md_client = MangaDexClient::default(); - - md_client - .set_client_info(&ClientInfo { - client_id, - client_secret, - }) - .await?; + let md = match (md_client_id, md_client_secret) { + (Ok(client_id), Ok(client_secret)) => { + let md_client = MangaDexClient::default(); - if let (Ok(username), Ok(password)) = (md_username, md_password) { - tracing::info!("logging in to mangadex..."); md_client - .oauth() - .login() - .username(Username::parse(username)?) - .password(Password::parse(password)?) - .send() - .await - .map_err(|e| { - tracing::warn!("failed to login to mangadex: {:?}", e); - e - })?; - } + .set_client_info(&ClientInfo { + client_id, + client_secret, + }) + .await?; - Some(md_client) - } else { - None - }; + if let (Ok(username), Ok(password)) = (md_username, md_password) { + tracing::info!("logging in to mangadex..."); + md_client + .oauth() + .login() + .username(Username::parse(username)?) + .password(Password::parse(password)?) + .send() + .await + .inspect_err( + |e| tracing::warn!(err = ?e, "an error occurred when logging into mangadex"), + )?; + } - let manga_update_channel_id = if let Ok(id) = std::env::var("MANGA_UPDATE_CHANNEL_ID") { - if let Ok(id) = id.parse::() { - tracing::info!("watching channel with id {} for mangadex links.", id); - Some(ChannelId::new(id)) - } else { - tracing::warn!("invalid channel id found. mangadex links will not be watched."); - None + Some(md_client) } - } else { - tracing::warn!("no manga update channel id found. mangadex links will not be watched."); - None + _ => None, }; - let mdlist_id = if let Ok(mdlist_id) = md_mdlist_id { - if let Ok(id) = uuid::Uuid::try_parse(&mdlist_id) { - Some(id) - } else { + let manga_update_channel_id = match std::env::var("MANGA_UPDATE_CHANNEL_ID") { + Ok(id) => match id.parse::() { + Ok(id) => { + tracing::info!("watching channel with id {} for mangadex links.", id); + Some(ChannelId::new(id)) + } + _ => { + tracing::warn!("invalid channel id found. mangadex links will not be watched."); + None + } + }, + _ => { + tracing::warn!("no manga update channel id found. mangadex links will not be watched."); None } - } else { - None + }; + + let mdlist_id = match md_mdlist_id { + Ok(mdlist_id) => match uuid::Uuid::try_parse(&mdlist_id) { + Ok(id) => Some(id), + _ => None, + }, + _ => None, }; let data = Data { @@ -306,9 +321,12 @@ async fn main() -> Result<(), anyhow::Error> { }) .setup(|ctx, _ready, framework| { Box::pin(async move { - poise::builtins::register_globally(ctx, &framework.options().commands).await?; + poise::builtins::register_globally(ctx, &framework.options().commands) + .await + .inspect_err(|e| tracing::error!(err = ?e, "an error occurred when registering commands"))?; + Ok(data) - }) + }.in_current_span()) }) .build(); @@ -332,21 +350,28 @@ async fn main() -> Result<(), anyhow::Error> { if data_clone.md.is_some() && webhook_url.is_ok() { tracing::info!("initialized chapter tracker!"); let http = serenity::Http::new(&token); - let webhook = serenity::Webhook::from_url(&http, &webhook_url.unwrap()).await?; - - let tracker_handle = tokio::spawn(async move { - let interval = tokio::time::interval(std::time::Duration::from_secs(7200)); - let task = futures::stream::unfold(interval, |mut interval| async { - interval.tick().await; - let _ = chapter_tracker::chapter_tracker(&http, &webhook, &data_clone).await; - - Some(((), interval)) - }); - - task.for_each(|_| async {}).await; - }); - tracker_handle.await?; + let webhook = serenity::Webhook::from_url(&http, &webhook_url.unwrap()) + .await + .inspect_err( + |e| tracing::error!(err = ?e, "an error occurred when creating webhook"), + )?; + + tokio::spawn( + async move { + let interval = tokio::time::interval(std::time::Duration::from_secs(7200)); + let task = futures::stream::unfold(interval, |mut interval| async { + interval.tick().await; + let _ = chapter_tracker::chapter_tracker(&http, &webhook, &data_clone).await; + + Some(((), interval)) + }); + + task.for_each(|_| async {}).await; + } + .in_current_span(), + ); } + bot_handle.await?; Ok(())