From fb1da5af11c80642bb149f894560cab55aa964fe Mon Sep 17 00:00:00 2001 From: akarras Date: Thu, 1 Feb 2024 20:27:01 -0700 Subject: [PATCH] update dependencies --- Cargo.lock | 766 ++++++++++++------ Cargo.toml | 15 +- ultros-frontend/ultros-app/Cargo.toml | 7 +- ultros-frontend/ultros-app/src/api.rs | 33 +- .../src/components/cheapest_price.rs | 2 +- .../src/components/recently_viewed.rs | 27 +- .../src/components/related_items.rs | 51 +- .../ultros-app/src/global_state/cookies.rs | 6 +- ultros-frontend/ultros-client/Cargo.toml | 6 +- ultros/Cargo.toml | 13 +- ultros/src/leptos.rs | 17 +- ultros/src/web.rs | 29 +- ultros/src/web/api/cheapest_per_world.rs | 2 +- ultros/src/web/api/recent_sales.rs | 2 +- ultros/src/web/country_code_decoder.rs | 16 +- ultros/src/web/error.rs | 2 +- ultros/src/web/item_card.rs | 6 +- ultros/src/web/oauth.rs | 3 +- ultros/src/web/sitemap.rs | 2 +- ultros/src/web_metrics.rs | 10 +- universalis/Cargo.toml | 2 +- 21 files changed, 652 insertions(+), 365 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a47c7d10..2ee2b59f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,9 +143,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" [[package]] name = "anstyle-parse" @@ -227,20 +227,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-compression" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" -dependencies = [ - "brotli", - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", -] - [[package]] name = "async-compression" version = "0.4.6" @@ -253,6 +239,8 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", + "zstd", + "zstd-safe", ] [[package]] @@ -277,7 +265,7 @@ checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel 2.1.1", "async-executor", - "async-io 2.3.0", + "async-io 2.3.1", "async-lock 3.3.0", "blocking", "futures-lite 2.2.0", @@ -307,9 +295,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ "async-lock 3.3.0", "cfg-if", @@ -439,18 +427,19 @@ dependencies = [ [[package]] name = "async-tungstenite" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e9efbe14612da0a19fb983059a0b621e9cf6225d7018ecab4f9988215540dc" +checksum = "3609af4bbf701ddaf1f6bb4e6257dff4ff8932327d0e685d3f653724c258b1ac" dependencies = [ "futures-io", "futures-util", "log", "pin-project-lite", + "rustls-pki-types", "tokio", - "tokio-rustls 0.24.1", - "tungstenite 0.20.1", - "webpki-roots 0.25.3", + "tokio-rustls 0.25.0", + "tungstenite 0.21.0", + "webpki-roots 0.26.0", ] [[package]] @@ -514,25 +503,25 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" dependencies = [ "async-trait", "axum-core", - "axum-macros", "base64 0.21.7", - "bitflags 1.3.2", "bytes", "futures-util", - "headers", - "http", - "http-body", - "hyper", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.1.0", + "hyper-util", "itoa", "matchit", "memchr", "mime", + "multer", "percent-encoding", "pin-project-lite", "rustversion", @@ -547,42 +536,48 @@ dependencies = [ "tower", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-extra" -version = "0.7.7" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a93e433be9382c737320af3924f7d5fc6f89c155cf2bf88949d8f5126fab283f" +checksum = "895ff42f72016617773af68fb90da2a9677d89c62338ec09162d4909d86fdd8f" dependencies = [ "axum", "axum-core", "bytes", - "cookie", + "cookie 0.18.0", "futures-util", - "http", - "http-body", + "headers", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", "mime", "pin-project-lite", "serde", - "tokio", "tower", "tower-layer", "tower-service", @@ -590,9 +585,9 @@ dependencies = [ [[package]] name = "axum-macros" -version = "0.3.8" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdca6a10ecad987bda04e95606ef85a5417dcaac1a78455242d72e031e2b6b62" +checksum = "00c055ee2d014ae5981ce1016374e8213682aa14d9bf40e48ab48b5f3ef20eaa" dependencies = [ "heck", "proc-macro2", @@ -792,15 +787,15 @@ dependencies = [ [[package]] name = "bson" -version = "2.8.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c18b51216e1f74b9d769cead6ace2f82b965b807e3d73330aabe9faec31c84" +checksum = "ce21468c1c9c154a85696bb25c20582511438edb6ad67f846ba1378ffdd80222" dependencies = [ "ahash 0.8.7", "base64 0.13.1", "bitvec", "hex", - "indexmap 1.9.3", + "indexmap 2.2.1", "js-sys", "once_cell", "rand", @@ -842,9 +837,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" [[package]] name = "byteorder" @@ -886,9 +881,9 @@ dependencies = [ [[package]] name = "cached_proc_macro_types" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" +checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "camino" @@ -920,9 +915,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" dependencies = [ "android-tzdata", "iana-time-zone", @@ -930,14 +925,14 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] name = "ciborium" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -946,18 +941,18 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 1.8.2", + "half", ] [[package]] @@ -1144,6 +1139,17 @@ name = "cookie" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cookie" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd91cf61412820176e137621345ee43b3f4423e589e7ae4e50d601d93e35ef8" dependencies = [ "aes-gcm", "base64 0.21.7", @@ -1332,12 +1338,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", + "darling_core 0.20.5", + "darling_macro 0.20.5", ] [[package]] @@ -1356,9 +1362,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" dependencies = [ "fnv", "ident_case", @@ -1381,11 +1387,11 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" dependencies = [ - "darling_core 0.20.3", + "darling_core 0.20.5", "quote", "syn 2.0.48", ] @@ -1422,7 +1428,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fa90da96b8fd491f5754d1f7a731f73921e3b7aa0ce333c821a0e43666ac14" dependencies = [ - "darling 0.20.3", + "darling 0.20.5", "proc-macro2", "quote", "syn 2.0.48", @@ -1630,13 +1636,13 @@ dependencies = [ [[package]] name = "exr" -version = "1.71.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832a761f35ab3e6664babfbdc6cef35a4860e816ec3916dcfd0882954e98a8a8" +checksum = "279d3efcc55e19917fff7ab3ddd6c14afb6a90881a0078465196fe2f99d08c56" dependencies = [ "bit_field", - "flume", - "half 2.2.1", + "flume 0.10.14", + "half", "lebe", "miniz_oxide", "rayon-core", @@ -1708,6 +1714,19 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e" +[[package]] +name = "flume" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "pin-project", + "spin 0.9.8", +] + [[package]] name = "flume" version = "0.11.0" @@ -1752,11 +1771,11 @@ dependencies = [ [[package]] name = "fontconfig-parser" -version = "0.5.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e258f4b5d2dcd63888c01c68413c51f565e8af99d2f7701c7b81d79ef41c4" +checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" dependencies = [ - "roxmltree", + "roxmltree 0.19.0", ] [[package]] @@ -2025,16 +2044,16 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "gloo" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd35526c28cc55c1db77aed6296de58677dbab863b118483a27845631d870249" +checksum = "d15282ece24eaf4bd338d73ef580c6714c8615155c4190c781290ee3fa0fd372" dependencies = [ "gloo-console", "gloo-dialogs", "gloo-events", "gloo-file", "gloo-history", - "gloo-net 0.4.0", + "gloo-net 0.5.0", "gloo-render", "gloo-storage", "gloo-timers 0.3.0", @@ -2097,7 +2116,7 @@ dependencies = [ "gloo-events", "gloo-utils 0.2.0", "serde", - "serde-wasm-bindgen 0.6.3", + "serde-wasm-bindgen", "serde_urlencoded", "thiserror", "wasm-bindgen", @@ -2126,15 +2145,15 @@ dependencies = [ [[package]] name = "gloo-net" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4" +checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" dependencies = [ "futures-channel", "futures-core", "futures-sink", "gloo-utils 0.2.0", - "http", + "http 0.2.11", "js-sys", "pin-project", "serde", @@ -2222,9 +2241,9 @@ dependencies = [ [[package]] name = "gloo-worker" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76495d3dd87de51da268fa3a593da118ab43eb7f8809e17eb38d3319b424e400" +checksum = "085f262d7604911c8150162529cefab3782e91adb20202e8658f7275d2aefe5d" dependencies = [ "bincode 1.3.3", "futures", @@ -2262,8 +2281,8 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.1.0", + "http 0.2.11", + "indexmap 2.2.1", "slab", "tokio", "tokio-util", @@ -2271,17 +2290,31 @@ dependencies = [ ] [[package]] -name = "half" -version = "1.8.2" +name = "h2" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.0.0", + "indexmap 2.2.1", + "slab", + "tokio", + "tokio-util", + "tracing", +] [[package]] name = "half" -version = "2.2.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" +checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" dependencies = [ + "cfg-if", "crunchy", ] @@ -2324,14 +2357,14 @@ dependencies = [ [[package]] name = "headers" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" dependencies = [ "base64 0.21.7", "bytes", "headers-core", - "http", + "http 1.0.0", "httpdate", "mime", "sha1", @@ -2339,11 +2372,11 @@ dependencies = [ [[package]] name = "headers-core" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http", + "http 1.0.0", ] [[package]] @@ -2428,6 +2461,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -2435,15 +2479,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.11", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.0.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +dependencies = [ + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", "pin-project-lite", ] [[package]] name = "http-range-header" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" +checksum = "3ce4ef31cda248bbdb6e6820603b82dfcd9e833db65a43e997a0ccec777d11fe" [[package]] name = "httparse" @@ -2473,20 +2540,39 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.24", + "http 0.2.11", + "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2 0.4.10", "tokio", "tower-service", "tracing", "want", ] +[[package]] +name = "hyper" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.2", + "http 1.0.0", + "http-body 1.0.0", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "tokio", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -2494,13 +2580,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.28", "rustls 0.21.10", "tokio", "tokio-rustls 0.24.1", ] +[[package]] +name = "hyper-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdea9aac0dbe5a9240d68cfd9501e2db94222c6dc06843e06640b9e07f0fdc67" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "hyper 1.1.0", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tracing", +] + [[package]] name = "iana-time-zone" version = "0.1.59" @@ -2792,9 +2896,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -2851,9 +2955,9 @@ checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8" [[package]] name = "inventory" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8573b2b1fb643a372c73b23f4da5f888677feef3305146d68a539250a9bccc7" +checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" [[package]] name = "io-lifetimes" @@ -2874,11 +2978,12 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "iri-string" -version = "0.4.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0f7638c1e223529f1bfdc48c8b133b9e0b434094d1d28473161ee48b235f78" +checksum = "21859b667d66a4c1dacd9df0863b3efb65785474255face87f5bca39dd8407c0" dependencies = [ - "nom", + "memchr", + "serde", ] [[package]] @@ -2913,18 +3018,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -2997,9 +3093,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "leptos" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "269ba4ba91ffa73d9559c975e0be17bd4eb34c6b6abd7fdd5704106132d89d2a" +checksum = "13156caccc40bb71d687bed455b7d644ac69ecb5a5c180c2809ba52df863a99a" dependencies = [ "cfg-if", "leptos_config", @@ -3018,10 +3114,11 @@ dependencies = [ [[package]] name = "leptos-use" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89fc1df43aeda3da8429369c4acbb319adebfee424d181568010cd115b4f647e" +source = "git+https://github.com/Synphonyte/leptos-use.git#89c2ea5ea5c36f1d22fe4ead361d78810810544a" dependencies = [ + "async-trait", "cfg-if", + "cookie 0.18.0", "default-struct-builder", "futures-util", "gloo-timers 0.3.0", @@ -3040,22 +3137,23 @@ dependencies = [ [[package]] name = "leptos_axum" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbfb557aa186ab4c3a693d3e23402805d879ead5d25096a4ab3fca06ee7688b4" +checksum = "47756bd25127a3cc5eb33535cafe7199d669fffd5f12d2a9a37757b7399556c9" dependencies = [ "axum", "cfg-if", "futures", - "http", - "hyper", + "http-body-util", "leptos", "leptos_integration_utils", + "leptos_macro", "leptos_meta", "leptos_router", "once_cell", "parking_lot", "serde_json", + "server_fn", "tokio", "tokio-util", "tracing", @@ -3063,9 +3161,9 @@ dependencies = [ [[package]] name = "leptos_config" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e72d8689d54737991831e9b279bb4fba36d27a93aa975c75cd4241d9a4a425ec" +checksum = "99cee343145b16836df6847d7da0db6f7f0a3f53f860e6b771bdeebb6da7f0ed" dependencies = [ "config", "regex", @@ -3076,9 +3174,9 @@ dependencies = [ [[package]] name = "leptos_dom" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad314950d41acb1bfdb8b5924811b2983484a8d6f69a20b834a173a682657ed4" +checksum = "bf6c02444169c390660bb8975adf064daf3f24f40b2d3f25618e5c0bbbe89cb5" dependencies = [ "async-recursion", "cfg-if", @@ -3086,8 +3184,8 @@ dependencies = [ "futures", "getrandom", "html-escape", - "indexmap 2.1.0", - "itertools 0.12.0", + "indexmap 2.2.1", + "itertools", "js-sys", "leptos_reactive", "once_cell", @@ -3106,13 +3204,13 @@ dependencies = [ [[package]] name = "leptos_hot_reload" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f62dcab17728877f2d2f16d2c8a6701c4c5fbdfb4964792924acb0b50529659" +checksum = "11bf126e9ac0597cda4156f14dea23627d90d53ade182a537b234b7e131e0096" dependencies = [ "anyhow", "camino", - "indexmap 2.1.0", + "indexmap 2.2.1", "parking_lot", "proc-macro2", "quote", @@ -3124,10 +3222,11 @@ dependencies = [ [[package]] name = "leptos_icons" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0477a66b90ed94d3b3e9472247189359426c1b6313f8589d3f2edf3fdf676b" +checksum = "584bccafed73138f4d700f936e6a82268efec2df9a2f9d74e1ee80985653413e" dependencies = [ + "bytes", "encoding_rs", "icondata_core", "lazy_static", @@ -3138,9 +3237,9 @@ dependencies = [ [[package]] name = "leptos_integration_utils" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fddda3a3b768dad90f80fb56ac6e250bc5c60755f8e3df225913aba4364ed7ee" +checksum = "55eb3cbc78aa67790799ef480270bef3d10e23f0a38e6fa3e4e42d797f931a13" dependencies = [ "futures", "leptos", @@ -3152,15 +3251,15 @@ dependencies = [ [[package]] name = "leptos_macro" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57955d66f624265222444a5c565fea38efa5b0152a1dfc7c060a78e5fb62a852" +checksum = "b859592ff768b01122733ac03a72507849e7ea2f640c63bb1c3487a5dc7a0891" dependencies = [ "attribute-derive", "cfg-if", "convert_case", "html-escape", - "itertools 0.12.0", + "itertools", "leptos_hot_reload", "prettyplease", "proc-macro-error", @@ -3175,12 +3274,12 @@ dependencies = [ [[package]] name = "leptos_meta" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc25c0f7f14ed5daf42b8d0d273ed790b0449e8ba8cff1c2fa800dc90a75acb" +checksum = "4705c24a835c3e8a158a351fee971d9efb0060a9817f719a79e22666dd112558" dependencies = [ "cfg-if", - "indexmap 2.1.0", + "indexmap 2.2.1", "leptos", "tracing", "wasm-bindgen", @@ -3189,14 +3288,14 @@ dependencies = [ [[package]] name = "leptos_reactive" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f54a525a0edfc8c2bf3ee92aae411800b8b10892c9cd819f8e8a6d4f0d62f3" +checksum = "4c5f08f2392b01cc5fc9223eeb92c70b40d366354ffbfb1c6761c9e621a8f966" dependencies = [ "base64 0.21.7", "cfg-if", "futures", - "indexmap 2.1.0", + "indexmap 2.2.1", "js-sys", "paste", "pin-project", @@ -3204,7 +3303,7 @@ dependencies = [ "rustc-hash", "self_cell", "serde", - "serde-wasm-bindgen 0.5.0", + "serde-wasm-bindgen", "serde_json", "slotmap", "thiserror", @@ -3217,14 +3316,14 @@ dependencies = [ [[package]] name = "leptos_router" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b31087173c60e25c329a1c6786756dd9ee97750b378622df4d780db160a09040" +checksum = "28334116fab9b903b31c8f6d2be254e86dd35265db6e0c0f5cfbc7b6c18ea0ef" dependencies = [ "cached", "cfg-if", "gloo-net 0.2.6", - "itertools 0.12.0", + "itertools", "js-sys", "lazy_static", "leptos", @@ -3235,6 +3334,7 @@ dependencies = [ "once_cell", "percent-encoding", "regex", + "send_wrapper", "serde", "serde_json", "serde_qs", @@ -3248,9 +3348,9 @@ dependencies = [ [[package]] name = "leptos_server" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1517c2024bc47d764e96053e55b927f8a2159e735a0cc47232542b493df9d" +checksum = "4d6baa84d07a5869261e1dc606058886f1a79d6bf89b7b138cf25bae30983b76" dependencies = [ "inventory", "lazy_static", @@ -3562,6 +3662,33 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "multer" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15d522be0a9c3e46fd2632e272d178f56387bdb5c9fbb3a36c649062e9b5219" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http 1.0.0", + "httparse", + "log", + "memchr", + "mime", + "spin 0.9.8", + "version_check", +] + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom", +] + [[package]] name = "new_debug_unreachable" version = "1.0.4" @@ -3683,7 +3810,7 @@ dependencies = [ "base64 0.13.1", "chrono", "getrandom", - "http", + "http 0.2.11", "rand", "reqwest", "serde", @@ -3913,18 +4040,18 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", @@ -4432,7 +4559,7 @@ checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.4", + "regex-automata 0.4.5", "regex-syntax 0.8.2", ] @@ -4447,9 +4574,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -4483,16 +4610,16 @@ version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "async-compression 0.4.6", + "async-compression", "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.24", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.28", "hyper-rustls", "ipnet", "js-sys", @@ -4515,7 +4642,7 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", + "wasm-streams 0.3.0", "web-sys", "webpki-roots 0.25.3", "winreg", @@ -4541,16 +4668,16 @@ dependencies = [ [[package]] name = "rexie" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef172ff9cdf146cdc934e28cdeb137517bf954fb75e6ee8987dd44b58f351b1" +checksum = "d34618a20b14cebebc63f8b1c5228116e7379765e8f1b7a9f66b5920babd8595" dependencies = [ - "console_error_panic_hook", "js-sys", "num-traits", "thiserror", "tokio", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] @@ -4628,7 +4755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad747e7384940e7bf33b15ba433b7bad9f44c0c6d5287a67c2cb22cd1743d497" dependencies = [ "log", - "roxmltree", + "roxmltree 0.18.1", "simplecss", "siphasher", "svgtypes", @@ -4643,6 +4770,12 @@ dependencies = [ "xmlparser", ] +[[package]] +name = "roxmltree" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" + [[package]] name = "rsa" version = "0.9.6" @@ -4761,10 +4894,24 @@ checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring 0.17.7", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-pki-types", + "rustls-webpki 0.102.1", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -4774,6 +4921,12 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pki-types" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9d979b3ce68192e42760c7810125eb6cf2ea10efae545a156063e61f314e2a" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -4784,6 +4937,17 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef4ca26037c909dedb327b48c3327d0ba91d3dd3c4e05dad328f210ffb68e95b" +dependencies = [ + "ring 0.17.7", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -4852,9 +5016,9 @@ dependencies = [ [[package]] name = "sea-orm" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f66e2129991acd51fcad7b59da1edd862edca69773cc9a19cb17b967fae2fb" +checksum = "0cbf88748872fa54192476d6d49d0775e208566a72656e267e45f6980b926c8d" dependencies = [ "async-stream", "async-trait", @@ -4880,9 +5044,9 @@ dependencies = [ [[package]] name = "sea-orm-cli" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747f032e4abd58a6cacdb21275cc13448b4ff4b368f5f578ece465957ae7b417" +checksum = "9f17eb697616be2f3e4ea3b468a44cfb6848750dec522fdef4caa44bf5a02beb" dependencies = [ "chrono", "clap", @@ -4897,9 +5061,9 @@ dependencies = [ [[package]] name = "sea-orm-macros" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03da1864306242678ac3b6567e69f70dd1252a72742baa23a4d92d2d45da3fc" +checksum = "e0dbc880d47aa53c6a572e39c99402c7fad59b50766e51e0b0fc1306510b0555" dependencies = [ "heck", "proc-macro2", @@ -4911,9 +5075,9 @@ dependencies = [ [[package]] name = "sea-orm-migration" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "412643baf225b37ae1313c0344c10bff6ec1fae72cdec1c7b591cc7c833134d2" +checksum = "e42807e13d38edd4cc1f9cbb370df898d43a9a143f6161dcdb8424a6de002def" dependencies = [ "async-trait", "clap", @@ -5025,11 +5189,20 @@ version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +dependencies = [ + "futures-core", +] + [[package]] name = "serde" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] @@ -5044,17 +5217,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde-wasm-bindgen" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e" -dependencies = [ - "js-sys", - "serde", - "wasm-bindgen", -] - [[package]] name = "serde-wasm-bindgen" version = "0.6.3" @@ -5077,9 +5239,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", @@ -5088,11 +5250,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.1", "itoa", "ryu", "serde", @@ -5142,15 +5304,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58c3a1b3e418f61c25b2aeb43fc6c95eaa252b8cecdda67f401943e9e08d33f" +checksum = "1b0ed1662c5a68664f45b76d18deb0e234aff37207086803165c961eb695e981" dependencies = [ "base64 0.21.7", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.1.0", + "indexmap 2.2.1", "serde", "serde_json", "serde_with_macros", @@ -5159,11 +5321,11 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2068b437a31fc68f25dd7edc296b078f04b45145c199d8eed9866e45f1ff274" +checksum = "568577ff0ef47b879f736cd66740e022f3672788cdf002a05a4e609ea5a6fb15" dependencies = [ - "darling 0.20.3", + "darling 0.20.5", "proc-macro2", "quote", "syn 2.0.48", @@ -5203,49 +5365,58 @@ dependencies = [ [[package]] name = "server_fn" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c265de965fe48e09ad8899d0ab1ffebdfa1a9914e4de5ff107b07bd94cf7541" +checksum = "f27208122b0fa6d2b90b7dc25de60294e28647efd43b4c8abaf7df86227931a5" dependencies = [ + "axum", + "bytes", "ciborium", "const_format", - "gloo-net 0.2.6", + "dashmap", + "futures", + "gloo-net 0.5.0", + "http 1.0.0", + "http-body-util", + "hyper 1.1.0", "inventory", "js-sys", - "lazy_static", "once_cell", - "proc-macro2", - "quote", - "reqwest", + "send_wrapper", "serde", "serde_json", "serde_qs", "server_fn_macro_default", - "syn 2.0.48", "thiserror", + "tower", + "tower-layer", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.4.0", + "web-sys", "xxhash-rust", ] [[package]] name = "server_fn_macro" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f77000541a62ceeec01eef3ee0f86c155c33dac5fae750ad04a40852c6d5469a" +checksum = "a8d7a5a1c0f78f261dbb8cf16281020552a1d518dbcb8501b33b8edae02b781b" dependencies = [ "const_format", - "proc-macro-error", + "convert_case", "proc-macro2", "quote", - "serde", "syn 2.0.48", "xxhash-rust", ] [[package]] name = "server_fn_macro_default" -version = "0.5.7" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3353f22e2bcc451074d4feaa37317d9d17dff11d4311928384734ea17ab9ca" +checksum = "29d13a68cc5b1ff8a3259e3ae984b91559268f0e5a7a8b0216f55b05307df5cb" dependencies = [ "server_fn_macro", "syn 2.0.48", @@ -5431,7 +5602,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ - "itertools 0.12.0", + "itertools", "nom", "unicode_categories", ] @@ -5473,7 +5644,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.1.0", + "indexmap 2.2.1", "log", "memchr", "once_cell", @@ -5637,7 +5808,7 @@ checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" dependencies = [ "atoi", "chrono", - "flume", + "flume 0.11.0", "futures-channel", "futures-core", "futures-executor", @@ -6047,6 +6218,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.2", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -6061,14 +6243,14 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", "tokio", - "tungstenite 0.20.1", + "tungstenite 0.21.0", ] [[package]] @@ -6108,7 +6290,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.1", "toml_datetime", "winnow", ] @@ -6119,7 +6301,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.1", "toml_datetime", "winnow", ] @@ -6142,18 +6324,19 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +checksum = "0da193277a4e2c33e59e09b5861580c33dd0a637c3883d0fa74ba40c0374af2e" dependencies = [ - "async-compression 0.3.15", - "base64 0.13.1", - "bitflags 1.3.2", + "async-compression", + "base64 0.21.7", + "bitflags 2.4.2", "bytes", "futures-core", "futures-util", - "http", - "http-body", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", "http-range-header", "httpdate", "iri-string", @@ -6277,7 +6460,7 @@ dependencies = [ "base64 0.13.1", "byteorder", "bytes", - "http", + "http 0.2.11", "httparse", "log", "rand", @@ -6291,18 +6474,19 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.0.0", "httparse", "log", "rand", - "rustls 0.21.10", + "rustls 0.22.2", + "rustls-pki-types", "sha1", "thiserror", "url", @@ -6349,15 +6533,18 @@ dependencies = [ "async-trait", "axum", "axum-extra", + "axum-macros", "base64 0.21.7", "chrono", + "cookie 0.18.0", "futures", "git-const", - "hyper", + "http-body-util", + "hyper 1.1.0", "image", "include_dir", "isocountry", - "itertools 0.11.0", + "itertools", "leptos", "leptos_axum", "leptos_router", @@ -6406,18 +6593,19 @@ name = "ultros-app" version = "0.1.0" dependencies = [ "anyhow", + "axum", "cfg-if", "chrono", "colorsys", - "cookie", + "cookie 0.17.0", "futures", "git-const", "gloo", - "gloo-net 0.4.0", + "gloo-net 0.5.0", "gloo-timers 0.3.0", "humantime", "icondata", - "itertools 0.12.0", + "itertools", "js-sys", "leptos", "leptos-use", @@ -6455,7 +6643,7 @@ dependencies = [ "anyhow", "chrono", "image", - "itertools 0.12.0", + "itertools", "log", "plotters", "ultros-api-types", @@ -6472,13 +6660,13 @@ dependencies = [ "console_error_panic_hook", "console_log", "futures", - "gloo-net 0.4.0", + "gloo-net 0.5.0", "leptos", "leptos_meta", "log", "rexie", "serde", - "serde-wasm-bindgen 0.5.0", + "serde-wasm-bindgen", "serde_bytes", "serde_json", "ultros-api-types", @@ -6495,7 +6683,7 @@ dependencies = [ "anyhow", "chrono", "futures", - "itertools 0.12.0", + "itertools", "metrics", "migration", "sea-orm", @@ -6621,7 +6809,7 @@ dependencies = [ name = "universalis" version = "0.1.0" dependencies = [ - "async-tungstenite 0.23.0", + "async-tungstenite 0.24.0", "bson", "chrono", "clap", @@ -6763,9 +6951,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cdbaf5e132e593e9fc1de6a15bbec912395b11fb9719e061cf64f804524c503" +checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" [[package]] name = "vcpkg" @@ -6895,6 +7083,19 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.67" @@ -6939,11 +7140,20 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +[[package]] +name = "webpki-roots" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de2cfda980f21be5a7ed2eadb3e6fe074d56022bea2cdeb1a62eb220fc04188" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "whoami" @@ -7125,9 +7335,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.34" +version = "0.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +checksum = "1931d78a9c73861da0134f453bb1f790ce49b2e30eba8410b4b79bac72b46a2d" dependencies = [ "memchr", ] @@ -7292,6 +7502,34 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +[[package]] +name = "zstd" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "zune-inflate" version = "0.2.54" diff --git a/Cargo.toml b/Cargo.toml index 69f15523..3e0ac0ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,19 +13,21 @@ members = [ resolver = "2" [workspace.dependencies] +axum = {version = "0.7.4", features = ["ws", "json"]} +axum-extra = {version = "0.9.2", features = ["cookie", "cookie-private", "typed-header"]} tokio = {version = "1", features = ["full"]} tracing = "0.1.36" tracing-subscriber = "0.3" futures = "0.3.24" anyhow = "1.0.72" -leptos = { version = "0.5.7", default-features = false, features = [ +leptos = { version = "0.6.4", default-features = false, features = [ "serde", "nightly" ] } -leptos_axum = { version = "0.5.7" } -leptos_router = { version = "0.5.7", default-features = false, features = ["nightly"] } -leptos_meta = { version = "0.5.7", default-features = false, features = ["nightly"] } -leptos-use = { verion = "0.9.0", features = ["serde"] } +leptos_axum = { version = "0.6.4" } +leptos_router = { version = "0.6.4", default-features = false, features = ["nightly"] } +leptos_meta = { version = "0.6.4", default-features = false, features = ["nightly"] } +leptos-use = { git = "https://github.com/Synphonyte/leptos-use.git", features = ["serde"] } chrono = "0.4.23" itertools = "0.12.0" image = "0.24.6" @@ -37,9 +39,10 @@ yoke = "0.7.1" xiv-gen = {path = "./xiv-gen", features = ["item", "item_ui_category", "item_search_category", "class_job", "recipe", "class_job_category", "base_param", "item_sort_category"]} icondata = "0.3" -leptos_icons = {version = "0.2.1" } +leptos_icons = {version = "0.3.0" } cfg-if = "1.0.0" git-const = "1.1.0" +gloo-net = {version = "0.5.0", features = ["http", "websocket"]} [patch.crates-io] #leptos = { git = "https://github.com/leptos-rs/leptos.git" } diff --git a/ultros-frontend/ultros-app/Cargo.toml b/ultros-frontend/ultros-app/Cargo.toml index 5948616c..33c7d697 100644 --- a/ultros-frontend/ultros-app/Cargo.toml +++ b/ultros-frontend/ultros-app/Cargo.toml @@ -10,13 +10,14 @@ leptos = { workspace = true, features = ["nightly"] } leptos_meta = { workspace = true, features = ["nightly"] } leptos_router = { workspace = true, features = ["nightly"] } leptos_axum = { workspace = true, optional = true } +axum = { workspace = true, optional = true } leptos-use = { workspace = true } xiv-gen-db = {path = "../../xiv-gen-db"} xiv-gen.workspace = true sublime_fuzzy = "0.7" reqwest = {version = "0.11.0", optional = true, default-features = false, features = ["json", "rustls-tls", "brotli", "gzip", "deflate"]} -gloo-net = {version = "0.4", optional = true, features = ["http", "websocket"]} -gloo = {version = "0.10.0", optional = true} +gloo-net = {workspace = true, optional = true} +gloo = {version = "0.11.0", optional = true} web-sys = {version = "0.3", optional = true, features = ["AbortController", "Clipboard", "Window", "Navigator", "HtmlCanvasElement", "HtmlDivElement", "HtmlElement", "HtmlDocument"]} ultros-api-types = {path = "../../ultros-api-types"} ultros-db = {path = "../../ultros-db", optional = true} @@ -51,4 +52,4 @@ percent-encoding = "2.3.0" [features] default = ["ssr"] # this is mostly so if I run cargo check, it has a flavor to work on hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate", "gloo", "gloo-net", "web-sys", "wasm-bindgen", "time/wasm-bindgen", "js-sys"] -ssr = ["leptos/ssr", "leptos_meta/ssr", "leptos_router/ssr", "reqwest", "leptos_axum", "web-sys", "ultros-db", "xiv-gen-db/embed", "leptos-use/ssr"] +ssr = ["leptos/ssr", "leptos_meta/ssr", "leptos_router/ssr", "reqwest", "leptos_axum", "web-sys", "ultros-db", "xiv-gen-db/embed", "leptos-use/ssr", "axum"] diff --git a/ultros-frontend/ultros-app/src/api.rs b/ultros-frontend/ultros-app/src/api.rs index 32343e3c..8fcbc2b4 100644 --- a/ultros-frontend/ultros-app/src/api.rs +++ b/ultros-frontend/ultros-app/src/api.rs @@ -319,6 +319,7 @@ pub(crate) async fn delete_api(path: &str) -> AppResult where T: Serializable, { + use axum::http::request::Parts; // use the original headers of the scope // add the hostname when using the ssr path. use tracing::Instrument; @@ -330,13 +331,22 @@ where .build() .unwrap() }); - let req_parts = use_context::().ok_or(AppError::ParamMissing)?; + let req_parts = use_context::().ok_or(AppError::ParamMissing)?; let headers = req_parts.headers; let hostname = "http://localhost:8080"; let path = format!("{hostname}{path}"); // headers.remove("Accept-Encoding"); - - let request = client.delete(&path).headers(headers).build()?; + // this is only necessary because reqwest isn't updated to http 1.0- and I'm being lazy + let mut new_map = reqwest::header::HeaderMap::new(); + for (name, value) in headers.into_iter().filter_map(|(name, value)| { + Some(( + reqwest::header::HeaderName::from_lowercase(name?.as_str().as_bytes()).ok()?, + reqwest::header::HeaderValue::from_bytes(value.as_bytes()).ok()?, + )) + }) { + new_map.insert(name, value); + } + let request = client.delete(&path).headers(new_map).build()?; let json = client .execute(request) .await @@ -388,6 +398,7 @@ where { // use the original headers of the scope // add the hostname when using the ssr path. + use axum::http::request::Parts; use tracing::Instrument; static CLIENT: std::sync::OnceLock = std::sync::OnceLock::new(); @@ -397,13 +408,21 @@ where .build() .unwrap() }); - let req_parts = use_context::().ok_or(AppError::ParamMissing)?; + let req_parts = use_context::().ok_or(AppError::ParamMissing)?; let headers = req_parts.headers; let hostname = "http://localhost:8080"; let path = format!("{hostname}{path}"); - // headers.remove("Accept-Encoding"); - - let request = client.get(&path).headers(headers).build()?; + // this is only necessary because reqwest isn't updated to http 1.0- and I'm being lazy + let mut new_map = reqwest::header::HeaderMap::new(); + for (name, value) in headers.into_iter().filter_map(|(name, value)| { + Some(( + reqwest::header::HeaderName::from_lowercase(name?.as_str().as_bytes()).ok()?, + reqwest::header::HeaderValue::from_bytes(value.as_bytes()).ok()?, + )) + }) { + new_map.insert(name, value); + } + let request = client.get(&path).headers(new_map).build()?; let json = client .execute(request) .await diff --git a/ultros-frontend/ultros-app/src/components/cheapest_price.rs b/ultros-frontend/ultros-app/src/components/cheapest_price.rs index 28f1fa86..4b9e19ea 100644 --- a/ultros-frontend/ultros-app/src/components/cheapest_price.rs +++ b/ultros-frontend/ultros-app/src/components/cheapest_price.rs @@ -34,7 +34,7 @@ pub fn CheapestPrice(item_id: ItemId, #[prop(optional)] show_hq: Option) - }.into_view() - }).unwrap_or(view!{"----"}.into_view()) + }).unwrap_or("----".into_view()) }) })} diff --git a/ultros-frontend/ultros-app/src/components/recently_viewed.rs b/ultros-frontend/ultros-app/src/components/recently_viewed.rs index 540be581..3bd79ca4 100644 --- a/ultros-frontend/ultros-app/src/components/recently_viewed.rs +++ b/ultros-frontend/ultros-app/src/components/recently_viewed.rs @@ -1,22 +1,20 @@ use std::collections::VecDeque; use leptos::*; -#[cfg(feature = "hydrate")] -use leptos_use::storage::{use_local_storage, JsonCodec}; +use leptos_use::storage::use_local_storage; use crate::components::{search_result::ItemSearchResult, skeleton::BoxSkeleton}; #[derive(Clone, Copy)] pub struct RecentItems { - #[cfg(feature = "hydrate")] read_signal: Signal>, - #[cfg(feature = "hydrate")] write_signal: WriteSignal>, } impl RecentItems { - #[cfg(feature = "hydrate")] pub fn new() -> Self { + use leptos_use::utils::JsonCodec; + let (read_signal, write_signal, _delete_fn) = use_local_storage::, JsonCodec>("recently_viewed"); Self { @@ -25,22 +23,10 @@ impl RecentItems { } } - #[cfg(not(feature = "hydrate"))] - pub fn new() -> Self { - Self {} - } - - #[cfg(feature = "hydrate")] pub fn reader(&self) -> Signal> { self.read_signal } - #[cfg(not(feature = "hydrate"))] - pub fn reader(&self) -> Signal> { - create_memo(|_| VecDeque::new()).into() - } - - #[cfg(feature = "hydrate")] pub fn add_item(&self, item_id: i32) { use itertools::Itertools; @@ -52,13 +38,6 @@ impl RecentItems { } }); } - - #[cfg(not(feature = "hydrate"))] - pub fn add_item(&self, _item_id: i32) { - use log::warn; - - warn!("added item to recently view ssr side."); - } } #[component] diff --git a/ultros-frontend/ultros-app/src/components/related_items.rs b/ultros-frontend/ultros-app/src/components/related_items.rs index 129e6cd6..f8552341 100644 --- a/ultros-frontend/ultros-app/src/components/related_items.rs +++ b/ultros-frontend/ultros-app/src/components/related_items.rs @@ -10,6 +10,32 @@ use crate::{ use super::{cheapest_price::*, gil::*, small_item_display::*}; +/// Matches against items that start with the same prefix +/// "Diadochos" -> "Diadochos Helmet" etc +fn prefix_item_iterator(item: &'static Item) -> impl Iterator { + let items = &xiv_gen_db::data().items; + let prefix = item.name.split_once(' ').map(|(prefix, _)| prefix); + items.values().filter(move |f| { + if let Some(prefix) = prefix { + f.name.starts_with(prefix) && f.item_search_category.0 != 0 && f.level_item.0 == item.level_item.0 + } else { + false + } + }) +} + +fn suffix_item_iterator(item: &'static Item) -> impl Iterator { + let items = &xiv_gen_db::data().items; + let suffix = item.name.rsplit_once(' ').map(|(_, suffix)| suffix); + items.values().filter(move |f| { + if let Some(suffix) = suffix { + f.name.ends_with(suffix) && f.item_search_category.0 != 0 && f.level_item.0 == item.level_item.0 + } else { + false + } + }) +} + /// This iterator will attempt to find related items using the classjobcategory && ilvl fn item_set_iter(item: &'static Item) -> impl Iterator { let items = &xiv_gen_db::data().items; @@ -20,7 +46,7 @@ fn item_set_iter(item: &'static Item) -> impl Iterator { && item.class_job_category.0 == i.class_job_category.0 && item.level_item.0 == i.level_item.0 && i.key_id != item.key_id - && item.item_search_category.0 != 0 + && item.item_search_category.0 > 0 }) .sorted_by_key(|i| i.key_id.0) } @@ -126,32 +152,39 @@ fn Recipe(recipe: &'static Recipe) -> impl IntoView { pub fn RelatedItems(#[prop(into)] item_id: Signal) -> impl IntoView { let db = xiv_gen_db::data(); let item = create_memo(move |_| db.items.get(&ItemId(item_id()))); - let item_set = create_memo(move |_| { + let item_set = move || { item() .map(|item| { item_set_iter(item) + .chain(prefix_item_iterator(item)) + .chain(suffix_item_iterator(item)) + .unique_by(|i| i.key_id) + .filter(|i| i.item_search_category.0 > 0) .map(|item| { view! { - +
+ +
"price: "
+
} }) - .take(30) + .take(15) .collect::>() }) .unwrap_or_default() - }); + }; let recipes = create_memo(move |_| { recipe_tree_iter(ItemId(item_id())) .map(|recipe| view! {}) - .take(10) + .take(30) .collect::>() }); - view! {
+ view! {
"related items" -
{item_set}
+
{item_set}
-
+
"crafting recipes"
{recipes}
diff --git a/ultros-frontend/ultros-app/src/global_state/cookies.rs b/ultros-frontend/ultros-app/src/global_state/cookies.rs index eefbe798..ab400789 100644 --- a/ultros-frontend/ultros-app/src/global_state/cookies.rs +++ b/ultros-frontend/ultros-app/src/global_state/cookies.rs @@ -153,9 +153,9 @@ pub(crate) fn get_cookies() -> Option { #[cfg(feature = "ssr")] pub(crate) fn get_cookies() -> Option { - use leptos_axum::RequestParts; - let cookies = use_context::()?; - let cookie = cookies.headers.get("Cookie")?; + use axum::http::request::Parts; + let request_parts = use_context::()?; + let cookie = request_parts.headers.get("Cookie")?; let value = cookie.to_str().ok()?.to_string(); let mut cookie_jar = CookieJar::new(); for cookie in Cookie::split_parse_encoded(value) { diff --git a/ultros-frontend/ultros-client/Cargo.toml b/ultros-frontend/ultros-client/Cargo.toml index effe3dee..57fbb712 100644 --- a/ultros-frontend/ultros-client/Cargo.toml +++ b/ultros-frontend/ultros-client/Cargo.toml @@ -20,16 +20,16 @@ wasm-bindgen = "0.2" console_log = "1.0.0" console_error_panic_hook = "0.1" leptos_meta = { workspace = true, default-features = false } -gloo-net = "0.4.0" +gloo-net.workspace = true xiv-gen-db = {path = "../../xiv-gen-db"} xiv-gen = {path = "../../xiv-gen"} futures = "0.3" serde = {version = "1", features = ["derive"]} -serde-wasm-bindgen = "0.5" +serde-wasm-bindgen = "0.6.3" serde_bytes = "0.11" serde_json = "1" anyhow.workspace = true -rexie = "0.4" +rexie = "0.5" [features] default = ["hydrate"] diff --git a/ultros/Cargo.toml b/ultros/Cargo.toml index c344855a..521c20a2 100644 --- a/ultros/Cargo.toml +++ b/ultros/Cargo.toml @@ -9,8 +9,10 @@ edition = "2021" universalis = {path = "../universalis", features = ["websocket"]} ultros-db = {path = "../ultros-db"} anyhow = {workspace = true} -axum = {version = "0.6.0", features = ["ws", "headers", "json"]} -axum-extra = {version = "0.7.4", features = ["cookie", "cookie-private"]} +axum.workspace = true +axum-extra.workspace = true +axum-macros = "0.4.1" +cookie = "0.18" xiv-gen-db = {path = "../xiv-gen-db", features = ["embed"]} poise = {version = "0.5.6"} chrono = "0.4.23" @@ -31,11 +33,11 @@ thiserror = "1.0.36" metrics = "0.22.0" metrics-exporter-prometheus = {version = "0.13.0", default-features = false} serde_with = "3.0.0" -tower-http = {version = "0.3.5", features = ["full"]} +tower-http = {version = "0.5.1", features = ["full"]} sha2 = "0.10.6" base64 = "0.21.0" smallvec = {version = "1.10.0", features = ["const_generics", "const_new", "union"]} -itertools = "0.11.0" +itertools = "0.12.0" sitemap-rs = "0.2.0" ultros-api-types = {path = "../ultros-api-types"} ultros-xiv-icons = {path = "../ultros-frontend/ultros-xiv-icons"} @@ -43,7 +45,7 @@ leptos = {workspace = true, features = ["ssr"]} leptos_axum.workspace = true leptos_router = {workspace = true, features = ["ssr"]} ultros-app = {path = "../ultros-frontend/ultros-app", features = ["ssr"]} -hyper = "0.14.24" +hyper = "1.1.0" tokio-stream = {version = "0.1.12", features = ["sync"]} ultros-charts = {path = "../ultros-frontend/ultros-charts", features = ["image"]} plotters-svg = {version = "0.3.2", features = ["bitmap_encoder"]} @@ -51,3 +53,4 @@ resvg = "0.33.0" image.workspace = true isocountry = "0.3.2" git-const.workspace = true +http-body-util = "0.1.0" diff --git a/ultros/src/leptos.rs b/ultros/src/leptos.rs index 939eecde..c397d2a1 100644 --- a/ultros/src/leptos.rs +++ b/ultros/src/leptos.rs @@ -14,7 +14,7 @@ use axum::{ Extension, Router, }; use git_const::git_short_hash; -use hyper::{body::HttpBody, header}; +use hyper::header; use leptos::*; use leptos_axum::generate_route_list; use leptos_router::RouteListing; @@ -67,7 +67,8 @@ pub(crate) async fn create_leptos_app( //let pkg_service = HandleError::new(ServeDir::new("./pkg"), handle_file_error); let git_hash = git_short_hash!(); leptos_options.site_pkg_dir = ["pkg/", git_hash].concat(); - let cargo_leptos_service = HandleError::new(ServeDir::new(&bundle_filepath), handle_file_error); + // let cargo_leptos_service = HandleError::new(ServeDir::new(&bundle_filepath), handle_file_error); + let cargo_leptos_service = ServeDir::new(&bundle_filepath); #[cfg(not(debug_assertions))] let cargo_leptos_service = SetResponseHeader::appending( cargo_leptos_service, @@ -101,26 +102,24 @@ pub(crate) async fn create_leptos_app( .layer(Extension(Arc::new(leptos_options)))) } -pub trait StatefulRoutes { +pub trait StatefulRoutes { fn leptos_routes_with_handler_stateful( self, paths: Vec, handler: H, ) -> Self where - H: axum::handler::Handler, + H: axum::handler::Handler, S: Clone + Send + Sync + 'static, - T: 'static, - B: HttpBody + Send + 'static; + T: 'static; } -impl StatefulRoutes for axum::Router { +impl StatefulRoutes for axum::Router { fn leptos_routes_with_handler_stateful(self, paths: Vec, handler: H) -> Self where - H: axum::handler::Handler, + H: axum::handler::Handler, S: Clone + Send + Sync + 'static, T: 'static, - B: HttpBody + Send + 'static, { let mut router = self; for route in paths.iter() { diff --git a/ultros/src/web.rs b/ultros/src/web.rs index 5cd80a07..155f6c9e 100644 --- a/ultros/src/web.rs +++ b/ultros/src/web.rs @@ -8,25 +8,29 @@ pub(crate) mod oauth; pub(crate) mod sitemap; use anyhow::Error; -use axum::body::{Empty, Full}; +use axum::body::Body; use axum::extract::{FromRef, Path, Query, State}; -use axum::headers::{CacheControl, ContentType, HeaderMapExt}; use axum::http::{HeaderValue, Response, StatusCode}; use axum::response::{IntoResponse, Redirect}; use axum::routing::{delete, get, post}; -use axum::{body, middleware, Json, Router, TypedHeader}; +use axum::{body, middleware, Json, Router}; use axum_extra::extract::cookie::{Cookie, Key}; use axum_extra::extract::CookieJar; +use axum_extra::headers::{CacheControl, ContentType, HeaderMapExt}; +use axum_extra::TypedHeader; use futures::future::{try_join, try_join_all}; use futures::stream::TryStreamExt; use futures::{stream, StreamExt}; +use hyper::body::Bytes; +use hyper::header; +use image::EncodableLayout; use itertools::Itertools; -use reqwest::header; use serde::Deserialize; use std::collections::{HashMap, HashSet}; use std::net::SocketAddr; use std::sync::{Arc, OnceLock}; use std::time::Duration; +use tokio::net::TcpListener; use tokio::time::timeout; use tower_http::compression::predicate::{NotForContentType, SizeAbove}; use tower_http::compression::{CompressionLayer, Predicate}; @@ -288,7 +292,7 @@ async fn get_file(path: &str) -> Result { match get_static_file(path) { None => Ok(Response::builder() .status(StatusCode::NOT_FOUND) - .body(body::boxed(Empty::new()))?), + .body(Body::new(http_body_util::Empty::new()))?), Some(file) => Ok(Response::builder() .status(StatusCode::OK) .header( @@ -302,7 +306,7 @@ async fn get_file(path: &str) -> Result { #[cfg(debug_assertions)] HeaderValue::from_str("none").unwrap(), ) - .body(body::boxed(Full::from(file)))?), + .body(Body::new(http_body_util::Full::from(file)))?), } } @@ -340,7 +344,7 @@ async fn get_item_icon( Ok(Response::builder() .header(header::CACHE_CONTROL, age_header) .header(header::CONTENT_TYPE, mime_type.as_ref()) - .body(body::boxed(Full::from(bytes)))?) + .body(body::Body::new(http_body_util::Full::from(bytes)))?) } pub(crate) async fn invite() -> Redirect { @@ -809,7 +813,7 @@ async fn delete_user( .value() .to_owned(); cache.remove_token(&token).await; - let cookie_jar = cookie_jar.remove(Cookie::named("discord_auth")); + let cookie_jar = cookie_jar.remove(Cookie::from("discord_auth")); // remove the token from the cache // remove the auth cookie from the cache Ok((cookie_jar, Redirect::to("/"))) @@ -929,10 +933,13 @@ pub(crate) async fn start_web(state: WebState) { .ok() .flatten() .unwrap_or(8080); - let addr = SocketAddr::from(([0, 0, 0, 0], port)); - tracing::info!("listening on {}", addr); let (_main_app, _metrics_app) = futures::future::join( - axum::Server::bind(&addr).serve(app.into_make_service()), + async move { + let addr = SocketAddr::from(([0, 0, 0, 0], port)); + tracing::info!("listening on {}", addr); + let listener = TcpListener::bind(addr).await.unwrap(); + axum::serve(listener, app).await.unwrap(); + }, start_metrics_server(), ) .await; diff --git a/ultros/src/web/api/cheapest_per_world.rs b/ultros/src/web/api/cheapest_per_world.rs index e5f58b82..005f3738 100644 --- a/ultros/src/web/api/cheapest_per_world.rs +++ b/ultros/src/web/api/cheapest_per_world.rs @@ -2,10 +2,10 @@ use std::{sync::Arc, time::Duration}; use axum::{ extract::{Path, State}, - headers::{CacheControl, HeaderMapExt}, response::IntoResponse, Json, }; +use axum_extra::headers::{CacheControl, HeaderMapExt}; use serde::Serialize; use ultros_db::world_cache::{AnySelector, WorldCache}; diff --git a/ultros/src/web/api/recent_sales.rs b/ultros/src/web/api/recent_sales.rs index b0d13a99..271fe3ce 100644 --- a/ultros/src/web/api/recent_sales.rs +++ b/ultros/src/web/api/recent_sales.rs @@ -2,10 +2,10 @@ use std::{sync::Arc, time::Duration}; use axum::{ extract::{Path, State}, - headers::{CacheControl, HeaderMapExt}, response::IntoResponse, Json, }; +use axum_extra::headers::{CacheControl, HeaderMapExt}; use ultros_api_types::recent_sales::{RecentSales, SaleData, Sales}; use ultros_db::world_cache::{AnySelector, WorldCache}; diff --git a/ultros/src/web/country_code_decoder.rs b/ultros/src/web/country_code_decoder.rs index 985b45e1..0d95836b 100644 --- a/ultros/src/web/country_code_decoder.rs +++ b/ultros/src/web/country_code_decoder.rs @@ -2,13 +2,13 @@ use std::iter; use async_trait::async_trait; use axum::{ - extract::{rejection::TypedHeaderRejection, FromRequestParts}, - headers::Header, + extract::FromRequestParts, http::{request::Parts, HeaderName, HeaderValue}, response::IntoResponse, - TypedHeader, }; +use axum_extra::{headers::Header, typed_header::TypedHeaderRejection, TypedHeader}; use isocountry::CountryCode; +use thiserror::Error; #[derive(Debug, Copy, Clone)] pub(crate) enum Region { @@ -26,6 +26,12 @@ impl IntoResponse for Region { } } +#[derive(Error, Debug)] +enum CountryCodeError { + #[error("Country code was not found")] + NotFound, +} + struct CloudflareCountryCode(CountryCode); static CFCOUNTRY_CODE: HeaderName = HeaderName::from_static("cf-ipcountry"); @@ -36,7 +42,7 @@ impl Header for CloudflareCountryCode { &CFCOUNTRY_CODE } - fn decode<'i, I>(values: &mut I) -> Result + fn decode<'i, I>(values: &mut I) -> Result where Self: Sized, I: Iterator, @@ -50,7 +56,7 @@ impl Header for CloudflareCountryCode { .and_then(|value| CountryCode::for_alpha2_caseless(value).ok()) }) .map(CloudflareCountryCode); - value.ok_or(axum::headers::Error::invalid()) + value.ok_or(axum_extra::headers::Error::invalid()) } fn encode>(&self, values: &mut E) { diff --git a/ultros/src/web/error.rs b/ultros/src/web/error.rs index 1f8b0b9a..7b854938 100644 --- a/ultros/src/web/error.rs +++ b/ultros/src/web/error.rs @@ -8,11 +8,11 @@ use axum_extra::extract::{ cookie::{Cookie, Key}, PrivateCookieJar, }; +use hyper::StatusCode; use oauth2::{ basic::BasicErrorResponseType, ConfigurationError, RequestTokenError, RevocationErrorResponseType, StandardErrorResponse, }; -use reqwest::StatusCode; use sitemap_rs::{sitemap_index_error::SitemapIndexError, url_set_error::UrlSetError}; use thiserror::Error; use tokio::{sync::broadcast::error::SendError, time::error::Elapsed}; diff --git a/ultros/src/web/item_card.rs b/ultros/src/web/item_card.rs index 993d6404..ad23285f 100644 --- a/ultros/src/web/item_card.rs +++ b/ultros/src/web/item_card.rs @@ -3,7 +3,7 @@ use std::{cell::RefCell, rc::Rc, sync::Arc}; use super::{error::WebError, WebState}; use anyhow::{anyhow, Result}; use axum::{ - body::{self, Full}, + body::{self, Body}, extract::{Path, State}, response::{IntoResponse, Response}, }; @@ -77,7 +77,7 @@ pub(crate) async fn generate_image<'a>( Ok(pixmap.encode_png()?) } -#[axum::debug_handler(state = WebState)] +#[axum_macros::debug_handler(state = WebState)] pub(crate) async fn item_card( Path((world, item_id)): Path<(String, i32)>, State(db): State, @@ -94,5 +94,5 @@ pub(crate) async fn item_card( let mime_type = mime_guess::from_path("icon.png").first_or_text_plain(); Ok(Response::builder() .header(header::CONTENT_TYPE, mime_type.as_ref()) - .body(body::boxed(Full::from(bytes)))?) + .body(Body::new(http_body_util::Full::from(bytes)))?) } diff --git a/ultros/src/web/oauth.rs b/ultros/src/web/oauth.rs index 494c70ab..eb66adb3 100644 --- a/ultros/src/web/oauth.rs +++ b/ultros/src/web/oauth.rs @@ -8,6 +8,7 @@ use axum_extra::extract::{ cookie::{Cookie, Key, SameSite}, PrivateCookieJar, }; +use cookie::CookieBuilder; use oauth2::{ basic::BasicClient, AccessToken, AuthUrl, AuthorizationCode, ClientId, ClientSecret, CsrfToken, PkceCodeChallenge, RedirectUrl, RevocationUrl, Scope, StandardRevocableToken, TokenResponse, @@ -115,7 +116,7 @@ pub async fn begin_login( // todo: send redirect handler for discord let cookies = cookies.add( - Cookie::build("pkce_challenge", pkce_challenge.as_str().to_string()) + CookieBuilder::new("pkce_challenge", pkce_challenge.as_str().to_string()) .same_site(SameSite::Strict) .secure(true) .finish(), diff --git a/ultros/src/web/sitemap.rs b/ultros/src/web/sitemap.rs index 645cc108..7f5c22af 100644 --- a/ultros/src/web/sitemap.rs +++ b/ultros/src/web/sitemap.rs @@ -8,9 +8,9 @@ use axum::{ }; use chrono::Utc; use futures::future::try_join_all; +use hyper::header; use itertools::Itertools; use mime_guess::mime; -use reqwest::header; use sitemap_rs::{ image::Image, sitemap::Sitemap, diff --git a/ultros/src/web_metrics.rs b/ultros/src/web_metrics.rs index 3a1c3352..f166e4b9 100644 --- a/ultros/src/web_metrics.rs +++ b/ultros/src/web_metrics.rs @@ -1,12 +1,12 @@ use std::{future::ready, net::SocketAddr, time::Instant}; use axum::{ - extract::MatchedPath, http::Request, middleware::Next, response::IntoResponse, routing::get, + extract::MatchedPath, extract::Request, middleware::Next, response::IntoResponse, routing::get, Router, }; use metrics_exporter_prometheus::{Matcher, PrometheusBuilder, PrometheusHandle}; -pub(crate) async fn track_metrics(req: Request, next: Next) -> impl IntoResponse { +pub(crate) async fn track_metrics(req: Request, next: Next) -> impl IntoResponse { let start = Instant::now(); let path = if let Some(matched_path) = req.extensions().get::() { matched_path.as_str().to_owned() @@ -58,8 +58,6 @@ pub(crate) async fn start_metrics_server() { // NOTE: expose metrics enpoint on a different port let addr = SocketAddr::from(([0, 0, 0, 0], 9091)); tracing::debug!("listening on {}", addr); - axum::Server::bind(&addr) - .serve(app.into_make_service()) - .await - .unwrap() + let listener = tokio::net::TcpListener::bind(addr).await.unwrap(); + axum::serve(listener, app).await.unwrap() } diff --git a/universalis/Cargo.toml b/universalis/Cargo.toml index bad883dd..6e09f617 100644 --- a/universalis/Cargo.toml +++ b/universalis/Cargo.toml @@ -13,7 +13,7 @@ thiserror = "1.0.32" url = "2" log = "0.4.17" bson = "2.4.0" -async-tungstenite = {version = "0.23", default-features = false, features = ["tokio-runtime", "tokio-rustls-webpki-roots"], optional = true} +async-tungstenite = {version = "0.24", default-features = false, features = ["tokio-runtime", "tokio-rustls-webpki-roots"], optional = true} tokio = {version = "1", optional = true, features = ["full"]} futures = "0.3.23" serde_with = {version = "3.3.0", features = ["chrono"]}