diff --git a/Cargo.lock b/Cargo.lock index 6003d60..416e047 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,41 +14,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" -dependencies = [ - "crypto-common", - "generic-array", -] - -[[package]] -name = "aes" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" -dependencies = [ - "cfg-if 1.0.0", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aes-gcm" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - [[package]] name = "ahash" version = "0.7.6" @@ -57,7 +22,7 @@ checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ "getrandom", "once_cell", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -66,9 +31,9 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -113,7 +78,7 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" dependencies = [ - "quote 1.0.23", + "quote", "syn 1.0.108", ] @@ -169,7 +134,7 @@ dependencies = [ "concurrent-queue", "futures-lite", "libc", - "log 0.4.17", + "log", "parking", "polling", "slab", @@ -206,7 +171,7 @@ dependencies = [ "futures-lite", "gloo-timers", "kv-log-macro", - "log 0.4.17", + "log", "memchr", "once_cell", "pin-project-lite", @@ -232,8 +197,8 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -245,13 +210,13 @@ checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.108", + "proc-macro2", + "quote", + "syn 2.0.10", ] [[package]] @@ -263,15 +228,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "atomic" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" -dependencies = [ - "autocfg", -] - [[package]] name = "atomic-waker" version = "1.1.0" @@ -286,7 +242,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -297,9 +253,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.7" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fb79c228270dcf2426e74864cabc94babb5dbab01a4314e702d2f16540e1591" +checksum = "349f8ccfd9221ee7d1f3d4b33e1f8319b3a81ed8f61f2ea40b37b859794b4491" dependencies = [ "async-trait", "axum-core", @@ -308,12 +264,12 @@ dependencies = [ "futures-util", "http", "http-body", - "hyper 0.14.24", + "hyper", "itoa", "matchit", "memchr", - "mime 0.3.16", - "percent-encoding 2.2.0", + "mime", + "percent-encoding", "pin-project-lite", "rustversion", "serde", @@ -323,23 +279,22 @@ dependencies = [ "sync_wrapper", "tokio", "tower", - "tower-http", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cae3e661676ffbacb30f1a824089a8c9150e71017f7e1e38f2aa32009188d34" +checksum = "b2f958c80c248b34b9a877a643811be8dbca03ca5ba827f2b63baf3a81e5fc4e" dependencies = [ "async-trait", "bytes", "futures-util", "http", "http-body", - "mime 0.3.16", + "mime", "rustversion", "tower-layer", "tower-service", @@ -353,8 +308,8 @@ checksum = "33b8de67cc41132507eeece2584804efcb15f85ba516e34c944b7667f480397a" dependencies = [ "heck 0.3.3", "proc-macro-error", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -364,28 +319,12 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" -[[package]] -name = "base64" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder", - "safemem", -] - [[package]] name = "base64" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" - [[package]] name = "base64" version = "0.21.0" @@ -409,12 +348,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "binascii" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72" - [[package]] name = "bitflags" version = "1.3.2" @@ -475,7 +408,7 @@ dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", "proc-macro-crate", - "proc-macro2 1.0.51", + "proc-macro2", "syn 1.0.108", ] @@ -485,8 +418,8 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "186b734fa1c9f6743e90c95d7233c9faab6360d1a96d4ffa19d9cfd1e9350f8a" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -496,8 +429,8 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99b7ff1008316626f485991b960ade129253d4034014616b94f309a15366cc49" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -523,8 +456,8 @@ version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -549,12 +482,6 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -574,17 +501,7 @@ dependencies = [ "serde", "time 0.1.45", "wasm-bindgen", - "winapi 0.3.9", -] - -[[package]] -name = "cipher" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" -dependencies = [ - "crypto-common", - "inout", + "winapi", ] [[package]] @@ -609,8 +526,8 @@ checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ "heck 0.4.1", "proc-macro-error", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -664,7 +581,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen", ] @@ -686,32 +603,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "cookie" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2018768ed1d848cc4d347d551546474025ba820e5db70e4c9aaa349f678bd7" -dependencies = [ - "percent-encoding 2.2.0", - "time 0.1.45", -] - [[package]] name = "cookie" version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ - "aes-gcm", - "base64 0.20.0", - "hkdf", - "hmac", - "percent-encoding 2.2.0", - "rand", - "sha2", - "subtle", + "percent-encoding", "time 0.3.19", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -745,7 +645,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -754,7 +654,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -764,7 +664,7 @@ version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -784,7 +684,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core", "typenum", ] @@ -805,19 +704,10 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ - "quote 1.0.23", + "quote", "syn 1.0.108", ] -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - [[package]] name = "cxx" version = "1.0.91" @@ -839,8 +729,8 @@ dependencies = [ "cc", "codespan-reporting", "once_cell", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "scratch", "syn 1.0.108", ] @@ -857,8 +747,8 @@ version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -880,8 +770,8 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "strsim", "syn 1.0.108", ] @@ -893,7 +783,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", - "quote 1.0.23", + "quote", "syn 1.0.108", ] @@ -915,8 +805,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "rustc_version 0.4.0", "syn 1.0.108", ] @@ -927,71 +817,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" -[[package]] -name = "devise" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd716c4a507adc5a2aa7c2a372d06c7497727e0892b243d3036bc7478a13e526" -dependencies = [ - "devise_codegen 0.2.1", - "devise_core 0.2.1", -] - -[[package]] -name = "devise" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c7580b072f1c8476148f16e0a0d5dedddab787da98d86c5082c5e9ed8ab595" -dependencies = [ - "devise_codegen 0.3.1", - "devise_core 0.3.1", -] - -[[package]] -name = "devise_codegen" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea7b8290d118127c08e3669da20b331bed56b09f20be5945b7da6c116d8fab53" -dependencies = [ - "devise_core 0.2.1", - "quote 0.6.13", -] - -[[package]] -name = "devise_codegen" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123c73e7a6e51b05c75fe1a1b2f4e241399ea5740ed810b0e3e6cacd9db5e7b2" -dependencies = [ - "devise_core 0.3.1", - "quote 1.0.23", -] - -[[package]] -name = "devise_core" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1053e9d5d5aade9bcedb5ab53b78df2b56ff9408a3138ce77eaaef87f932373" -dependencies = [ - "bitflags", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "devise_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841ef46f4787d9097405cac4e70fb8644fc037b526e8c14054247c0263c400d0" -dependencies = [ - "bitflags", - "proc-macro2 1.0.51", - "proc-macro2-diagnostics", - "quote 1.0.23", - "syn 1.0.108", -] - [[package]] name = "digest" version = "0.10.6" @@ -1000,7 +825,6 @@ checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer", "crypto-common", - "subtle", ] [[package]] @@ -1091,7 +915,7 @@ version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1102,7 +926,7 @@ checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ "atty", "humantime", - "log 0.4.17", + "log", "regex", "termcolor", ] @@ -1129,18 +953,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65f0fbe245d714b596ba5802b46f937f5ce68dcae0f32f9a70b5c3b04d3c6f64" dependencies = [ "base64 0.13.1", - "cookie 0.16.2", + "cookie", "futures-core", "futures-util", "http", - "hyper 0.14.24", + "hyper", "hyper-tls", - "mime 0.3.16", + "mime", "serde", "serde_json", "time 0.3.19", "tokio", - "url 2.3.1", + "url", "webdriver", ] @@ -1161,32 +985,6 @@ dependencies = [ "instant", ] -[[package]] -name = "figment" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e56602b469b2201400dec66a66aec5a9b8761ee97cd1b8c96ab2483fcc16cc9" -dependencies = [ - "atomic", - "pear 0.2.3", - "serde", - "toml 0.5.11", - "uncased", - "version_check 0.9.4", -] - -[[package]] -name = "filetime" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall", - "windows-sys 0.45.0", -] - [[package]] name = "flate2" version = "1.0.25" @@ -1230,7 +1028,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "percent-encoding 2.2.0", + "percent-encoding", ] [[package]] @@ -1239,41 +1037,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" -[[package]] -name = "fsevent" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" -dependencies = [ - "bitflags", - "fsevent-sys", -] - -[[package]] -name = "fsevent-sys" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" -dependencies = [ - "libc", -] - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "funty" version = "1.1.0" @@ -1360,8 +1123,8 @@ version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -1395,19 +1158,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generator" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e" -dependencies = [ - "cc", - "libc", - "log 0.4.17", - "rustversion", - "windows", -] - [[package]] name = "generic-array" version = "0.14.6" @@ -1415,7 +1165,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -1424,27 +1174,11 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" -dependencies = [ - "opaque-debug", - "polyval", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "gloo-net" version = "0.1.0" @@ -1578,24 +1312,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hkdf" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - [[package]] name = "html-escape" version = "0.2.13" @@ -1656,28 +1372,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.10.16" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" -dependencies = [ - "base64 0.9.3", - "httparse", - "language-tags", - "log 0.3.9", - "mime 0.2.6", - "num_cpus", - "time 0.1.45", - "traitobject", - "typeable", - "unicase 1.4.2", - "url 1.7.2", -] - -[[package]] -name = "hyper" -version = "0.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -1704,7 +1401,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ "http", - "hyper 0.14.24", + "hyper", "rustls", "tokio", "tokio-rustls", @@ -1717,7 +1414,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.24", + "hyper", "native-tls", "tokio", "tokio-native-tls", @@ -1734,7 +1431,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1753,17 +1450,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.3.0" @@ -1782,42 +1468,6 @@ checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "inlinable_string" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" - -[[package]] -name = "inotify" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f" -dependencies = [ - "bitflags", - "inotify-sys", - "libc", -] - -[[package]] -name = "inotify-sys" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" -dependencies = [ - "libc", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", ] [[package]] @@ -1826,16 +1476,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", + "cfg-if", ] [[package]] @@ -1868,46 +1509,24 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "kv-log-macro" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" dependencies = [ - "log 0.4.17", + "log", ] -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "spin 0.5.2", + "spin", ] -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "lexical-core" version = "0.7.6" @@ -1916,7 +1535,7 @@ checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec 0.5.2", "bitflags", - "cfg-if 1.0.0", + "cfg-if", "ryu", "static_assertions", ] @@ -1958,40 +1577,16 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.17", -] - [[package]] name = "log" version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "value-bag", ] -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if 1.0.0", - "generator", - "scoped-tls", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - [[package]] name = "lopdf" version = "0.29.0" @@ -2003,7 +1598,7 @@ dependencies = [ "flate2", "itoa", "linked-hash-map", - "log 0.4.17", + "log", "pom", "time 0.2.27", "weezl", @@ -2018,12 +1613,6 @@ dependencies = [ "regex-automata", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.0" @@ -2045,15 +1634,6 @@ dependencies = [ "sea-orm-migration", ] -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -dependencies = [ - "log 0.3.9", -] - [[package]] name = "mime" version = "0.3.16" @@ -2066,8 +1646,8 @@ version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ - "mime 0.3.16", - "unicase 2.6.0", + "mime", + "unicase", ] [[package]] @@ -2108,25 +1688,6 @@ dependencies = [ "adler", ] -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log 0.4.17", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - [[package]] name = "mio" version = "0.8.6" @@ -2134,55 +1695,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", - "log 0.4.17", + "log", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.45.0", ] -[[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log 0.4.17", - "mio 0.6.23", - "slab", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "multer" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed4198ce7a4cbd2a57af78d28c6fbb57d81ac5f1d6ad79ac6c5587419cbdf22" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http", - "httparse", - "log 0.4.17", - "memchr", - "mime 0.3.16", - "spin 0.9.5", - "tokio", - "tokio-util", - "version_check 0.9.4", -] - [[package]] name = "native-tls" version = "0.2.11" @@ -2191,7 +1708,7 @@ checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", - "log 0.4.17", + "log", "openssl", "openssl-probe", "openssl-sys", @@ -2201,17 +1718,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "net2" -version = "0.2.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "nom" version = "6.1.2" @@ -2222,7 +1728,7 @@ dependencies = [ "funty", "lexical-core", "memchr", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -2235,24 +1741,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "notify" -version = "4.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257" -dependencies = [ - "bitflags", - "filetime", - "fsevent", - "fsevent-sys", - "inotify", - "libc", - "mio 0.6.23", - "mio-extras", - "walkdir", - "winapi 0.3.9", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2260,7 +1748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ "overload", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2338,12 +1826,6 @@ version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "openssl" version = "0.10.45" @@ -2351,7 +1833,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -2365,8 +1847,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -2413,8 +1895,8 @@ checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" dependencies = [ "Inflector", "proc-macro-error", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -2457,12 +1939,12 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", "redox_syscall", "smallvec", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2471,7 +1953,7 @@ version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "smallvec", @@ -2495,51 +1977,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" -[[package]] -name = "pear" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32dfa7458144c6af7f9ce6a137ef975466aa68ffa44d4d816ee5934018ba960a" -dependencies = [ - "pear_codegen 0.1.5", -] - -[[package]] -name = "pear" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e44241c5e4c868e3eaa78b7c1848cadd6344ed4f54d029832d32b415a58702" -dependencies = [ - "inlinable_string", - "pear_codegen 0.2.3", - "yansi", -] - -[[package]] -name = "pear_codegen" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0288ba5d581afbc93e2bbd931c1013584c15ecf46b1cdb927edc7abddbc8ca6" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", - "version_check 0.9.4", - "yansi", -] - -[[package]] -name = "pear_codegen" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a5ca643c2303ecb740d506539deba189e16f2754040a42901cd8105d0282d0" -dependencies = [ - "proc-macro2 1.0.51", - "proc-macro2-diagnostics", - "quote 1.0.23", - "syn 1.0.108", -] - [[package]] name = "pem-rfc7468" version = "0.3.1" @@ -2549,12 +1986,6 @@ dependencies = [ "base64ct", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.2.0" @@ -2600,7 +2031,7 @@ checksum = "7ca2d139e1eb507cca8ffcda8878f1da174285058843bf75d4f8c64b7016d8a8" dependencies = [ "axum", "perseus", - "tower-http", + "tower-http 0.3.5", ] [[package]] @@ -2610,8 +2041,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5620bc354c480258abe55f2bcdaa5569d584a5b76fb7a1dc4fb34a5d5bd9dcf" dependencies = [ "darling", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -2630,8 +2061,8 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -2682,25 +2113,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" dependencies = [ "autocfg", - "cfg-if 1.0.0", + "cfg-if", "libc", - "log 0.4.17", + "log", "wepoll-ffi", "windows-sys 0.42.0", ] -[[package]] -name = "polyval" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - [[package]] name = "pom" version = "3.2.0" @@ -2720,7 +2139,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" dependencies = [ "env_logger", - "log 0.4.17", + "log", ] [[package]] @@ -2729,7 +2148,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml 0.5.11", + "toml", ] [[package]] @@ -2739,10 +2158,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -2751,9 +2170,9 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "version_check 0.9.4", + "proc-macro2", + "quote", + "version_check", ] [[package]] @@ -2764,35 +2183,13 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.51" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" dependencies = [ "unicode-ident", ] -[[package]] -name = "proc-macro2-diagnostics" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" -dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.108", - "version_check 0.9.4", - "yansi", -] - [[package]] name = "ptr_meta" version = "0.1.4" @@ -2808,33 +2205,24 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] [[package]] name = "quick-error" version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ - "proc-macro2 1.0.51", + "proc-macro2", ] [[package]] @@ -2882,26 +2270,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "ref-cast" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" -dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.108", -] - [[package]] name = "regex" version = "1.7.1" @@ -2934,7 +2302,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2969,16 +2337,16 @@ dependencies = [ "h2", "http", "http-body", - "hyper 0.14.24", + "hyper", "hyper-rustls", "hyper-tls", "ipnet", "js-sys", - "log 0.4.17", - "mime 0.3.16", + "log", + "mime", "native-tls", "once_cell", - "percent-encoding 2.2.0", + "percent-encoding", "pin-project-lite", "rustls", "rustls-pemfile", @@ -2989,7 +2357,7 @@ dependencies = [ "tokio-native-tls", "tokio-rustls", "tower-service", - "url 2.3.1", + "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3020,10 +2388,10 @@ dependencies = [ "cc", "libc", "once_cell", - "spin 0.5.2", + "spin", "untrusted", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3046,157 +2414,9 @@ version = "0.7.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff26ed6c7c4dfc2aa9480b86a60e3c7233543a270a680e10758a507c5a4ce476" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", - "syn 1.0.108", -] - -[[package]] -name = "rocket" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b9d9dc08c5dcc1d8126a9dd615545e6a358f8c13c883c8dfed8c0376fa355e" -dependencies = [ - "atty", - "base64 0.13.1", - "log 0.4.17", - "memchr", - "num_cpus", - "pear 0.1.5", - "rocket_codegen 0.4.11", - "rocket_http 0.4.11", - "state 0.4.2", - "time 0.1.45", - "toml 0.4.10", - "version_check 0.9.4", - "yansi", -] - -[[package]] -name = "rocket" -version = "0.5.0-rc.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98ead083fce4a405feb349cf09abdf64471c6077f14e0ce59364aa90d4b99317" -dependencies = [ - "async-stream", - "async-trait", - "atomic", - "atty", - "binascii", - "bytes", - "either", - "figment", - "futures", - "indexmap", - "log 0.4.17", - "memchr", - "multer", - "num_cpus", - "parking_lot 0.12.1", - "pin-project-lite", - "rand", - "ref-cast", - "rocket_codegen 0.5.0-rc.2", - "rocket_http 0.5.0-rc.2", - "serde", - "serde_json", - "state 0.5.3", - "tempfile", - "time 0.3.19", - "tokio", - "tokio-stream", - "tokio-util", - "ubyte", - "version_check 0.9.4", - "yansi", -] - -[[package]] -name = "rocket_codegen" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2810037b5820098af97bd4fdd309e76a8101ceb178147de775c835a2537284fe" -dependencies = [ - "devise 0.2.1", - "glob", - "indexmap", - "quote 0.6.13", - "rocket_http 0.4.11", - "version_check 0.9.4", - "yansi", -] - -[[package]] -name = "rocket_codegen" -version = "0.5.0-rc.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6aeb6bb9c61e9cd2c00d70ea267bf36f76a4cc615e5908b349c2f9d93999b47" -dependencies = [ - "devise 0.3.1", - "glob", - "indexmap", - "proc-macro2 1.0.51", - "quote 1.0.23", - "rocket_http 0.5.0-rc.2", + "proc-macro2", + "quote", "syn 1.0.108", - "unicode-xid 0.2.4", -] - -[[package]] -name = "rocket_contrib" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e20efbc6a211cb3df5375accf532d4186f224b623f39eca650b19b96240c596b" -dependencies = [ - "log 0.4.17", - "notify", - "rocket 0.4.11", - "serde", - "serde_json", -] - -[[package]] -name = "rocket_http" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf9cbd128e1f321a2d0bebd2b7cf0aafd89ca43edf69e49b56a5c46e48eb19f" -dependencies = [ - "cookie 0.11.5", - "hyper 0.10.16", - "indexmap", - "pear 0.1.5", - "percent-encoding 1.0.1", - "smallvec", - "state 0.4.2", - "time 0.1.45", - "unicode-xid 0.1.0", -] - -[[package]] -name = "rocket_http" -version = "0.5.0-rc.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ded65d127954de3c12471630bf4b81a2792f065984461e65b91d0fdaafc17a2" -dependencies = [ - "cookie 0.16.2", - "either", - "futures", - "http", - "hyper 0.14.24", - "indexmap", - "log 0.4.17", - "memchr", - "pear 0.2.3", - "percent-encoding 2.2.0", - "pin-project-lite", - "ref-cast", - "serde", - "smallvec", - "stable-pattern", - "state 0.5.3", - "time 0.3.19", - "tokio", - "uncased", ] [[package]] @@ -3261,7 +2481,7 @@ version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ - "log 0.4.17", + "log", "ring", "sct", "webpki", @@ -3288,21 +2508,6 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "schannel" version = "0.1.21" @@ -3312,12 +2517,6 @@ dependencies = [ "windows-sys 0.42.0", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scopeguard" version = "1.1.0" @@ -3351,7 +2550,7 @@ dependencies = [ "bigdecimal", "chrono", "futures", - "log 0.4.17", + "log", "ouroboros", "rust_decimal", "sea-orm-macros", @@ -3364,7 +2563,7 @@ dependencies = [ "thiserror", "time 0.3.19", "tracing", - "url 2.3.1", + "url", "uuid", ] @@ -3381,7 +2580,7 @@ dependencies = [ "sea-schema", "tracing", "tracing-subscriber", - "url 2.3.1", + "url", ] [[package]] @@ -3392,8 +2591,8 @@ checksum = "5d89f7d4d2533c178e08a9e1990619c391e9ca7b402851d02a605938b15e03d9" dependencies = [ "bae", "heck 0.3.3", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -3414,26 +2613,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "sea-orm-rocket" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30f30b2cf45d317def42af8542635e341fa4ae12fb0697a713346750ff426aa2" -dependencies = [ - "rocket 0.5.0-rc.2", - "sea-orm-rocket-codegen", -] - -[[package]] -name = "sea-orm-rocket-codegen" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfd750adb2541f30b855e2d86e90bf7031ac17e048ac5226a8e8c8d8a6022f2" -dependencies = [ - "devise 0.3.1", - "quote 1.0.23", -] - [[package]] name = "sea-query" version = "0.28.3" @@ -3472,8 +2651,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63f62030c60f3a691f5fe251713b4e220b306e50a71e1d6f9cce1f24bb781978" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", "thiserror", ] @@ -3496,8 +2675,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56821b7076f5096b8f726e2791ad255a99c82498e08ec477a65a96c461ff1927" dependencies = [ "heck 0.3.3", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -3517,8 +2696,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69b4397b825df6ccf1e98bcdabef3bbcfc47ff5853983467850eeab878384f21" dependencies = [ "heck 0.3.3", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "rustversion", "syn 1.0.108", ] @@ -3588,8 +2767,8 @@ version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -3630,26 +2809,29 @@ name = "server" version = "0.1.0" dependencies = [ "async-trait", + "axum", "bytes", "chrono", "dotenvy", "envy", "futures", + "hyper", "lazy_static", - "log 0.4.17", + "log", "lopdf", "migration", "pretty_env_logger", "reqwest", - "rocket 0.5.0-rc.2", - "rocket_contrib", "sea-orm", - "sea-orm-rocket", "serde", "serde_json", "slug", "thiserror", "tokio", + "tower", + "tower-http 0.4.0", + "tracing", + "tracing-subscriber", ] [[package]] @@ -3667,7 +2849,7 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -3684,7 +2866,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -3722,7 +2904,7 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" dependencies = [ - "version_check 0.9.4", + "version_check", ] [[package]] @@ -3747,7 +2929,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3756,12 +2938,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "spin" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dccf47db1b41fa1573ed27ccf5e08e3ca771cb994f776668c5ebda893b248fc" - [[package]] name = "spki" version = "0.5.4" @@ -3821,12 +2997,12 @@ dependencies = [ "indexmap", "itoa", "libc", - "log 0.4.17", + "log", "memchr", "num-bigint", "once_cell", "paste", - "percent-encoding 2.2.0", + "percent-encoding", "rand", "rsa", "rust_decimal", @@ -3843,7 +3019,7 @@ dependencies = [ "thiserror", "time 0.3.19", "tokio-stream", - "url 2.3.1", + "url", "uuid", "webpki-roots", ] @@ -3858,13 +3034,13 @@ dependencies = [ "either", "heck 0.4.1", "once_cell", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "serde_json", "sqlx-core", "sqlx-rt", "syn 1.0.108", - "url 2.3.1", + "url", ] [[package]] @@ -3878,37 +3054,13 @@ dependencies = [ "tokio-rustls", ] -[[package]] -name = "stable-pattern" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4564168c00635f88eaed410d5efa8131afa8d8699a612c80c455a0ba05c21045" -dependencies = [ - "memchr", -] - [[package]] name = "standback" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" dependencies = [ - "version_check 0.9.4", -] - -[[package]] -name = "state" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3015a7d0a5fd5105c91c3710d42f9ccf0abfb287d62206484dcc67f9569a6483" - -[[package]] -name = "state" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b" -dependencies = [ - "loom", + "version_check", ] [[package]] @@ -3937,8 +3089,8 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "serde", "serde_derive", "syn 1.0.108", @@ -3951,8 +3103,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" dependencies = [ "base-x", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "serde", "serde_derive", "serde_json", @@ -4040,8 +3192,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3abd3f402c1a943cf70860b91a40c79c713e269156445998dbfd647deac8a5" dependencies = [ "once_cell", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -4078,10 +3230,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92914a2f809b636d245b28d8a734801ecb8ff9c4996bbe6ea4176582e12503eb" dependencies = [ "nom 7.1.3", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", - "unicode-xid 0.2.4", + "unicode-xid", ] [[package]] @@ -4102,23 +3254,23 @@ dependencies = [ [[package]] name = "syn" -version = "0.15.44" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +checksum = "d56e159d99e6c2b93995d171050271edb50ecc5288fbc7cc17de8fdce4e58c14" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "syn" -version = "1.0.108" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56e159d99e6c2b93995d171050271edb50ecc5288fbc7cc17de8fdce4e58c14" +checksum = "5aad1363ed6d37b84299588d62d3a7d95b5a5c2d9aad5c85609fda12afaa1f40" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "unicode-ident", ] @@ -4140,12 +3292,12 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", "redox_syscall", "remove_dir_all", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4178,8 +3330,8 @@ version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -4189,7 +3341,7 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -4201,7 +3353,7 @@ checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4215,8 +3367,8 @@ dependencies = [ "standback", "stdweb", "time-macros 0.1.1", - "version_check 0.9.4", - "winapi 0.3.9", + "version_check", + "winapi", ] [[package]] @@ -4263,8 +3415,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "standback", "syn 1.0.108", ] @@ -4294,7 +3446,7 @@ dependencies = [ "bytes", "libc", "memchr", - "mio 0.8.6", + "mio", "num_cpus", "parking_lot 0.12.1", "pin-project-lite", @@ -4310,8 +3462,8 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -4361,15 +3513,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "toml" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.5.11" @@ -4409,17 +3552,35 @@ dependencies = [ "http-body", "http-range-header", "httpdate", - "mime 0.3.16", + "mime", "mime_guess", - "percent-encoding 2.2.0", + "percent-encoding", "pin-project-lite", "tokio", "tokio-util", - "tower", "tower-layer", "tower-service", ] +[[package]] +name = "tower-http" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-layer" version = "0.3.2" @@ -4438,8 +3599,8 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", - "log 0.4.17", + "cfg-if", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4451,8 +3612,8 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", ] @@ -4473,7 +3634,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ "lazy_static", - "log 0.4.17", + "log", "tracing-core", ] @@ -4495,65 +3656,25 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" - [[package]] name = "try-lock" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" - [[package]] name = "typenum" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" -[[package]] -name = "ubyte" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c81f0dae7d286ad0d9366d7679a77934cfc3cf3a8d67e82669794412b2368fe6" -dependencies = [ - "serde", -] - -[[package]] -name = "uncased" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b01702b0fd0b3fadcf98e098780badda8742d4f4a7676615cad90e8ac73622" -dependencies = [ - "serde", - "version_check 0.9.4", -] - -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -dependencies = [ - "version_check 0.1.5", -] - [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.4", + "version_check", ] [[package]] @@ -4589,12 +3710,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.4" @@ -4607,33 +3722,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" -[[package]] -name = "universal-hash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" -dependencies = [ - "crypto-common", - "subtle", -] - [[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.3.1" @@ -4641,8 +3735,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", - "idna 0.3.0", - "percent-encoding 2.2.0", + "idna", + "percent-encoding", ] [[package]] @@ -4679,7 +3773,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" dependencies = [ "ctor", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -4688,12 +3782,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.4" @@ -4706,24 +3794,13 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" -[[package]] -name = "walkdir" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" -dependencies = [ - "same-file", - "winapi 0.3.9", - "winapi-util", -] - [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.17", + "log", "try-lock", ] @@ -4745,7 +3822,7 @@ version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "serde", "serde_json", "wasm-bindgen-macro", @@ -4758,10 +3835,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", - "log 0.4.17", + "log", "once_cell", - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", "wasm-bindgen-shared", ] @@ -4772,7 +3849,7 @@ version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -4784,7 +3861,7 @@ version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ - "quote 1.0.23", + "quote", "wasm-bindgen-macro-support", ] @@ -4794,8 +3871,8 @@ version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ - "proc-macro2 1.0.51", - "quote 1.0.23", + "proc-macro2", + "quote", "syn 1.0.108", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -4825,15 +3902,15 @@ checksum = "9973cb72c8587d5ad5efdb91e663d36177dc37725e6c90ca86c626b0cc45c93f" dependencies = [ "base64 0.13.1", "bytes", - "cookie 0.16.2", + "cookie", "http", - "log 0.4.17", + "log", "serde", "serde_derive", "serde_json", "time 0.3.19", "unicode-segmentation", - "url 2.3.1", + "url", ] [[package]] @@ -4870,12 +3947,6 @@ dependencies = [ "cc", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -4886,12 +3957,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -4904,7 +3969,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4913,15 +3978,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-targets", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -5009,17 +4065,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", + "winapi", ] [[package]] @@ -5028,12 +4074,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - [[package]] name = "zeroize" version = "1.5.7" diff --git a/makefile b/makefile index 4dcf42d..5dad3f0 100644 --- a/makefile +++ b/makefile @@ -8,7 +8,8 @@ db_entities: sea-orm-cli generate entity --database-url $(DATABASE_URL) -o src/model --with-serde both server-dev: - cargo run --bin server + cd server && \ + cargo run tailwind: cd client && \ diff --git a/server/Cargo.toml b/server/Cargo.toml index 561ad87..f9e8efe 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -14,7 +14,9 @@ dotenvy = { workspace = true } envy = { workspace = true } tokio = { version = "^1.20.1", features = ["full"] } reqwest = { version = "0.11", features = ["json", "rustls-tls"] } -rocket = { version = "0.5.0-rc.2", features = ["json"] } +axum = "0.6.12" +hyper = { version = "0.14.25", features = ["full"] } +tower = "0.4" sea-orm = { version = "0.11.0", features = [ "runtime-tokio-rustls", "macros", @@ -26,8 +28,9 @@ lazy_static = "1.4.0" pretty_env_logger = "0.4.0" log = "0.4.17" futures = "0.3.25" -rocket_contrib = "0.4.11" async-trait = "0.1.61" -sea-orm-rocket = "0.5.2" thiserror = "1.0.38" slug = "0.1.4" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tower-http = { version = "0.4", features = ["trace", "cors"] } +tracing = "0.1" diff --git a/server/src/cors.rs b/server/src/cors.rs deleted file mode 100644 index 1b1f7fb..0000000 --- a/server/src/cors.rs +++ /dev/null @@ -1,25 +0,0 @@ -use rocket::fairing::{Fairing, Info, Kind}; -use rocket::http::Header; -use rocket::{Request, Response}; - -pub struct Cors; - -#[rocket::async_trait] -impl Fairing for Cors { - fn info(&self) -> Info { - Info { - name: "Add CORS headers to responses", - kind: Kind::Response, - } - } - - async fn on_response<'r>(&self, _request: &'r Request<'_>, response: &mut Response<'r>) { - response.set_header(Header::new("Access-Control-Allow-Origin", "*")); - response.set_header(Header::new( - "Access-Control-Allow-Methods", - "POST, GET, PATCH, OPTIONS", - )); - response.set_header(Header::new("Access-Control-Allow-Headers", "*")); - response.set_header(Header::new("Access-Control-Allow-Credentials", "true")); - } -} diff --git a/server/src/db/mod.rs b/server/src/db/mod.rs index 2d59fd8..2cf2e52 100644 --- a/server/src/db/mod.rs +++ b/server/src/db/mod.rs @@ -1,47 +1,24 @@ use std::time::Duration; -use crate::CONFIG; -use async_trait::async_trait; use sea_orm::{ConnectOptions, DatabaseConnection}; -use sea_orm_rocket::rocket; -use sea_orm_rocket::{rocket::figment::Figment, Database}; +use crate::CONFIG; pub mod paginate; pub mod slug; -#[derive(Database, Debug)] -#[database("fast_insiders")] -pub struct Db(SeaOrmPool); - -#[derive(Debug, Clone)] -pub struct SeaOrmPool { - pub conn: DatabaseConnection, -} - -#[async_trait] -impl sea_orm_rocket::Pool for SeaOrmPool { - type Error = sea_orm::DbErr; - - type Connection = DatabaseConnection; - - async fn init(_figment: &Figment) -> Result { - let config = &CONFIG; - let mut options: ConnectOptions = ConnectOptions::new(config.database_url.to_owned()); - options - .max_connections(config.max_connections) - .min_connections(config.min_connections) - .connect_timeout(Duration::from_secs(config.connect_timeout)) - .acquire_timeout(Duration::from_secs(config.acquire_timeout)) - .idle_timeout(Duration::from_secs(config.idle_timeout)) - .max_lifetime(Duration::from_secs(config.max_lifetime)) - .sqlx_logging(config.sqlx_logging); - - let conn = sea_orm::Database::connect(options).await?; - - Ok(SeaOrmPool { conn }) - } - - fn borrow(&self) -> &Self::Connection { - &self.conn - } +pub async fn init() -> Result { + let config = &CONFIG; + let mut options: ConnectOptions = ConnectOptions::new(config.database_url.to_owned()); + options + .max_connections(config.max_connections) + .min_connections(config.min_connections) + .connect_timeout(Duration::from_secs(config.connect_timeout)) + .acquire_timeout(Duration::from_secs(config.acquire_timeout)) + .idle_timeout(Duration::from_secs(config.idle_timeout)) + .max_lifetime(Duration::from_secs(config.max_lifetime)) + .sqlx_logging(config.sqlx_logging); + + let conn = sea_orm::Database::connect(options).await?; + + Ok(conn) } diff --git a/server/src/db/paginate.rs b/server/src/db/paginate.rs index dcd03e5..4cf3ce6 100644 --- a/server/src/db/paginate.rs +++ b/server/src/db/paginate.rs @@ -1,11 +1,8 @@ use sea_orm::{ error::DbErr, prelude::*, sea_query::SimpleExpr, FromQueryResult, Order, QueryOrder, }; -use sea_orm_rocket::Connection; use serde::{Deserialize, Serialize}; -use super::Db; - #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PaginatedResponse { pub count: u64, @@ -14,7 +11,7 @@ pub struct PaginatedResponse { } pub async fn paginate( - conn: Connection<'_, Db>, + db: &DatabaseConnection, page: Option, size: Option, column: Option, @@ -25,7 +22,6 @@ where M: Send + Sync + FromQueryResult, C: ColumnTrait, { - let db = conn.into_inner(); let s = size.unwrap_or(20).min(50); let selector; if let (Some(col), Some(ord)) = (column, order) { @@ -53,7 +49,7 @@ where } pub async fn paginate_also_related( - conn: Connection<'_, Db>, + db: &DatabaseConnection, page: Option, size: Option, column: Option, @@ -67,7 +63,6 @@ where K: Sync + Send + FromQueryResult, C: ColumnTrait, { - let db = conn.into_inner(); let s = size.unwrap_or(20).min(50); let mut selector; diff --git a/server/src/error.rs b/server/src/error.rs new file mode 100644 index 0000000..cc5d1bc --- /dev/null +++ b/server/src/error.rs @@ -0,0 +1,49 @@ +use axum::{ + http::StatusCode, + response::{IntoResponse, Response}, + Json, +}; +use sea_orm::DbErr; +use serde_json::json; + +use crate::repo::in_process_transaction::InProcessTransactionError; + +pub enum AppError { + DbErr(DbErr), + InProcessTransaction(InProcessTransactionError), + NotFound(String), +} + +impl From for AppError { + fn from(inner: DbErr) -> Self { + AppError::DbErr(inner) + } +} + +impl From for AppError { + fn from(inner: InProcessTransactionError) -> Self { + AppError::InProcessTransaction(inner) + } +} + +impl IntoResponse for AppError { + fn into_response(self) -> Response { + let (status, error_message) = match self { + AppError::DbErr(e) => ( + StatusCode::INTERNAL_SERVER_ERROR, + format!("The database retruned an error: {}", e), + ), + AppError::InProcessTransaction(e) => ( + StatusCode::INTERNAL_SERVER_ERROR, + format!("Error in the in process transaction repo: {}", e), + ), + AppError::NotFound(e) => (StatusCode::NOT_FOUND, format!("Not found error: {}", e)), + }; + + let body = Json(json!({ + "error": error_message, + })); + + (status, body).into_response() + } +} diff --git a/server/src/lib.rs b/server/src/lib.rs deleted file mode 100644 index f674194..0000000 --- a/server/src/lib.rs +++ /dev/null @@ -1,85 +0,0 @@ -#![feature(proc_macro_hygiene, decl_macro)] - -// Macros -#[macro_use] -extern crate rocket; -#[macro_use] -extern crate lazy_static; -extern crate pretty_env_logger; -#[macro_use] -extern crate log; - -// External crates -use rocket::{Build, Rocket}; -use sea_orm_rocket::rocket::fairing::{self, AdHoc}; -use sea_orm_rocket::Database; - -// Local crates -use migration::MigratorTrait; - -mod amf; -mod cors; -mod db; -mod env; -mod logger; -mod model; -mod repo; -mod route; -mod task; -use crate::task::run_tasks; - -// Module imports -use crate::db::Db; -use env::Config; - -lazy_static! { - /// Contains variables defind in .env file - static ref CONFIG: Config = Config::new(); -} - -async fn run_migrations(rocket: Rocket) -> fairing::Result { - let conn = &Db::fetch(&rocket).unwrap().conn; - let _ = migration::Migrator::up(conn, None).await; - Ok(rocket) -} - -async fn start_rocket() -> Result<(), sea_orm_rocket::rocket::Error> { - rocket::build() - .attach(Db::init()) - .attach(AdHoc::try_on_ignite("Migrations", run_migrations)) - .attach(crate::cors::Cors) - .mount( - "/v1", - routes![ - route::company::get_all, - route::company::get_by_isin, - route::transaction::get_transactions, - route::transaction::get_aggregated_transactions, - route::transaction::get_latest_transactions, - route::in_process_transaction::get_all, - route::in_process_transaction::retry_failed_transaction, - route::in_process_transaction::retry_all - ], - ) - .launch() - .await - .map(|_| ()) -} - -#[rocket::main] -pub async fn main() -> Result<(), Box> { - logger::init_log()?; - - // Run tasks - tokio::task::spawn(async { run_tasks().await }); - - let result = start_rocket().await; - - info!("Rocket: deorbit."); - - if let Some(err) = result.err() { - println!("Error: {}", err); - } - - Ok(()) -} diff --git a/server/src/main.rs b/server/src/main.rs new file mode 100644 index 0000000..8407c56 --- /dev/null +++ b/server/src/main.rs @@ -0,0 +1,169 @@ +#![feature(proc_macro_hygiene, decl_macro)] + +// Macros +#[macro_use] +extern crate lazy_static; +extern crate pretty_env_logger; +#[macro_use] +extern crate log; + +// External crates +use axum::{ + extract::MatchedPath, + http::{HeaderValue, Method, Request, StatusCode}, + response::Response, + routing::get, + Router, +}; +use sea_orm::DatabaseConnection; +use std::{net::SocketAddr, time::Duration}; +use tokio::signal; +use tower_http::{classify::ServerErrorsFailureClass, cors::CorsLayer, trace::TraceLayer}; +use tracing::{info, info_span, Span}; +use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; + +// Local crates +use migration::MigratorTrait; +use route::{company, in_process_transaction, transaction}; + +mod amf; +mod db; +mod env; +mod error; +mod logger; +mod model; +mod repo; +mod route; +mod task; +use crate::task::run_tasks; + +// Module imports +use env::Config; + +lazy_static! { + /// Contains variables defined in .env file + static ref CONFIG: Config = Config::new(); +} + +async fn fallback() -> (StatusCode, &'static str) { + (StatusCode::NOT_FOUND, "Not Found") +} + +#[derive(Clone)] +pub struct AppState { + pub db: DatabaseConnection, +} + +#[tokio::main] +pub async fn main() -> Result<(), Box> { + tracing_subscriber::registry() + .with( + tracing_subscriber::EnvFilter::try_from_default_env() + .unwrap_or_else(|_| "info,tower_http=info".into()), + ) + .with(tracing_subscriber::fmt::layer()) + .init(); + + let shared_state = AppState { + db: db::init().await?, + }; + + let _ = migration::Migrator::up(&shared_state.db, None).await; + + let app = Router::new() + .route("/company", get(company::get_all)) + .route("/company/:name", get(company::get_by_name)) + .route("/transaction", get(transaction::get_all)) + .route( + "/transaction/latest", + get(transaction::get_latest_transactions), + ) + .route( + "/transaction/aggregated", + get(transaction::get_aggregated_transactions), + ) + .route( + "/in_process_transaction", + get(in_process_transaction::get_all), + ) + .route( + "/in_process_transaction/:foreign_id/retry", + get(in_process_transaction::retry_failed_transaction), + ) + .route( + "/in_process_transaction/retry_all", + get(in_process_transaction::retry_all), + ) + .with_state(shared_state.clone()) + .fallback(fallback) + .layer( + TraceLayer::new_for_http() + .make_span_with(|request: &Request<_>| { + let matched_path = request + .extensions() + .get::() + .map(MatchedPath::as_str); + + info_span!( + "http_request", + method = ?request.method(), + full_path = ?request.uri(), + matched_path, + ) + }) + .on_request(|_request: &Request<_>, _span: &Span| { + info!("New request"); + }) + .on_response(|response: &Response, latency: Duration, _span: &Span| { + info!( + "Response, status {}, time {}ms", + response.status(), + latency.as_millis() + ); + }) + .on_failure( + |error: ServerErrorsFailureClass, latency: Duration, _span: &Span| { + error!("There was an error answering this request, the server nonetheless answered in {}ms, error: {}", latency.as_millis(), error); + }, + ), + ) + .layer( + CorsLayer::new() + .allow_origin("*".parse::().unwrap()) + .allow_methods([Method::GET]) + ); + + // Run tasks + tokio::task::spawn(async move { run_tasks(&shared_state.db).await }); + + let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); + axum::Server::bind(&addr) + .serve(app.into_make_service()) + .with_graceful_shutdown(shutdown_signal()) + .await?; + + Ok(()) +} + +async fn shutdown_signal() { + let ctrl_c = async { + signal::ctrl_c() + .await + .expect("failed to install Ctrl+C handler"); + }; + + #[cfg(unix)] + let terminate = async { + signal::unix::signal(signal::unix::SignalKind::terminate()) + .expect("failed to install signal handler") + .recv() + .await; + }; + + tokio::select! { + _ = ctrl_c => {}, + _ = terminate => {}, + } + + info!("Starting graceful shutdown"); +} diff --git a/server/src/route/company.rs b/server/src/route/company.rs index 2ccd2db..feb2cf1 100644 --- a/server/src/route/company.rs +++ b/server/src/route/company.rs @@ -1,50 +1,41 @@ -use rocket::{http::Status, response::status::Custom}; +use axum::extract::{Path, Query, State}; +use axum::Json; use sea_orm::{ColumnTrait, EntityTrait, QueryFilter, QuerySelect}; -use sea_orm_rocket::rocket::serde::json::Json; -use sea_orm_rocket::Connection; use serde::{Deserialize, Serialize}; use crate::db::paginate::{paginate, PaginatedResponse}; -use crate::db::Db; +use crate::error::AppError; use crate::model::{self, company}; +use crate::route::Pagination; +use crate::AppState; + +use super::Limit; -#[get("/company?&")] pub async fn get_all( - conn: Connection<'_, Db>, - page: Option, - size: Option, -) -> Result>, Custom> { + Query(pagination): Query, + State(state): State, +) -> Result>, AppError> { + let page = pagination.page; + let size = pagination.size; + let db = &state.db; let res = - paginate::(conn, page, size, None, None) - .await - .map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + paginate::(db, page, size, None, None) + .await?; Ok(Json(res)) } -#[get("/company/?")] -pub async fn get_by_isin( - conn: Connection<'_, Db>, - name: String, - limit: Option, -) -> Result>, Custom> { - let db = conn.into_inner(); +pub async fn get_by_name( + Query(Limit { limit }): Query, + State(state): State, + Path(name): Path, +) -> Result>, AppError> { + let conn = state.db; let res = company::Entity::find() .filter(company::Column::Name.contains(&name)) - .limit(limit.unwrap_or(10)) - .all(db) - .await - .map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + .limit(limit.unwrap_or(10).min(10)) + .all(&conn) + .await?; Ok(Json(res)) } diff --git a/server/src/route/in_process_transaction.rs b/server/src/route/in_process_transaction.rs index c5f8038..a2f950f 100644 --- a/server/src/route/in_process_transaction.rs +++ b/server/src/route/in_process_transaction.rs @@ -1,120 +1,76 @@ -use rocket::http::Status; -use rocket::response::status::Custom; +use axum::extract::{Path, Query, State}; +use axum::Json; use sea_orm::{ColumnTrait, EntityTrait, Order, QueryFilter, TransactionTrait}; -use sea_orm_rocket::rocket::serde::json::Json; -use sea_orm_rocket::Connection; use crate::db::paginate::{paginate, PaginatedResponse}; -use crate::db::Db; +use crate::error::AppError; use crate::model::transaction; use crate::model::{company, in_process_transaction}; +use crate::AppState; + +use super::Pagination; -#[get("/in_process_transaction?&")] pub async fn get_all( - conn: Connection<'_, Db>, - page: Option, - size: Option, -) -> Result>, Custom> { + state: State, + Query(pagination): Query, +) -> Result>, AppError> { + let db = &state.db; + let page = pagination.page; + let size = pagination.size; let res = paginate::< in_process_transaction::Entity, in_process_transaction::Model, in_process_transaction::Column, >( - conn, + db, page, size, Some(in_process_transaction::Column::CreatedAt), Some(Order::Asc), ) - .await - .map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + .await?; Ok(Json(res)) } -#[get("/in_process_transaction//retry")] pub async fn retry_failed_transaction( - conn: Connection<'_, Db>, - foreign_id: String, -) -> Result)>, Custom> { - let db = conn.into_inner(); - let txn = db.begin().await.map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + state: State, + Path(foreign_id): Path, +) -> Result)>, AppError> { + let db = &state.db; + let txn = db.begin().await?; let mut tr = in_process_transaction::Entity::find() .filter(in_process_transaction::Column::Failed.eq(1)) .filter(in_process_transaction::Column::ForeignId.eq(foreign_id.to_owned())) .one(&txn) - .await - .map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })? + .await? .ok_or_else(|| { - Custom( - Status::NotFound, - format!("Failed transaction {} doesn't exist", foreign_id), - ) + AppError::NotFound(format!("Failed transaction {} doesn't exist", foreign_id)) })?; - tr.process(&txn).await.map_err(|e| { - Custom( - Status::InternalServerError, - format!("Error retrying failed transaction {}", e), - ) - })?; + tr.process(&txn).await?; let res = transaction::Entity::find() .filter(transaction::Column::ForeignId.eq(foreign_id.to_owned())) .find_also_related(company::Entity) .one(&txn) - .await - .map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })? + .await? .ok_or_else(|| { - Custom( - Status::NotFound, - "Failed to fetch just created transaction".to_string(), - ) + AppError::NotFound("Failed to fetch just created transaction".to_string()) })?; - txn.commit().await.map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + txn.commit().await?; Ok(Json(res)) } -#[get("/in_process_transaction/retry_all")] -pub async fn retry_all(conn: Connection<'_, Db>) -> Result<(), Custom> { - let db = conn.into_inner(); +pub async fn retry_all(state: State) -> Result<(), AppError> { + let db = &state.db; let list = in_process_transaction::Entity::find() .all(db) .await - .map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + .map_err(|e| AppError::NotFound(format!("Database error: {}", e)))?; let mut res_list = vec![]; for mut tr in list { diff --git a/server/src/route/mod.rs b/server/src/route/mod.rs index d805fca..28de2ea 100644 --- a/server/src/route/mod.rs +++ b/server/src/route/mod.rs @@ -1,3 +1,43 @@ +use std::{fmt, str::FromStr}; + +use serde::{de, Deserialize, Deserializer}; + pub mod company; pub mod in_process_transaction; pub mod transaction; + +/// Struct to deserialize paginated routes query parameters +#[derive(Deserialize)] +pub struct Pagination { + #[serde(default, deserialize_with = "empty_string_as_none")] + pub page: Option, + #[serde(default, deserialize_with = "empty_string_as_none")] + pub size: Option, +} + +/// Struct to deserialize a company slug as a query parameters +#[derive(Deserialize)] +pub struct CompanySlug { + #[serde(default, deserialize_with = "empty_string_as_none")] + pub company_slug: Option, +} + +/// Struct to deserialize a limit as a query parameters +#[derive(Deserialize)] +pub struct Limit { + #[serde(default, deserialize_with = "empty_string_as_none")] + pub limit: Option, +} + +fn empty_string_as_none<'de, D, T>(de: D) -> Result, D::Error> +where + D: Deserializer<'de>, + T: FromStr, + T::Err: fmt::Display, +{ + let opt = Option::::deserialize(de)?; + match opt.as_deref() { + None | Some("") => Ok(None), + Some(s) => FromStr::from_str(s).map_err(de::Error::custom).map(Some), + } +} diff --git a/server/src/route/transaction.rs b/server/src/route/transaction.rs index 2e1c1f5..ea3290f 100644 --- a/server/src/route/transaction.rs +++ b/server/src/route/transaction.rs @@ -1,14 +1,16 @@ -use chrono::{Duration, NaiveDate, NaiveDateTime, Utc}; -use rocket::{http::Status, response::status::Custom}; +use axum::extract::{Json, Path, Query, State}; +use chrono::{NaiveDate, NaiveDateTime}; use sea_orm::{ prelude::*, DbBackend, FromQueryResult, ItemsAndPagesNumber, JoinType, Order, QueryOrder, QuerySelect, Statement, }; -use sea_orm_rocket::{rocket::serde::json::Json, Connection}; use serde::{Deserialize, Serialize}; use crate::db::paginate::{paginate_also_related, PaginatedResponse}; -use crate::{db::Db, model}; +use crate::error::AppError; +use crate::{model, AppState}; + +use super::{CompanySlug, Pagination}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionCompany { @@ -27,27 +29,17 @@ pub struct TransactionCompany { pub company: Option, } -#[get("/transaction?&&&")] -pub async fn get_transactions( - conn: Connection<'_, Db>, - company_slug: Option, - hours: Option, - page: Option, - size: Option, -) -> Result>, Custom> { +pub async fn get_all( + state: State, + Query(CompanySlug { company_slug }): Query, + Query(Pagination { page, size }): Query, +) -> Result>, AppError> { + let db = &state.db; + let mut filters = vec![]; if let Some(c) = company_slug { filters.push(model::company::Column::Slug.eq(c)) } - if let Some(h) = hours { - filters.push( - model::transaction::Column::CreatedAtUtc.gte( - Utc::now() - .naive_utc() - .checked_sub_signed(Duration::hours(h)), - ), - ) - } let res = paginate_also_related::< model::transaction::Entity, @@ -56,20 +48,14 @@ pub async fn get_transactions( model::company::Model, model::transaction::Column, >( - conn, + db, page, size, Some(model::transaction::Column::DatePublished), Some(Order::Desc), Some(filters), ) - .await - .map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + .await?; let list = res .list @@ -108,14 +94,12 @@ pub struct LatestTransaction { total: f32, } -#[get("/transaction/latest?&")] pub async fn get_latest_transactions( - conn: Connection<'_, Db>, - page: Option, - size: Option, -) -> Result>, Custom> { - let db = conn.into_inner(); - let s = size.unwrap_or(20).min(50); + state: State, + Query(pagination): Query, +) -> Result>, AppError> { + let db = &state.db; + let s = pagination.size.unwrap_or(20).min(50); let query_raw = "SELECT company.name as company_name, @@ -141,21 +125,11 @@ pub async fn get_latest_transactions( let ItemsAndPagesNumber { number_of_items: count, number_of_pages: num_pages, - } = pages.num_items_and_pages().await.map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + } = pages.num_items_and_pages().await?; - let p = page.unwrap_or(0).min(num_pages); + let p = pagination.page.unwrap_or(0).min(num_pages); - let list = pages.fetch_page(p).await.map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + let list = pages.fetch_page(p).await?; let res = PaginatedResponse { count, @@ -166,16 +140,13 @@ pub async fn get_latest_transactions( Ok(Json(res)) } -#[get("/transaction/aggregated?&&")] pub async fn get_aggregated_transactions( - conn: Connection<'_, Db>, - hours: Option, - page: Option, - size: Option, -) -> Result>, Custom> { - let db = conn.into_inner(); - let s = size.unwrap_or(20).min(50); - let mut query = model::company::Entity::find() + state: State, + pagination: Query, +) -> Result>, AppError> { + let db = &state.db; + let s = pagination.0.size.unwrap_or(20).min(50); + let query = model::company::Entity::find() .select_only() .join( JoinType::InnerJoin, @@ -186,16 +157,6 @@ pub async fn get_aggregated_transactions( .column(model::company::Column::Slug) .column_as(model::transaction::Column::Id.count(), "transaction_count"); - if let Some(h) = hours { - query = query.filter( - model::transaction::Column::CreatedAtUtc.gte( - Utc::now() - .naive_utc() - .checked_sub_signed(Duration::hours(h)), - ), - ) - } - let pages = query .group_by(model::company::Column::Name) .order_by(model::transaction::Column::Id.count(), Order::Desc) @@ -205,21 +166,11 @@ pub async fn get_aggregated_transactions( let ItemsAndPagesNumber { number_of_items: count, number_of_pages: num_pages, - } = pages.num_items_and_pages().await.map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + } = pages.num_items_and_pages().await?; - let p = page.unwrap_or(0).min(num_pages); + let p = pagination.0.page.unwrap_or(0).min(num_pages); - let list = pages.fetch_page(p).await.map_err(|e| { - Custom( - Status::InternalServerError, - format!("Database error: {}", e), - ) - })?; + let list = pages.fetch_page(p).await?; let res = PaginatedResponse { count, diff --git a/server/src/task/get_amf_transactions.rs b/server/src/task/get_amf_transactions.rs index 3eb4ace..e69e4d6 100644 --- a/server/src/task/get_amf_transactions.rs +++ b/server/src/task/get_amf_transactions.rs @@ -134,7 +134,7 @@ impl GetAMFTransactions { for tr in page.iter() { futures.push(async move { tr.clone().process(db).await }); } - let stream = futures::stream::iter(futures).buffer_unordered(10); + let stream = futures::stream::iter(futures).buffer_unordered(100); let _results: Vec> = stream.collect().await; } diff --git a/server/src/task/mod.rs b/server/src/task/mod.rs index bba3a19..bd605ed 100644 --- a/server/src/task/mod.rs +++ b/server/src/task/mod.rs @@ -1,6 +1,6 @@ use std::time::Duration; -use sea_orm::ConnectOptions; +use sea_orm::DatabaseConnection; use crate::{task::get_amf_transactions::GetAMFTransactions, CONFIG}; @@ -14,20 +14,8 @@ trait TaskTrait { fn run(&self) -> Result<(), Self::Err>; } -pub async fn run_tasks() -> Result<(), sea_orm::DbErr> { +pub async fn run_tasks(tasks_pool: &DatabaseConnection) -> Result<(), sea_orm::DbErr> { let config = &CONFIG; - info!("Creating task db pool"); - let mut options: ConnectOptions = ConnectOptions::new(config.database_url.to_owned()); - options - .max_connections(config.max_connections) - .min_connections(config.min_connections) - .connect_timeout(Duration::from_secs(config.connect_timeout)) - .acquire_timeout(Duration::from_secs(config.acquire_timeout)) - .idle_timeout(Duration::from_secs(config.idle_timeout)) - .max_lifetime(Duration::from_secs(config.max_lifetime)) - .sqlx_logging(config.sqlx_logging); - - let tasks_pool = sea_orm::Database::connect(options).await?; let mut inter = tokio::time::interval(Duration::from_secs(config.get_amf_transaction_interval)); loop { diff --git a/src/bin/server.rs b/src/bin/server.rs deleted file mode 100644 index da7ffb0..0000000 --- a/src/bin/server.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() -> Result<(), Box> { - server::main()?; - Ok(()) -}