diff --git a/.gitignore b/.gitignore index 07827cc..e5d1887 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.DS_Store target/ -.idea/ \ No newline at end of file +.idea/ diff --git a/Cargo.lock b/Cargo.lock index a8594ac..ffe87a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - [[package]] name = "ansi_term" version = "0.12.1" @@ -45,10 +39,10 @@ dependencies = [ ] [[package]] -name = "bitflags" -version = "0.9.1" +name = "base64" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "bitflags" @@ -56,6 +50,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bumpalo" +version = "3.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" + [[package]] name = "byteorder" version = "1.4.3" @@ -72,6 +72,12 @@ dependencies = [ "iovec", ] +[[package]] +name = "bytes" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" + [[package]] name = "cc" version = "1.0.73" @@ -98,7 +104,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags 1.3.2", + "bitflags", "strsim", "textwrap", "unicode-width", @@ -111,7 +117,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] @@ -120,14 +126,13 @@ version = "0.2.0" dependencies = [ "clap", "colored", - "hyper", + "hyper 0.11.27", "nom", "reqwest", "rpassword", "serde", "serde_derive", "serde_json", - "url", ] [[package]] @@ -137,15 +142,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" dependencies = [ "atty", - "lazy_static 1.4.0", + "lazy_static", "winapi 0.3.9", ] [[package]] name = "core-foundation" -version = "0.2.3" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -153,21 +158,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065a5d7ffdcbc8fa145d6f0746f3555025b9097a9e9cda59f7467abae670c78d" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "crossbeam-deque" @@ -189,7 +182,7 @@ dependencies = [ "autocfg", "cfg-if 0.1.10", "crossbeam-utils", - "lazy_static 1.4.0", + "lazy_static", "maybe-uninit", "memoffset", "scopeguard", @@ -214,15 +207,9 @@ checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ "autocfg", "cfg-if 0.1.10", - "lazy_static 1.4.0", + "lazy_static", ] -[[package]] -name = "dtoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" - [[package]] name = "encoding_rs" version = "0.8.31" @@ -232,6 +219,15 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "fnv" version = "1.0.7" @@ -253,6 +249,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding 2.2.0", +] + [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -265,7 +270,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" dependencies = [ - "bitflags 1.3.2", + "bitflags", "fuchsia-zircon-sys", ] @@ -281,6 +286,21 @@ version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" + [[package]] name = "futures-cpupool" version = "0.1.8" @@ -291,6 +311,64 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-sink" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" + +[[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-core", + "futures-io", + "futures-task", + "memchr 2.5.0", + "pin-project-lite", + "pin-utils", + "slab 0.4.7", +] + +[[package]] +name = "h2" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +dependencies = [ + "bytes 1.2.1", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab 0.4.7", + "tokio 1.21.2", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -300,11 +378,39 @@ dependencies = [ "libc", ] +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes 1.2.1", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes 1.2.1", + "http", + "pin-project-lite", +] + [[package]] name = "httparse" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" @@ -312,8 +418,8 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34a590ca09d341e94cddf8e5af0bbccde205d5fbc2fa3c09dd67c7f85cea59d7" dependencies = [ - "base64", - "bytes", + "base64 0.9.3", + "bytes 0.4.12", "futures", "futures-cpupool", "httparse", @@ -322,7 +428,7 @@ dependencies = [ "log 0.4.17", "mime", "net2", - "percent-encoding", + "percent-encoding 1.0.1", "relay", "time", "tokio-core", @@ -330,35 +436,75 @@ dependencies = [ "tokio-proto", "tokio-service", "unicase", - "want", + "want 0.0.4", +] + +[[package]] +name = "hyper" +version = "0.14.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +dependencies = [ + "bytes 1.2.1", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio 1.21.2", + "tower-service", + "tracing", + "want 0.3.0", ] [[package]] name = "hyper-tls" -version = "0.1.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1bd5e518d3065840ab315dbbf44e4420e5f7d80e2cb93fa6ffffc50522378" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "futures", - "hyper", + "bytes 1.2.1", + "hyper 0.14.23", "native-tls", - "tokio-core", - "tokio-io", - "tokio-service", - "tokio-tls", + "tokio 1.21.2", + "tokio-native-tls", ] [[package]] name = "idna" -version = "0.1.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] +[[package]] +name = "indexmap" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "instant" +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" @@ -369,16 +515,25 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "0.4.8" +name = "ipnet" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" [[package]] name = "itoa" -version = "1.0.2" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" + +[[package]] +name = "js-sys" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] [[package]] name = "kernel32-sys" @@ -396,12 +551,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -[[package]] -name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" - [[package]] name = "lazy_static" version = "1.4.0" @@ -410,21 +559,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.126" +version = "0.2.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" - -[[package]] -name = "libflate" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9135df43b1f5d0e333385cb6e7897ecd1a43d7d11b91ac003f4d2c2d2401fdd" -dependencies = [ - "adler32", - "crc32fast", - "rle-decode-fast", - "take_mut", -] +checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" [[package]] name = "lock_api" @@ -453,12 +590,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "maybe-uninit" version = "2.0.0" @@ -474,6 +605,12 @@ dependencies = [ "libc", ] +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + [[package]] name = "memoffset" version = "0.5.6" @@ -514,10 +651,22 @@ dependencies = [ "log 0.4.17", "miow", "net2", - "slab 0.4.6", + "slab 0.4.7", "winapi 0.2.8", ] +[[package]] +name = "mio" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +dependencies = [ + "libc", + "log 0.4.17", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.42.0", +] + [[package]] name = "mio-uds" version = "0.6.8" @@ -526,7 +675,7 @@ checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ "iovec", "libc", - "mio", + "mio 0.6.23", ] [[package]] @@ -543,17 +692,20 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.1.5" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ - "lazy_static 0.2.11", + "lazy_static", "libc", + "log 0.4.17", "openssl", + "openssl-probe", + "openssl-sys", "schannel", "security-framework", "security-framework-sys", - "tempdir", + "tempfile", ] [[package]] @@ -573,7 +725,7 @@ version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" dependencies = [ - "memchr", + "memchr 1.0.2", ] [[package]] @@ -586,24 +738,49 @@ dependencies = [ "libc", ] +[[package]] +name = "once_cell" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" + [[package]] name = "openssl" -version = "0.9.24" +version = "0.10.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985" +checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" dependencies = [ - "bitflags 0.9.1", + "bitflags", + "cfg-if 1.0.0", "foreign-types", - "lazy_static 1.4.0", "libc", + "once_cell", + "openssl-macros", "openssl-sys", ] +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + [[package]] name = "openssl-sys" -version = "0.9.74" +version = "0.9.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" +checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a" dependencies = [ "autocfg", "cc", @@ -632,7 +809,7 @@ dependencies = [ "cfg-if 0.1.10", "cloudabi", "libc", - "redox_syscall", + "redox_syscall 0.1.57", "rustc_version", "smallvec 0.6.14", "winapi 0.3.9", @@ -644,26 +821,44 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "proc-macro2" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" +checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] @@ -721,6 +916,15 @@ version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + [[package]] name = "relay" version = "0.1.1" @@ -741,35 +945,42 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.8.8" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "738769ec83daf6c1929dc9dae7d69ed3779b55ae5c356e989dcd3aa677d8486e" +checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" dependencies = [ - "bytes", + "base64 0.13.1", + "bytes 1.2.1", "encoding_rs", - "futures", - "hyper", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper 0.14.23", "hyper-tls", - "libflate", + "ipnet", + "js-sys", "log 0.4.17", + "mime", "mime_guess", "native-tls", + "once_cell", + "percent-encoding 2.2.0", + "pin-project-lite", "serde", "serde_json", "serde_urlencoded", - "tokio-core", - "tokio-io", - "tokio-tls", + "tokio 1.21.2", + "tokio-native-tls", + "tower-service", "url", - "uuid", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", ] -[[package]] -name = "rle-decode-fast" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" - [[package]] name = "rpassword" version = "2.1.0" @@ -792,9 +1003,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "safemem" @@ -808,8 +1019,8 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ - "lazy_static 1.4.0", - "windows-sys", + "lazy_static", + "windows-sys 0.36.1", ] [[package]] @@ -826,10 +1037,11 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "0.1.16" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa44ee9c54ce5eecc9de7d5acbad112ee58755239381f687e564004ba4a2332" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -838,9 +1050,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "0.1.16" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5421621e836278a0b139268f36eee0dc7e389b784dc3f79d8f11aabadf41bead" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -863,15 +1075,15 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", @@ -880,25 +1092,25 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.81" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" dependencies = [ - "itoa 1.0.2", + "itoa", "ryu", "serde", ] [[package]] name = "serde_urlencoded" -version = "0.5.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "dtoa", - "itoa 0.4.8", + "form_urlencoded", + "itoa", + "ryu", "serde", - "url", ] [[package]] @@ -909,9 +1121,12 @@ checksum = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" [[package]] name = "slab" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" @@ -928,6 +1143,16 @@ dependencies = [ "maybe-uninit", ] +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "strsim" version = "0.8.0" @@ -936,9 +1161,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "syn" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" +checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" dependencies = [ "proc-macro2", "quote", @@ -952,19 +1177,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" [[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - -[[package]] -name = "tempdir" -version = "0.3.7" +name = "tempfile" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "rand 0.4.6", + "cfg-if 1.0.0", + "fastrand", + "libc", + "redox_syscall 0.2.16", "remove_dir_all", + "winapi 0.3.9", ] [[package]] @@ -983,7 +1206,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", - "wasi", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] @@ -1008,9 +1231,9 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" dependencies = [ - "bytes", + "bytes 0.4.12", "futures", - "mio", + "mio 0.6.23", "num_cpus", "tokio-codec", "tokio-current-thread", @@ -1026,13 +1249,30 @@ dependencies = [ "tokio-uds", ] +[[package]] +name = "tokio" +version = "1.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +dependencies = [ + "autocfg", + "bytes 1.2.1", + "libc", + "memchr 2.5.0", + "mio 0.8.5", + "num_cpus", + "pin-project-lite", + "socket2", + "winapi 0.3.9", +] + [[package]] name = "tokio-codec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" dependencies = [ - "bytes", + "bytes 0.4.12", "futures", "tokio-io", ] @@ -1043,13 +1283,13 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87b1395334443abca552f63d4f61d0486f12377c2ba8b368e523f89e828cffd4" dependencies = [ - "bytes", + "bytes 0.4.12", "futures", "iovec", "log 0.4.17", - "mio", + "mio 0.6.23", "scoped-tls", - "tokio", + "tokio 0.1.22", "tokio-executor", "tokio-io", "tokio-reactor", @@ -1093,11 +1333,21 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" dependencies = [ - "bytes", + "bytes 0.4.12", "futures", "log 0.4.17", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio 1.21.2", +] + [[package]] name = "tokio-proto" version = "0.1.1" @@ -1124,12 +1374,12 @@ checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" dependencies = [ "crossbeam-utils", "futures", - "lazy_static 1.4.0", + "lazy_static", "log 0.4.17", - "mio", + "mio 0.6.23", "num_cpus", "parking_lot", - "slab 0.4.6", + "slab 0.4.7", "tokio-executor", "tokio-io", "tokio-sync", @@ -1160,10 +1410,10 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" dependencies = [ - "bytes", + "bytes 0.4.12", "futures", "iovec", - "mio", + "mio 0.6.23", "tokio-io", "tokio-reactor", ] @@ -1178,10 +1428,10 @@ dependencies = [ "crossbeam-queue", "crossbeam-utils", "futures", - "lazy_static 1.4.0", + "lazy_static", "log 0.4.17", "num_cpus", - "slab 0.4.6", + "slab 0.4.7", "tokio-executor", ] @@ -1193,32 +1443,20 @@ checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" dependencies = [ "crossbeam-utils", "futures", - "slab 0.4.6", + "slab 0.4.7", "tokio-executor", ] -[[package]] -name = "tokio-tls" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772f4b04e560117fe3b0a53e490c16ddc8ba6ec437015d91fa385564996ed913" -dependencies = [ - "futures", - "native-tls", - "tokio-core", - "tokio-io", -] - [[package]] name = "tokio-udp" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" dependencies = [ - "bytes", + "bytes 0.4.12", "futures", "log 0.4.17", - "mio", + "mio 0.6.23", "tokio-codec", "tokio-io", "tokio-reactor", @@ -1230,24 +1468,70 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" dependencies = [ - "bytes", + "bytes 0.4.12", "futures", "iovec", "libc", "log 0.4.17", - "mio", + "mio 0.6.23", "mio-uds", "tokio-codec", "tokio-io", "tokio-reactor", ] +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes 1.2.1", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio 1.21.2", + "tracing", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if 1.0.0", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +dependencies = [ + "once_cell", +] + [[package]] name = "try-lock" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2" +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + [[package]] name = "unicase" version = "2.6.0" @@ -1265,44 +1549,34 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" +checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "url" -version = "1.7.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ + "form_urlencoded", "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "uuid" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1436e58182935dcd9ce0add9ea0b558e8a87befe01c1a301e6020aeb0876363" -dependencies = [ - "cfg-if 0.1.10", - "rand 0.4.6", + "percent-encoding 2.2.0", ] [[package]] @@ -1331,7 +1605,17 @@ checksum = "a05d9d966753fa4b5c8db73fcab5eed4549cfe0e1e4e66911e5564a0085c35d1" dependencies = [ "futures", "log 0.4.17", - "try-lock", + "try-lock 0.1.0", +] + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log 0.4.17", + "try-lock 0.2.3", ] [[package]] @@ -1340,6 +1624,88 @@ version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log 0.4.17", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "winapi" version = "0.2.8" @@ -1380,43 +1746,109 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + [[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + [[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + +[[package]] +name = "winreg" +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" diff --git a/Cargo.toml b/Cargo.toml index 13ec5d3..f6612a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "codedx-client" -version = "0.2.0" -authors = ["Dylan Halperin "] +version = "0.3.0" +authors = ["Dylan Halperin "] +edition = "2021" [dependencies] clap = "2.26.2" colored = "1.5.3" hyper = "0.11" -url = "1.5.1" serde = "1.0" serde_json = "1.0" serde_derive = "1.0" -reqwest = "0.8" +reqwest = { version = "0.11", features = ["blocking", "json", "multipart", "native-tls"] } rpassword = "2.0.0" [dependencies.nom] diff --git a/src/client.rs b/src/client.rs index 6bd0bbd..f9098f9 100644 --- a/src/client.rs +++ b/src/client.rs @@ -14,17 +14,16 @@ * limitations under the License. */ -use branching::*; -use config::ClientConfig; -use hyper::{Method, StatusCode}; +use crate::branching::*; +use crate::config::ClientConfig; use reqwest; +use::reqwest::Method; use serde::de::DeserializeOwned; use serde::ser::Serialize; use serde_json; use std; use std::collections::HashMap; use std::fmt::Debug; -use std::io::Read; use std::path::Path; use std::thread; use std::time::Duration; @@ -140,7 +139,7 @@ pub enum ApiError { /// Additionally holds the error response, which will be an `ApiErrorMessage::Nice` /// for most expected error cases, but may sometimes be an `ApiErrorMessage::Raw`, /// typically for 5xx internal error responses. - NonSuccess(StatusCode, ApiErrorMessage), + NonSuccess(reqwest::StatusCode, ApiErrorMessage), /// Covers some I/O error cases like when the server's response body couldn't be read to a String, /// and when a file couldn't be added to a multipart form body. @@ -163,9 +162,8 @@ pub enum ApiErrorMessage { Raw(String) } impl ApiErrorMessage { - fn from_body(response: &mut reqwest::Response) -> Result { - let mut body = String::new(); - response.read_to_string(&mut body).map_err(ApiError::from).and_then(|_|{ + fn from_body(response: reqwest::blocking::Response) -> Result { + response.text().map_err(ApiError::from).and_then(|body|{ serde_json::from_str::(&body) .map(|err_body| ApiErrorMessage::Nice(err_body.error)) .or_else(|_| Ok(ApiErrorMessage::Raw(body))) @@ -214,30 +212,31 @@ pub type ApiResult = Result; /// .expect_success() /// .expect_json(); /// ``` -pub struct ApiResponse(ApiResult); +pub struct ApiResponse(ApiResult); impl ApiResponse { - pub fn from(r: ApiResult) -> ApiResponse { + pub fn from(r: ApiResult) -> ApiResponse { ApiResponse(r) } - pub fn get(self) -> ApiResult { + pub fn get(self) -> ApiResult { self.0 } pub fn expect_success(self) -> ApiResponse { - ApiResponse(self.0.and_then(move |mut response| { - if response.status().is_success() { + ApiResponse(self.0.and_then(move |response| { + let status = response.status(); + if status.is_success() { Ok(response) } else { - ApiErrorMessage::from_body(&mut response).and_then(|response_msg| { - Err(ApiError::NonSuccess(response.status(), response_msg)) + ApiErrorMessage::from_body(response).and_then(|response_msg| { + Err(ApiError::NonSuccess(status, response_msg)) }) } })) } pub fn expect_json(self) -> ApiResult { - self.0.and_then(|mut response| { + self.0.and_then(|response| { response.json().map_err(ApiError::from) }) } @@ -246,16 +245,18 @@ impl ApiResponse { /// Main entry point for interacting with the Code Dx REST API. pub struct ApiClient { config: Box, - client: reqwest::Client + client: reqwest::blocking::Client } impl ApiClient { pub fn new(config: Box) -> ApiClient { - let mut client_builder = reqwest::Client::builder(); - // the --insecure CLI flag enables this, to disable the CN name check - if config.allows_insecure() { - client_builder.danger_disable_hostname_verification(); - } + let client_builder = reqwest::blocking::Client::builder(); + // the --insecure CLI flag enables this, to disable TLS hostname verification + let client_builder = if config.allows_insecure() { + client_builder.danger_accept_invalid_hostnames(true) + } else { + client_builder + }; let client = client_builder.build().unwrap(); ApiClient { config, client } } @@ -344,7 +345,7 @@ impl ApiClient { let form = files .iter() .enumerate() - .fold(Ok(reqwest::multipart::Form::new()), move |maybe_form, (index, file)| { + .fold(Ok(reqwest::blocking::multipart::Form::new()), move |maybe_form, (index, file)| { maybe_form.and_then(|mut form| { if !branch_name_string.is_empty() { form = form.text("branchName", branch_name_string.clone()) @@ -368,7 +369,7 @@ impl ApiClient { let form = files .iter() .enumerate() - .fold(Ok(reqwest::multipart::Form::new()), |maybe_form, (index, file)| { + .fold(Ok(reqwest::blocking::multipart::Form::new()), |maybe_form, (index, file)| { maybe_form.and_then(|mut form| { if !branch_name_string.is_empty() { form = form.text("branchName", branch_name_string.clone()) @@ -397,44 +398,43 @@ impl ApiClient { } pub fn api_get(&self, path_segments: &[&str]) -> ApiResponse { - self.api_request(Method::Get, path_segments, ReqBody::None) + self.api_request(Method::GET, path_segments, ReqBody::None) } pub fn api_post(&self, path_segments: &[&str], body: B) -> ApiResponse where B: Into { - self.api_request(Method::Post, path_segments, body) + self.api_request(Method::POST, path_segments, body) } pub fn api_put(&self, path_segments: &[&str], body: B) -> ApiResponse where B: Into { - self.api_request(Method::Put, path_segments, body) + self.api_request(Method::PUT, path_segments, body) } pub fn api_request(&self, method: Method, path_segments: &[&str], body: B) -> ApiResponse where B: Into { let url = self.config.api_url(path_segments); - let mut request_builder = self.client.request(method, url); - self.config.apply_auth(&mut request_builder); + let request_builder = self.client.request(method, url); + let configured_rb = self.config.apply_auth(request_builder); match body.into() { ReqBody::Json(ref json) => { - request_builder.json(json); + ApiResponse::from(configured_rb.json(json).send().map_err(ApiError::from)) }, ReqBody::Form(form) => { - request_builder.multipart(form); - } - ReqBody::None => (), - }; - ApiResponse::from(request_builder.send().map_err(ApiError::from)) + ApiResponse::from(configured_rb.multipart(form).send().map_err(ApiError::from)) + }, + ReqBody::None => ApiResponse::from(configured_rb.send().map_err(ApiError::from)) + } } } /// Collection of types that `ApiClient` knows how to use as a request body. pub enum ReqBody { /// A multipart form, typically used for file uploads. - Form(reqwest::multipart::Form), + Form(reqwest::blocking::multipart::Form), /// A JSON object as the body Json(serde_json::Value), /// No body @@ -451,8 +451,8 @@ impl From for ReqBody { ReqBody::Json(json) } } -impl From for ReqBody { - fn from(form: reqwest::multipart::Form) -> ReqBody { +impl From for ReqBody { + fn from(form: reqwest::blocking::multipart::Form) -> ReqBody { ReqBody::Form(form) } } \ No newline at end of file diff --git a/src/commands.rs b/src/commands.rs index 517ea8a..fe7b8e8 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -14,9 +14,9 @@ * limitations under the License. */ -use branching::*; +use crate::branching::*; use clap::{ArgMatches, App, Arg, SubCommand}; -use client::*; +use crate::client::*; use serde_json; use std::collections::HashMap; use std::path::Path; diff --git a/src/config.rs b/src/config.rs index fd54c86..4fd0997 100644 --- a/src/config.rs +++ b/src/config.rs @@ -16,12 +16,11 @@ extern crate clap; extern crate reqwest; -extern crate url; use clap::{Arg, ArgMatches, App}; -use reqwest::{RequestBuilder}; +use reqwest::blocking::{RequestBuilder}; +use reqwest::Url; use rpassword; -use url::Url; /// Connection information for Code Dx. #[derive(Debug)] @@ -44,15 +43,15 @@ pub enum ClientAuth { } impl ClientAuth { - fn apply_to(&self, request_builder: &mut RequestBuilder) { + fn apply_to(&self, request_builder: RequestBuilder) -> RequestBuilder { match *self { ClientAuth::Basic { ref username, ref password } => { let u: String = username.to_owned(); let p: String = password.to_owned(); - request_builder.basic_auth(u, Some(p)); + request_builder.basic_auth(u, Some(p)) }, ClientAuth::ApiKey(ref key) => { - request_builder.header(ApiKey(key.to_string())); + request_builder.header("API-Key", key.to_string()) } } } @@ -103,7 +102,16 @@ pub fn get_base_app<'a, 'b>() -> App<'a, 'b> { .arg(Arg::with_name("insecure") .long("insecure") .takes_value(false) - .help("Ignore https certificate hostname validation") + .help("Disables TLS certificate validation for HTTPS") + .long_help(concat!( + "This option allows HTTPS connections to succeed and operate\n", + "for servers that would otherwise fail TLS verification.\n", + "This includes certificates with mismatched names and\n", + "certificates with no established chain of trust.\n", + "\n", + "WARNING: this makes the connection insecure and vulnerable\n", + "to things such as man-in-the-middle attacks.", + )) ) .arg(Arg::with_name("no-prompt") .long("no-prompt") @@ -167,8 +175,8 @@ impl ClientConfig { }) } - pub fn apply_auth(&self, request_builder: &mut RequestBuilder) { - self.auth_info.apply_to(request_builder); + pub fn apply_auth(&self, request_builder: RequestBuilder) -> RequestBuilder { + self.auth_info.apply_to(request_builder) } pub fn api_url(&self, segments: &[&str]) -> Url { diff --git a/src/main.rs b/src/main.rs index 00dbaf5..f9c4f68 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,6 @@ extern crate reqwest; extern crate rpassword; extern crate serde; -extern crate url; #[macro_use] extern crate clap; #[macro_use] extern crate hyper; @@ -35,9 +34,9 @@ use clap::{ArgMatches, App, AppSettings}; use std::io; use std::io::Write; -use config::*; -use client::*; -use repl::CmdArgs; +use crate::config::*; +use crate::client::*; +use crate::repl::CmdArgs; fn main(){ let app = {