diff --git a/Cargo.lock b/Cargo.lock index 4ebc3df..014b542 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -45,7 +45,7 @@ dependencies = [ "futures-util", "log", "once_cell", - "parking_lot", + "parking_lot 0.11.2", "pin-project 0.4.29", "smallvec", "tokio 0.2.25", @@ -71,10 +71,10 @@ dependencies = [ "futures-util", "log", "once_cell", - "parking_lot", + "parking_lot 0.11.2", "pin-project-lite 0.2.8", "smallvec", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-util 0.6.9", ] @@ -96,7 +96,7 @@ dependencies = [ "actix-web 4.0.0-rc.3", "casbin", "loge", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -128,10 +128,27 @@ dependencies = [ "log", "memchr", "pin-project-lite 0.2.8", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-util 0.6.9", ] +[[package]] +name = "actix-codec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" +dependencies = [ + "bitflags", + "bytes 1.1.0", + "futures-core", + "futures-sink", + "log", + "memchr", + "pin-project-lite 0.2.8", + "tokio 1.17.0", + "tokio-util 0.7.0", +] + [[package]] name = "actix-connect" version = "2.0.0" @@ -165,9 +182,9 @@ dependencies = [ [[package]] name = "actix-cors" -version = "0.6.0-beta.8" +version = "0.6.0-beta.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4f1bd0e31c745df129f0e94efd374d21f2a455bcc386c15d78ed9a9e7d4dd50" +checksum = "8debd30414af03e9411186aac95e0230b0bb1e91146f48015dfab5c049940223" dependencies = [ "actix-service 2.0.2", "actix-utils 3.0.0", @@ -226,7 +243,7 @@ version = "0.6.0-beta.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b49f1b48724a52605ba40b67ede24f5a6cbc246817f9278d280d393a28e8b0e" dependencies = [ - "actix-http 3.0.0-rc.2", + "actix-http 3.0.0-rc.3", "actix-service 2.0.2", "actix-utils 3.0.0", "actix-web 4.0.0-rc.3", @@ -292,14 +309,14 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.0.0-rc.2" +version = "3.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0185d65352deeea60d92231708068c04dc64f1ab307a1a307206a47d5a45d3" +checksum = "a8b5ba038f3bb4aa29ad9bdd7eba09955ff04503263c497fc61a389d6412f4e8" dependencies = [ - "actix-codec 0.4.2", + "actix-codec 0.5.0", "actix-rt 2.6.0", "actix-service 2.0.2", - "actix-tls 3.0.2", + "actix-tls 3.0.3", "actix-utils 3.0.0", "ahash", "base64 0.13.0", @@ -322,7 +339,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite 0.2.8", - "rand 0.8.4", + "rand 0.8.5", "sha-1 0.10.0", "smallvec", "zstd", @@ -330,17 +347,17 @@ dependencies = [ [[package]] name = "actix-http-test" -version = "3.0.0-beta.12" +version = "3.0.0-beta.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d67fa297842c7982a761c0c711224f216ac44d8d668d3691cb9d6c6d297a31" +checksum = "09594b8a7eaa15da5cfd0e25c779d4b1d6ded62d4a79904f1d91b0dcf97c78e7" dependencies = [ - "actix-codec 0.4.2", + "actix-codec 0.5.0", "actix-rt 2.6.0", "actix-server 2.0.0", "actix-service 2.0.2", - "actix-tls 3.0.2", + "actix-tls 3.0.3", "actix-utils 3.0.0", - "awc 3.0.0-beta.20", + "awc 3.0.0-beta.21", "base64 0.13.0", "bytes 1.1.0", "futures-core", @@ -351,7 +368,7 @@ dependencies = [ "serde_urlencoded", "slab", "socket2 0.4.4", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -431,19 +448,19 @@ dependencies = [ "actix-rt 2.6.0", "actix-service 2.0.2", "actix-session", - "actix-tls 3.0.2", + "actix-tls 3.0.3", "actix-web 4.0.0-rc.3", "backoff", "derive_more", "futures-core", "log", - "rand 0.8.4", + "rand 0.8.5", "redis", "redis-async", "serde 1.0.136", "serde_json", "time 0.3.7", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-util 0.6.9", ] @@ -497,7 +514,7 @@ checksum = "cdf3f2183be1241ed4dd22611850b85d38de0b08a09f1f7bcccbd0809084b359" dependencies = [ "actix-macros 0.2.3", "futures-core", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -535,7 +552,7 @@ dependencies = [ "mio 0.8.0", "num_cpus", "socket2 0.4.4", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -578,25 +595,25 @@ dependencies = [ [[package]] name = "actix-test" -version = "0.1.0-beta.12" +version = "0.1.0-beta.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "386598d02615bd976b19f05bbfad0d3a559bfdb6af658131889114672d689858" +checksum = "7919a113ef74b5d52218ea0bd310d0d1b0d2be822994716754e265f20734d601" dependencies = [ - "actix-codec 0.4.2", - "actix-http 3.0.0-rc.2", + "actix-codec 0.5.0", + "actix-http 3.0.0-rc.3", "actix-http-test", "actix-rt 2.6.0", "actix-service 2.0.2", "actix-utils 3.0.0", "actix-web 4.0.0-rc.3", - "awc 3.0.0-beta.20", + "awc 3.0.0-beta.21", "futures-core", "futures-util", "log", "serde 1.0.136", "serde_json", "serde_urlencoded", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -624,7 +641,7 @@ dependencies = [ "lazy_static", "log", "num_cpus", - "parking_lot", + "parking_lot 0.11.2", "threadpool", ] @@ -642,11 +659,11 @@ dependencies = [ [[package]] name = "actix-tls" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31ab31563b611fa822480b4255e8750cf0af9ce1b8b7bde298afe8447ef9333" +checksum = "9fde0cf292f7cdc7f070803cb9a0d45c018441321a78b1042ffbbb81ec333297" dependencies = [ - "actix-codec 0.4.2", + "actix-codec 0.5.0", "actix-rt 2.6.0", "actix-service 2.0.2", "actix-utils 3.0.0", @@ -657,7 +674,7 @@ dependencies = [ "pin-project-lite 0.2.8", "tokio-openssl", "tokio-rustls 0.23.2", - "tokio-util 0.6.9", + "tokio-util 0.7.0", "webpki-roots 0.22.2", ] @@ -737,13 +754,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83e3c85bc4116b69913b03f16cff8cade1212508fcd321847d9cfe3d3e41f991" dependencies = [ "actix-codec 0.4.2", - "actix-http 3.0.0-rc.2", + "actix-http 3.0.0-rc.3", "actix-macros 0.2.3", "actix-router 0.5.0-rc.3", "actix-rt 2.6.0", "actix-server 2.0.0", "actix-service 2.0.2", - "actix-tls 3.0.2", + "actix-tls 3.0.3", "actix-utils 3.0.0", "actix-web-codegen 0.5.0-rc.2", "ahash", @@ -786,6 +803,23 @@ dependencies = [ "pin-project 0.4.29", ] +[[package]] +name = "actix-web-actors" +version = "4.0.0-beta.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95319210d3670dcdc918e670c076bd77f0b8ee557d84c157d8c408796bcd5eb9" +dependencies = [ + "actix 0.12.0", + "actix-codec 0.5.0", + "actix-http 3.0.0-rc.3", + "actix-web 4.0.0-rc.3", + "bytes 1.1.0", + "bytestring", + "futures-core", + "pin-project-lite 0.2.8", + "tokio 1.17.0", +] + [[package]] name = "actix-web-codegen" version = "0.4.0" @@ -813,7 +847,7 @@ dependencies = [ name = "actix-web-cors" version = "1.0.0" dependencies = [ - "actix-cors 0.6.0-beta.8", + "actix-cors 0.6.0-beta.10", "actix-web 4.0.0-rc.3", "env_logger 0.9.0", "futures", @@ -993,9 +1027,9 @@ checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" [[package]] name = "askama" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d8f355701c672c2ba3d718acbd213f740beea577cc4eae66accdffe15be1882" +checksum = "fb98f10f371286b177db5eeb9a6e5396609555686a35e1d4f7b9a9c6d8af0139" dependencies = [ "askama_derive", "askama_escape", @@ -1004,9 +1038,9 @@ dependencies = [ [[package]] name = "askama_derive" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84704cab5b7ae0fd3a9f78ee5eb7b27f3749df445f04623db6633459ae283267" +checksum = "87bf87e6e8b47264efa9bde63d6225c6276a52e05e91bf37eaa8afd0032d6b71" dependencies = [ "askama_shared", "proc-macro2", @@ -1015,18 +1049,20 @@ dependencies = [ [[package]] name = "askama_escape" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1bb320f97e6edf9f756bf015900038e43c7700e059688e5724a928c8f3b8d5" +checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" [[package]] name = "askama_shared" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dae03eebba55a2697a376e58b573a29fe36893157173ac8df312ad85f3c0e012" +checksum = "e3d372b233d121e841b4cc5dc716538755e338ca902b3e12ac131ffb6b9d5fbf" dependencies = [ "askama_escape", "humansize", + "mime", + "mime_guess", "nom 7.1.0", "num-traits 0.2.14", "percent-encoding", @@ -1085,7 +1121,7 @@ dependencies = [ "actix 0.10.0", "actix-http 2.2.2", "actix-web 3.3.3", - "actix-web-actors", + "actix-web-actors 3.0.0", "async-channel", "async-graphql", "futures-util", @@ -1248,9 +1284,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "awc" @@ -1278,15 +1314,15 @@ dependencies = [ [[package]] name = "awc" -version = "3.0.0-beta.20" +version = "3.0.0-beta.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a64a95bbf4905fd057ea45b70fdfeeb9c7ae09f03f091642c4e66a16ebb3ad5" +checksum = "d91ad5074d7d2d8be6ef74d4ecb79c0f4d5f58bdc7ec896d5fbaa9f2fb9bfa5e" dependencies = [ - "actix-codec 0.4.2", - "actix-http 3.0.0-rc.2", + "actix-codec 0.5.0", + "actix-http 3.0.0-rc.3", "actix-rt 2.6.0", "actix-service 2.0.2", - "actix-tls 3.0.2", + "actix-tls 3.0.3", "actix-utils 3.0.0", "ahash", "base64 0.13.0", @@ -1303,12 +1339,12 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite 0.2.8", - "rand 0.8.4", - "rustls 0.20.2", + "rand 0.8.5", + "rustls 0.20.3", "serde 1.0.136", "serde_json", "serde_urlencoded", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -1316,11 +1352,11 @@ name = "awc_https" version = "1.0.0" dependencies = [ "actix-web 4.0.0-rc.3", - "awc 3.0.0-beta.20", + "awc 3.0.0-beta.21", "env_logger 0.9.0", "log", "mime", - "rustls 0.20.2", + "rustls 0.20.3", "webpki-roots 0.22.2", ] @@ -1431,9 +1467,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d36a02058e76b040de25a4464ba1c80935655595b661505c8b39b664828b95" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ "generic-array 0.14.5", ] @@ -1497,7 +1533,7 @@ dependencies = [ "hex", "indexmap", "lazy_static", - "rand 0.8.4", + "rand 0.8.5", "serde 1.0.136", "serde_bytes", "serde_json", @@ -1618,20 +1654,20 @@ checksum = "e3be2866a3a3174b9d31a11d9f9ef219ab84a444d107981c51bf79d7be221adc" dependencies = [ "async-trait", "lazy_static", - "parking_lot", + "parking_lot 0.11.2", "regex", "rhai", "ritelinked", "serde 1.0.136", "thiserror", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] name = "cc" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" dependencies = [ "jobserver", ] @@ -1701,9 +1737,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.0.14" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63edc3f163b3c71ec8aa23f9bd6070f77edbf3d1d198b164afa90ff00e4ec62" +checksum = "e5f1fea81f183005ced9e59cdb01737ef2423956dac5a6d731b06b2ecfaa3467" dependencies = [ "atty", "bitflags", @@ -1718,9 +1754,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.0.14" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1132dc3944b31c20dd8b906b3a9f0a5d0243e092d59171414969657ac6aa85" +checksum = "5fd1122e63869df2cb309f449da1ad54a7c6dfeb7c7e6ccd8e0825d9eb93bb72" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -1763,7 +1799,7 @@ dependencies = [ "futures-core", "memchr", "pin-project-lite 0.2.8", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-util 0.6.9", ] @@ -1830,10 +1866,10 @@ dependencies = [ "aes-gcm", "base64 0.13.0", "hkdf", - "hmac 0.12.0", + "hmac 0.12.1", "percent-encoding", - "rand 0.8.4", - "sha2 0.10.1", + "rand 0.8.5", + "sha2 0.10.2", "subtle", "time 0.3.7", "version_check 0.9.4", @@ -1846,7 +1882,7 @@ dependencies = [ "actix-identity", "actix-web 4.0.0-rc.3", "env_logger 0.9.0", - "rand 0.8.4", + "rand 0.8.5", ] [[package]] @@ -1883,9 +1919,9 @@ checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -1923,9 +1959,9 @@ checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" [[package]] name = "crc32fast" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2209c310e29876f7f0b2721e7e26b84aff178aa3da5d091f9bfbf47669e60e3" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if 1.0.0", ] @@ -1947,17 +1983,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", ] [[package]] name = "crossbeam-queue" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b979d76c9fcb84dffc80a73f7290da0f83e4c95773494674cb44b76d13a7a110" +checksum = "4dd435b205a4842da59efd07628f921c096bc1cc0a156835b4fa0bcb9a19bcce" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", ] [[package]] @@ -1973,9 +2009,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" +checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" dependencies = [ "cfg-if 1.0.0", "lazy_static", @@ -1983,11 +2019,12 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d6b536309245c849479fba3da410962a43ed8e51c26b729208ec0ac2798d0" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" dependencies = [ "generic-array 0.14.5", + "typenum", ] [[package]] @@ -2095,7 +2132,7 @@ dependencies = [ "deadpool-runtime", "num_cpus", "serde 1.0.136", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -2107,7 +2144,7 @@ dependencies = [ "deadpool", "log", "serde 1.0.136", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-postgres", ] @@ -2117,7 +2154,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1" dependencies = [ - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -2207,13 +2244,12 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b697d66081d42af4fba142d56918a3cb21dc8eb63372c6b85d14f44fb9c5979b" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "block-buffer 0.10.0", + "block-buffer 0.10.2", "crypto-common", - "generic-array 0.14.5", "subtle", ] @@ -2328,7 +2364,7 @@ dependencies = [ "actix-web 4.0.0-rc.3", "derive_more", "env_logger 0.9.0", - "rand 0.8.4", + "rand 0.8.5", ] [[package]] @@ -2407,9 +2443,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.10.10" +version = "0.10.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d04dafd11240188e146b6f6476a898004cace3be31d4ec5e08e216bf4947ac0" +checksum = "0b279436a715a9de95dcd26b151db590a71961cc06e54918b24fe0dd5b7d3fc4" dependencies = [ "futures-core", "futures-sink", @@ -2474,9 +2510,9 @@ checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b" +checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" dependencies = [ "mac", "new_debug_unreachable", @@ -2484,9 +2520,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -2499,9 +2535,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -2509,9 +2545,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-enum" @@ -2526,9 +2562,9 @@ dependencies = [ [[package]] name = "futures-executor" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -2543,20 +2579,20 @@ checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" dependencies = [ "futures-core", "lock_api", - "parking_lot", + "parking_lot 0.11.2", ] [[package]] name = "futures-io" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-macro" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ "proc-macro2", "quote", @@ -2565,21 +2601,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-task" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-util" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ "futures-channel", "futures-core", @@ -2727,7 +2763,7 @@ dependencies = [ "http", "indexmap", "slab", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-util 0.6.9", "tracing", ] @@ -2805,11 +2841,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158bc31e00a68e380286904cc598715f861f2b0ccf7aa6fe20c6d0c49ca5d0f6" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" dependencies = [ - "hmac 0.12.0", + "hmac 0.12.1", ] [[package]] @@ -2824,11 +2860,11 @@ dependencies = [ [[package]] name = "hmac" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddca131f3e7f2ce2df364b57949a9d47915cfbd35e46cfee355ccebbf794d6a2" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.1", + "digest 0.10.3", ] [[package]] @@ -2879,7 +2915,7 @@ name = "http-proxy" version = "1.0.0" dependencies = [ "actix-web 4.0.0-rc.3", - "awc 3.0.0-beta.20", + "awc 3.0.0-beta.21", "clap", "env_logger 0.9.0", "log", @@ -2888,15 +2924,15 @@ dependencies = [ [[package]] name = "http-range" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee9694f83d9b7c09682fdb32213682939507884e5bcf227be9aff5d644b90dc" +checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" [[package]] name = "httparse" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" [[package]] name = "httpdate" @@ -2948,9 +2984,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.16" +version = "0.14.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "043f0e083e9901b6cc658a77d1eb86f4fc650bbb977a4337dd63192826aa85dd" dependencies = [ "bytes 1.1.0", "futures-channel", @@ -2961,10 +2997,10 @@ dependencies = [ "http-body 0.4.4", "httparse", "httpdate 1.0.2", - "itoa 0.4.8", + "itoa 1.0.1", "pin-project-lite 0.2.8", "socket2 0.4.4", - "tokio 1.16.1", + "tokio 1.17.0", "tower-service", "tracing", "want", @@ -2990,9 +3026,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes 1.1.0", - "hyper 0.14.16", + "hyper 0.14.17", "native-tls", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-native-tls", ] @@ -3025,7 +3061,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" dependencies = [ - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", "globset", "lazy_static", "log", @@ -3167,7 +3203,7 @@ name = "json-validation" version = "1.0.0" dependencies = [ "actix-web 4.0.0-rc.3", - "awc 3.0.0-beta.20", + "awc 3.0.0-beta.21", "env_logger 0.9.0", "futures", "log", @@ -3210,9 +3246,9 @@ dependencies = [ [[package]] name = "juniper" -version = "0.15.8" +version = "0.15.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8963f95e2c29f91dd5e1e2a7273a6a3a08057df0a17d410a0b3515e4a428fa5a" +checksum = "21ac55c9084d08a7e315d78e2b15b7cc220f5eb67413c6ebf6967ee5de3b69fc" dependencies = [ "async-trait", "bson 1.2.4", @@ -3262,9 +3298,9 @@ dependencies = [ [[package]] name = "juniper_codegen" -version = "0.15.8" +version = "0.15.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437dfaf580f470754d79b16bf2426d8de97e74fea1b2d38c587cd5054d07c6d7" +checksum = "aee97671061ad50301ba077d054d295e01d31a1868fbd07902db651f987e71db" dependencies = [ "proc-macro-error", "proc-macro2", @@ -3340,9 +3376,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.116" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74" +checksum = "06e509672465a0504304aa87f9f176f2b2b716ed8fb105ebe5c02dc6dce96a94" [[package]] name = "libsqlite3-sys" @@ -3487,11 +3523,11 @@ dependencies = [ [[package]] name = "md-5" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a38fc55c8bbc10058782919516f88826e70320db6d206aebc49611d24216ae" +checksum = "658646b21e0b72f7866c7038ab086d3d5e1cd6271f060fd37defb241949d0582" dependencies = [ - "digest 0.10.1", + "digest 0.10.3", ] [[package]] @@ -3525,7 +3561,7 @@ version = "1.0.0" dependencies = [ "actix-web 4.0.0-rc.3", "futures", - "rustls 0.20.2", + "rustls 0.20.3", "rustls-pemfile", ] @@ -3537,9 +3573,9 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ "mime", "unicase", @@ -3580,19 +3616,6 @@ dependencies = [ "winapi 0.2.8", ] -[[package]] -name = "mio" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" -dependencies = [ - "libc", - "log", - "miow 0.3.7", - "ntapi", - "winapi 0.3.9", -] - [[package]] name = "mio" version = "0.8.0" @@ -3671,7 +3694,7 @@ dependencies = [ "os_info", "pbkdf2", "percent-encoding", - "rand 0.8.4", + "rand 0.8.5", "rustls 0.19.1", "rustls-pemfile", "serde 1.0.136", @@ -3684,7 +3707,7 @@ dependencies = [ "strsim", "take_mut", "thiserror", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-rustls 0.22.0", "tokio-util 0.6.9", "trust-dns-proto 0.20.4", @@ -3890,9 +3913,9 @@ dependencies = [ [[package]] name = "ntapi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" dependencies = [ "winapi 0.3.9", ] @@ -4041,9 +4064,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198e392be7e882f0c2836f425e430f81d9a0e99651e4646311347417cddbfd43" +checksum = "023df84d545ef479cf67fd2f4459a613585c9db4852c2fad12ab70587859d340" dependencies = [ "log", "winapi 0.3.9", @@ -4066,7 +4089,17 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.1", ] [[package]] @@ -4083,6 +4116,19 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "parking_lot_core" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + [[package]] name = "parse-zoneinfo" version = "0.3.0" @@ -4211,7 +4257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ "phf_shared 0.10.0", - "rand 0.8.4", + "rand 0.8.5", ] [[package]] @@ -4319,11 +4365,11 @@ dependencies = [ "byteorder", "bytes 1.1.0", "fallible-iterator", - "hmac 0.12.0", - "md-5 0.10.0", + "hmac 0.12.1", + "md-5 0.10.1", "memchr", - "rand 0.8.4", - "sha2 0.10.1", + "rand 0.8.5", + "sha2 0.10.2", "stringprep", ] @@ -4361,9 +4407,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettyplease" -version = "0.1.2" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76e37a075ae09b1f183afcbbd97e9cde2900e1fbaebeee50b3925ccd559b55a" +checksum = "53748b0c63a6a276a2c8b591de5b117d7590f1b41e34062efeadd222f841d1a3" dependencies = [ "proc-macro2", "syn", @@ -4371,9 +4417,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" +checksum = "9dada8c9981fcf32929c3c0f0cd796a9284aca335565227ed88c83babb1d43dc" dependencies = [ "thiserror", "toml", @@ -4501,7 +4547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" dependencies = [ "log", - "parking_lot", + "parking_lot 0.11.2", "scheduled-thread-pool", ] @@ -4535,20 +4581,19 @@ dependencies = [ "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", - "rand_hc 0.2.0", + "rand_hc", "rand_pcg", ] [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.3", - "rand_hc 0.3.1", ] [[package]] @@ -4598,15 +4643,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - [[package]] name = "rand_pcg" version = "0.2.1" @@ -4632,7 +4668,7 @@ dependencies = [ "percent-encoding", "pin-project-lite 0.2.8", "sha1", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-native-tls", "tokio-util 0.6.9", "url", @@ -4649,7 +4685,7 @@ dependencies = [ "futures-sink", "futures-util", "log", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-util 0.6.9", ] @@ -4675,7 +4711,7 @@ checksum = "028e4e2639af069271f0681968c11a34ec2d7b726fddbd087964fde34b52f99a" dependencies = [ "redis", "tang-rs", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -4773,7 +4809,7 @@ dependencies = [ "h2 0.3.11", "http", "http-body 0.4.4", - "hyper 0.14.16", + "hyper 0.14.17", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -4786,7 +4822,7 @@ dependencies = [ "serde 1.0.136", "serde_json", "serde_urlencoded", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-native-tls", "url", "wasm-bindgen", @@ -4807,9 +4843,9 @@ dependencies = [ [[package]] name = "rhai" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898b114d6cfa18af4593393fdc6c7437118e7e624d97f635fba8c75fd5c06f56" +checksum = "49c94fda0280985896ed6d8bf0b43bbb5a7f0e39ccc8728ac907ddb4f06dae94" dependencies = [ "ahash", "instant", @@ -4877,7 +4913,7 @@ dependencies = [ "crc32fast", "futures", "http", - "hyper 0.14.16", + "hyper 0.14.17", "hyper-tls 0.5.0", "lazy_static", "log", @@ -4886,7 +4922,7 @@ dependencies = [ "rustc_version 0.4.0", "serde 1.0.136", "serde_json", - "tokio 1.16.1", + "tokio 1.17.0", "xml-rs", ] @@ -4900,11 +4936,11 @@ dependencies = [ "chrono", "dirs-next", "futures", - "hyper 0.14.16", + "hyper 0.14.17", "serde 1.0.136", "serde_json", "shlex", - "tokio 1.16.1", + "tokio 1.17.0", "zeroize", ] @@ -4935,7 +4971,7 @@ dependencies = [ "hex", "hmac 0.11.0", "http", - "hyper 0.14.16", + "hyper 0.14.17", "log", "md-5 0.9.1", "percent-encoding", @@ -4944,7 +4980,7 @@ dependencies = [ "rustc_version 0.4.0", "serde 1.0.136", "sha2 0.9.9", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -4971,7 +5007,7 @@ dependencies = [ "base64 0.13.0", "blake2b_simd", "constant_time_eq", - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", ] [[package]] @@ -5012,7 +5048,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.4", + "semver 1.0.5", ] [[package]] @@ -5030,9 +5066,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" +checksum = "b323592e3164322f5b193dc4302e4e36cd8d37158a712d664efae1a5c2791700" dependencies = [ "log", "ring", @@ -5044,11 +5080,11 @@ dependencies = [ name = "rustls-client-cert" version = "1.0.0" dependencies = [ - "actix-tls 3.0.2", + "actix-tls 3.0.3", "actix-web 4.0.0-rc.3", "env_logger 0.9.0", "log", - "rustls 0.20.2", + "rustls 0.20.3", "rustls-pemfile", ] @@ -5059,7 +5095,7 @@ dependencies = [ "actix-files 0.6.0-beta.16", "actix-web 4.0.0-rc.3", "env_logger 0.9.0", - "rustls 0.20.2", + "rustls 0.20.3", "rustls-pemfile", ] @@ -5119,7 +5155,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" dependencies = [ - "parking_lot", + "parking_lot 0.11.2", ] [[package]] @@ -5150,9 +5186,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fed7948b6c68acbb6e20c334f55ad635dc0f75506963de4464289fbd3b051ac" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ "bitflags", "core-foundation", @@ -5163,9 +5199,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a57321bf8bc2362081b2599912d2961fe899c0efadf1b4b2f8d48b3e253bb96c" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -5182,9 +5218,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" +checksum = "0486718e92ec9a68fbed73bb5ef687d71103b142595b406835649bebd33f72c7" [[package]] name = "semver-parser" @@ -5241,9 +5277,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ "indexmap", "itoa 1.0.1", @@ -5265,9 +5301,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6056b4cb69b6e43e3a0f055def223380baecc99da683884f205bf347f7c4b3" +checksum = "ec1e6ec4d8950e5b1e894eac0d360742f3b1407a6078a604a731c4b3f49cefbc" dependencies = [ "rustversion", "serde 1.0.136", @@ -5290,10 +5326,13 @@ dependencies = [ name = "server-sent-events" version = "1.0.0" dependencies = [ - "actix-web 3.3.3", - "env_logger 0.8.4", - "futures", - "tokio 0.2.25", + "actix-web 4.0.0-rc.3", + "env_logger 0.9.0", + "futures-util", + "log", + "parking_lot 0.12.0", + "tokio 1.17.0", + "tokio-stream", ] [[package]] @@ -5329,7 +5368,7 @@ checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.1", + "digest 0.10.3", ] [[package]] @@ -5374,13 +5413,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.1", + "digest 0.10.3", ] [[package]] @@ -5396,7 +5435,7 @@ dependencies = [ "actix-web 4.0.0-rc.3", "env_logger 0.9.0", "futures", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -5550,7 +5589,7 @@ dependencies = [ "crc", "crossbeam-channel 0.5.2", "crossbeam-queue", - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", "either", "flume", "futures-channel", @@ -5567,7 +5606,7 @@ dependencies = [ "log", "memchr", "once_cell", - "parking_lot", + "parking_lot 0.11.2", "percent-encoding", "rustls 0.19.1", "serde 1.0.136", @@ -5612,7 +5651,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8061cbaa91ee75041514f67a09398c65a64efed72c90151ecd47593bad53da99" dependencies = [ "once_cell", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-rustls 0.22.0", ] @@ -5705,14 +5744,14 @@ checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" [[package]] name = "string_cache" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923f0f39b6267d37d23ce71ae7235602134b250ace715dd2c90421998ddac0c6" +checksum = "33994d0838dc2d152d17a62adf608a869b5e846b65b389af7f3dbc1de45c5b26" dependencies = [ "lazy_static", "new_debug_unreachable", - "parking_lot", - "phf_shared 0.8.0", + "parking_lot 0.11.2", + "phf_shared 0.10.0", "precomputed-hash", "serde 1.0.136", ] @@ -5873,7 +5912,7 @@ dependencies = [ "percent-encoding", "pest", "pest_derive", - "rand 0.8.4", + "rand 0.8.5", "regex", "serde 1.0.136", "serde_json", @@ -6066,19 +6105,20 @@ dependencies = [ [[package]] name = "tokio" -version = "1.16.1" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a" +checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" dependencies = [ "bytes 1.1.0", "libc", "memchr", - "mio 0.7.14", + "mio 0.8.0", "num_cpus", "once_cell", - "parking_lot", + "parking_lot 0.12.0", "pin-project-lite 0.2.8", "signal-hook-registry", + "socket2 0.4.4", "tokio-macros", "winapi 0.3.9", ] @@ -6101,7 +6141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ "native-tls", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -6113,7 +6153,7 @@ dependencies = [ "futures-util", "openssl", "openssl-sys", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -6148,14 +6188,14 @@ dependencies = [ "fallible-iterator", "futures", "log", - "parking_lot", + "parking_lot 0.11.2", "percent-encoding", "phf 0.10.1", "pin-project-lite 0.2.8", "postgres-protocol", "postgres-types", "socket2 0.4.4", - "tokio 1.16.1", + "tokio 1.17.0", "tokio-util 0.6.9", ] @@ -6166,7 +6206,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ "rustls 0.19.1", - "tokio 1.16.1", + "tokio 1.17.0", "webpki 0.21.4", ] @@ -6176,8 +6216,8 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" dependencies = [ - "rustls 0.20.2", - "tokio 1.16.1", + "rustls 0.20.3", + "tokio 1.17.0", "webpki 0.22.0", ] @@ -6189,7 +6229,7 @@ checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" dependencies = [ "futures-core", "pin-project-lite 0.2.8", - "tokio 1.16.1", + "tokio 1.17.0", ] [[package]] @@ -6228,7 +6268,21 @@ dependencies = [ "futures-sink", "log", "pin-project-lite 0.2.8", - "tokio 1.16.1", + "tokio 1.17.0", +] + +[[package]] +name = "tokio-util" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1" +dependencies = [ + "bytes 1.1.0", + "futures-core", + "futures-sink", + "log", + "pin-project-lite 0.2.8", + "tokio 1.17.0", ] [[package]] @@ -6248,9 +6302,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9" dependencies = [ "cfg-if 1.0.0", "log", @@ -6260,9 +6314,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23" dependencies = [ "lazy_static", ] @@ -6314,11 +6368,11 @@ dependencies = [ "ipnet", "lazy_static", "log", - "rand 0.8.4", + "rand 0.8.5", "smallvec", "thiserror", "tinyvec", - "tokio 1.16.1", + "tokio 1.17.0", "url", ] @@ -6353,11 +6407,11 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot", + "parking_lot 0.11.2", "resolv-conf", "smallvec", "thiserror", - "tokio 1.16.1", + "tokio 1.17.0", "trust-dns-proto 0.20.4", ] @@ -6384,7 +6438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" dependencies = [ "cfg-if 1.0.0", - "rand 0.8.4", + "rand 0.8.5", "static_assertions 1.1.0", ] @@ -6502,9 +6556,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "unicode-width" @@ -6918,7 +6972,7 @@ dependencies = [ "actix-codec 0.3.0", "actix-files 0.3.0", "actix-web 3.3.3", - "actix-web-actors", + "actix-web-actors 3.0.0", "awc 2.0.3", "bytes 0.5.6", "env_logger 0.8.4", @@ -6931,7 +6985,7 @@ version = "1.0.0" dependencies = [ "actix 0.10.0", "actix-web 3.3.3", - "actix-web-actors", + "actix-web-actors 3.0.0", "env_logger 0.8.4", ] @@ -6944,7 +6998,7 @@ dependencies = [ "actix-files 0.4.1", "actix-rt 1.1.1", "actix-web 3.3.3", - "actix-web-actors", + "actix-web-actors 3.0.0", "env_logger 0.8.4", "futures", "log", @@ -6958,7 +7012,7 @@ dependencies = [ "actix 0.10.0", "actix-files 0.3.0", "actix-web 3.3.3", - "actix-web-actors", + "actix-web-actors 3.0.0", "byteorder", "bytes 0.5.6", "env_logger 0.8.4", @@ -6972,20 +7026,22 @@ dependencies = [ name = "websocket-tcp-example" version = "1.0.0" dependencies = [ - "actix 0.10.0", - "actix-codec 0.3.0", - "actix-files 0.3.0", - "actix-web 3.3.3", - "actix-web-actors", + "actix 0.12.0", + "actix-codec 0.4.2", + "actix-files 0.6.0-beta.16", + "actix-web 4.0.0-rc.3", + "actix-web-actors 4.0.0-beta.12", "byteorder", - "bytes 0.5.6", - "env_logger 0.8.4", + "bytes 1.1.0", + "env_logger 0.9.0", "futures", - "rand 0.7.3", + "log", + "rand 0.8.5", "serde 1.0.136", "serde_json", - "tokio 0.2.25", - "tokio-util 0.3.1", + "tokio 1.17.0", + "tokio-stream", + "tokio-util 0.6.9", ] [[package]] @@ -7037,6 +7093,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" + +[[package]] +name = "windows_i686_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" + +[[package]] +name = "windows_i686_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" + [[package]] name = "winreg" version = "0.6.2" diff --git a/websockets/tcp-chat/Cargo.toml b/websockets/tcp-chat/Cargo.toml index ccb31a0..4ae3556 100644 --- a/websockets/tcp-chat/Cargo.toml +++ b/websockets/tcp-chat/Cargo.toml @@ -12,18 +12,20 @@ name = "websocket-tcp-client" path = "src/client.rs" [dependencies] -actix = "0.10" -actix-web = "3" -actix-web-actors = "3" -actix-files = "0.3" -actix-codec = "0.3" +actix = "0.12" +actix-codec = "0.4.1" +actix-files = "0.6.0-beta.16" +actix-web = "4.0.0-rc.3" +actix-web-actors = "4.0.0-beta.11" -rand = "0.7" -bytes = "0.5.3" byteorder = "1.2" +bytes = "1" +env_logger = "0.9" futures = "0.3" -env_logger = "0.8" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -tokio = "0.2.4" -tokio-util = "0.3" +log = "0.4" +rand = "0.8" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +tokio = { version = "1", features = ["full"] } +tokio-util = { version = "0.6", features = ["codec"] } +tokio-stream = "0.1.8" diff --git a/websockets/tcp-chat/src/client.rs b/websockets/tcp-chat/src/client.rs index b4d442b..28a707e 100644 --- a/websockets/tcp-chat/src/client.rs +++ b/websockets/tcp-chat/src/client.rs @@ -1,139 +1,114 @@ -use actix::prelude::*; -use std::str::FromStr; -use std::time::Duration; -use std::{io, net, thread}; -use tokio::io::{split, WriteHalf}; -use tokio::net::TcpStream; -use tokio_util::codec::FramedRead; +use std::{io, thread}; + +use futures::{SinkExt, StreamExt}; +use tokio::{net::TcpStream, select, sync::mpsc}; +use tokio_stream::wrappers::UnboundedReceiverStream; mod codec; #[actix_web::main] async fn main() { - // Connect to server - let addr = net::SocketAddr::from_str("127.0.0.1:12345").unwrap(); + env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); println!("Running chat client"); - let stream = TcpStream::connect(&addr).await.unwrap(); + let (cmd_tx, cmd_rx) = mpsc::unbounded_channel(); + let mut cmd_rx = UnboundedReceiverStream::new(cmd_rx); - let addr = ChatClient::create(|ctx| { - let (r, w) = split(stream); - ChatClient::add_stream(FramedRead::new(r, codec::ClientChatCodec), ctx); - ChatClient { - framed: actix::io::FramedWrite::new(w, codec::ClientChatCodec, ctx), - } - }); + // run blocking terminal input reader on separate thread + let input_thread = thread::spawn(move || loop { + let mut cmd = String::with_capacity(32); - // start console loop - thread::spawn(move || loop { - let mut cmd = String::new(); if io::stdin().read_line(&mut cmd).is_err() { - println!("error"); + log::error!("error reading line"); return; } - addr.do_send(ClientCommand(cmd)); + if cmd == "/exit" { + println!("exiting input loop"); + return; + } + + cmd_tx.send(cmd).unwrap(); }); -} -struct ChatClient { - framed: actix::io::FramedWrite< - codec::ChatRequest, - WriteHalf, - codec::ClientChatCodec, - >, -} + let io = TcpStream::connect(("127.0.0.1", 12345)).await.unwrap(); + let mut framed = actix_codec::Framed::new(io, codec::ClientChatCodec); -#[derive(Message)] -#[rtype(result = "()")] -struct ClientCommand(String); - -impl Actor for ChatClient { - type Context = Context; - - fn started(&mut self, ctx: &mut Context) { - // start heartbeats otherwise server will disconnect after 10 seconds - self.hb(ctx) - } - - fn stopped(&mut self, _: &mut Context) { - println!("Disconnected"); - - // Stop application on disconnect - System::current().stop(); - } -} - -impl ChatClient { - fn hb(&self, ctx: &mut Context) { - ctx.run_later(Duration::new(1, 0), |act, ctx| { - act.framed.write(codec::ChatRequest::Ping); - act.hb(ctx); - - // client should also check for a timeout here, similar to the - // server code - }); - } -} - -impl actix::io::WriteHandler for ChatClient {} - -/// Handle stdin commands -impl Handler for ChatClient { - type Result = (); - - fn handle(&mut self, msg: ClientCommand, _: &mut Context) { - let m = msg.0.trim(); - if m.is_empty() { - return; - } - - // we check for /sss type of messages - if m.starts_with('/') { - let v: Vec<&str> = m.splitn(2, ' ').collect(); - match v[0] { - "/list" => { - self.framed.write(codec::ChatRequest::List); - } - "/join" => { - if v.len() == 2 { - self.framed.write(codec::ChatRequest::Join(v[1].to_owned())); - } else { - println!("!!! room name is required"); + loop { + select! { + Some(msg) = framed.next() => { + match msg { + Ok(codec::ChatResponse::Message(ref msg)) => { + println!("message: {}", msg); } + Ok(codec::ChatResponse::Joined(ref msg)) => { + println!("!!! joined: {}", msg); + } + + Ok(codec::ChatResponse::Rooms(rooms)) => { + println!("!!! Available rooms:"); + for room in rooms { + println!("{}", room); + } + } + + // respond to pings with a "pong" + Ok(codec::ChatResponse::Ping) => { framed.send(codec::ChatRequest::Ping).await.unwrap(); }, + + _ => { eprintln!("{:?}", msg); } } - _ => println!("!!! unknown command"), } - } else { - self.framed.write(codec::ChatRequest::Message(m.to_owned())); + + Some(cmd) = cmd_rx.next() => { + if cmd.is_empty() { + continue; + } + + if cmd == "/exit" { + println!("exiting recv loop"); + return; + } + + if let Some(req) = parse_client_command(&cmd) { + // submit client command + framed.send(req).await.unwrap(); + } + } + + else => break } } + + input_thread.join().unwrap(); } -/// Server communication +fn parse_client_command(msg: &str) -> Option { + let m = msg.trim(); -impl StreamHandler> for ChatClient { - fn handle( - &mut self, - msg: Result, - ctx: &mut Context, - ) { - match msg { - Ok(codec::ChatResponse::Message(ref msg)) => { - println!("message: {}", msg); - } - Ok(codec::ChatResponse::Joined(ref msg)) => { - println!("!!! joined: {}", msg); - } - Ok(codec::ChatResponse::Rooms(rooms)) => { - println!("\n!!! Available rooms:"); - for room in rooms { - println!("{}", room); + if m.is_empty() { + return None; + } + + // we check for /sss type of messages + if m.starts_with('/') { + let v: Vec<&str> = m.splitn(2, ' ').collect(); + match v[0] { + "/list" => Some(codec::ChatRequest::List), + "/join" => { + if v.len() == 2 { + Some(codec::ChatRequest::Join(v[1].to_owned())) + } else { + println!("!!! room name is required"); + None } - println!(); } - _ => ctx.stop(), + _ => { + println!("!!! unknown command"); + None + } } + } else { + Some(codec::ChatRequest::Message(m.to_owned())) } } diff --git a/websockets/tcp-chat/src/codec.rs b/websockets/tcp-chat/src/codec.rs index 098e71e..daa369c 100644 --- a/websockets/tcp-chat/src/codec.rs +++ b/websockets/tcp-chat/src/codec.rs @@ -3,8 +3,8 @@ use std::io; use actix::prelude::*; use actix_codec::{Decoder, Encoder}; +use actix_web::web::{BufMut, BytesMut}; use byteorder::{BigEndian, ByteOrder}; -use bytes::{BufMut, BytesMut}; use serde::{Deserialize, Serialize}; use serde_json as json; diff --git a/websockets/tcp-chat/src/main.rs b/websockets/tcp-chat/src/main.rs index 542f886..2a36bb9 100644 --- a/websockets/tcp-chat/src/main.rs +++ b/websockets/tcp-chat/src/main.rs @@ -2,7 +2,7 @@ use std::time::{Duration, Instant}; use actix::*; use actix_files as fs; -use actix_web::{web, App, Error, HttpRequest, HttpResponse, HttpServer}; +use actix_web::{http::header, web, App, Error, HttpRequest, HttpResponse, HttpServer}; use actix_web_actors::ws; mod codec; @@ -221,7 +221,7 @@ impl WsChatSession { #[actix_web::main] async fn main() -> std::io::Result<()> { - env_logger::init(); + env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); // Start chat server actor let server = server::ChatServer::default().start(); @@ -230,16 +230,15 @@ async fn main() -> std::io::Result<()> { let srv = server.clone(); session::tcp_server("127.0.0.1:12345", srv); - println!("Started http server: 127.0.0.1:8080"); + log::info!("starting HTTP+WebSocket server at http://localhost:8080"); - // Create Http server with websocket support HttpServer::new(move || { App::new() - .data(server.clone()) + .app_data(web::Data::new(server.clone())) // redirect to websocket.html - .service(web::resource("/").route(web::get().to(|| { + .service(web::resource("/").route(web::get().to(|| async { HttpResponse::Found() - .header("LOCATION", "/static/websocket.html") + .insert_header((header::LOCATION, "/static/websocket.html")) .finish() }))) // websocket @@ -247,7 +246,8 @@ async fn main() -> std::io::Result<()> { // static resources .service(fs::Files::new("/static/", "static/")) }) - .bind("127.0.0.1:8080")? + .bind(("127.0.0.1", 8080))? + .workers(1) .run() .await } diff --git a/websockets/tcp-chat/src/session.rs b/websockets/tcp-chat/src/session.rs index 4ddcf05..687548e 100644 --- a/websockets/tcp-chat/src/session.rs +++ b/websockets/tcp-chat/src/session.rs @@ -1,18 +1,23 @@ //! `ClientSession` is an actor, it manages peer tcp connection and //! proxies commands from peer to `ChatServer`. -use std::str::FromStr; -use std::time::{Duration, Instant}; -use std::{io, net}; -use futures::StreamExt; -use tokio::io::{split, WriteHalf}; -use tokio::net::{TcpListener, TcpStream}; +use std::{ + io, net, + str::FromStr, + time::{Duration, Instant}, +}; + +use actix::{prelude::*, spawn}; +use tokio::{ + io::{split, WriteHalf}, + net::{TcpListener, TcpStream}, +}; use tokio_util::codec::FramedRead; -use actix::prelude::*; - -use crate::codec::{ChatCodec, ChatRequest, ChatResponse}; -use crate::server::{self, ChatServer}; +use crate::{ + codec::{ChatCodec, ChatRequest, ChatResponse}, + server::{self, ChatServer}, +}; /// Chat server sends this messages to session #[derive(Message)] @@ -170,32 +175,22 @@ impl ChatSession { } } -/// Define tcp server that will accept incoming tcp connection and create +/// Define TCP server that will accept incoming TCP connection and create /// chat actors. pub fn tcp_server(_s: &str, server: Addr) { // Create server listener let addr = net::SocketAddr::from_str("127.0.0.1:12345").unwrap(); - actix_web::rt::spawn(async move { - let server = server.clone(); - let mut listener = TcpListener::bind(&addr).await.unwrap(); - let mut incoming = listener.incoming(); + spawn(async move { + let listener = TcpListener::bind(&addr).await.unwrap(); - while let Some(stream) = incoming.next().await { - match stream { - Ok(stream) => { - let server = server.clone(); - ChatSession::create(|ctx| { - let (r, w) = split(stream); - ChatSession::add_stream(FramedRead::new(r, ChatCodec), ctx); - ChatSession::new( - server, - actix::io::FramedWrite::new(w, ChatCodec, ctx), - ) - }); - } - Err(_) => return, - } + while let Ok((stream, _)) = listener.accept().await { + let server = server.clone(); + ChatSession::create(|ctx| { + let (r, w) = split(stream); + ChatSession::add_stream(FramedRead::new(r, ChatCodec), ctx); + ChatSession::new(server, actix::io::FramedWrite::new(w, ChatCodec, ctx)) + }); } }); }